blob: 8c70319f2af739da1e49dad09ec11396edaacd0e (
plain)
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
|
/* pmlinux.c -- PortMidi os-dependent code */
/* This file only needs to implement pm_init(), which calls various
routines to register the available midi devices. This file must
be separate from the main portmidi.c file because it is system
dependent, and it is separate from, pmlinuxalsa.c, because it
might need to register non-alsa devices as well.
*/
#include "stdlib.h"
#include "portmidi.h"
#ifdef PMALSA
#include "pmlinuxalsa.h"
#endif
#ifdef PMNULL
#include "pmlinuxnull.h"
#endif
PmError pm_init()
{
#ifdef PMALSA
pm_linuxalsa_init();
#endif
#ifdef PMNULL
pm_linuxnull_init();
#endif
}
void pm_term(void)
{
#ifdef PMALSA
pm_linuxalsa_term();
#endif
}
PmDeviceID pm_default_input_device_id = -1;
PmDeviceID pm_default_output_device_id = -1;
PmDeviceID Pm_GetDefaultInputDeviceID() {
return pm_default_input_device_id;
}
PmDeviceID Pm_GetDefaultOutputDeviceID() {
return pm_default_output_device_id;
}
void *pm_alloc(size_t s) { return malloc(s); }
void pm_free(void *ptr) { free(ptr); }
|