1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-11 16:18:10 +00:00

sound/TonePlayer: call toMaster on volumeNode if toDestination missing

This commit is contained in:
Sotiri Bakagiannis 2020-12-03 20:56:02 +00:00
parent c89d2ff91a
commit 72491aff3c

View File

@ -339,8 +339,14 @@ export class TonePlayer extends SoundPlayer
this._synth.connect(this._volumeNode);
// connect the volume node to the master output:
this._volumeNode.toDestination();
if (typeof this._volumeNode.toDestination === 'function')
{
this._volumeNode.toDestination();
}
else
{
this._volumeNode.toMaster();
}
}
else
{