aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src/s_midi_mmio.c
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-05-27 21:29:49 +0000
committerN.N. <matju@users.sourceforge.net>2009-05-27 21:29:49 +0000
commitbd37f6c5890395dd9aaebbf35a9aac20c24a671a (patch)
tree9f89154991979c9efcb4cfc3908467910c92580f /desiredata/src/s_midi_mmio.c
parent6e974bbbc5e671818d1b91413ebc0f1941a6914a (diff)
reformat
svn path=/trunk/; revision=11534
Diffstat (limited to 'desiredata/src/s_midi_mmio.c')
-rw-r--r--desiredata/src/s_midi_mmio.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/desiredata/src/s_midi_mmio.c b/desiredata/src/s_midi_mmio.c
index 55ccf277..6d11128a 100644
--- a/desiredata/src/s_midi_mmio.c
+++ b/desiredata/src/s_midi_mmio.c
@@ -462,17 +462,13 @@ void sys_listmididevs() {
/* for MIDI and audio in and out, get the number of devices. Then get the capabilities of each device and print its description. */
UINT ndevices = midiInGetNumDevs();
for (unsigned i=0; i<ndevices; i++) {
- MIDIINCAPS m;
- UINT wRtn = midiInGetDevCaps(i, (LPMIDIINCAPS) &m, sizeof(m));
- if (wRtn) msw_midiinerror("midiInGetDevCaps: %s", wRtn);
- else error("MIDI input device #%d: %s", i+1, m.szPname);
+ MIDIINCAPS m; UINT wRtn = midiInGetDevCaps( i, (LPMIDIINCAPS) &m, sizeof(m));
+ if (wRtn) msw_midiinerror("midiInGetDevCaps: %s", wRtn); else error("MIDI input device #%d: %s", i+1, m.szPname);
}
ndevices = midiOutGetNumDevs();
for (unsigned i=0; i<devices; i++) {
- MIDIOUTCAPS m;
- UINT wRtn = midiOutGetDevCaps(i, (LPMIDIOUTCAPS) &m, sizeof(m));
- if (wRtn) msw_midiouterror("midiOutGetDevCaps: %s", wRtn);
- else error("MIDI output device #%d: %s", i+1, m.szPname);
+ MIDIOUTCAPS m; UINT wRtn = midiOutGetDevCaps(i, (LPMIDIOUTCAPS) &m, sizeof(m));
+ if (wRtn) msw_midiouterror("midiOutGetDevCaps: %s", wRtn); else error("MIDI output device #%d: %s", i+1, m.szPname);
}
}
#endif
@@ -482,12 +478,10 @@ void midi_getdevs(char *indevlist, int *nindevs, char *outdevlist, int *noutdevs
int nout = min(maxndev,int(midiOutGetNumDevs()));
for (int i=0; i<nin; i++) {
MIDIINCAPS m; UINT wRtn = midiInGetDevCaps(i, (LPMIDIINCAPS) &m, sizeof(m));
- strncpy(indevlist + i*devdescsize, (wRtn ? "???" : m.szPname), devdescsize); indevlist[(i+1)*devdescsize - 1] = 0;
- }
+ strncpy(indevlist + i*devdescsize, (wRtn ? "???" : m.szPname), devdescsize); indevlist[(i+1)*devdescsize - 1] = 0;}
for (int i=0; i<nout; i++) {
MIDIOUTCAPS m; UINT wRtn = midiOutGetDevCaps(i, (LPMIDIOUTCAPS) &m, sizeof(m));
- strncpy(outdevlist + i*devdescsize, (wRtn ? "???" : m.szPname), devdescsize); outdevlist[(i+1)*devdescsize - 1] = 0;
- }
+ strncpy(outdevlist + i*devdescsize, (wRtn ? "???" : m.szPname), devdescsize); outdevlist[(i+1)*devdescsize - 1] = 0;}
*nindevs = nin;
*noutdevs = nout;
}