ALSA capture default sound speaker
Разарабатываю визуализатор музыки и планирую получать данные прямо из системы, с помощью alsa
snd_pcm_open(&PcmDevice, "default", SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
Когда вызываю открытие PCM с именем "default" - то звук захватывается, если в компьютер не встален микрофон, но когда вставлен микрофон, то захватывается он, а не динамик. Выдача aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
HDA Intel PCH, ALC883 Digital
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
HDA Intel PCH, ALC883 Digital
Hardware device with all software conversions
sysdefault:CARD=PCH
HDA Intel PCH, ALC883 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC883 Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=1
HDA Intel PCH, ALC883 Digital
Direct sample mixing device
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
hw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 1
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 2
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 3
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=10
HDA NVidia, HDMI 4
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=11
HDA NVidia, HDMI 5
Direct hardware device without any conversions
hw:CARD=NVidia,DEV=12
HDA NVidia, HDMI 6
Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
HDA NVidia, HDMI 1
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
HDA NVidia, HDMI 2
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=9
HDA NVidia, HDMI 3
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=10
HDA NVidia, HDMI 4
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=11
HDA NVidia, HDMI 5
Hardware device with all software conversions
plughw:CARD=NVidia,DEV=12
HDA NVidia, HDMI 6
Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 1
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 2
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 3
HDMI Audio Output
hdmi:CARD=NVidia,DEV=4
HDA NVidia, HDMI 4
HDMI Audio Output
hdmi:CARD=NVidia,DEV=5
HDA NVidia, HDMI 5
HDMI Audio Output
hdmi:CARD=NVidia,DEV=6
HDA NVidia, HDMI 6
HDMI Audio Output
dmix:CARD=NVidia,DEV=3
HDA NVidia, HDMI 0
Direct sample mixing device
dmix:CARD=NVidia,DEV=7
HDA NVidia, HDMI 1
Direct sample mixing device
dmix:CARD=NVidia,DEV=8
HDA NVidia, HDMI 2
Direct sample mixing device
dmix:CARD=NVidia,DEV=9
HDA NVidia, HDMI 3
Direct sample mixing device
dmix:CARD=NVidia,DEV=10
HDA NVidia, HDMI 4
Direct sample mixing device
dmix:CARD=NVidia,DEV=11
HDA NVidia, HDMI 5
Direct sample mixing device
dmix:CARD=NVidia,DEV=12
HDA NVidia, HDMI 6
Direct sample mixing device
usbstream:CARD=NVidia
HDA NVidia
USB Stream Output
usbstream:CARD=Device
Usb Audio Device
USB Stream Output
Можете подсказать как мне обратиться к карте динамика, когда есть микрофон?
Источник: Stack Overflow на русском