Skip to content

fix(audio): keep concurrent audio streams with the same type apart - #44

Open
code-new-bie wants to merge 1 commit into
shilapi:masterfrom
code-new-bie:pr/audio-streams-by-audio-type
Open

code-new-bie wants to merge 1 commit into
shilapi:masterfrom
code-new-bie:pr/audio-streams-by-audio-type

Conversation

@code-new-bie

Copy link
Copy Markdown

CarPlay can run several audio streams of the same stream type at once: music,
navigation prompts and Siri can all arrive as type 100, told apart only by
their audioType. Streams, audio metadata, packet captures, renderers and
microphone uplinks were keyed by the type alone, so a second stream replaced
the first one's renderer and the first stream went silent or played through
the wrong output.

They are now keyed by (type, audioType) through a new AudioStreamId: a new
stream only replaces one with the same audio type, and a TEARDOWN, which names
only the stream type, releases every audio type variant of it. The web display
media tap still receives the stream type, as before.

CarPlayMediaEngineTest covers two concurrent type-100 streams and their
teardown.

CarPlay can run several audio streams of the same stream type at once: music,
navigation prompts and Siri can all arrive as type 100, told apart only by
their audioType. Streams, audio metadata, packet captures, renderers and
microphone uplinks were keyed by the type alone, so a second stream replaced
the first one's renderer and the first stream went silent or played through
the wrong output.

They are now keyed by (type, audioType) through a new AudioStreamId: a new
stream only replaces one with the same audio type, and a TEARDOWN, which names
only the stream type, releases every audio type variant of it. The web display
media tap still receives the stream type, as before.

CarPlayMediaEngineTest covers two concurrent type-100 streams and their
teardown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant