mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user