hi guys
Is it possible for the language, retrieve information about the actual audio device the synth is connected to when working on Windows?
Let me better explain: when I’m on Windows I’m used to work like these: settings all the server options and then running the main code.
(
s = Server.local;
s.options.sampleRate = 48000;
s.options.numWireBufs_(256);
s.options.numOutputBusChannels_( 6 );
s.latency = 0.20;
s.options.device = "ASIO : US-16x08 ASIO";
s.waitForBoot({
// my main code here
});
)
One of the most important settings to set beforehand to me is to address a specific sound device in order for the project to actually work as expected.
Recently I’ve come across an issue with the hardware I’m working with: the PC sometimes is not capable of correctly detecting the sound card (a Tascam US-16x08) at startup so, SuperCollider will corretly boot but falling back to the default audio device. Only a PC reboot can solve the problem.
When the issue occurs, the post window is telling me something like this:
Booting server 'localhost' on address 127.0.0.1:57110.
Device options:
- MME : Microsoft Sound Mapper - Input (device #0 with 2 ins 0 outs)
- MME : Microphone (High Definition Aud (device #1 with 2 ins 0 outs)
- MME : Microsoft Sound Mapper - Output (device #2 with 0 ins 2 outs)
- MME : Altoparlanti (High Definition A (device #3 with 0 ins 6 outs)
- Windows DirectSound : Driver primario di acquisizione suoni (device #4 with 2 ins 0 outs)
- Windows DirectSound : Microphone (High Definition Audio Device) (device #5 with 2 ins 0 outs)
- Windows DirectSound : Driver audio principale (device #6 with 0 ins 2 outs)
- Windows DirectSound : Altoparlanti (High Definition Audio Device) (device #7 with 0 ins 6 outs)
- ASIO : ASIO4ALL v2 (device #8 with 2 ins 6 outs)
- Windows WASAPI : Altoparlanti (High Definition Audio Device) (device #9 with 0 ins 2 outs)
- Windows WASAPI : Microphone (High Definition Audio Device) (device #10 with 2 ins 0 outs)
- Windows WDM-KS : Speakers (HD Audio Speaker) (device #11 with 0 ins 6 outs)
- Windows WDM-KS : Microfono (HD Audio Microphone) (device #12 with 2 ins 0 outs)
Requested devices:
In (matching device NOT found):
- ASIO : US-16x08 ASIO
Out (matching device NOT found):
- ASIO : US-16x08 ASIO
Selecting default system input/output devices
Booting with:
In: MME : Microphone (High Definition Aud
Out: MME : Altoparlanti (High Definition A
Sample rate: 48000.000
Latency (in/out): 0.013 / 0.093 sec
SC_AudioDriver: sample rate = 48000.000000, driver's block size = 64
SuperCollider 3 server ready.
Requested notification messages from server 'localhost'
localhost: server process's maxLogins (1) matches with my options.
localhost: keeping clientID (0) as confirmed by server process.
Shared memory server interface initialized
As you see, the PC is not detecting the sound device I would like to use:
Requested devices:
In (matching device NOT found):
- ASIO : US-16x08 ASIO
Out (matching device NOT found):
- ASIO : US-16x08 ASIO
instead it is using the default one:
Booting with:
In: MME : Microphone (High Definition Aud
Out: MME : Altoparlanti (High Definition A
I would like SuperCollider to be able of reboot the PC when the wrong sound card is selected as audio device so, initially I thought that checking for equality between s.options.device
and the string ASIO : US-16x08 ASIO
after booting will do the job but, this option stays always the same, even if another hardware audio device has been selected by the server.
I have the suspicion that this option can be written by the user, but then, in the event of an error like mine, whereby a different device is chosen as fallback by the server, the option is not updated with the name of the device actually in use; although, this information must exist somewhere, since the post window is able to detect it and print it out.
How can I intercept this information? maybe s.options.device is not the correct place where i should look for?
Thank you so much for your help