Bug 308283
| Summary: | [GStreamer][WebAudio] Fix garbage sound | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Xabier Rodríguez Calvar <calvaris> |
| Component: | New Bugs | Assignee: | Xabier Rodríguez Calvar <calvaris> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Xabier Rodríguez Calvar
When playing:
function playTone() {
window.audioCtx = new AudioContext();
// Create oscillator
const osc = window.audioCtx.createOscillator();
osc.type = 'sine';
osc.frequency.value = 440; // A4 note
// Create destination stream node
const dest = window.audioCtx.createMediaStreamDestination();
osc.connect(dest);
// Hook up to audio element
const audioElem = document.getElementById('audio_source');
audioElem.srcObject = dest.stream;
var selected = document.querySelector('input[name="sink"]:checked');
setSink(audioElem, selected.value);
// Start and stop beep
osc.start();
audioElem.play();
setTimeout(() => osc.stop(), 1000); // 1 sec beep
}
We hear garbage.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Xabier Rodríguez Calvar
Pull request: https://github.com/WebKit/WebKit/pull/59075
EWS
Committed 308038@main (cc0a043f95a8): <https://commits.webkit.org/308038@main>
Reviewed commits have been landed. Closing PR #59075 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/170975582>