ALSA 및 Pulseaudio를 사용하여 여러 입력 장치의 오디오를 녹음하고 싶습니다. 좀 더 정확하게 말하면 울트라스타 디럭스를 하고 싶다. SDL을 이용한 게임입니다. 제가 아는 한 ALSA만 지원합니다. 출력과 입력에 가상 ALSA "펄스" 장치를 사용하기만 하면 모든 것이 잘 작동합니다. 불행하게도 이것은 하나의 입력 장치만 허용하지만 세 개의 독립(USB) 마이크에서 녹음하고 싶습니다. 세 가지 소스를 하나로 혼합하는 것은 선택 사항이 아닙니다.
https://wiki.archlinux.de/title/Pulseaudio#Mehrere_PulseAudio_ALSA_Ger.C3.A4te다음을 추가하여 추가 ALSA PCM을 정의하는 것이 좋습니다.
pcm.<pcmname> {
type pulse
device <devicename>
}
나를 위한 ~/.asoundrc
. 안타깝게도 펄스 오디오 장치 이름이 무엇인지 알 수 없습니다. 추측한 pulseaudio 이름을 사용해 보았습니다 alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device
. arecord -L
첨부된 더미 ALSA PCM이 표시되지만 로그할 수 없으며 오류 메시지가 표시됩니다 ALSA lib pcm_pulse.c:752:(pulse_prepare) PulseAudio: Unable to create stream: Entität nicht vorhanden
(마지막 독일어 비트가 라인을 따라 무언가로 변환됨 Entity not existant
). 가상 ALSA PCM은 UltraStar Deluxe에 표시되지 않습니다.
이 목표를 어떻게 달성할 수 있나요? 가능합니까? 나는 다른 용도로 Pulseaudio를 사용하는데 훌륭하게 작동합니다. Pulseaudio가 없으면 많은 프로그램이 작동하는 데 문제가 발생하고 오디오가 불안정해질 수 있습니다.
출력은 다음과 같습니다 pacmd list-cards
.
4 card(s) available.
index: 0
... (HDMI Output Device stripped)
index: 1
name: <alsa_card.pci-0000_00_1b.0>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xf6130000 irq 48"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "1e20"
device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
device.form_factor = "internal"
device.string = "0"
device.description = "Internes Audio"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
input:analog-stereo: Analog Stereo Eingang (priority 60, available: unknown)
output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
output:analog-surround-40: Analog Surround 4.0 Ausgang (priority 700, available: unknown)
output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Ausgang + Analog Stereo Eingang (priority 760, available: unknown)
output:analog-surround-41: Analog Surround 4.1 Ausgang (priority 800, available: unknown)
output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Ausgang + Analog Stereo Eingang (priority 860, available: unknown)
output:analog-surround-50: Analog Surround 5.0 Ausgang (priority 700, available: unknown)
output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Ausgang + Analog Stereo Eingang (priority 760, available: unknown)
output:analog-surround-51: Analog Surround 5.1 Ausgang (priority 800, available: unknown)
output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Ausgang + Analog Stereo Eingang (priority 860, available: unknown)
output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)
output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Ausgang + Analog Stereo Eingang (priority 5560, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <output:analog-stereo>
sinks:
alsa_output.pci-0000_00_1b.0.analog-stereo/#0: Internes Audio Analog Stereo
sources:
alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#0: Monitor of Internes Audio Analog Stereo
ports:
analog-input: Analoge Eingabe (priority 10000, latency offset 0 usec, available: unknown)
properties:
analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
properties:
analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)
properties:
iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
index: 2
name: <alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "1"
alsa.card_name = "C-Media USB Audio Device"
alsa.long_card_name = "C-Media USB Audio Device at usb-0000:00:1d.0-1.5, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:1d.0-usb-0:1.5:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/sound/card1"
udev.id = "usb-0d8c_C-Media_USB_Audio_Device-00-Device"
device.bus = "usb"
device.vendor.id = "0d8c"
device.vendor.name = "C-Media Electronics, Inc."
device.product.id = "0008"
device.product.name = "C-Media USB Audio Device "
device.serial = "0d8c_C-Media_USB_Audio_Device"
device.string = "1"
device.description = "C-Media USB Audio Device "
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
profiles:
input:analog-mono: Analog Mono Eingang (priority 1, available: unknown)
output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)
output:analog-stereo+input:analog-mono: Analog Stereo Ausgang + Analog Mono Eingang (priority 6001, available: unknown)
output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)
output:iec958-stereo+input:analog-mono: Digital Stereo (IEC958) Ausgang + Analog Mono Eingang (priority 5501, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <input:analog-mono>
sources:
alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono/#1: C-Media USB Audio Device Analog Mono
ports:
analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)
properties:
iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
index: 3
name: <alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device_1>
driver: <module-alsa-card.c>
owner module: 8
properties:
alsa.card = "2"
alsa.card_name = "C-Media USB Audio Device"
alsa.long_card_name = "C-Media USB Audio Device at usb-0000:00:1d.0-1.6, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:1d.0-usb-0:1.6:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/sound/card2"
udev.id = "usb-0d8c_C-Media_USB_Audio_Device-00-Device_1"
device.bus = "usb"
device.vendor.id = "0d8c"
device.vendor.name = "C-Media Electronics, Inc."
device.product.id = "0008"
device.product.name = "C-Media USB Audio Device "
device.serial = "0d8c_C-Media_USB_Audio_Device"
device.string = "2"
device.description = "C-Media USB Audio Device "
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
profiles:
input:analog-mono: Analog Mono Eingang (priority 1, available: unknown)
output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)
output:analog-stereo+input:analog-mono: Analog Stereo Ausgang + Analog Mono Eingang (priority 6001, available: unknown)
output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)
output:iec958-stereo+input:analog-mono: Digital Stereo (IEC958) Ausgang + Analog Mono Eingang (priority 5501, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <input:analog-mono>
sources:
alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device_1.analog-mono/#2: C-Media USB Audio Device Analog Mono
ports:
analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)
properties:
iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
인사
허먼
답변1
나는 그것을 스스로 알아 냈습니다. "장치" 옵션에 장치 이름이 필요하다고 잘못 생각했습니다. 대신, 달성하려는 목표에 따라 소스(또는 싱크) 이름이 필요합니다. 예를 들어, ALSA를 통해 pulseaudio로 처리되는 단일 마이크에 액세스할 수 있습니다.
pcm.pulse_mic1 {
type pulse
device alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono
}
ctl.pulse_mic1 {
type pulse
device alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono
}