aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src
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
parent6e974bbbc5e671818d1b91413ebc0f1941a6914a (diff)
reformat
svn path=/trunk/; revision=11534
Diffstat (limited to 'desiredata/src')
-rw-r--r--desiredata/src/s_main.c4
-rw-r--r--desiredata/src/s_midi_mmio.c18
2 files changed, 8 insertions, 14 deletions
diff --git a/desiredata/src/s_main.c b/desiredata/src/s_main.c
index a4e1f22a..2a274b18 100644
--- a/desiredata/src/s_main.c
+++ b/desiredata/src/s_main.c
@@ -615,8 +615,8 @@ static void sys_afterargparse() {
if (sys_nchout>=0) {for (int i=0; i<nchoutdev; i++) audio_out.chdev[i] = sys_choutlist[i];}
if (sys_nsoundin >=0) {audio_in.ndev = sys_nsoundin; for (int i=0; i< audio_in.ndev; i++) audio_in.dev[i] = sys_soundindevlist[i];}
if (sys_nsoundout>=0) {audio_out.ndev = sys_nsoundout;for (int i=0; i<audio_out.ndev; i++) audio_out.dev[i] = sys_soundoutdevlist[i];}
- if (sys_nmidiin >=0) {nmidiindev = sys_nmidiin; for (int i=0; i< nmidiindev; i++) midiindev[i] = sys_midiindevlist[i];}
- if (sys_nmidiout>=0) {nmidioutdev = sys_nmidiout; for (int i=0; i< nmidioutdev; i++) midioutdev[i] = sys_midioutdevlist[i];}
+ if (sys_nmidiin >=0) {nmidiindev = sys_nmidiin; for (int i=0; i< nmidiindev; i++) midiindev[i] = sys_midiindevlist[i];}
+ if (sys_nmidiout>=0) {nmidioutdev = sys_nmidiout; for (int i=0; i< nmidioutdev; i++) midioutdev[i] = sys_midioutdevlist[i];}
if (sys_main_advance) advance = sys_main_advance;
if (sys_main_srate) rate = sys_main_srate;
if (sys_main_dacblocksize) dacblksize = sys_main_dacblocksize;
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;
}