mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
sound/TonePlayer: call toMaster on volumeNode if toDestination missing
This commit is contained in:
parent
c89d2ff91a
commit
72491aff3c
@ -339,8 +339,14 @@ export class TonePlayer extends SoundPlayer
|
|||||||
this._synth.connect(this._volumeNode);
|
this._synth.connect(this._volumeNode);
|
||||||
|
|
||||||
// connect the volume node to the master output:
|
// 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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user