Aviate Audio Multiverse Library
EfxPrint.h
Go to the documentation of this file.
1 /**************************************************************************/
14 #ifndef AVIATE_EFXPRINT_H_
15 #define AVIATE_EFXPRINT_H_
16 
17 #include <cstdarg>
18 
19 namespace Aviate {
20 
21 class EfxLogger {
22 public:
23  EfxLogger();
24  virtual ~EfxLogger();
25 
26 #ifdef NO_EFX_PRINTF
27  int printf(const char *fmt, ...) { return 0; }
28  void flush() {}
29 #else
30  int printf(const char *fmt, ...) {
31  va_list args;
32  va_start(args, fmt);
33  int result = printf_impl(fmt, args);
34  va_end(args);
35  return result;
36  }
37  void flush() { flush_impl(); }
38 #endif
39 private:
40  int printf_impl(const char *__restrict fmt, __gnuc_va_list args);
41  void flush_impl();
42 };
43 
44 extern EfxLogger efxLogger;
45 
46 }
47 
50 #ifdef NO_PRINTF
51 #define EFX_PRINT(x)
52 #else
53 #define EFX_PRINT(x) do { x; } while(0)
54 #endif
55 
56 #endif /* AVIATE_EFXPRINT_H_ */
Definition: EfxPrint.h:21
The Aviate library/namespace provides the primary API for working with Multiverse.
Definition: AudioEffectWrapper.h:24