Another round of tweaks for spandsp. There should be no functional changes,

although quite a few things have changed in the test suite
This commit is contained in:
Steve Underwood
2011-07-02 21:16:52 +08:00
parent d30e82e226
commit 4a7bbf4ec6
77 changed files with 966 additions and 357 deletions
+1 -4
View File
@@ -322,10 +322,7 @@ int qam_monitor_update_audio_level(qam_monitor_t *s, const int16_t amp[], int le
s->audio_meter->sample(amp[i]/32768.0);
s->power_reading += ((amp[i]*amp[i] - s->power_reading) >> 10);
}
if (s->power_reading <= 0)
val = -90.0;
else
val = log10((double) s->power_reading/(32767.0f*32767.0f))*10.0f + 3.14 + 3.02;
val = 10.0*log10((double) s->power_reading/(32767.0*32767.0) + 1.0e-10) + 3.14 + 3.02;
snprintf(buf, sizeof(buf), "%5.1fdBm0", val);
s->audio_level->value(buf);