web: Remove now unused `copyToAudioBuffer`

This commit is contained in:
TÖRÖK Attila 2024-07-18 04:09:07 +02:00 committed by Nathan Adams
parent 60bbbda990
commit c88d363263
1 changed files with 0 additions and 22 deletions

View File

@ -5,28 +5,6 @@
* @internal
*/
/**
* Copies data into the given audio channel.
* This is necessary because Safari does not support `AudioBuffer.copyToChannel`.
*
* @internal
*/
export function copyToAudioBuffer(
audioBuffer: AudioBuffer,
leftData: ArrayLike<number>,
rightData: ArrayLike<number>,
): void {
if (leftData) {
const dstBuffer = audioBuffer.getChannelData(0);
dstBuffer.set(leftData);
}
if (rightData) {
const dstBuffer = audioBuffer.getChannelData(1);
dstBuffer.set(rightData);
}
}
/**
* Returns the estimated output timestamp for the audio context.
* This is necessary because web-sys does not export `AudioContext.baseLatency`.