Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[SOLVED] ALSA loopback, trying to record from multiple subdevices

$
0
0
Hello,

I am using a VM with Ubuntu 16.04 and what I am trying to do is record multiple sources.
I read about ALSA snd_aloop having 8 subdevices.
Code:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

What works so far, I can play for example a network stream (internet radio) with mplayer

Code:

mplayer hw:0,0,0 -ao alsa -af volume=10:1 -prefer-ipv4 http://someradio1
and record it:

Code:

arecord -D hw:0,1,0 -f S32_LE -c 2 -r 48000 /home/raven/record1.wav
Now if I have understood correctly, if I use mplayer and use a different subinterface, eg. hw:0,0,1 , I can record using hw:0,1,1. Is this correct?
Well this does not work, recording is ok using hw:0,1,0 , but using hw:0,1,1 records nothing.

Could you help me please?

Edit:
Problem solved, the mplayer command was wrong... to access a subdevice needs parameter: alsa:device=hw=0.0.0

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>