### 🔊 Both voice plugins at once
A server with Simple Voice Chat and Plasmo Voice both installed had to pick
one, and CDisc refused to start until it was told which. That was the wrong
question: the two mods' users are different people, so choosing a backend was
choosing which half of the server heard nothing.
Both are now used together. One jukebox is still decoded once, and a source is
opened in every installed voice plugin, so whichever mod a player brought, the
music arrives. `voice-backend: auto` does this by itself when both are present;
`multi` asks for it explicitly, and naming `simplevoicechat` or `plasmovoice`
still pins it to one.
Players who have *both* mods installed would hear the track twice, a few
milliseconds apart — a flanging smear worse than either feed alone. So each
listener is handed to a single backend and filtered off the others, reworked
once a second as people connect and disconnect their voice mod. Nobody is
filtered off a backend unless another one is already reaching them.
Simple Voice Chat starts later than Plasmo does, on its own startup event, so
it joins a broadcast that may already be playing: anything mid-track gains its
Simple Voice Chat source on the spot, with the distance, speaker settings and
carrier it missed replayed onto it.
The cost is one Opus encode per playing jukebox per voice plugin. The track
itself is decoded once regardless.
### 🎤 Lyrics stopped piling up over the jukebox ([Issue #7](https://github.com/valkdzx/CDisc-Issues/issues/7))
Leave a song playing, walk away, come back, and the words over the jukebox were
there twice. Then three times, then six: a stack of frozen lines from different
points in the track, overlapping into an unreadable block that nothing short of
a restart would take down.
A display entity reports itself invalid the moment the server stops ticking the
chunk it stands in, which is what a jukebox's chunk does as soon as the last
person walks far enough off. The hologram read that as "gone" and put up a
replacement over the top of the one still hanging there — and read it the same
way when the time came to take a hologram down, and so took nothing down. Either
mistake alone leaves one more copy per trip away and back, for as long as the
track keeps going round.
It now asks whether the display has actually been removed rather than whether it
happens to be ticking, takes the old one down before putting any replacement up,
and once a minute looks over the jukeboxes that are playing for words it is no
longer holding on to and clears them. The same mistake was in the words above a
carried jukebox and in the sample shown while a hologram's colours are being
chosen; both go with it.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }