summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 18:33:25 +0000
committerrtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 18:33:25 +0000
commitfb6b1631e32720a196a97b5cfc63b7bc67a9a6eb (patch)
treec6bb1730afef1cde285ea555fa4faee7cdf2996d
parent1ee7452a92f951f0d3164879d5a6f8db385f820b (diff)
downloadchromium_src-fb6b1631e32720a196a97b5cfc63b7bc67a9a6eb.zip
chromium_src-fb6b1631e32720a196a97b5cfc63b7bc67a9a6eb.tar.gz
chromium_src-fb6b1631e32720a196a97b5cfc63b7bc67a9a6eb.tar.bz2
Fix sign inversion of 24-bit wav files.
On a 32-bit machine (1L << 31) is negative. BUG=132320 TEST=Covered in webkit bug 88794 Review URL: https://chromiumcodereview.appspot.com/10533118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142180 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/audio/audio_util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/audio/audio_util.cc b/media/audio/audio_util.cc
index 524b1e8..23aad0f 100644
--- a/media/audio/audio_util.cc
+++ b/media/audio/audio_util.cc
@@ -213,7 +213,7 @@ bool DeinterleaveAudioChannel(void* source,
case 4:
{
int32* source32 = reinterpret_cast<int32*>(source) + channel_index;
- const float kScale = 1.0f / (1L << 31);
+ const float kScale = 1.0f / 2147483648.0f;
for (unsigned i = 0; i < number_of_frames; ++i) {
destination[i] = kScale * *source32;
source32 += channels;