CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/at3_standalone/compat.cpp
Views: 1401
1
#include <cstdarg>
2
#include <cstdio>
3
4
#include "compat.h"
5
#include "Common/Log.h"
6
7
void av_log(int level, const char *fmt, ...) {
8
char buffer[512];
9
va_list vl;
10
va_start(vl, fmt);
11
size_t retval = vsnprintf(buffer, sizeof(buffer), fmt, vl);
12
va_end(vl);
13
14
// lazy
15
switch (level) {
16
case AV_LOG_DEBUG:
17
case AV_LOG_TRACE:
18
case AV_LOG_VERBOSE: DEBUG_LOG(Log::ME, "Atrac3/3+: %s", buffer); break;
19
case AV_LOG_ERROR: ERROR_LOG(Log::ME, "Atrac3/3+: %s", buffer); break;
20
case AV_LOG_INFO: INFO_LOG(Log::ME, "Atrac3/3+: %s", buffer); break;
21
case AV_LOG_WARNING:
22
default:
23
WARN_LOG(Log::ME, "Atrac3/3+: %s", buffer); break;
24
}
25
}
26
27