Docker audio output mixed with Kodi (PulseAudio ? ALSA ?)

  • Hi everyone,

    I've been browsing this forum with no luck about this.

    I want to use Tidal Connect in a similar way Librespot is implemented in LibreElec.

    A binary exists for this but needs outdated libraries, so a guy made a docker container with those libs: https://github.com/TonyTromp/tidal-connect-docker/

    This container works fine in LibreElec when the sink is not locked by Kodi.

    (I have been using --device /dev/snd to get the container access to the sound device)

    However, I had no luck trying to make it use PulseAudio in any way, so the sound could be mixed with Kodi. (this is how Librespot works in LibreElec if I understood correctly ?)

    After stumbling upon this post:

    Quote

    Docker container's audio to OS
    From: escalade
    If you want to use Pulse you can run your container with -v /run:/run -e PULSE_RUNTIME_PATH=/run/pulse, I think that should do it.

    I've been trying to bind /run/pulse in many ways to the container, eventually succeeding in seeing a pulseaudio sink (named librespot) from within the container but no way to use it.

    Would anyone that understands better PulseAudio and ALSA than me have any idea on how I could have a Librespot-like client to output audio simultaneously with Kodi please ? ^^

    Thank you for your answers.

    Keep rocking, LibreElec is a great distro, been loving it for years now !

  • The use of docker containers when they have hardware access can interfere with the operation of LE, for example, I would never install a tvheadend docker container with the LE tvheadend addon, the reasons are obvious.

    Instead of redirecting the sound output from the docker container to the hardware, why not redirect the output to a port that can be captured, for example, by the LE player to send the output to the audio hardware? I am successfully using this technique with television content for complex playlist processing and it works very well.