Skip to content

Commit 2d9d865

Browse files
fix: keep channelCount of native AudioContext
1 parent 13ad452 commit 2d9d865

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/factories/audio-context-constructor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const createAudioContextConstructor: TAudioContextConstructorFactory = (
3939
);
4040
}
4141

42-
super(nativeAudioContext, 2);
42+
super(nativeAudioContext, nativeAudioContext.destination.channelCount);
4343

4444
this._nativeAudioContext = nativeAudioContext;
4545
this._state = null;

src/factories/minimal-audio-context-constructor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const createMinimalAudioContextConstructor: TMinimalAudioContextConstruct
2727
);
2828
}
2929

30-
super(nativeAudioContext, 2);
30+
super(nativeAudioContext, nativeAudioContext.destination.channelCount);
3131

3232
this._nativeAudioContext = nativeAudioContext;
3333
this._state = null;

0 commit comments

Comments
 (0)