Skip to content

Commit 6b2aca1

Browse files
committed
Compile error for USE_AUDIO_LOGGING false
1 parent fc3f009 commit 6b2aca1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/AudioTools/CoreAudio/AudioHttp/URLStream.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ class URLStream : public AbstractURLStream {
9696
total_read = 0;
9797
active = result == 200;
9898
LOGI("==> http status: %d", result);
99+
#if USE_AUDIO_LOGGING
99100
custom_log_level.reset();
100-
101+
#endif
101102
return active;
102103
}
103104

@@ -121,8 +122,9 @@ class URLStream : public AbstractURLStream {
121122
total_read = 0;
122123
active = result == 200;
123124
LOGI("==> http status: %d", result);
125+
#if USE_AUDIO_LOGGING
124126
custom_log_level.reset();
125-
127+
#endif
126128
return active;
127129
}
128130

@@ -247,14 +249,17 @@ class URLStream : public AbstractURLStream {
247249
return request.available() > 0;
248250
}
249251

252+
#if USE_AUDIO_LOGGING
250253
/// Defines the class specific custom log level
251254
void setLogLevel(AudioLogger::LogLevel level) { custom_log_level.set(level); }
252-
255+
#endif
253256
const char* urlStr() { return url_str.c_str(); }
254257

255258
protected:
256259
HttpRequest request;
260+
#if USE_AUDIO_LOGGING
257261
CustomLogLevel custom_log_level;
262+
#endif
258263
Str url_str;
259264
Url url;
260265
long size;
@@ -282,7 +287,9 @@ class URLStream : public AbstractURLStream {
282287

283288
bool preProcess(const char* urlStr, const char* acceptMime) {
284289
TRACED();
290+
#if USE_AUDIO_LOGGING
285291
custom_log_level.set();
292+
#endif
286293
url_str = urlStr;
287294
url.setUrl(url_str.c_str());
288295
int result = -1;

0 commit comments

Comments
 (0)