Skip to content

Commit a18f6e2

Browse files
committed
VS1053 logging optimization
1 parent 8affbea commit a18f6e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/AudioLibs/VS1053Stream.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,15 @@ class VS1053Stream : public AudioStreamX {
209209
/// Starts with the indicated configuration
210210
bool begin(VS1053Config cfg) {
211211
LOGI(LOG_METHOD);
212-
cfg.logInfo();
212+
this->cfg = cfg;
213+
setAudioInfo(cfg);
213214
LOGI("is_encoded_data: %s", cfg.is_encoded_data?"true":"false");
214215
LOGI("cs_pin: %d", cfg.cs_pin);
215216
LOGI("dcs_pin: %d", cfg.dcs_pin);
216217
LOGI("dreq_pin: %d", cfg.dreq_pin);
217218
LOGI("reset_pin: %d", cfg.reset_pin);
218219
LOGI("cs_sd_pin: %d", cfg.cs_sd_pin);
219220

220-
this->cfg = cfg;
221-
setAudioInfo(cfg);
222221
if (p_driver==nullptr){
223222
p_driver = new VS1053BaseStream(cfg.cs_pin,cfg.dcs_pin,cfg.dreq_pin, cfg.reset_pin);
224223
}

0 commit comments

Comments
 (0)