switch back to icecast????
This commit is contained in:
@@ -102,11 +102,11 @@ class RadioBot:
|
|||||||
def _play_stream(self):
|
def _play_stream(self):
|
||||||
if not self._voice_client:
|
if not self._voice_client:
|
||||||
return
|
return
|
||||||
# Stream from PulseAudio (drb_sink.monitor, the default source).
|
from app.config import settings
|
||||||
# ~250ms latency vs 2-5s for Icecast — stays in sync with live transmissions.
|
stream_url = f"http://{settings.icecast_host}:{settings.icecast_port}{settings.icecast_mount}"
|
||||||
source = discord.FFmpegPCMAudio(
|
source = discord.FFmpegPCMAudio(
|
||||||
"default",
|
stream_url,
|
||||||
before_options="-f pulse",
|
before_options="-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5",
|
||||||
)
|
)
|
||||||
self._voice_client.play(
|
self._voice_client.play(
|
||||||
discord.PCMVolumeTransformer(source, volume=1.0),
|
discord.PCMVolumeTransformer(source, volume=1.0),
|
||||||
|
|||||||
Reference in New Issue
Block a user