Selecting Audio Devices

15 views
Skip to first unread message

Raph

unread,
Mar 16, 2018, 6:48:22 PM3/16/18
to JAudioLibs
Hi,

Sorry for the noob-ish question, but it's not clear to me from the API examples how you can select and set the audio device(s) you want to use. I'm following the PassThroughAudioClient and DeviceIteration examples. It's easy to query the available devices like in the example, but how do I set the input/output devices based on that list?

Thanks.

Neil C Smith

unread,
Mar 16, 2018, 7:10:15 PM3/16/18
to jaudi...@googlegroups.com
Hi,


On Fri, 16 Mar 2018, 22:48 Raph, <melgar....@gmail.com> wrote:
Sorry for the noob-ish question, but it's not clear to me from the API examples how you can select and set the audio device(s) you want to use. I'm following the PassThroughAudioClient and DeviceIteration examples. 

No problem, and sorry for how badly documented that feature is! You need to add the device(s) where you see the ClientID and Connection parameters (extensions comment) in the AudioConfiguration constructor.

Note there might be two devices if you need input - Windows has a separate device for input and output for some bizarre reason. 

Best wishes, 

Neil
--
Neil C Smith
Artist & Technologist

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Raph

unread,
Mar 17, 2018, 1:04:03 PM3/17/18
to JAudioLibs
Hi Neil,

Awesome! I was adapting the PassThroughAudioClient example to query and set alternative devices. As you said, I simply had to pass in the output and input devices to the AudioConfiguration constructor extensions parameter, and it works like a charm! Thanks!
Reply all
Reply to author
Forward
0 new messages