mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
testing
This commit is contained in:
parent
b27f8e45dc
commit
7aa217828b
@ -30,7 +30,11 @@ let audioContext;
|
||||
export const getAudioContext = () => {
|
||||
if (!audioContext) {
|
||||
audioContext = new AudioContext();
|
||||
var maxChannelCount = audioContext.destination.maxChannelCount;
|
||||
audioContext.destination.channelCount = maxChannelCount;
|
||||
}
|
||||
//console.log(audioContext.destination.maxChannelCount);
|
||||
|
||||
return audioContext;
|
||||
};
|
||||
|
||||
@ -39,7 +43,10 @@ const getDestination = () => {
|
||||
const ctx = getAudioContext();
|
||||
if (!destination) {
|
||||
destination = ctx.createGain();
|
||||
destination.connect(ctx.destination);
|
||||
var merger = ctx.createChannelMerger(ctx.destination.channelCount);
|
||||
merger.connect(ctx.destination);
|
||||
destination.connect(merger, 0, 4);
|
||||
destination.connect(merger, 0, 5);
|
||||
}
|
||||
return destination;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user