mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-14 22:50:26 +02:00
add system audio loopback for webaudio
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import type { WebAudio } from '/@/shared/types/types';
|
||||
|
||||
import { PlayerType } from '/@/shared/types/types';
|
||||
|
||||
export function getVisualizerAudioNodes(
|
||||
webAudio: undefined | WebAudio,
|
||||
playbackType: PlayerType,
|
||||
): AudioNode[] {
|
||||
if (!webAudio) return [];
|
||||
if (playbackType === PlayerType.LOCAL) {
|
||||
return webAudio.visualizerInputs ?? [];
|
||||
}
|
||||
return webAudio.gains;
|
||||
}
|
||||
Reference in New Issue
Block a user