1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
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
|