0

I created a custom sound device in ~/.asoundrc or /etc/asound.conf. Now i call my sound client with the parameter for the sound device and want to check if this device exists. I found it easier to use the actual card and device index instead of names, which can be different (long or short version).

Unfortunately the "Name" hint of snd_device_name_get_hint has the syntax "devicename:CARD=name,DEV=index" like "iec958:CARD=Adapter,DEV=0", but i need "devicename:index,index". Is there alternative function to get exisiting snd_devices?

Meldryt
  • 99
  • 1
  • 9
  • That is a valid device name. You can look up the card ID in `/proc/asound/cards`, but why bother? – CL. Mar 30 '17 at 16:48
  • Actually the syntax "devicename:CARD=index,DEV=index" is also valid, when you try to call it from the console. Its shorter and definite, when you have two devices connected with the same name. – Meldryt Apr 03 '17 at 05:15

0 Answers0