2
2
3
3
#include " AudioCodecsBase.h"
4
4
#include " AudioToolsConfig.h"
5
- #include " AudioLogger.h"
5
+ #include " AudioTools/CoreAudio/ AudioLogger.h"
6
6
#include " AudioTools/CoreAudio/AudioIO.h"
7
7
#include " AudioTools/CoreAudio/AudioOutput.h"
8
8
#include " AudioTools/CoreAudio/AudioStreams.h"
@@ -135,9 +135,6 @@ class EncodedAudioOutput : public ModifyingOutput {
135
135
136
136
// / Starts the processing - sets the status to active
137
137
bool begin () override {
138
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
139
- custom_log_level.set ();
140
- #endif
141
138
TRACED ();
142
139
if (!active) {
143
140
TRACED ();
@@ -150,9 +147,6 @@ class EncodedAudioOutput : public ModifyingOutput {
150
147
LOGW (" no decoder or encoder defined" );
151
148
}
152
149
}
153
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
154
- custom_log_level.reset ();
155
- #endif
156
150
return active;
157
151
}
158
152
@@ -165,16 +159,10 @@ class EncodedAudioOutput : public ModifyingOutput {
165
159
// / Ends the processing
166
160
void end () override {
167
161
if (active) {
168
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
169
- custom_log_level.set ();
170
- #endif
171
162
TRACEI ();
172
163
decoder_ptr->end ();
173
164
encoder_ptr->end ();
174
165
active = false ;
175
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
176
- custom_log_level.reset ();
177
- #endif
178
166
}
179
167
}
180
168
@@ -184,9 +172,6 @@ class EncodedAudioOutput : public ModifyingOutput {
184
172
// LOGI("write: %d", 0);
185
173
return 0 ;
186
174
}
187
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
188
- custom_log_level.set ();
189
- #endif
190
175
LOGD (" EncodedAudioOutput::write: %d" , (int )len);
191
176
192
177
if (writer_ptr == nullptr || data == nullptr ) {
@@ -200,9 +185,6 @@ class EncodedAudioOutput : public ModifyingOutput {
200
185
201
186
size_t result = writer_ptr->write (data, len);
202
187
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
206
188
return result;
207
189
}
208
190
@@ -220,10 +202,6 @@ class EncodedAudioOutput : public ModifyingOutput {
220
202
// / Provides the initialized encoder
221
203
AudioEncoder &encoder () { return *encoder_ptr; }
222
204
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
227
205
// / Is Available for Write check activated ?
228
206
bool isCheckAvailableForWrite () { return check_available_for_write; }
229
207
@@ -238,9 +216,6 @@ class EncodedAudioOutput : public ModifyingOutput {
238
216
Print *ptr_out = nullptr ;
239
217
bool active = false ;
240
218
bool check_available_for_write = false ;
241
- #if USE_AUDIO_LOGGING && !defined(USE_IDF_LOGGER)
242
- CustomLogLevel custom_log_level;
243
- #endif
244
219
int frame_size = DEFAULT_BUFFER_SIZE;
245
220
};
246
221
@@ -372,11 +347,6 @@ class EncodedAudioStream : public ReformatBaseStream {
372
347
float getByteFactor () { return byte_factor; }
373
348
void setByteFactor (float factor) { byte_factor = factor; }
374
349
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
-
380
350
// / defines the size of the decoded frame in bytes
381
351
void setFrameSize (int size) { enc_out.setFrameSize (size); }
382
352
0 commit comments