Repository navigation
feat: audio in Quad mode for the selected cell (#12) - #51
Conversation
PR Summary by QodoAdd selectable audio playback in Quad mode
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
92dfb14 to
42e0e17
Compare
Every Quad cell now sets up its audio track, but only the selected cell passes its audio to the AudioManager, so switching needs no reconnect (fixes #12). - Long press on a cell selects it; a long press on the selected cell mutes. The cell shows an AUDIO badge, and the choice is saved ("quad_audio"). - A dedicated playback thread runs while Quad is shown; it is stopped with Quad and on pause. - A reconnect of the audible cell reconfigures the AudioManager with the new audio parameters. - README (EN/RU/ZH): Quad audio documented, #12 removed from the limitations. Tests: audio of a cell reaches the sink only while selected, never video packets; the audio configuration is reported on connect.
Review findings on Quad audio: an in-flight SDP callback of a stopped cell could reconfigure the audio, a track created during shutdown could stay open, and a late Quad packet could be played in single view. AudioManager now has routes: newRoute() bumps the route and clears the queues under one lock and closes audio. Every producer carries its route: onAudioFrame(frame, route), configure(config, route), the AAC decode loop (route of its codec), and track creation (route at start). Anything from an older route is dropped. - Single view: startListener() gives RtspClient a new route, and RtspClient configures the AudioManager itself on that route. - Quad: applyQuadAudio() starts a route for the selected cell; the cell configures audio on its own route; stopQuadAudio() invalidates it. Tests: stale config and frames are ignored, a new route clears the queue; a cell's config reaches the sink with the cell's route.
42e0e17 to
6c7da5b
Compare
feat: audio in Quad mode for the selected cell (#12)
Fixes #12.
How it works
AudioManager. Switching is instant and needs no reconnect. Audio traffic is small compared with video.AUDIObadge, and the choice is saved (quad_audio).AudioManager.Tests
QuadAudioTest:93 JVM tests on this branch (stacked on #48), all pass.
assembleDebugandlintDebugpass with no new issues.Device checklist