mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Fix VC6 build.
This commit is contained in:
+10
-10
@@ -5323,10 +5323,10 @@ static MA_INLINE double ma_cos(double x)
|
|||||||
return ma_sin((MA_PI*0.5) - x);
|
return ma_sin((MA_PI*0.5) - x);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MA_INLINE double ma_log2(double x)
|
static MA_INLINE double ma_log(double x)
|
||||||
{
|
{
|
||||||
/* TODO: Implement custom log2(x). */
|
/* TODO: Implement custom log(x). */
|
||||||
return log2(x);
|
return log(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MA_INLINE double ma_pow(double x, double y)
|
static MA_INLINE double ma_pow(double x, double y)
|
||||||
@@ -5337,7 +5337,7 @@ static MA_INLINE double ma_pow(double x, double y)
|
|||||||
|
|
||||||
static MA_INLINE double ma_log10(double x)
|
static MA_INLINE double ma_log10(double x)
|
||||||
{
|
{
|
||||||
return ma_log2(x) * 0.30102999566398119521;
|
return ma_log(x) * 0.43429448190325182765;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MA_INLINE float ma_powf(float x, float y)
|
static MA_INLINE float ma_powf(float x, float y)
|
||||||
@@ -6281,7 +6281,7 @@ const char* ma_log_level_to_string(ma_uint32 logLevel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Posts a log message. */
|
/* Posts a log message. */
|
||||||
static void ma_log(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* message)
|
static void ma_post_log_message(ma_context* pContext, ma_device* pDevice, ma_uint32 logLevel, const char* message)
|
||||||
{
|
{
|
||||||
if (pContext == NULL) {
|
if (pContext == NULL) {
|
||||||
return;
|
return;
|
||||||
@@ -6315,7 +6315,7 @@ static ma_result ma_context_post_error(ma_context* pContext, ma_device* pDevice,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ma_log(pContext, pDevice, logLevel, message);
|
ma_post_log_message(pContext, pDevice, logLevel, message);
|
||||||
return resultCode;
|
return resultCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6449,7 +6449,7 @@ ma_handle ma_dlopen(ma_context* pContext, const char* filename)
|
|||||||
if (pContext != NULL) {
|
if (pContext != NULL) {
|
||||||
char message[256];
|
char message[256];
|
||||||
ma_strappend(message, sizeof(message), "Loading library: ", filename);
|
ma_strappend(message, sizeof(message), "Loading library: ", filename);
|
||||||
ma_log(pContext, NULL, MA_LOG_LEVEL_VERBOSE, message);
|
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, message);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -6477,7 +6477,7 @@ ma_handle ma_dlopen(ma_context* pContext, const char* filename)
|
|||||||
if (handle == NULL) {
|
if (handle == NULL) {
|
||||||
char message[256];
|
char message[256];
|
||||||
ma_strappend(message, sizeof(message), "Failed to load library: ", filename);
|
ma_strappend(message, sizeof(message), "Failed to load library: ", filename);
|
||||||
ma_log(pContext, NULL, MA_LOG_LEVEL_INFO, message);
|
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_INFO, message);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -6504,7 +6504,7 @@ ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symbol)
|
|||||||
if (pContext != NULL) {
|
if (pContext != NULL) {
|
||||||
char message[256];
|
char message[256];
|
||||||
ma_strappend(message, sizeof(message), "Loading symbol: ", symbol);
|
ma_strappend(message, sizeof(message), "Loading symbol: ", symbol);
|
||||||
ma_log(pContext, NULL, MA_LOG_LEVEL_VERBOSE, message);
|
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_VERBOSE, message);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -6525,7 +6525,7 @@ ma_proc ma_dlsym(ma_context* pContext, ma_handle handle, const char* symbol)
|
|||||||
if (handle == NULL) {
|
if (handle == NULL) {
|
||||||
char message[256];
|
char message[256];
|
||||||
ma_strappend(message, sizeof(message), "Failed to load symbol: ", symbol);
|
ma_strappend(message, sizeof(message), "Failed to load symbol: ", symbol);
|
||||||
ma_log(pContext, NULL, MA_LOG_LEVEL_WARNING, message);
|
ma_post_log_message(pContext, NULL, MA_LOG_LEVEL_WARNING, message);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user