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

Merge pull request #532 from apitiot/2022.2.4

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 11:12:26 +02:00 committed by GitHub
commit 23c0ccbb6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
{