cpp-lln-lab / CPP_PTB

a set of function to make it easier to create behavioral, EEG, fMRI experiment with psychtoolbox
https://cpp-ptb.readthedocs.io/en/latest/index.html#
MIT License
12 stars 13 forks source link

have setDefaultsPTB set the value for cfg.audio.devIdx #124

Closed Remi-Gau closed 3 years ago

Remi-Gau commented 3 years ago

Currently cfg.audio.devIdx default value is set to [ ] by initPTB if cfg.audio.do is true.

The problem is that unless we use the cfg.audio.useDevice any value we use for cfg.audio.devIdx we set will be overwritten to [ ] by initPTB.

We had to hack around in Liège last time.

The proper way to do this is to remove the setting up of default values for audio stuff from initPTB.

Like this one.

cfg.audio.devIdx = [];

And let the default value for the auditory things be set up by setDefaultsPTB that is better behaved and does not overwrite things set up by the user.

I will open a PR to fix this.

@CerenB tagging you and will ask you to cross check that on your code later, to make sure that this does not break your auditory experiment. :wink:

It should not but better safe than sorry.

FYI: this is is to be included before the next version is released.