Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    21

    Squeezelite multiple device output

    Is there a way to specify multiple outputs with the -o flag?
    I know I could run multiple instances and group them, but it's on a PC that has multiple soundcards and I want it to play to both at the same time. If I specify -o x -o y then it only plays to the latter.

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,912
    What is the use case for this ?

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Posts
    21
    Quote Originally Posted by bpa View Post
    What is the use case for this ?
    In short: Having the audio play out to multiple devices where a group is undesirable

    The long: I have my home theatre PC that connects into my squeezelite network (Which consists of in multiple ceiling speakers with in roof RPi per pair and a portable wireless speaker box) and I've just finished an LED wall that has an audio sampler/spectrum analyser that I would like to receive a mirror of the audio going to the main speakers via a second sound card for it to analyse and react to. Currently running W7 but that'll probably change to Linux when I have some more time after Christmas.

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,912
    Quote Originally Posted by justinj View Post
    In short: Having the audio play out to multiple devices where a group is undesirable

    The long: I have my home theatre PC that connects into my squeezelite network (Which consists of in multiple ceiling speakers with in roof RPi per pair and a portable wireless speaker box) and I've just finished an LED wall that has an audio sampler/spectrum analyser that I would like to receive a mirror of the audio going to the main speakers via a second sound card for it to analyse and react to. Currently running W7 but that'll probably change to Linux when I have some more time after Christmas.
    Normal LMS ways is multiple players which are synced. Group is a plugin to simplify this. Squeezelite will only output to a single audio "device". On Linux this can be a PulseAudio or ALSA devices. Alsa and PulseAudio can do lots of functionality such as mixing / merging etc

    If using Linux I suspect it could be best done with ALSA - example https://unix.stackexchange.com/quest...-audio-devices

    Not sure if you still want to use the two device separately at other times - if 2nd audio is just for display then unlikely.

    IIRC There used to be a version of squeezelite which provided a feed of FFT data of the audio streams.

    edit:
    The -v option if squeezelite is built using OPT_VIS.
    Examples of code using the fft feed. https://github.com/ralph-irving/jive...src/visualizer
    Last edited by bpa; 2019-11-29 at 17:42.

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Posts
    21
    I know groups would be the normal way to do multi device, but seeing as how this is from one device per say I was hoping I could specify multiple outputs.
    I think it would be possible on Linux, not sure about Windows, but seeing as how it allows output to STDOUT, I wonder if I can pipe that into 2 devices as part of the process?

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,912
    Quote Originally Posted by justinj View Post
    I know groups would be the normal way to do multi device, but seeing as how this is from one device per say I was hoping I could specify multiple outputs.
    I think it would be possible on Linux, not sure about Windows, but seeing as how it allows output to STDOUT, I wonder if I can pipe that into 2 devices as part of the process?
    I think you could have timing problems using STDOUT that way.

    Since you want second output to drive a display wall visualising the audio stream - what is wrong with using the "-v" option and the FFT data as that is the usual mechanism for driving visualisations.

  7. #7
    Junior Member
    Join Date
    Jan 2019
    Posts
    21
    Quote Originally Posted by bpa View Post
    I think you could have timing problems using STDOUT that way.

    Since you want second output to drive a display wall visualising the audio stream - what is wrong with using the "-v" option and the FFT data as that is the usual mechanism for driving visualisations.
    Partly because I haven't designed the controller to take FFT data, although that could be changed and also my Squeezelite builds don't have a -v or FFT option (Squeezelite-win v1.9.0-1119, v1.9.6-1198)

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,912
    Quote Originally Posted by justinj View Post
    Partly because I haven't designed the controller to take FFT data, although that could be changed and also my Squeezelite builds don't have a -v or FFT option (Squeezelite-win v1.9.0-1119, v1.9.6-1198)
    Life will be too hard to do this in Windows

    How do you do visualation without doing a FFT on the audio data ?

  9. #9
    Junior Member
    Join Date
    Jan 2019
    Posts
    21
    Quote Originally Posted by bpa View Post
    Life will be too hard to do this in Windows

    How do you do visualation without doing a FFT on the audio data ?
    At the hardware level with an Arduino, a couple of ba3812l and some ws2812 LEDs
    I'm thinking of changing the controllers to something else though so I can do more with it. It looks good, but I think it can look better!

  10. #10
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    936
    Unless you want to implement something yourself (using squeezelite's visualizer export), I'd suggest you explore the ALSA option suggested above. You can send the stream to two cards, one being the real HW, the other a file plugin, which "stores contents of a PCM stream to file or pipes the stream to a command".
    However, if you want to write something yourself, here's another existing implementation which illustrates the bare minimum you have to do to get the data from squeezelite: cava/input/shmem.c
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •