More > JRiver Media Center 32 for Linux
Broadcasting could not start on the 'ALSA' output [SOLVED]
JohnDoeSama:
I'll need to dig a little deeper to figure out how to set-up the pseudo-devices because it's been a failure so far...
However, I'd like the MC audio stream to avoid any processing and be as direct as possible (for real gain? I'll be honest, I don't know but I'll sleep peacefully).
With the almighty chatgpt, I've made a little script that serves as a shortcut that lets me release alsa before launching mediacenter and relaunch easy effect when it closes.
Here's the code for those who might be interested.
EDIT : more efficient, need playerctl installed
--- Code: ---#!/bin/bash
LOCKFILE="/tmp/alsa_mediacenter_lock"
# Vérifier si le script est déjà en cours d'exécution
if [ -e "$LOCKFILE" ] && kill -0 "$(cat $LOCKFILE)"; then
echo "Le script est déjà en cours d'exécution."
exit 1
fi
# Créer un fichier de verrouillage avec le PID du script actuel
echo $$ > "$LOCKFILE"
# Assurer la suppression du fichier de verrouillage à la fin du script ou en cas d'interruption
trap 'rm -f "$LOCKFILE"; exit' INT TERM EXIT
# Mettre en pause la lecture
playerctl pause
# Couper le son dès le début du script
pactl set-sink-mute @DEFAULT_SINK@ true
# Arrêter EasyEffects
flatpak kill com.github.wwmm.easyeffects
# Attendre que EasyEffects soit bien arrêté
while pgrep -x "easyeffects" > /dev/null; do
sleep 0.5
done
# Désactiver PipeWire et ses services associés
systemctl --user mask pipewire.service pipewire-pulse.service
systemctl --user stop pipewire.service pipewire-pulse.service
# Attendre que PipeWire soit bien arrêté
while pgrep -x "pipewire" > /dev/null || pgrep -x "pipewire-pulse" > /dev/null; do
sleep 0.5
done
# Lancer MediaCenter32
mediacenter32 &
# Attendre que MediaCenter32 se ferme
wait $!
# Réactiver PipeWire et ses services associés
systemctl --user unmask pipewire.service pipewire-pulse.service
systemctl --user start pipewire.service pipewire-pulse.service
# Couper le son
pactl set-sink-mute @DEFAULT_SINK@ true
# Attendre que PipeWire soit bien démarré
while ! pgrep -x "pipewire" > /dev/null || ! pgrep -x "pipewire-pulse" > /dev/null; do
sleep 0.5
done
# Couper le son
pactl set-sink-mute @DEFAULT_SINK@ true
# Démarrer EasyEffects en arrière-plan
flatpak run com.github.wwmm.easyeffects --gapplication-service &
# Attendre qu'EasyEffects soit bien démarré
while ! pgrep -x "easyeffects" > /dev/null; do
sleep 3
done
# Réactiver le son
pactl set-sink-mute @DEFAULT_SINK@ false
# Supprimer le fichier de verrouillage
rm -f "$LOCKFILE"
--- End code ---
As far as I'm concerned, the subject is solved.
Many thanks to you all.
mattkhan:
I don't understand why you want to use the hw directly from MC but use pipewire and easyeffects at other times, is there a reason?
I don't know mint but debian says https://wiki.debian.org/PipeWire
For Debian 12 and newer, pipewire-audio-client-libraries is replaced by pipewire-alsa and pipewire-jack. It is recommended to install the metapackage pipewire-audio which depends on wireplumber (the recommended session manager), pipewire-pulse (to replace PulseAudio), pipewire-alsa (ALSA) and libspa-0.2-bluetooth (for Bluetooth support). Moreover, installing this metapackage will remove pulseaudio to prevent any conflicts between both sound server.
probably mint has some similar packages
JohnDoeSama:
From what I read while researching the term "bitperfect" on Windows, I saw that the audio path led to changes in the sound (resampling, compressor, mixer, etc.). The solution to avoid this was to output MC directly and in exclusive mode to the sound card using Wasapi.
I've just switched to Linux and kept the same logic, and the direct output without any conversion seems very similar to what I had on Windows.
I then apply a series of treatments (EQ, balance, convolution) to my audio stream, either directly in MC or through easyeffect when i'm not using it.
mattkhan:
I can't comment on the specifics of any given audio path but would just ask.... if you have a functioning setup in easyeffects, why then reimplement the same (or similar) in MC?
JohnDoeSama:
There are differences, because via MC :
- I avoid any unwanted/controlled alteration to the audio stream (I can't tell if this is the case on pipewire, but it seems to be on Windows).
- I can automatically apply a specific convolution file per samplerate
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version