From b7461ff9c42c500ff6fba3bc9349cda767f90ed5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 7 Jun 2007 03:48:07 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@234 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/include/libteletone_generate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/openzap/src/include/libteletone_generate.h b/libs/openzap/src/include/libteletone_generate.h index 8a324216d0..5340f767cc 100644 --- a/libs/openzap/src/include/libteletone_generate.h +++ b/libs/openzap/src/include/libteletone_generate.h @@ -151,12 +151,12 @@ static __inline__ int16_t teletone_dds_modulate_sample(teletone_dds_state_t *dds return (int16_t) (sample * dds->scale_factor >> 15); } -static __inline__ void teletone_dds_state_set_tx_level(teletone_dds_state_t *dds, teletone_process_t tx_level) +static __inline__ void teletone_dds_state_set_tx_level(teletone_dds_state_t *dds, float tx_level) { dds->scale_factor = (int) (powf(10.0f, (tx_level - DBM0_MAX_POWER) / 20.0f) * (32767.0f * 1.414214f)); } -static __inline__ void teletone_dds_state_set_tone(teletone_dds_state_t *dds, teletone_process_t tone, uint32_t rate, teletone_process_t tx_level) +static __inline__ void teletone_dds_state_set_tone(teletone_dds_state_t *dds, teletone_process_t tone, uint32_t rate, float tx_level) { dds->phase_accumulator = 0; dds->phase_rate = (int32_t) ((tone * MAX_PHASE_ACCUMULATOR) / rate);