From fb6b1631e32720a196a97b5cfc63b7bc67a9a6eb Mon Sep 17 00:00:00 2001 From: "rtoy@google.com" Date: Thu, 14 Jun 2012 18:33:25 +0000 Subject: 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 --- media/audio/audio_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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; -- cgit v1.1