Hi Mario,
Here’s some more info that may prove useful.
I’m running with R2021b on Windows 10 Enterprise - Intel i5-8500
I have a Creative SoundBlaster X4 USB connected surround sound box. This offers 4 stereo outputs which I split into left/right channels to drive 8 vibrating transducers (DancerDesign) but this can easily be replicated using 4 pairs of stero headphones.
I build a data buffer using MakeBeep() to create 8 rows (one per channel) x 9600 data points for a 0.2 second audio clip @ 48k.
Typlically some channels have a sample from a 100Hz sine wave and the others are all 0 for no sound.
Many combinations of channels being on/off work as expected however:
playing channel 1 & 2 together with 3-8 as 0 always plays 1,2 & 3.(4-8 no sound as expected)
Similarly, playing on only 7&8 results in output on channels 6 & 7&8. (1-5 no sound)
Here’s some sample code.
f = 100; %Hz
srate = 48000;
dur_s = 0.2;
nch = 8;
vol = 0.5;
dev_idx = 9; % 9 for laptop; 6 for 1.1 pc
InitializePsychSound(1);
Beep = MakeBeep( f, dur_s, srate);
noBeep = zeros(1,length(Beep));
handle = PsychPortAudio('Open', dev_idx, 1, 1, srate, nch);
PsychPortAudio('Volume', handle, vol);
stim = [Beep; Beep; noBeep; noBeep; noBeep; noBeep; noBeep; noBeep];
PsychPortAudio('FillBuffer', handle, stim);
PsychPortAudio('Start', handle, 1, 1, 1);
jd=PsychPortAudio('Stop', handle, 1, 1);
PsychPortAudio('Close', handle);
Note the above errors only happen when I have the 2015-2022 redistributable C++ libraries installed. When I uninstalled them and reverted to the 2015-2019 everything worked as designed.
I doubled checked the PPA docs and don’t think I’m donig anything wrong but happy to be corrected if I am.
I also had a quick look at the psychportaudio C++ source code but unsurprisingly couldn’t see anything obvious (though it’s 20 years since I coded in C)
So, on the face of it it seems that some combination of the 2019-2022 libraries on my HP system with an intel i5-8500 has broken something from the 2015-2019 libs but other possibilities exist.
Hopefully it’s a mistake on my part that can be rectified but thought it was worth flagging in case others experience experience problems.
Please report back if you have anything to add,
cheers,
John