sco_util: simplify double #ifdefs

This commit is contained in:
Matthias Ringwald 2016-07-23 16:40:17 +02:00
parent 1e98a36782
commit 17cd946e87

View File

@ -293,21 +293,13 @@ void sco_demo_set_codec(uint8_t codec){
if (negotiated_codec == codec) return; if (negotiated_codec == codec) return;
negotiated_codec = codec; negotiated_codec = codec;
#if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE #if SCO_DEMO_MODE == SCO_DEMO_MODE_SINE
#ifdef SCO_WAV_FILENAME #if defined(SCO_WAV_FILENAME) || defined(SCO_SBC_FILENAME)
if (negotiated_codec == HFP_CODEC_MSBC){ if (negotiated_codec == HFP_CODEC_MSBC){
sco_demo_init_mSBC(); sco_demo_init_mSBC();
} else { } else {
sco_demo_init_CVSD(); sco_demo_init_CVSD();
} }
#endif #endif
#ifdef SCO_SBC_FILENAME
if (negotiated_codec == HFP_CODEC_MSBC){
sco_demo_init_mSBC();
} else {
sco_demo_init_CVSD();
}
#endif
#endif #endif
} }