mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-10 17:59:01 +08:00
1604b064f2
* ao: add libao windows port * ao: update baseline version * Update ports/ao/portfile.cmake Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> * ao:update version * Update ports/ao/portfile.cmake Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com> * ao:add license and supports * ao:rename libao to ao * ao:modify libao license to be same with libao * Update version database * ao rename to libao * Update version database * libao add def export file * ao use vcpkg_configure_make * Update version database Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
128 lines
6.5 KiB
Diff
128 lines
6.5 KiB
Diff
From 129f8e155596199191cc005bcc257397d0d981ac Mon Sep 17 00:00:00 2001
|
|
From: xiaoyifang <yifang.xiao@outlook.com>
|
|
Date: Wed, 16 Feb 2022 21:58:40 +0800
|
|
Subject: [PATCH] patch windows
|
|
|
|
---
|
|
include/ao/ao_private.h | 30 +++++++++++++++---------------
|
|
src/ao_wmm.c | 1 +
|
|
src/audio_out.c | 1 -
|
|
3 files changed, 16 insertions(+), 16 deletions(-)
|
|
|
|
diff --git a/include/ao/ao_private.h b/include/ao/ao_private.h
|
|
index 44fa03e..c3c50aa 100644
|
|
--- a/include/ao/ao_private.h
|
|
+++ b/include/ao/ao_private.h
|
|
@@ -138,13 +138,13 @@ struct ao_functions {
|
|
|
|
void ao_read_config_files (ao_config *config);
|
|
|
|
-#define adebug(format, args...) {\
|
|
+#define adebug(format, ...) {\
|
|
if(!device || device->verbose==2){ \
|
|
if(strcmp(format,"\n")){ \
|
|
if(device && device->funcs->driver_info()->short_name){ \
|
|
- fprintf(stderr,"ao_%s debug: " format,device->funcs->driver_info()->short_name,## args); \
|
|
+ fprintf(stderr,"ao_%s debug: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
|
}else{ \
|
|
- fprintf(stderr,"debug: " format,## args); \
|
|
+ fprintf(stderr,"debug: " format,__VA_ARGS__); \
|
|
} \
|
|
}else{ \
|
|
fprintf(stderr,"\n"); \
|
|
@@ -152,13 +152,13 @@ void ao_read_config_files (ao_config *config);
|
|
} \
|
|
}
|
|
|
|
-#define averbose(format, args...) {\
|
|
+#define averbose(format, ...) {\
|
|
if(!device || device->verbose>0){ \
|
|
if(strcmp(format,"\n")){ \
|
|
if(device && device->funcs->driver_info()->short_name){ \
|
|
- fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,## args); \
|
|
+ fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
|
}else{ \
|
|
- fprintf(stderr,"info: " format,## args); \
|
|
+ fprintf(stderr,"info: " format,__VA_ARGS__); \
|
|
} \
|
|
}else{ \
|
|
fprintf(stderr,"\n"); \
|
|
@@ -166,13 +166,13 @@ void ao_read_config_files (ao_config *config);
|
|
} \
|
|
}
|
|
|
|
-#define ainfo(format, args...) {\
|
|
+#define ainfo(format, ...) {\
|
|
if(!device || device->verbose>=0){ \
|
|
if(strcmp(format,"\n")){ \
|
|
if(device && device->funcs->driver_info()->short_name){ \
|
|
- fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,## args); \
|
|
+ fprintf(stderr,"ao_%s info: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
|
}else{ \
|
|
- fprintf(stderr,"info: " format,## args); \
|
|
+ fprintf(stderr,"info: " format,__VA_ARGS__); \
|
|
} \
|
|
}else{ \
|
|
fprintf(stderr,"\n"); \
|
|
@@ -180,13 +180,13 @@ void ao_read_config_files (ao_config *config);
|
|
} \
|
|
}
|
|
|
|
-#define awarn(format, args...) {\
|
|
+#define awarn(format, ...) {\
|
|
if(!device || device->verbose>=0){ \
|
|
if(strcmp(format,"\n")){ \
|
|
if(device && device->funcs->driver_info()->short_name){ \
|
|
- fprintf(stderr,"ao_%s WARNING: " format,device->funcs->driver_info()->short_name,## args); \
|
|
+ fprintf(stderr,"ao_%s WARNING: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
|
}else{ \
|
|
- fprintf(stderr,"WARNING: " format,## args); \
|
|
+ fprintf(stderr,"WARNING: " format,__VA_ARGS__); \
|
|
} \
|
|
}else{ \
|
|
fprintf(stderr,"\n"); \
|
|
@@ -194,13 +194,13 @@ void ao_read_config_files (ao_config *config);
|
|
} \
|
|
}
|
|
|
|
-#define aerror(format, args...) { \
|
|
+#define aerror(format, ...) { \
|
|
if(!device || device->verbose>=0){ \
|
|
if(strcmp(format,"\n")){ \
|
|
if(device && device->funcs->driver_info()->short_name){ \
|
|
- fprintf(stderr,"ao_%s ERROR: " format,device->funcs->driver_info()->short_name,## args); \
|
|
+ fprintf(stderr,"ao_%s ERROR: " format,device->funcs->driver_info()->short_name,__VA_ARGS__); \
|
|
}else{ \
|
|
- fprintf(stderr,"ERROR: " format,## args); \
|
|
+ fprintf(stderr,"ERROR: " format,__VA_ARGS__); \
|
|
} \
|
|
}else{ \
|
|
fprintf(stderr,"\n"); \
|
|
diff --git a/src/ao_wmm.c b/src/ao_wmm.c
|
|
index eec6b83..d18d2a4 100644
|
|
--- a/src/ao_wmm.c
|
|
+++ b/src/ao_wmm.c
|
|
@@ -33,6 +33,7 @@
|
|
#include <windows.h>
|
|
#include <mmreg.h>
|
|
#include <mmsystem.h>
|
|
+#include <ks.h>
|
|
#include <ksmedia.h>
|
|
|
|
#include <stdlib.h>
|
|
diff --git a/src/audio_out.c b/src/audio_out.c
|
|
index bd8f6fc..e3af366 100644
|
|
--- a/src/audio_out.c
|
|
+++ b/src/audio_out.c
|
|
@@ -49,7 +49,6 @@ static int dlclose(void *handle) { return 0; }
|
|
#ifndef _MSC_VER
|
|
# include <unistd.h>
|
|
#endif
|
|
-#include <dirent.h>
|
|
|
|
#include "ao/ao.h"
|
|
#include "ao_private.h"
|
|
--
|
|
2.30.0.windows.2
|
|
|