DSSI soft-synths may provide run_synth or run_multiple_synths functions.
I was only handling the run_synth case before, so some soft-synths
failed to run (like the hexter DX7 clone). This patch adds support for
the alternate method. I'm checking it in.
2005-10-07 Anthony Green <[EMAIL PROTECTED]>
* native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
(process): call run_multiple_synths if required.
Index: native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
===================================================================
RCS file:
/cvsroot/classpath/classpath/native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c,v
retrieving revision 1.7
diff -u -r1.7 gnu_javax_sound_midi_dssi_DSSISynthesizer.c
--- native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c 8 Oct
2005 05:07:10 -0000 1.7
+++ native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c 8 Oct
2005 06:37:47 -0000
@@ -83,11 +83,31 @@
set_control (data, & data->midiEventBuffer[index]);
}
- /* Call the synth audio processing routine. */
- data->desc->run_synth(data->plugin_handle,
- nframes,
- &data->midiEventBuffer[data->midiEventReadIndex],
- data->midiEventWriteIndex - data->midiEventReadIndex);
+ if (data->desc->run_synth)
+ {
+ /* Call the synth audio processing routine. */
+ data->desc->run_synth
+ (data->plugin_handle,
+ nframes,
+ &data->midiEventBuffer[data->midiEventReadIndex],
+ data->midiEventWriteIndex - data->midiEventReadIndex);
+ }
+ else
+ if (data->desc->run_multiple_synths)
+ {
+ snd_seq_event_t *events =
+ &data->midiEventBuffer[data->midiEventReadIndex];
+ unsigned long event_count =
+ data->midiEventWriteIndex - data->midiEventReadIndex;
+
+ /* Call the synth audio processing routine. */
+ data->desc->run_multiple_synths
+ (1,
+ & (data->plugin_handle),
+ nframes,
+ &events,
+ &event_count);
+ }
/* Update the read index on our circular buffer. */
data->midiEventReadIndex = data->midiEventWriteIndex;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches