mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
a2dp sink demo: fix audio on stream restart
This commit is contained in:
parent
8f8dd6263a
commit
b50123e9f2
@ -352,7 +352,6 @@ static void hal_audio_dma_process(btstack_data_source_t * ds, btstack_data_sourc
|
|||||||
|
|
||||||
static int media_processing_init(avdtp_media_codec_configuration_sbc_t configuration){
|
static int media_processing_init(avdtp_media_codec_configuration_sbc_t configuration){
|
||||||
if (media_initialized) return 0;
|
if (media_initialized) return 0;
|
||||||
|
|
||||||
#ifdef DECODE_SBC
|
#ifdef DECODE_SBC
|
||||||
btstack_sbc_decoder_init(&state, mode, handle_pcm_data, NULL);
|
btstack_sbc_decoder_init(&state, mode, handle_pcm_data, NULL);
|
||||||
#endif
|
#endif
|
||||||
@ -416,6 +415,7 @@ static int media_processing_init(avdtp_media_codec_configuration_sbc_t configura
|
|||||||
memset(ring_buffer_storage, 0, sizeof(ring_buffer_storage));
|
memset(ring_buffer_storage, 0, sizeof(ring_buffer_storage));
|
||||||
btstack_ring_buffer_init(&ring_buffer, ring_buffer_storage, sizeof(ring_buffer_storage));
|
btstack_ring_buffer_init(&ring_buffer, ring_buffer_storage, sizeof(ring_buffer_storage));
|
||||||
audio_stream_started = 0;
|
audio_stream_started = 0;
|
||||||
|
audio_stream_paused = 0;
|
||||||
#endif
|
#endif
|
||||||
media_initialized = 1;
|
media_initialized = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user