diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-05-30 03:01:38 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-05-30 03:01:38 +0000 |
commit | 47729b52cb85e8a52bf2e6bbf8ee9a810ed331e1 (patch) | |
tree | b001d3f3bdf3539d928535e47a965c72f7044a26 /pd/portmidi_osx/pmdarwin.c | |
parent | fcba84c01167d5be4e4ed70619fda85cb63804fe (diff) |
Add new portmidi and update portaudio. CHanges to makefile.nt and various
sources. Checking that I'm in sync with "help" file changes. I ended
up deleting help files in extra and recreating them under the new names.
svn path=/trunk/; revision=3091
Diffstat (limited to 'pd/portmidi_osx/pmdarwin.c')
-rw-r--r-- | pd/portmidi_osx/pmdarwin.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/pd/portmidi_osx/pmdarwin.c b/pd/portmidi_osx/pmdarwin.c deleted file mode 100644 index 01863368..00000000 --- a/pd/portmidi_osx/pmdarwin.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * PortMidi OS-dependent interface for Darwin (MacOS X) - * Jon Parise <jparise@cmu.edu> - * - * $Id: pmdarwin.c,v 1.8 2005-05-18 04:28:50 millerpuckette Exp $ - * - * CHANGE LOG: - * 03Jul03 - X. J. Scott (xjs): - * - Pm_GetDefaultInputDeviceID() and Pm_GetDefaultOutputDeviceID() - * now return id of first input and output devices in system, - * rather than returning 0 as before. - * This fix enables valid default port values to be returned. - * 0 is returned if no such device is found. - */ - -/* - * 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, say, pmwinmm.c, because it - * might need to register devices for winmm, directx, and others. - */ - -#include <stdlib.h> -#include "portmidi.h" -#include "pmmacosx.h" - -PmError pm_init(void) // xjs added void -{ - return pm_macosx_init(); -} - -PmError pm_term(void) // xjs added void -{ - return pm_macosx_term(); -} - -/* Pm_GetDefaultInputDeviceID() - return input with lowest id # (xjs) - */ -PmDeviceID Pm_GetDefaultInputDeviceID() -{ - int i; - int device_count; - const PmDeviceInfo *deviceInfo; - - device_count = Pm_CountDevices(); - for (i = 0; i < device_count; i++) { - deviceInfo = Pm_GetDeviceInfo(i); - if (deviceInfo->input) - return i; - } - - return 0; -}; - -/* Pm_GetDefaultOutputDeviceID() - return output with lowest id # (xjs) -*/ -PmDeviceID Pm_GetDefaultOutputDeviceID() -{ - int i; - int device_count; - const PmDeviceInfo *deviceInfo; - - device_count = Pm_CountDevices(); - for (i = 0; i < device_count; i++) { - deviceInfo = Pm_GetDeviceInfo(i); - if (deviceInfo->output) - return i; - } - - return 0; -}; - - -void *pm_alloc(size_t s) { return malloc(s); } - -void pm_free(void *ptr) { free(ptr); } - |