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

BF SoundPlayer.accept outputs false instead of undefined, which needed to be reflected in Sound.setValue

This commit is contained in:
Alain Pitiot 2022-09-22 10:26:20 +02:00
parent f8a2b10e88
commit e1ffc9550a
2 changed files with 4 additions and 3 deletions

View File

@ -171,6 +171,7 @@ export class PsychoJS
this.logger.info("[PsychoJS] Initialised.");
this.logger.info("[PsychoJS] @version 2022.2.4");
this.logger.info("[PsychoJS] @version 2022.2.4");
// hide the initialisation message:
const root = document.getElementById("root");

View File

@ -195,7 +195,7 @@ export class Sound extends PsychObject
}
let playerArgs = TonePlayer.accept(value, octave);
if (typeof playerArgs !== "undefined")
if (playerArgs)
{
if (this._player instanceof TonePlayer)
{
@ -209,7 +209,7 @@ export class Sound extends PsychObject
}
playerArgs = TrackPlayer.accept(this._psychoJS, value);
if (playerArgs !== false)
if (playerArgs)
{
if (this._player instanceof TrackPlayer)
{
@ -223,7 +223,7 @@ export class Sound extends PsychObject
}
playerArgs = AudioClipPlayer.accept(this._psychoJS, value);
if (typeof playerArgs !== "undefined")
if (playerArgs)
{
if (this._player instanceof AudioClipPlayer)
{