mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
refactor(audio): peel device commands out of commands.rs
Hotspot J first slice: split the device-listing + device-selection commands out of audio/commands.rs (1912 LOC monolith) into a new audio/device_commands.rs (~95 LOC). Moved: - audio_canonicalize_selected_device - audio_list_devices_for_engine (kept pub for cli/exchange.rs callers) - audio_list_devices - audio_default_output_device_name - audio_set_device audio/mod.rs re-exports audio_default_output_device_name + audio_list_devices_for_engine from the new submodule. The four #[tauri::command] device handlers are registered in lib.rs run() under their new path `audio::device_commands::*`. audio/commands.rs goes from 1912 → 1830 LOC and drops its `use super::dev_io::*` since playback/radio/EQ don't touch device enumeration. Behaviour-preserving — same Tauri commands, same dev_io helpers, same selected_device + stream_handle mutations.
This commit is contained in:
@@ -406,10 +406,10 @@ pub fn run() {
|
||||
audio::commands::audio_set_crossfade,
|
||||
audio::commands::audio_set_gapless,
|
||||
audio::commands::audio_set_normalization,
|
||||
audio::commands::audio_list_devices,
|
||||
audio::commands::audio_canonicalize_selected_device,
|
||||
audio::commands::audio_default_output_device_name,
|
||||
audio::commands::audio_set_device,
|
||||
audio::device_commands::audio_list_devices,
|
||||
audio::device_commands::audio_canonicalize_selected_device,
|
||||
audio::device_commands::audio_default_output_device_name,
|
||||
audio::device_commands::audio_set_device,
|
||||
audio::commands::audio_chain_preload,
|
||||
discord::discord_update_presence,
|
||||
discord::discord_clear_presence,
|
||||
|
||||
Reference in New Issue
Block a user