mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 821495 - Add cast to silence unnecessary data loss compile warning in AudioSampleFormat.h. r=kinetik
This commit is contained in:
parent
6933f20fbc
commit
2e5f28125f
@ -143,7 +143,7 @@ ScaleAudioSamples(float* aBuffer, int aCount, float 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user