mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
Numerous little changes to spandsp that haven't been pushed to Freeswitch for a
while. The only big changes are a majorly rewritten V.42 and V.42bis which are now basically functional.
This commit is contained in:
@@ -122,7 +122,7 @@ SPAN_DECLARE(float) power_meter_current_dbm0(power_meter_t *s)
|
||||
if (s->reading <= 0)
|
||||
return -96.329f + DBM0_MAX_POWER;
|
||||
/* This is based on A-law, but u-law is only 0.03dB different, so don't worry. */
|
||||
return log10f((float) s->reading/(32767.0f*32767.0f))*10.0f + DBM0_MAX_POWER;
|
||||
return 10.0f*log10f((float) s->reading/(32767.0f*32767.0f) + 1.0e-10f) + DBM0_MAX_POWER;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
@@ -130,7 +130,7 @@ SPAN_DECLARE(float) power_meter_current_dbov(power_meter_t *s)
|
||||
{
|
||||
if (s->reading <= 0)
|
||||
return -96.329f;
|
||||
return log10f((float) s->reading/(32767.0f*32767.0f))*10.0f;
|
||||
return 10.0f*log10f((float) s->reading/(32767.0f*32767.0f) + 1.0e-10f);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
|
Reference in New Issue
Block a user