ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
799 stars 127 forks source link

"RtApiDs::getDeviceInfo: device ID is invalid!" on certain sample rates on windows with directsound #428

Open nshaheed opened 6 months ago

nshaheed commented 6 months ago

chuck --srate48000 --dac:"Headphones (Realtek(R) Audio)"

results in the following error message:

[chuck]: RtApiDs::getDeviceInfo: device ID is invalid!

So for some sample rates with the realtek device on the default directsound audio driver it's able to find the device and some it can't.

Here's this list of valid and invalid sample rates on my dell xps:

[chuck]:   4000 Hz - bad
[chuck]:   5512 Hz - bad
[chuck]:   8000 Hz - bad
[chuck]:   9600 Hz - bad
[chuck]:   11025 Hz - good
[chuck]:   16000 Hz - bad
[chuck]:   22050 Hz - good
[chuck]:   32000 Hz - bad
[chuck]:   44100 Hz - good
[chuck]:   48000 Hz - bad
[chuck]:   88200 Hz - bad
[chuck]:   96000 Hz - good
[chuck]:   176400 Hz - bad
[chuck]:   192000 Hz - bad

setting --driver:wasapi fixes this