Fix PFL channel custom outputs.

This commit is contained in:
Matthew Stratford 2021-01-28 19:44:17 +00:00
parent 721fb632e2
commit db7275bb12

View file

@ -188,6 +188,8 @@ class Player extends ((PlayerEmitter as unknown) as { new (): EventEmitter }) {
}
_connectPFL() {
// We check the existence of the analyser here, because if we're using a custom output, this won't exist.
if ((this.wavesurfer as any).backend.analyser) {
if (this.pfl) {
// In this case, we just want to route the player output to the headphones direct.
// Tap it from analyser to avoid the player volume.
@ -204,6 +206,7 @@ class Player extends ((PlayerEmitter as unknown) as { new (): EventEmitter }) {
}
}
}
}
public static create(
engine: AudioEngine,