Hello, today I formatted my PC and reinstalled GNU Octave, as well as Psychtoolbox, I am using the Psychtoolbox 3.0.16. I saw that there is another topic with the same question here: Help with audio: error due to unsupported combination of audio parameters I still have tried to check if there is any instruction in how to fix this issue but in this topic it wasn’t solved.
I am receiving the same message:
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 64-Bit (Version 3.0.16 - Build date: Feb 24 2020).
PTB-INFO: OS support status: Linux 5.11.0-38-generic Supported.
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you underterms of the MIT License, with
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.
PTB-INFO: Failed to enable realtime-scheduling [Operation not permitted]!
PTB-INFO: You need to run Matlab or Octave with root-privileges, or run the script PsychLinuxConfiguration once for this to work.
PTB-INFO: See /usr/share/doc/psychtoolbox-3-common/README.Debian to make this work.
PTB-INFO: OpenGL-Renderer is Intel Open Source Technology Center :: Mesa DRI Intel(R) HD Graphics 3000 (SNB GT2) :: 3.0 Mesa 20.0.8
PTB-INFO: VBL startline = 768 , VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.714730 ms [59.827469 Hz]. (50 valid samples taken, stddev=0.007110 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.673058 ms [59.977001 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Using modified PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4
PTB-INFO: Choosing deviceIndex 0 [HDA Intel PCH: ALC269 Analog (hw:0,0)] as default output audio device.
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1812
PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device: Unanticipated host error
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
PTB-ERROR: On Linux you may be able to use ALSA audio converter plugins to makethis work.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
error: PsychPortAudio: Usage:
pahandle = PsychPortAudio('Open' [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][, suggestedLatency][, selectchannels][, specialFlags=0]);
error: called from
Naderi_test_task_v_main_1203_v_2 at line 159 column 14
>> PsychtoolboxVersion
ans = 3.0.16 - Flavor: Debian package - psychtoolbox-3 (3.0.16.20200130.dfsg1-1)
For more info visit:
http://neuro.debian.net/pkgs/octave-psychtoolbox-3.html
And here below is a excerpt of the code:
.... ....
InitializePsychSound(1);
nrchannels = 2;
freq = 44100;
repetitions = 1;
startCue = 0;
waitForDeviceStart = 1;
pahandle = PsychPortAudio('Open', [], 1, 1, freq, nrchannels); %ERROR HERE
I always used this same values for frequency and channel numbers or the frequency with 48000 and always worked. Now how could I fix it?
Thanks,
Victor