From 0b5a695acca80b1c4f1399002597d160ab09e6a7 Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Thu, 23 Jun 2022 15:39:56 +0200 Subject: [PATCH] example/sco_demo_util: drop ENABLE_SCO_STEREO_PLAYBACK code --- example/sco_demo_util.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/example/sco_demo_util.c b/example/sco_demo_util.c index ba70347ac..8402fd7ae 100644 --- a/example/sco_demo_util.c +++ b/example/sco_demo_util.c @@ -76,7 +76,6 @@ // number of sco packets until 'report' on console #define SCO_REPORT_PERIOD 100 -// #define ENABLE_SCO_STEREO_PLAYBACK #ifdef HAVE_POSIX_FILE_IO // length and name of wav file on disk @@ -210,11 +209,7 @@ static void playback_callback(int16_t * buffer, uint16_t num_samples){ // fill with silence while paused if (audio_output_paused){ if (btstack_ring_buffer_bytes_available(&audio_output_ring_buffer) < prebuffer_bytes){ -#ifdef ENABLE_SCO_STEREO_PLAYBACK - memset(buffer, 0, num_samples * BYTES_PER_FRAME * 2); -#else memset(buffer, 0, num_samples * BYTES_PER_FRAME); -#endif return; } else { // resume playback @@ -224,32 +219,13 @@ static void playback_callback(int16_t * buffer, uint16_t num_samples){ // get data from ringbuffer uint32_t bytes_read = 0; -#ifdef ENABLE_SCO_STEREO_PLAYBACK - while (num_samples){ - int16_t temp[16]; - unsigned int bytes_to_read = btstack_min(num_samples * BYTES_PER_FRAME, sizeof(temp)); - btstack_ring_buffer_read(&audio_output_ring_buffer, (uint8_t *) &temp[0], bytes_to_read, &bytes_read); - if (bytes_read == 0) break; - unsigned int i; - for (i=0;iinit(2, sample_rate, &playback_callback); -#else audio_sink->init(1, sample_rate, &playback_callback); -#endif audio_sink->start_stream(); audio_output_paused = 1;