- Create lightsync/audio/__init__.py package marker - Create lightsync/audio/engine.py with MPVEngine class - Headless mpv wrapper (vo=null, ao from MPV_AO env var default null) - 10Hz polling loop in daemon thread (time.sleep(0.1), not observe_property) - Thread-safe get_state() returning position, paused, duration, loaded, file - load/play/pause/seek/stop methods (AUD-01, AUD-03) - apply_timer_fix() with sys.platform == win32 guard (INF-03) - Update main.py lifespan to create/start/stop MPVEngine - MPV_AO env var controls audio output (default null for server mode) - engine exposed via app.state.engine for API routes
1.9 KiB
1.9 KiB