diff --git a/src/portaudio-test.c b/src/portaudio-test.c new file mode 100644 index 00000000..16d6dd09 --- /dev/null +++ b/src/portaudio-test.c @@ -0,0 +1,21 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include +#include + +int main() +{ + int i; + const PaDeviceInfo *device_info; + + Pa_Initialize(); + printf("Version: %s\n", Pa_GetVersionText()); + for( i = 0; i < Pa_GetDeviceCount(); i++ ) + { + device_info = Pa_GetDeviceInfo(i); + printf("Device %d: %s %s\n", i, device_info->name, Pa_GetHostApiInfo(device_info->hostApi)->name); + } + Pa_Terminate(); + return 0; +} diff --git a/src/portaudio.mk b/src/portaudio.mk index 89109ad2..c3f7c16c 100644 --- a/src/portaudio.mk +++ b/src/portaudio.mk @@ -27,6 +27,11 @@ define $(PKG)_BUILD --with-host_os=mingw \ --with-winapi=directx \ --with-dxdir=$(PREFIX)/$(TARGET) - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j '$(JOBS)' SHARED_FLAGS= TESTS= + $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portaudio.exe' \ + `'$(TARGET)-pkg-config' portaudio-2.0 --cflags --libs` endef