Commit Graph
8 Commits
Author SHA1 Message Date
vicrodh 1d0e069be1 feat(config): add stream_first_track setting to AudioSettings
Add two new fields to AudioSettings struct:
- stream_first_track: bool flag to enable streaming for uncached tracks
- stream_buffer_seconds: u8 for initial buffer size (1-10 seconds)

Includes:
- Database schema migration for existing users
- Getter/setter methods in AudioSettingsStore
- Tauri commands for frontend integration
- Registration in lib.rs invoke_handler

cpvsc
2026-01-25 12:20:47 -06:00
vicrodh 45e6df49d5 Add UI for ALSA hardware volume control
- Add alsa_hardware_volume to AudioSettings interface
- Add Tauri command set_audio_alsa_hardware_volume
- Add checkbox in Settings (visible only for ALSA Direct + Hw plugin)
- Checkbox disabled by default for maximum compatibility
- Clear tooltip explaining experimental nature and risks
2026-01-19 04:08:44 -06:00
vicrodh ce72addd90 Fix database migration: remove alsa_hardware_volume from INSERT
User's existing database doesn't have the column yet, so INSERT fails.
Migration adds column after INSERT runs. Solution: only insert old columns.
2026-01-19 04:01:29 -06:00
vicrodh 31798432cb Fix database migration for alsa_hardware_volume column
PROBLEM: App crashed on startup with existing databases:
'table audio_settings has no column named alsa_hardware_volume'

CAUSE: ALTER TABLE with 'NOT NULL' constraint fails on SQLite migrations.

FIX:
- Removed NOT NULL from ALTER TABLE statement
- Handle NULL values with unwrap_or(0) in get_settings()
- Defaults to false (disabled) for old databases

Now works with both new and existing databases.
2026-01-19 03:52:01 -06:00
vicrodh 7177f248c9 Add alsa_hardware_volume setting (disabled by default)
Preparation for hybrid volume control (B+C option):
- New field: alsa_hardware_volume: bool (default: false)
- Database schema updated with migration support
- Setter/getter methods added

When enabled, will attempt to control DAC volume via ALSA mixer.
When disabled (default), in-app volume control is disabled for maximum
compatibility (user controls volume on DAC/amplifier).
2026-01-19 03:50:02 -06:00
vicrodh d5a2991e2b Fase 3: Add backend and plugin persistence to audio settings
AUDIO SETTINGS EXTENDED:
- Added backend_type field (PipeWire/ALSA/Pulse, None=auto)
- Added alsa_plugin field (Hw/PlugHw/Pcm for ALSA backend)
- Default: backend_type=None (auto-detect), alsa_plugin=Hw

DATABASE MIGRATION:
- ALTER TABLE for existing databases (backward compatible)
- Stores enums as JSON strings for flexibility

NEW TAURI COMMANDS:
- set_audio_backend_type(backend_type)
- set_audio_alsa_plugin(plugin)

VERIFIED:
- cargo check passes
- Migration handles existing databases gracefully
- Ready for Phase 4 (player integration)
2026-01-17 13:04:30 -06:00
vicrodh 5f725195c2 fix: unify data paths to use qbz instead of qbz-nix
Changes all application data paths from qbz-nix to qbz:
- Cache directory: ~/.cache/qbz-nix -> ~/.cache/qbz
- Config directory: ~/.config/qbz-nix -> ~/.config/qbz
- Data directory: ~/.local/share/qbz-nix -> ~/.local/share/qbz

This fixes path inconsistencies between development and production builds
and resolves asset protocol permission issues with downloaded album artwork.

cp
2026-01-14 23:49:30 -06:00
vicrodh 29079458cf Add audio settings storage and commands
Backend:
- Create config/audio_settings.rs with SQLite persistence
- Store output_device, exclusive_mode, dac_passthrough, sample_rate
- Add Tauri commands: get_audio_settings, set_audio_*
- Register state and commands in lib.rs

Note: Player modification to USE these settings is pending.
See HANDOFF.md for implementation details.
2026-01-11 03:46:21 -06:00