Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13996
Modified Files: Tag: desiredata s_midi_mmio.c Log Message: cleanup
Index: s_midi_mmio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_midi_mmio.c,v retrieving revision 1.4 retrieving revision 1.4.12.1 diff -C2 -d -r1.4 -r1.4.12.1 *** s_midi_mmio.c 6 Sep 2004 20:20:36 -0000 1.4 --- s_midi_mmio.c 2 Aug 2007 23:50:10 -0000 1.4.12.1 *************** *** 6,15 **** #include "s_stuff.h" #include <stdio.h> - #include <windows.h> #include <MMSYSTEM.H>
! /* ------------- MIDI time stamping from audio clock ------------ */ ! #ifdef MIDI_TIMESTAMP
[...1084 lines suppressed...] } #endif
! void midi_getdevs(char *indevlist, int *nindevs, char *outdevlist, int *noutdevs, int maxndev, int devdescsize) { int i, nin = midiInGetNumDevs(), nout = midiOutGetNumDevs(); UINT wRtn; ! if (nin > maxndev) nin = maxndev; ! for (i = 0; i < nin; i++) { MIDIINCAPS micap; wRtn = midiInGetDevCaps(i, (LPMIDIINCAPS) &micap, sizeof(micap)); ! strncpy(indevlist + i * devdescsize, (wRtn ? "???" : micap.szPname), devdescsize); indevlist[(i+1) * devdescsize - 1] = 0; } ! if (nout > maxndev) nout = maxndev; ! for (i = 0; i < nout; i++) { MIDIOUTCAPS mocap; wRtn = midiOutGetDevCaps(i, (LPMIDIOUTCAPS) &mocap, sizeof(mocap)); ! strncpy(outdevlist + i * devdescsize, (wRtn ? "???" : mocap.szPname), devdescsize); outdevlist[(i+1) * devdescsize - 1] = 0; }