22
33#include " AudioCodecsBase.h"
44#include " AudioToolsConfig.h"
5- #include " AudioLogger.h"
5+ #include " AudioTools/CoreAudio/ AudioLogger.h"
66#include " AudioTools/CoreAudio/AudioIO.h"
77#include " AudioTools/CoreAudio/AudioOutput.h"
88#include " AudioTools/CoreAudio/AudioStreams.h"
@@ -135,9 +135,6 @@ class EncodedAudioOutput : public ModifyingOutput {
135135
136136 // / Starts the processing - sets the status to active
137137 bool begin () override {
138- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
139- custom_log_level.set ();
140- #endif
141138 TRACED ();
142139 if (!active) {
143140 TRACED ();
@@ -150,9 +147,6 @@ class EncodedAudioOutput : public ModifyingOutput {
150147 LOGW (" no decoder or encoder defined" );
151148 }
152149 }
153- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
154- custom_log_level.reset ();
155- #endif
156150 return active;
157151 }
158152
@@ -165,16 +159,10 @@ class EncodedAudioOutput : public ModifyingOutput {
165159 // / Ends the processing
166160 void end () override {
167161 if (active) {
168- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
169- custom_log_level.set ();
170- #endif
171162 TRACEI ();
172163 decoder_ptr->end ();
173164 encoder_ptr->end ();
174165 active = false ;
175- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
176- custom_log_level.reset ();
177- #endif
178166 }
179167 }
180168
@@ -184,9 +172,6 @@ class EncodedAudioOutput : public ModifyingOutput {
184172 // LOGI("write: %d", 0);
185173 return 0 ;
186174 }
187- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
188- custom_log_level.set ();
189- #endif
190175 LOGD (" EncodedAudioOutput::write: %d" , (int )len);
191176
192177 if (writer_ptr == nullptr || data == nullptr ) {
@@ -200,9 +185,6 @@ class EncodedAudioOutput : public ModifyingOutput {
200185
201186 size_t result = writer_ptr->write (data, len);
202187 LOGD (" EncodedAudioOutput::write: %d -> %d" , (int )len, (int )result);
203- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
204- custom_log_level.reset ();
205- #endif
206188 return result;
207189 }
208190
@@ -220,10 +202,6 @@ class EncodedAudioOutput : public ModifyingOutput {
220202 // / Provides the initialized encoder
221203 AudioEncoder &encoder () { return *encoder_ptr; }
222204
223- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
224- // / Defines the class specific custom log level
225- void setLogLevel (AudioLogger::LogLevel level) { custom_log_level.set (level); }
226- #endif
227205 // / Is Available for Write check activated ?
228206 bool isCheckAvailableForWrite () { return check_available_for_write; }
229207
@@ -238,9 +216,6 @@ class EncodedAudioOutput : public ModifyingOutput {
238216 Print *ptr_out = nullptr ;
239217 bool active = false ;
240218 bool check_available_for_write = false ;
241- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
242- CustomLogLevel custom_log_level;
243- #endif
244219 int frame_size = DEFAULT_BUFFER_SIZE;
245220};
246221
@@ -372,11 +347,6 @@ class EncodedAudioStream : public ReformatBaseStream {
372347 float getByteFactor () { return byte_factor; }
373348 void setByteFactor (float factor) { byte_factor = factor; }
374349
375- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
376- // / Defines the class specific custom log level
377- void setLogLevel (AudioLogger::LogLevel level) { enc_out.setLogLevel (level); }
378- #endif
379-
380350 // / defines the size of the decoded frame in bytes
381351 void setFrameSize (int size) { enc_out.setFrameSize (size); }
382352
0 commit comments