aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp2
-rw-r--r--alc/alconfig.cpp2
-rw-r--r--alc/ambdec.cpp2
-rw-r--r--alc/backends/alsa.cpp2
-rw-r--r--alc/backends/base.cpp2
-rw-r--r--alc/backends/coreaudio.cpp2
-rw-r--r--alc/backends/dsound.cpp2
-rw-r--r--alc/backends/jack.cpp2
-rw-r--r--alc/backends/null.cpp1
-rw-r--r--alc/backends/oboe.cpp2
-rw-r--r--alc/backends/opensl.cpp2
-rw-r--r--alc/backends/oss.cpp2
-rw-r--r--alc/backends/portaudio.cpp2
-rw-r--r--alc/backends/pulseaudio.cpp2
-rw-r--r--alc/backends/sdl2.cpp2
-rw-r--r--alc/backends/sndio.cpp4
-rw-r--r--alc/backends/solaris.cpp2
-rw-r--r--alc/backends/wasapi.cpp2
-rw-r--r--alc/backends/wave.cpp2
-rw-r--r--alc/backends/winmm.cpp2
-rw-r--r--alc/effects/convolution.cpp2
-rw-r--r--alc/helpers.cpp79
-rw-r--r--alc/hrtf.cpp2
-rw-r--r--alc/logging.h47
-rw-r--r--alc/panning.cpp2
-rw-r--r--alc/voice.cpp2
26 files changed, 25 insertions, 150 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 2720033e..6fd61b44 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -85,6 +85,7 @@
#include "core/mastering.h"
#include "core/filters/nfc.h"
#include "core/filters/splitter.h"
+#include "core/logging.h"
#include "core/uhjfilter.h"
#include "cpu_caps.h"
#include "effects/base.h"
@@ -93,7 +94,6 @@
#include "hrtf.h"
#include "inprogext.h"
#include "intrusive_ptr.h"
-#include "logging.h"
#include "opthelpers.h"
#include "pragmadefs.h"
#include "ringbuffer.h"
diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp
index ac075b54..634679aa 100644
--- a/alc/alconfig.cpp
+++ b/alc/alconfig.cpp
@@ -41,7 +41,7 @@
#include "alfstream.h"
#include "alstring.h"
#include "compat.h"
-#include "logging.h"
+#include "core/logging.h"
#include "strutils.h"
#include "vector.h"
diff --git a/alc/ambdec.cpp b/alc/ambdec.cpp
index eaeb9086..a50d6d95 100644
--- a/alc/ambdec.cpp
+++ b/alc/ambdec.cpp
@@ -11,7 +11,7 @@
#include <string>
#include "alfstream.h"
-#include "logging.h"
+#include "core/logging.h"
namespace {
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index a07d006b..0166e28c 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -45,8 +45,8 @@
#include "alnumeric.h"
#include "aloptional.h"
#include "alu.h"
+#include "core/logging.h"
#include "dynload.h"
-#include "logging.h"
#include "ringbuffer.h"
#include "threads.h"
#include "vector.h"
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp
index 04fc4d64..9d8d0c64 100644
--- a/alc/backends/base.cpp
+++ b/alc/backends/base.cpp
@@ -19,7 +19,7 @@
#include "alnumeric.h"
#include "aloptional.h"
#include "atomic.h"
-#include "logging.h"
+#include "core/logging.h"
bool BackendBase::reset()
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 32f8d123..80259667 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -34,7 +34,7 @@
#include "alu.h"
#include "ringbuffer.h"
#include "converter.h"
-#include "logging.h"
+#include "core/logging.h"
#include "backends/base.h"
#include <unistd.h>
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index 9ff5505b..061e9a18 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -48,8 +48,8 @@
#include "alexcpt.h"
#include "alu.h"
#include "compat.h"
+#include "core/logging.h"
#include "dynload.h"
-#include "logging.h"
#include "ringbuffer.h"
#include "strutils.h"
#include "threads.h"
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index bc3a2d09..871562ff 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -35,8 +35,8 @@
#include "alu.h"
#include "alconfig.h"
#include "alexcpt.h"
+#include "core/logging.h"
#include "dynload.h"
-#include "logging.h"
#include "ringbuffer.h"
#include "threads.h"
diff --git a/alc/backends/null.cpp b/alc/backends/null.cpp
index f78a23a0..8a134a93 100644
--- a/alc/backends/null.cpp
+++ b/alc/backends/null.cpp
@@ -34,7 +34,6 @@
#include "alexcpt.h"
#include "almalloc.h"
#include "alu.h"
-#include "logging.h"
#include "threads.h"
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index f4a9877a..1c1b22cd 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -7,7 +7,7 @@
#include <cstring>
#include "alu.h"
-#include "logging.h"
+#include "core/logging.h"
#include "oboe/Oboe.h"
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 74309a94..185c9999 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -36,8 +36,8 @@
#include "alexcpt.h"
#include "alu.h"
#include "compat.h"
+#include "core/logging.h"
#include "endiantest.h"
-#include "logging.h"
#include "ringbuffer.h"
#include "threads.h"
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index 0f00115e..513f481a 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -50,7 +50,7 @@
#include "alnumeric.h"
#include "aloptional.h"
#include "alu.h"
-#include "logging.h"
+#include "core/logging.h"
#include "ringbuffer.h"
#include "threads.h"
#include "vector.h"
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp
index 42dbb4c9..54fac803 100644
--- a/alc/backends/portaudio.cpp
+++ b/alc/backends/portaudio.cpp
@@ -30,9 +30,9 @@
#include "alexcpt.h"
#include "alu.h"
#include "alconfig.h"
+#include "core/logging.h"
#include "dynload.h"
#include "ringbuffer.h"
-#include "logging.h"
#include <portaudio.h>
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 5bcd8b5f..73312722 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -40,8 +40,8 @@
#include "alconfig.h"
#include "alexcpt.h"
#include "compat.h"
+#include "core/logging.h"
#include "dynload.h"
-#include "logging.h"
#include "strutils.h"
#include <pulse/pulseaudio.h>
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp
index 30335140..05e8e4e0 100644
--- a/alc/backends/sdl2.cpp
+++ b/alc/backends/sdl2.cpp
@@ -33,7 +33,7 @@
#include "alexcpt.h"
#include "almalloc.h"
#include "alu.h"
-#include "logging.h"
+#include "core/logging.h"
#include <SDL2/SDL.h>
diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp
index c20ce496..4e9af3bc 100644
--- a/alc/backends/sndio.cpp
+++ b/alc/backends/sndio.cpp
@@ -32,10 +32,10 @@
#include "alcmain.h"
#include "alexcpt.h"
#include "alu.h"
+#include "core/logging.h"
+#include "ringbuffer.h"
#include "threads.h"
#include "vector.h"
-#include "ringbuffer.h"
-#include "logging.h"
#include <sndio.h>
diff --git a/alc/backends/solaris.cpp b/alc/backends/solaris.cpp
index 6849a820..5134c101 100644
--- a/alc/backends/solaris.cpp
+++ b/alc/backends/solaris.cpp
@@ -43,7 +43,7 @@
#include "alu.h"
#include "alconfig.h"
#include "compat.h"
-#include "logging.h"
+#include "core/logging.h"
#include "threads.h"
#include "vector.h"
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index ba0d52d5..154355f2 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -60,7 +60,7 @@
#include "alu.h"
#include "compat.h"
#include "converter.h"
-#include "logging.h"
+#include "core/logging.h"
#include "ringbuffer.h"
#include "strutils.h"
#include "threads.h"
diff --git a/alc/backends/wave.cpp b/alc/backends/wave.cpp
index 473d0314..a9713718 100644
--- a/alc/backends/wave.cpp
+++ b/alc/backends/wave.cpp
@@ -43,8 +43,8 @@
#include "alnumeric.h"
#include "alu.h"
#include "compat.h"
+#include "core/logging.h"
#include "endiantest.h"
-#include "logging.h"
#include "strutils.h"
#include "threads.h"
#include "vector.h"
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index 274536b3..d4e7c786 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -42,7 +42,7 @@
#include "alexcpt.h"
#include "alu.h"
#include "compat.h"
-#include "logging.h"
+#include "core/logging.h"
#include "ringbuffer.h"
#include "strutils.h"
#include "threads.h"
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 677c59ba..667d5fb3 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -18,9 +18,9 @@
#include "core/ambidefs.h"
#include "core/filters/splitter.h"
#include "core/fmt_traits.h"
+#include "core/logging.h"
#include "effects/base.h"
#include "effectslot.h"
-#include "logging.h"
#include "polyphase_resampler.h"
diff --git a/alc/helpers.cpp b/alc/helpers.cpp
index 1003ccfa..8c1c8562 100644
--- a/alc/helpers.cpp
+++ b/alc/helpers.cpp
@@ -35,7 +35,7 @@
#include "alspan.h"
#include "alstring.h"
#include "compat.h"
-#include "logging.h"
+#include "core/logging.h"
#include "strutils.h"
#include "vector.h"
@@ -79,36 +79,6 @@ const PathNamePair &GetProcBinary()
return ret;
}
-
-void al_print(LogLevel level, FILE *logfile, const char *fmt, ...)
-{
- al::vector<char> dynmsg;
- char stcmsg[256];
- char *str{stcmsg};
-
- va_list args, args2;
- va_start(args, fmt);
- va_copy(args2, args);
- int msglen{std::vsnprintf(str, sizeof(stcmsg), fmt, args)};
- if UNLIKELY(msglen >= 0 && static_cast<size_t>(msglen) >= sizeof(stcmsg))
- {
- dynmsg.resize(static_cast<size_t>(msglen) + 1u);
- str = dynmsg.data();
- msglen = std::vsnprintf(str, dynmsg.size(), fmt, args2);
- }
- va_end(args2);
- va_end(args);
-
- std::wstring wstr{utf8_to_wstr(str)};
- if(gLogLevel >= level)
- {
- fputws(wstr.c_str(), logfile);
- fflush(logfile);
- }
- OutputDebugStringW(wstr.c_str());
-}
-
-
namespace {
void DirectorySearch(const char *path, const char *ext, al::vector<std::string> *const results)
@@ -225,9 +195,6 @@ void SetRTPriority(void)
#ifdef __HAIKU__
#include <FindDirectory.h>
#endif
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
#ifdef HAVE_PROC_PIDPATH
#include <libproc.h>
#endif
@@ -323,50 +290,6 @@ const PathNamePair &GetProcBinary()
return ret;
}
-
-void al_print(LogLevel level, FILE *logfile, const char *fmt, ...)
-{
- al::vector<char> dynmsg;
- char stcmsg[256];
- char *str{stcmsg};
-
- va_list args, args2;
- va_start(args, fmt);
- va_copy(args2, args);
- int msglen{std::vsnprintf(str, sizeof(stcmsg), fmt, args)};
- if UNLIKELY(msglen >= 0 && static_cast<size_t>(msglen) >= sizeof(stcmsg))
- {
- dynmsg.resize(static_cast<size_t>(msglen) + 1u);
- str = dynmsg.data();
- msglen = std::vsnprintf(str, dynmsg.size(), fmt, args2);
- }
- va_end(args2);
- va_end(args);
-
- if(gLogLevel >= level)
- {
- fputs(str, logfile);
- fflush(logfile);
- }
-#ifdef __ANDROID__
- auto android_severity = [](LogLevel l) noexcept
- {
- switch(l)
- {
- case LogLevel::Trace: return ANDROID_LOG_DEBUG;
- case LogLevel::Warning: return ANDROID_LOG_WARN;
- case LogLevel::Error: return ANDROID_LOG_ERROR;
- /* Should not happen. */
- case LogLevel::Disable:
- break;
- }
- return ANDROID_LOG_ERROR;
- };
- __android_log_print(android_severity(level), "openal", "%s", str);
-#endif
-}
-
-
namespace {
void DirectorySearch(const char *path, const char *ext, al::vector<std::string> *const results)
diff --git a/alc/hrtf.cpp b/alc/hrtf.cpp
index e01cdf97..b13b50cb 100644
--- a/alc/hrtf.cpp
+++ b/alc/hrtf.cpp
@@ -48,7 +48,7 @@
#include "aloptional.h"
#include "alspan.h"
#include "core/filters/splitter.h"
-#include "logging.h"
+#include "core/logging.h"
#include "math_defs.h"
#include "opthelpers.h"
#include "polyphase_resampler.h"
diff --git a/alc/logging.h b/alc/logging.h
deleted file mode 100644
index 32a877e1..00000000
--- a/alc/logging.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef LOGGING_H
-#define LOGGING_H
-
-#include <stdio.h>
-
-#include "opthelpers.h"
-
-
-enum class LogLevel {
- Disable,
- Error,
- Warning,
- Trace
-};
-extern LogLevel gLogLevel;
-
-extern FILE *gLogFile;
-
-
-#if !defined(_WIN32) && !defined(__ANDROID__)
-#define TRACE(...) do { \
- if UNLIKELY(gLogLevel >= LogLevel::Trace) \
- fprintf(gLogFile, "[ALSOFT] (II) " __VA_ARGS__); \
-} while(0)
-
-#define WARN(...) do { \
- if UNLIKELY(gLogLevel >= LogLevel::Warning) \
- fprintf(gLogFile, "[ALSOFT] (WW) " __VA_ARGS__); \
-} while(0)
-
-#define ERR(...) do { \
- if UNLIKELY(gLogLevel >= LogLevel::Error) \
- fprintf(gLogFile, "[ALSOFT] (EE) " __VA_ARGS__); \
-} while(0)
-
-#else
-
-[[gnu::format(printf,3,4)]] void al_print(LogLevel level, FILE *logfile, const char *fmt, ...);
-
-#define TRACE(...) al_print(LogLevel::Trace, gLogFile, "[ALSOFT] (II) " __VA_ARGS__)
-
-#define WARN(...) al_print(LogLevel::Warning, gLogFile, "[ALSOFT] (WW) " __VA_ARGS__)
-
-#define ERR(...) al_print(LogLevel::Error, gLogFile, "[ALSOFT] (EE) " __VA_ARGS__)
-#endif
-
-#endif /* LOGGING_H */
diff --git a/alc/panning.cpp b/alc/panning.cpp
index ad297ef7..cb77199f 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -52,10 +52,10 @@
#include "core/ambidefs.h"
#include "core/bs2b.h"
#include "core/devformat.h"
+#include "core/logging.h"
#include "core/uhjfilter.h"
#include "front_stablizer.h"
#include "hrtf.h"
-#include "logging.h"
#include "math_defs.h"
#include "opthelpers.h"
diff --git a/alc/voice.cpp b/alc/voice.cpp
index 15240544..2639bcf8 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -50,12 +50,12 @@
#include "core/filters/nfc.h"
#include "core/filters/splitter.h"
#include "core/fmt_traits.h"
+#include "core/logging.h"
#include "core/mixer/defs.h"
#include "core/mixer/hrtfdefs.h"
#include "cpu_caps.h"
#include "hrtf.h"
#include "inprogext.h"
-#include "logging.h"
#include "opthelpers.h"
#include "ringbuffer.h"
#include "threads.h"