Raspberry pi cli mixing

Discussion of all things Raspberry Pi / Raspberry Pi 2 related

Moderators: khz, MattKingUSA

Post Reply
rjusher
Posts: 2
Joined: Sun Oct 04, 2020 10:22 pm

Raspberry pi cli mixing

Post by rjusher »

Hi!!

I have been trying for a long time to make a personal sound machine.

The project consist of the following parts:
1. Multiple instances of cmus as "Music Files Player"
2. Icecast as a http endpoint to listen to the music
3. darkice to broadcast a recording device to Icecast
4. code-server as an easy ssh terminal (from the web browser), used mainly to run tmux
5. tmux as a terminal multiplexor to manage multiple cmus instances
6. snl_aloop to create a loopback device to stream the sound output of the machine

What I can't figure out how to solve is the following:
Currently everything works fine on the first cmus instance, broadcasting works fine between darkcast and icecast, but ... the following instances of cmus, appear to be playing audio but it doesn't emit any sound to the output device, as far as my current understanding of things allows me to conclude, the snl_aloop loopback devices can't handle mixing so the first cmus instance gets the lock on the device and the other instances just get ignored.

I would like to enable mixing on these devices if at all possible or an alternative solution that works without a desktop environment.

Baggypants
Established Member
Posts: 149
Joined: Fri Jul 31, 2015 11:28 pm

Re: Raspberry pi cli mixing

Post by Baggypants »

Is the personal sound machine supposed to stream music to a web based client or send the music out of a local audio device to a speaker? The way alsa works is to only allow one client to use a sound device at a time, that's why we use JACK or pulseaudio to mix the sound.

rjusher
Posts: 2
Joined: Sun Oct 04, 2020 10:22 pm

Re: Raspberry pi cli mixing

Post by rjusher »

:shock: Yes it is supposed to stream music to a web server that streams to web clients.

I dindn't knew that alsa wasn't a good option for my solution.

Is there some resource I can read (tutorial over manual :D ) for using pulseaudio or JACK on my project.

Baggypants
Established Member
Posts: 149
Joined: Fri Jul 31, 2015 11:28 pm

Re: Raspberry pi cli mixing

Post by Baggypants »

There are a few pre-built music streaming servers that will run on a pi like LibreElec or web based apps like Ampache that are not too difficult to get runnning. I'm also unsure as to why you're running multiple cmus instances.

Post Reply