Closed Wikinaut closed 1 year ago
I found a solution using alsa, alsa equalizer and dmixer which I will publish here soon.
See
how to use multiple mpv-instances which audio signals are then mixed and finally equalised before they are sent to the DAC unit.
This is the core of my tweak:
mpvtest.py:
import mpv
options = { 'audio-output' : 'alsa/plugmixequal' } # plugmixequal as defined in .asoundrc
player1 = mpv.MPV( **options )
player2 = mpv.MPV( **options )
.asoundrc:
ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
slave {
pcm "plughw:CARD=sndrpihifiberry,DEV=0";
}
}
pcm.plugmixequal {
type equal;
slave {
pcm plug:dmix;
}
}
pcm.!default {
type plug;
slave {
pcm plugequal;
}
}
# Shared access to our audio card
pcm.dmixer {
type dmix
ipc_key 1234
ipc_key_add_uid true
ipc_perm 0666
slave {
pcm "hw:CARD=sndrpihifiberry,DEV=0";
}
}
self-answered my question and fixed the issue.
In issue #126 you describe how to run several players, basically so
On my Raspberry Pi, I only get this working after
jackd -R -dalsa
having running, but using this approach I have to addto the code above and (at the moment) I could not use the alsa equalizer plugin.
Question: Is there a programmatic way to run the two players to mix their signals?