web: Remove now unused `copyToAudioBuffer`
This commit is contained in:
parent
60bbbda990
commit
c88d363263
|
@ -5,28 +5,6 @@
|
||||||
* @internal
|
* @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.
|
* Returns the estimated output timestamp for the audio context.
|
||||||
* This is necessary because web-sys does not export `AudioContext.baseLatency`.
|
* This is necessary because web-sys does not export `AudioContext.baseLatency`.
|
||||||
|
|
Loading…
Reference in New Issue