Open
Bug 1514526
Opened 7 years ago
Updated 3 years ago
DynamicsCompressorNode doesn't seem to have a tail time
Categories
(Core :: Web Audio, defect, P3)
Tracking
()
NEW
People
(Reporter: chrisguttandin, Assigned: padenot)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Steps to reproduce:
I scheduled a very small (only a few samples) AudioBuffer with an AudioBufferSourceNode. I connected that ABSN to a DynamicsCompressorNode. I connected that DCN to the destination. I noticed that no signal ever reached the destination. That changed when I modified the AudioBuffer to have at least 257 samples. Given that observation I guess that a DynamicsCompressorNode is outputting silence once the input sends silence even though their is still some audio in the buffer.
Actual results:
The following code snippet does not log any values when executed in Firefox:
const oac = new OfflineAudioContext({ length: 500, sampleRate: 44100 });
const audioBuffer = new AudioBuffer({ length: 3, sampleRate: 44100 })
const audioBufferSourceNode = oac.createBufferSource();
const dynamicsCompressorNode = oac.createDynamicsCompressor();
audioBuffer.copyToChannel(new Float32Array([ 1, 1, 1 ]), 0)
audioBufferSourceNode.buffer = audioBuffer;
audioBufferSourceNode.start(0);
audioBufferSourceNode.connect(dynamicsCompressorNode).connect(oac.destination);
oac.startRendering()
.then((renderedBuffer) => {
const channelData = renderedBuffer.getChannelData(0);
for (let i = 0; i < channelData.length; i += 1) {
if (channelData[i] !== 0) {
console.log(i, channelData[i]);
}
}
});
Expected results:
It log three values in Chrome:
264 0.3056469261646271
265 0.30571678280830383
266 0.3057866394519806
Updated•7 years ago
|
Component: Untriaged → Web Audio
Product: Firefox → Core
Comment 1•7 years ago
|
||
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
| Assignee | ||
Comment 2•7 years ago
|
||
Additionally, we need a bit of code that feeds the underlying compressor code the right amount of channels, otherwise an assert blows up, and in release, silence is output.
| Assignee | ||
Comment 3•6 years ago
|
||
I remember finding the solution for this, it was something simple.
Assignee: nobody → padenot
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•