pub fn peer_audio_stream_id(peer_id: PeerId, uuid: Uuid) -> [u8; 16]
Expand description
Generate a unique ID to use with audio_core, given the peer_id
and whether it
will be an input device. Current format is:
[
0x42, 0x54, - Prefix reserved for Bluetooth Audio devices
0xUU, 0xID, - UUID for the service being provided locally on this device:
- 0x11, 0x1E Handsfree (for input devices)
- 0x11, 0x1F Handsfree Audio Gateway (for output devices)
- 0x11, 0x0A A2DP AudioSource
- 0x11, 0x0B A2DP AudioSink (unused for now)
0x00, 0x00, 0x00, 0x00 - Reserved for Future Use
(PeerId in big endian, 8 bytes)
]
Panics if the uuid provided is not a 16-bit Bluetooth Service UUID.