Skip to content

Commit

Permalink
Compile error for USE_AUDIO_LOGGING false
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Nov 5, 2024
1 parent fc3f009 commit 6b2aca1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/AudioTools/CoreAudio/AudioHttp/URLStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ class URLStream : public AbstractURLStream {
total_read = 0;
active = result == 200;
LOGI("==> http status: %d", result);
#if USE_AUDIO_LOGGING
custom_log_level.reset();

#endif
return active;
}

Expand All @@ -121,8 +122,9 @@ class URLStream : public AbstractURLStream {
total_read = 0;
active = result == 200;
LOGI("==> http status: %d", result);
#if USE_AUDIO_LOGGING
custom_log_level.reset();

#endif
return active;
}

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

#if USE_AUDIO_LOGGING
/// Defines the class specific custom log level
void setLogLevel(AudioLogger::LogLevel level) { custom_log_level.set(level); }

#endif
const char* urlStr() { return url_str.c_str(); }

protected:
HttpRequest request;
#if USE_AUDIO_LOGGING
CustomLogLevel custom_log_level;
#endif
Str url_str;
Url url;
long size;
Expand Down Expand Up @@ -282,7 +287,9 @@ class URLStream : public AbstractURLStream {

bool preProcess(const char* urlStr, const char* acceptMime) {
TRACED();
#if USE_AUDIO_LOGGING
custom_log_level.set();
#endif
url_str = urlStr;
url.setUrl(url_str.c_str());
int result = -1;
Expand Down

0 comments on commit 6b2aca1

Please sign in to comment.