Closed Bug 639587 Opened 9 years ago Closed 7 years ago
Audio Stream U8 sound format conversion incorrect
Found while working on bug 635649. The code to covert from U8 sound samples to S16 format is incorrect. Existing code is: s_data[i + offset] = short(((PRInt32(buf[i]) - 128) * volume) >> 8); For a U8 value of 255 this gives a result of 32512. It should give 32767. Matthew Gregan suggested fixing it as part of the audio backend refactoring.
FORMAT_U8 conversion was removed from nsAudioStream in bug 775319.
You need to log in before you can comment on or make changes to this bug.