From 7f500823c03dfc6dc39acb63dbd66e0014b27da7 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 7 Jul 2023 14:59:14 +0200 Subject: [PATCH] example/a2dp_source_demo: define A2DP_SOURCE_DEMO_PREFERRED_SAMPLING_RATE --- example/a2dp_source_demo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/a2dp_source_demo.c b/example/a2dp_source_demo.c index 9b4f809fc..1b8e6518a 100644 --- a/example/a2dp_source_demo.c +++ b/example/a2dp_source_demo.c @@ -75,6 +75,9 @@ //#define AVRCP_BROWSING_ENABLED +// select preferred audio sampling rate: 44100 or 48000 +#define A2DP_SOURCE_DEMO_PREFERRED_SAMPLING_RATE 44100 + #define NUM_CHANNELS 2 #define BYTES_PER_AUDIO_SAMPLE (2*NUM_CHANNELS) #define AUDIO_TIMEOUT_MS 10 @@ -266,7 +269,7 @@ static int a2dp_source_and_avrcp_services_init(void){ return 1; } - avdtp_set_preferred_sampling_frequency(local_stream_endpoint, 44100); + avdtp_set_preferred_sampling_frequency(local_stream_endpoint, A2DP_SOURCE_DEMO_PREFERRED_SAMPLING_RATE); // Store stream enpoint's SEP ID, as it is used by A2DP API to indentify the stream endpoint media_tracker.local_seid = avdtp_local_seid(local_stream_endpoint);