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