Why deviceManager.addDevice completely ignore Index

Dear all,

I use Psychopy 2024.2.2, on Windows 10.

In my experiment, I try to play two sounds consecutively, one in one speaker (index:1) one in the other (index=2).

I recently updated and was happy to see that the option to choose the speaker for a sound to play was now available in the builder. I indicate the right speaker in the builder, but when i launch the experiment, both sounds are played in the system default speaker.

I tried to go back to the coder and manually change the index in deviceManager.addDevice. It completely ignores the index and plays always in the system default speaker.

Is this a bug? Is there a way to do it in this software. I feel that this is quite a basic feature but I have been at it for a while and start to desperate.

EDIT: Actually, boths Speakers are determined in Sound_2. When I change the Speaker for Sound_2, it changes the speaker for Sound_1 and Sound_2, when i change the speaker for Sound_1, nothing happens… Is there a way to solve this and use two soundcards?

Thanks

Best

Damien

Ok so I have seen a few people with the same issue and no answer from the forum so here what I did to solve this. First–> the speaker option in the Builder or the sound.PTB function does not work on my PC. It is completely ignored and is set to whatever random choice of main speaker it chooses at the beguinning.

What I did for double soundcard sound presentation is :

One sound from the buider chosing the soundcard1 and
for the second sound presenting it through a code snippet as follows

Before experiment
from psychtoolbox import audio
from soundfile import SoundFile

Beguin experiment
Fs = 48000
audio.get_devices()
stream = audio.Stream(freq=Fs,device_id=6,channels=2)
stream.volume = 0.5
myfile = SoundFile(fname)
stereowav = myfile.read(dtype=‘float32’, always_2d=True)
stream.fill_buffer(stereowav)

Beguin Rountine
stream.start(repetitions=1, when=0.1, wait_for_start=0)

I works
May it help someone, if possible

Best

Damien