Closed Remi-Gau closed 4 years ago
As far as I can tell this should not break anything. But as I keep saying that I think we should have a basic set of "demo" to use as "tests" to make sure nothing breaks.
@CerenB
This should be how you would initialize for the audio set up.
Does this make sense?
I urgently need to create ways to test this.
Audio init
% in your main script
cfg.initAudio = true;
cfg.audio.useDevice = true; % set to false when you don't want to use it (on mac or linux)
cfg.audio.inputChannels = 0;
cfg.audio.channels = 2;
cfg.audio.deviceName = 'WASAPI';
cfg = initPTB(cfg);
% this should return these fields
cfg.audio.fs
cfg.audio.channels
cfg.audio.initVolume
cfg.audio.requestedLatency
cfg.audio.repeat
cfg.audio.startCue
cfg.audio.waitForDevice
cfg.audio.devIdx
cfg.audio.playbackMode
cfg.audio.pushSize
cfg.audio.requestOffsetTime
cfg.audio.reqsSampleOffset
@CerenB some of the names of the fields had to be changed to stick to the camelCase
rule
I'll test after the most sunny & hot day is over in Brussels! Thank you for implementing all these in such a short time <3
This is a big refactoring of the initPTB function into many subfunctions.
Also allowing to set some defaults if they are not passed by the user.