Closed
Bug 1219164
Opened 10 years ago
Closed 9 years ago
Replace audio silence data with the same value as the last audio data to make sound better.
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: bwu, Unassigned)
Details
For some cases[1][2], like audio underrun, we need to insert silence data. I think we should insert the same value as the previous audio data instead of silence data(0) since silence data may cause unpleasant noise due to discontinuous data. Maybe we should use the value of last audio data.
[1]https://dxr.mozilla.org/mozilla-central/source/dom/media/mediasink/DecodedAudioDataSink.cpp?from=DecodedAudioDataSink.cpp#421
[2]https://dxr.mozilla.org/mozilla-central/source/dom/media/AudioStream.cpp?case=true&from=AudioStream.cpp#744
Comment 1•10 years ago
|
||
In effect you would be producing a square wave; which are often very damaging for the membrane of a speaker
| Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #1)
> In effect you would be producing a square wave; which are often very
> damaging for the membrane of a speaker
How about a triangle wave?
Comment 3•10 years ago
|
||
We might need polynomial interpolation to produce a smooth curve for the lost samples (or linear interpolation is good enough). However, given the real time traits of audio, I wonder if it is possible to do it in a real time fashion.
Comment 4•10 years ago
|
||
MSE has some algorithm mentioned on how to make audio transition (not sure how good those are seeing how bad the webaudio processing algorithm are sometimes)
http://w3c.github.io/media-source/index.html#sourcebuffer-audio-splice-frame-algorithm
having said that those are two make transitions between two streams ; it doesn't account for having a gap between the two ; e.g. they are supposed to overlap.
Inserting 0 is I'm afraid the safest / easiest way to manage audio underruns (it's a problem I attempted solving on another project of mine)
Updated•10 years ago
|
Priority: -- → P2
Comment 5•9 years ago
|
||
It looks like we won't fix it.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•