Let us start here, from square one. No, from Zero!

This commit is contained in:
smpn2
2022-09-30 22:45:51 +09:00
parent 14215af0d1
commit b7a60638a4
1005 changed files with 303069 additions and 0 deletions
@@ -0,0 +1,29 @@
#pragma once
#include <windows.h>
#include "hooks/audio/audio_private.h"
#include "util/logging.h"
#define PRINT_FAILED_RESULT(class_name, func_name, ret) \
if (AUDIO_LOG_HRESULT) { \
log_warning("audio::wasapi", "{}::{} failed, hr={}", class_name, func_name, FMT_HRESULT(ret)); \
}
#define SAFE_CALL(class_name, func_name, x) \
do { \
HRESULT __hr = (x); \
if (FAILED(__hr)) { \
PRINT_FAILED_RESULT(class_name, func_name, __hr); \
return __hr; \
} \
} while (0)
#define CHECK_RESULT(x) \
do { \
HRESULT __ret = (x); \
if (FAILED(__ret)) { \
PRINT_FAILED_RESULT(CLASS_NAME, __func__, __ret); \
} \
return __ret; \
} while (0)