fix: slow volume ramp to 1s for smoother transitions
Reduce _max_step from 0.1 to 0.02 per frame, extending the full 0-to-1 volume ramp from ~200ms to ~1 second.
This commit is contained in:
@@ -560,7 +560,7 @@ HTML stripped on receive, escaped on send. IRC-only commands are no-ops.
|
|||||||
|
|
||||||
Requires: `yt-dlp`, `ffmpeg`, `libopus` on the host.
|
Requires: `yt-dlp`, `ffmpeg`, `libopus` on the host.
|
||||||
Max 50 tracks in queue. Playlists auto-expand; excess truncated at limit.
|
Max 50 tracks in queue. Playlists auto-expand; excess truncated at limit.
|
||||||
Volume ramps smoothly over ~200ms (no abrupt jumps mid-playback).
|
Volume ramps smoothly over ~1s (no abrupt jumps mid-playback).
|
||||||
Mumble-only: `!play` replies with error on other adapters, others silently no-op.
|
Mumble-only: `!play` replies with error on other adapters, others silently no-op.
|
||||||
|
|
||||||
## Plugin Template
|
## Plugin Template
|
||||||
|
|||||||
@@ -1581,7 +1581,7 @@ and voice transmission.
|
|||||||
and one is picked randomly
|
and one is picked randomly
|
||||||
- Playlists are expanded into individual tracks; excess tracks are
|
- Playlists are expanded into individual tracks; excess tracks are
|
||||||
truncated at the queue limit
|
truncated at the queue limit
|
||||||
- Volume changes ramp smoothly over ~200ms (no abrupt jumps)
|
- Volume changes ramp smoothly over ~1s (no abrupt jumps)
|
||||||
- Default volume: 50%
|
- Default volume: 50%
|
||||||
- Titles resolved via `yt-dlp --flat-playlist` before playback
|
- Titles resolved via `yt-dlp --flat-playlist` before playback
|
||||||
- Audio pipeline: `yt-dlp | ffmpeg` subprocess, PCM fed to pymumble
|
- Audio pipeline: `yt-dlp | ffmpeg` subprocess, PCM fed to pymumble
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ class MumbleBot:
|
|||||||
stderr=asyncio.subprocess.PIPE,
|
stderr=asyncio.subprocess.PIPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
_max_step = 0.1 # max volume change per frame (~200ms full ramp)
|
_max_step = 0.02 # max volume change per frame (~1s full ramp)
|
||||||
_cur_vol = _get_vol()
|
_cur_vol = _get_vol()
|
||||||
|
|
||||||
frames = 0
|
frames = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user