Zephyr Project API
3.3.0
A Scalable Open Source RTOS
|
#include <audio.h>
Data Fields | |
bool(* | scan_recv )(const struct bt_le_scan_recv_info *info, struct net_buf_simple *ad, uint32_t broadcast_id) |
Scan receive callback. More... | |
void(* | pa_synced )(struct bt_audio_broadcast_sink *sink, struct bt_le_per_adv_sync *sync, uint32_t broadcast_id) |
Periodic advertising sync callback. More... | |
void(* | base_recv )(struct bt_audio_broadcast_sink *sink, const struct bt_audio_base *base) |
Broadcast Audio Source Endpoint (BASE) received. More... | |
void(* | syncable )(struct bt_audio_broadcast_sink *sink, bool encrypted) |
Broadcast sink is syncable. More... | |
void(* | scan_term )(int err) |
Scan terminated callback. More... | |
void(* | pa_sync_lost )(struct bt_audio_broadcast_sink *sink) |
Periodic advertising synchronization lost callback. More... | |
Broadcast Audio Sink callback structure
void(* bt_audio_broadcast_sink_cb::base_recv) (struct bt_audio_broadcast_sink *sink, const struct bt_audio_base *base) |
Broadcast Audio Source Endpoint (BASE) received.
Callback for when we receive a BASE from a broadcaster after syncing to the broadcaster's periodic advertising.
sink | Pointer to the sink structure. |
base | Broadcast Audio Source Endpoint (BASE). |
void(* bt_audio_broadcast_sink_cb::pa_sync_lost) (struct bt_audio_broadcast_sink *sink) |
Periodic advertising synchronization lost callback.
The periodic advertising synchronization lost callback is called if the periodic advertising sync is lost. If this happens, the sink object is deleted. To synchronize to the broadcaster again, bt_audio_broadcast_sink_scan_start() must be called.
sink | Pointer to the sink structure. |
void(* bt_audio_broadcast_sink_cb::pa_synced) (struct bt_audio_broadcast_sink *sink, struct bt_le_per_adv_sync *sync, uint32_t broadcast_id) |
Periodic advertising sync callback.
Called when synchronized to a periodic advertising. When synchronized a bt_audio_broadcast_sink structure is allocated for future use.
sink | Pointer to the allocated sink structure. |
sync | Pointer to the periodic advertising sync. |
broadcast_id | 24-bit broadcast ID previously reported by scan_recv. |
bool(* bt_audio_broadcast_sink_cb::scan_recv) (const struct bt_le_scan_recv_info *info, struct net_buf_simple *ad, uint32_t broadcast_id) |
Scan receive callback.
Scan receive callback is called whenever a broadcast source has been found.
info | Advertiser packet information. |
ad | Buffer containing advertiser data. |
broadcast_id | 24-bit broadcast ID |
void(* bt_audio_broadcast_sink_cb::scan_term) (int err) |
Scan terminated callback.
Scan terminated callback is called whenever a scan started by bt_audio_broadcast_sink_scan_start() is terminated before bt_audio_broadcast_sink_scan_stop().
Typical reasons for this are that the periodic advertising has synchronized (success criteria) or the scan timed out. It may also be called if the periodic advertising failed to synchronize.
err | 0 in case of success or negative value in case of error. |
void(* bt_audio_broadcast_sink_cb::syncable) (struct bt_audio_broadcast_sink *sink, bool encrypted) |
Broadcast sink is syncable.
Called whenever a broadcast sink is not synchronized to audio, but the audio is synchronizable. This is inferred when a BIGInfo report is received.
Once this callback has been called, it is possible to call bt_audio_broadcast_sink_sync() to synchronize to the audio stream(s).
sink | Pointer to the sink structure. |
encrypted | Whether or not the broadcast is encrypted |