From db6242f07615f85d8bd1bcf9b6e86c4e031ecc19 Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 13 Mar 2021 00:23:13 +0700 Subject: [PATCH] move AUDIO_SAMPLE_RATE to example main.c --- examples/device/audio_test/src/main.c | 4 ++++ examples/device/audio_test/src/tusb_config.h | 4 ---- examples/device/uac2_headset/src/main.c | 4 ++++ examples/device/uac2_headset/src/tusb_config.h | 5 ----- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/device/audio_test/src/main.c b/examples/device/audio_test/src/main.c index c2406bd23..a631f37b6 100644 --- a/examples/device/audio_test/src/main.c +++ b/examples/device/audio_test/src/main.c @@ -34,6 +34,10 @@ // MACRO CONSTANT TYPEDEF PROTYPES //--------------------------------------------------------------------+ +#ifndef AUDIO_SAMPLE_RATE +#define AUDIO_SAMPLE_RATE 48000 +#endif + /* Blink pattern * - 250 ms : device not mounted * - 1000 ms : device mounted diff --git a/examples/device/audio_test/src/tusb_config.h b/examples/device/audio_test/src/tusb_config.h index 6ee5d937c..557a8b15e 100644 --- a/examples/device/audio_test/src/tusb_config.h +++ b/examples/device/audio_test/src/tusb_config.h @@ -91,10 +91,6 @@ extern "C" { // AUDIO CLASS DRIVER CONFIGURATION //-------------------------------------------------------------------- -#ifndef AUDIO_SAMPLE_RATE -#define AUDIO_SAMPLE_RATE 48000 -#endif - // Audio format type #define CFG_TUD_AUDIO_FORMAT_TYPE_TX AUDIO_FORMAT_TYPE_I diff --git a/examples/device/uac2_headset/src/main.c b/examples/device/uac2_headset/src/main.c index cdb29f3f4..f5360a0b6 100644 --- a/examples/device/uac2_headset/src/main.c +++ b/examples/device/uac2_headset/src/main.c @@ -34,6 +34,10 @@ // MACRO CONSTANT TYPEDEF PROTOTYPES //--------------------------------------------------------------------+ +#ifndef AUDIO_SAMPLE_RATE +#define AUDIO_SAMPLE_RATE 48000 +#endif + /* Blink pattern * - 25 ms : streaming data * - 250 ms : device not mounted diff --git a/examples/device/uac2_headset/src/tusb_config.h b/examples/device/uac2_headset/src/tusb_config.h index 45acf0093..7795d8405 100644 --- a/examples/device/uac2_headset/src/tusb_config.h +++ b/examples/device/uac2_headset/src/tusb_config.h @@ -91,11 +91,6 @@ extern "C" { //-------------------------------------------------------------------- // AUDIO CLASS DRIVER CONFIGURATION //-------------------------------------------------------------------- - -#ifndef AUDIO_SAMPLE_RATE -#define AUDIO_SAMPLE_RATE 48000 -#endif - #define CFG_TUD_AUDIO_IN_PATH (CFG_TUD_AUDIO) #define CFG_TUD_AUDIO_OUT_PATH (CFG_TUD_AUDIO)