refactor(audio): extract transport commands into transport_commands

Pull audio_pause / audio_resume / audio_stop / audio_seek (~210 LOC)
out of audio/commands.rs into audio/transport_commands.rs. They mutate
state.current on an already-running sink and coordinate radio
warm/cold resume — distinct concern from playback startup
(audio_play / audio_chain_preload / audio_preload).

audio/commands.rs: 1447 → 1240 LOC. Imports trimmed: TryLockError,
radio_download_task, RADIO_BUF_CAPACITY are no longer pulled in here;
they followed the transport block to its new home. lib.rs
invoke_handler updated.

The remaining commands.rs is now focused on the playback orchestration
proper (track + chain preload + initial preload + the shared
spawn_progress_task helper).
This commit is contained in:
Psychotoxical
2026-05-08 14:01:56 +02:00
parent 17099d3aee
commit 0fae33f00b
4 changed files with 233 additions and 216 deletions
+4 -4
View File
@@ -388,10 +388,10 @@ pub fn run() {
mpris_set_metadata,
mpris_set_playback,
audio::commands::audio_play,
audio::commands::audio_pause,
audio::commands::audio_resume,
audio::commands::audio_stop,
audio::commands::audio_seek,
audio::transport_commands::audio_pause,
audio::transport_commands::audio_resume,
audio::transport_commands::audio_stop,
audio::transport_commands::audio_seek,
audio::mix_commands::audio_set_volume,
audio::mix_commands::audio_update_replay_gain,
audio::mix_commands::audio_set_eq,