Closed
Bug 639587
Opened 14 years ago
Closed 13 years ago
nsAudioStream U8 sound format conversion incorrect
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
People
(Reporter: cajbir, Unassigned)
References
Details
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.
Comment 1•13 years ago
|
||
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.
Description
•