1
/* pmlinux.c -- PortMidi os-dependent code */
3
/* This file only needs to implement pm_init(), which calls various
4
routines to register the available midi devices. This file must
5
be separate from the main portmidi.c file because it is system
6
dependent, and it is separate from, pmlinuxalsa.c, because it
7
might need to register non-alsa devices as well.
9
NOTE: if you add non-ALSA support, you need to fix :alsa_poll()
10
in pmlinuxalsa.c, which assumes all input devices are ALSA.
16
#include "pmlinuxalsa.h"
20
#include "pmlinuxnull.h"
25
/* Note: it is not an error for PMALSA to fail to initialize.
26
* It may be a design error that the client cannot query what subsystems
27
* are working properly other than by looking at the list of available
46
PmDeviceID pm_default_input_device_id = -1;
47
PmDeviceID pm_default_output_device_id = -1;
49
PmDeviceID Pm_GetDefaultInputDeviceID() {
50
return pm_default_input_device_id;
53
PmDeviceID Pm_GetDefaultOutputDeviceID() {
54
return pm_default_output_device_id;
57
void *pm_alloc(size_t s) { return malloc(s); }
59
void pm_free(void *ptr) { free(ptr); }