From: <sb...@us...> - 2007-09-10 17:52:47
|
Revision: 1117 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1117&view=rev Author: sbalea Date: 2007-09-10 10:52:49 -0700 (Mon, 10 Sep 2007) Log Message: ----------- Fix db calculation for sound levels to return -99.9 when there's no audio Modified Paths: -------------- trunk/lib/audio_encode.c Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-09-05 23:31:26 UTC (rev 1116) +++ trunk/lib/audio_encode.c 2007-09-10 17:52:49 UTC (rev 1117) @@ -58,7 +58,7 @@ /* avoid calling log10() on zero which yields inf or * negative numbers which yield nan */ if ( vol <= 0.0 ) - return 0.0; + return -99.9; else return log10f(vol) * 20; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |