[Jahshaka-cvs] SF.net SVN: openlibraries:[1467] trunk/src/openmedialib/ml/utilities.cpp
Status: Beta
Brought to you by:
jahshaka
From: <tim...@us...> - 2009-04-18 18:28:38
|
Revision: 1467 http://openlibraries.svn.sourceforge.net/openlibraries/?rev=1467&view=rev Author: timdewhirst Date: 2009-04-18 18:28:35 +0000 (Sat, 18 Apr 2009) Log Message: ----------- OML * add debug in audio mixing code Modified Paths: -------------- trunk/src/openmedialib/ml/utilities.cpp Modified: trunk/src/openmedialib/ml/utilities.cpp =================================================================== --- trunk/src/openmedialib/ml/utilities.cpp 2009-04-08 11:32:47 UTC (rev 1466) +++ trunk/src/openmedialib/ml/utilities.cpp 2009-04-18 18:28:35 UTC (rev 1467) @@ -879,11 +879,19 @@ for(int ch = 0; ch < channels_out; ++ch) { + sum[ch] /= channels_in; + // clip channels appropriately if(sum[ch] < min_short) + { + WARNING_LOG << "signal too low"; clipped[ch] = min_short; + } else if(sum[ch] > max_short) + { + WARNING_LOG << "signal too high"; clipped[ch] = max_short; + } else clipped[ch] = sum[ch]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |