Skip to content

Commit 912394a

Browse files
committed
Add PortAudio
Issue in enque/deque when play in second time.
1 parent 2a521f6 commit 912394a

File tree

4 files changed

+232
-96
lines changed

4 files changed

+232
-96
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
path = mini-gdbstub
77
url = https://github.com/RinHizakura/mini-gdbstub
88
shallow = true
9+
[submodule "portaudio"]
10+
path = portaudio
11+
url = https://github.com/PortAudio/portaudio
12+
shallow = true

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ $(call set-feature, VIRTIOSND)
7070
ifeq ($(call has, VIRTIOSND), 1)
7171
OBJS_EXTRA += virtio-snd.o
7272

73-
LDFLAGS += -lasound -lpthread
74-
CFLAGS += -Icnfa
73+
PORTAUDIOLIB := portaudio/lib/.libs/libportaudio.a
74+
LDFLAGS += -lasound -lpthread $(PORTAUDIOLIB) -lm -lrt -lpulse
75+
CFLAGS += -Icnfa -Iportaudio/include
7576

7677
cnfa/Makefile:
7778
git submodule update --init cnfa
@@ -80,7 +81,12 @@ cnfa/os_generic: cnfa/Makefile
8081
CNFA_LIB := cnfa/CNFA_sf.h
8182
$(CNFA_LIB): cnfa/Makefile cnfa/os_generic
8283
$(MAKE) -C $(dir $<) CNFA_sf.h
83-
main.o: $(CNFA_LIB)
84+
portaudio/Makefile:
85+
git submodule update --init portaudio
86+
$(PORTAUDIOLIB): portaudio/Makefile
87+
@cd $(dir $<) && ./configure
88+
@cd $(dir $<) && $(MAKE)
89+
main.o: $(CNFA_LIB) $(PORTAUDIOLIB)
8490

8591
# suppress warning when compiling CNFA
8692
virtio-snd.o: CFLAGS += -Wno-unused-parameter -Wno-sign-compare

portaudio

Submodule portaudio added at e97effb

0 commit comments

Comments
 (0)