Virtual 8 channel ALSA capture card from Mplayer

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Post Reply
andreww
Posts: 1
Joined: Wed Mar 25, 2015 11:27 pm

Virtual 8 channel ALSA capture card from Mplayer

Post by andreww »

tl;dr: noobie wants a virtual multi-channel (8+) audio capture device in arecord -l that he can point mplayer at to simulate a large audio interface.

This is my first foray into audio in Linux and it's been an eye-opening, interesting, and challenging experience. I'm not sure this falls under hardware, but I believe it does because it's tightly integrated with ALSA, so that means it's close enough? Feel free to recategorize if necessary.

I am in the VERY early stages of developing a program that receives audio from a USB audio interface. I have it working with 2 channels (being fed by my laptop), but I would like to increase to 8 (or more) channels. I have one 8 channel (capture) audio interface, but only have a 2 channel (playback) source (my laptop), so I'd like to generate a multi-channel .wav and present that to my program like an ALSA audio device instead of the 8 channel interface. I could technically buy another 8 channel audio interface, but really don't have the patience for that and would like to support far more channels if possible.

I have it mostly working with Mplayer (http://alsa.opensrc.org/Mplayer), Audacity (simulating my program to get this working with a known good audio program before attempting on my program), and a hacked together .asoundrc. But when I set Audacity to capture 8 channels it only records the first 2 channels of the file, repeated 4 times, despite the "Playback" tab of PulseAudio Volume Control showing 8 discrete channels being sent.

I've spent days learning about ALSA, attempted dozens of tutorials, but simply want a placeholder virtual device to show up in my aplay -l/arecord -l list that I can point my program at. I feel like there's something glaringly obvious I'm missing, but my eyes have gone cross trying to wade through the ALSA documentation.

snd-aloop seems to be the easiest, but even that seems to only handle 2 channels on my hardware. Is there no easy way to make a virtual ALSA device with an arbitrary number of channels?

Thanks in advance for your help, I really want to learn about these incredibly powerful and complex systems but seem to have an edge case that doesn't have an easy solution.
Post Reply