From 89ea295e8e19dac6601f5d4913d50f2657b5a1ed Mon Sep 17 00:00:00 2001 From: shatty Date: Sun, 25 Jan 2004 06:35:25 +0000 Subject: [PATCH] divide by 32000 to reduce volume git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6268 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/plugins/speex/speexCodecPlugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp b/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp index 52ecda9e63..53bd309602 100644 --- a/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp +++ b/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp @@ -328,6 +328,10 @@ SpeexDecoder::Decode(void *buffer, int64 *frameCount, if (fHeader->nb_channels == 2) { speex_decode_stereo((float*)out_buffer, fSpeexOutputLength, fStereoState); } + for (int i = 0 ; i < fSpeexOutputLength/fFrameSize ; i++) { + *((float*)out_buffer) /= 32000; + out_buffer += fFrameSize; + } out_buffer += fSpeexOutputLength; out_bytes_needed -= fSpeexOutputLength; }