mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
fix windows build issues from snapshot spandsp-20090131
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11602 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -190,31 +190,31 @@ static const int16_t sine_table[DDS_STEPS] =
|
||||
32767,
|
||||
};
|
||||
|
||||
int32_t dds_phase_rate(float frequency)
|
||||
SPAN_DECLARE(int32_t) dds_phase_rate(float frequency)
|
||||
{
|
||||
return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
float dds_frequency(int32_t phase_rate)
|
||||
SPAN_DECLARE(float) dds_frequency(int32_t phase_rate)
|
||||
{
|
||||
return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds_scaling_dbm0(float level)
|
||||
SPAN_DECLARE(int16_t) dds_scaling_dbm0(float level)
|
||||
{
|
||||
return (int16_t) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds_scaling_dbov(float level)
|
||||
SPAN_DECLARE(int16_t) dds_scaling_dbov(float level)
|
||||
{
|
||||
return (int16_t) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds_lookup(uint32_t phase)
|
||||
SPAN_DECLARE(int16_t) dds_lookup(uint32_t phase)
|
||||
{
|
||||
uint32_t step;
|
||||
int16_t amp;
|
||||
@@ -230,19 +230,19 @@ int16_t dds_lookup(uint32_t phase)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds_offset(uint32_t phase_acc, int32_t phase_offset)
|
||||
SPAN_DECLARE(int16_t) dds_offset(uint32_t phase_acc, int32_t phase_offset)
|
||||
{
|
||||
return dds_lookup(phase_acc + phase_offset);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void dds_advance(uint32_t *phase_acc, int32_t phase_rate)
|
||||
SPAN_DECLARE(void) dds_advance(uint32_t *phase_acc, int32_t phase_rate)
|
||||
{
|
||||
*phase_acc += phase_rate;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds(uint32_t *phase_acc, int32_t phase_rate)
|
||||
SPAN_DECLARE(int16_t) dds(uint32_t *phase_acc, int32_t phase_rate)
|
||||
{
|
||||
int16_t amp;
|
||||
|
||||
@@ -252,7 +252,7 @@ int16_t dds(uint32_t *phase_acc, int32_t phase_rate)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
SPAN_DECLARE(int16_t) dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
{
|
||||
int16_t amp;
|
||||
|
||||
@@ -262,13 +262,13 @@ int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi_t dds_lookup_complexi(uint32_t phase)
|
||||
SPAN_DECLARE(complexi_t) dds_lookup_complexi(uint32_t phase)
|
||||
{
|
||||
return complex_seti(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi_t dds_complexi(uint32_t *phase_acc, int32_t phase_rate)
|
||||
SPAN_DECLARE(complexi_t) dds_complexi(uint32_t *phase_acc, int32_t phase_rate)
|
||||
{
|
||||
complexi_t amp;
|
||||
|
||||
@@ -278,7 +278,7 @@ complexi_t dds_complexi(uint32_t *phase_acc, int32_t phase_rate)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
SPAN_DECLARE(complexi_t) dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
{
|
||||
complexi_t amp;
|
||||
|
||||
@@ -289,13 +289,13 @@ complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t sca
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi16_t dds_lookup_complexi16(uint32_t phase)
|
||||
SPAN_DECLARE(complexi16_t) dds_lookup_complexi16(uint32_t phase)
|
||||
{
|
||||
return complex_seti16(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi16_t dds_complexi16(uint32_t *phase_acc, int32_t phase_rate)
|
||||
SPAN_DECLARE(complexi16_t) dds_complexi16(uint32_t *phase_acc, int32_t phase_rate)
|
||||
{
|
||||
complexi16_t amp;
|
||||
|
||||
@@ -305,7 +305,7 @@ complexi16_t dds_complexi16(uint32_t *phase_acc, int32_t phase_rate)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
SPAN_DECLARE(complexi16_t) dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
{
|
||||
complexi16_t amp;
|
||||
|
||||
@@ -316,13 +316,13 @@ complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi32_t dds_lookup_complexi32(uint32_t phase)
|
||||
SPAN_DECLARE(complexi32_t) dds_lookup_complexi32(uint32_t phase)
|
||||
{
|
||||
return complex_seti32(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi32_t dds_complexi32(uint32_t *phase_acc, int32_t phase_rate)
|
||||
SPAN_DECLARE(complexi32_t) dds_complexi32(uint32_t *phase_acc, int32_t phase_rate)
|
||||
{
|
||||
complexi32_t amp;
|
||||
|
||||
@@ -332,7 +332,7 @@ complexi32_t dds_complexi32(uint32_t *phase_acc, int32_t phase_rate)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
SPAN_DECLARE(complexi32_t) dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
|
||||
{
|
||||
complexi32_t amp;
|
||||
|
||||
|
Reference in New Issue
Block a user