Bug 821495 - Add cast to silence unnecessary data loss compile warning in AudioSampleFormat.h. r=kinetik
authorChris Pearce <cpearce@mozilla.com>
Fri, 14 Dec 2012 12:11:50 +1300
changeset 125103 fb6ef9590c392947d1c4e7a722269f81f0e1ae87
parent 125102 1c5601022840424fa192fc0c1bb29cd8ef980d0a
child 125104 4519670ac62dd7dcb97e7abc5af9e2146b3dac99
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs821495
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 821495 - Add cast to silence unnecessary data loss compile warning in AudioSampleFormat.h. r=kinetik
content/media/AudioSampleFormat.h
--- a/content/media/AudioSampleFormat.h
+++ b/content/media/AudioSampleFormat.h
@@ -138,17 +138,17 @@ ScaleAudioSamples(float* aBuffer, int aC
     aBuffer[i] *= aScale;
   }
 }
 
 
 inline void
 ScaleAudioSamples(short* aBuffer, int aCount, float aScale)
 {
-  int32_t volume = int32_t(1 << 16) * aScale;
+  int32_t volume = int32_t((1 << 16) * aScale);
   for (int32_t i = 0; i < aCount; ++i) {
     aBuffer[i] = short((int32_t(aBuffer[i]) * volume) >> 16);
   }
 }
 
 } // namespace mozilla
 
 #endif /* MOZILLA_AUDIOSAMPLEFORMAT_H_ */