mirror of https://git.wownero.com/dsc/mxe.git
package portmidi: standalone test and strict compiler flags
This commit is contained in:
parent
30606f556e
commit
67d940c3c1
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* This file is part of MXE.
|
||||
* See index.html for further information.
|
||||
*
|
||||
* modified from pm_test/test.c
|
||||
*/
|
||||
|
||||
#include "portmidi.h"
|
||||
#include "stdio.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int default_in;
|
||||
int default_out;
|
||||
int i = 0;
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
/* list device information */
|
||||
default_in = Pm_GetDefaultInputDeviceID();
|
||||
default_out = Pm_GetDefaultOutputDeviceID();
|
||||
printf("number of devices: %s", Pm_CountDevices());
|
||||
for (i = 0; i < Pm_CountDevices(); i++) {
|
||||
char *deflt;
|
||||
const PmDeviceInfo *info = Pm_GetDeviceInfo(i);
|
||||
|
||||
printf("%d: %s, %s", i, info->interf, info->name);
|
||||
if (info->input) {
|
||||
deflt = (i == default_in ? "default " : "");
|
||||
printf(" (%sinput)", deflt);
|
||||
}
|
||||
if (info->output) {
|
||||
deflt = (i == default_out ? "default " : "");
|
||||
printf(" (%soutput)", deflt);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -29,6 +29,7 @@ define $(PKG)_BUILD
|
|||
$(INSTALL) -m644 '$(1)/porttime/porttime.h' '$(PREFIX)/$(TARGET)/include/'
|
||||
|
||||
'$(TARGET)-gcc' \
|
||||
'$(1)/pm_test/test.c' -o '$(PREFIX)/$(TARGET)/bin/test-portmidi.exe' \
|
||||
-W -Wall -Werror -ansi -pedantic \
|
||||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portmidi.exe' \
|
||||
-lportmidi -lwinmm
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue