Skip to content

Commit 10d160e

Browse files
committed
Add core audio
1 parent 04ae196 commit 10d160e

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ ifeq (0, $(call check-alsa))
5454
$(warning No libasound installed. Check libasound in advance.)
5555
ENABLE_VIRTIOSND := 0
5656
endif
57+
ifeq (0, $(call check-coreaudio))
58+
$(warning No CoreAudio framework installed.)
59+
ENABLE_VIRTIOSND := 0
60+
endif
5761
$(call set-feature, VIRTIOSND)
5862
ifeq ($(call has, VIRTIOSND), 1)
5963
OBJS_EXTRA += virtio-snd.o

mk/check-libs.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,26 @@ int main(){\n\
1010
}\n'
1111
endef
1212

13+
# Create a mininal Core Audio program
14+
define create-coreaudio-prog
15+
echo '\
16+
#include <CoreAudio/CoreAudio.h>\n\
17+
int main(){\n\
18+
AudioComponent comp;\n\
19+
comp = AudioComponentFindNext(NULL, &desc);\n\
20+
if (comp == NULL) exit (-1);\n\
21+
return 0;\n\
22+
}\n'
23+
endf
24+
1325
# Check ALSA installation
1426
define check-alsa
1527
$(shell $(call create-alsa-prog) | $(CC) -x c -lasound -o /dev/null > /dev/null 2> /dev/null -
1628
&& echo $$?)
1729
endef
30+
31+
# Check Core Audio installation
32+
define check-coreaudio
33+
$(shell $(call create-coreaudo-prog) | $(CC) -x c -framework CoreAudio -o /dev/null > /dev/null 2> /dev/null -
34+
&& echo $$?)
35+
endf

0 commit comments

Comments
 (0)