--- a/src/fluidsynth-dssi.h
+++ b/src/fluidsynth-dssi.h
@@ -1,6 +1,6 @@
 /* FluidSynth DSSI software synthesizer plugin
  *
- * Copyright (C) 2004 Sean Bolton and others.
+ * Copyright (C) 2004-2005 Sean Bolton and others.
  *
  * Portions of this file may have come from Peter Hanappe's
  * Fluidsynth, copyright (C) 2003 Peter Hanappe and others.
@@ -26,8 +26,13 @@
 #ifndef _FLUIDSYNTH_DSSI_H
 #define _FLUIDSYNTH_DSSI_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <ladspa.h>
-#include "fluidsynth_priv.h"   /* for FLUID_BUFSIZE */
+
+#include <fluidsynth.h>
 
 /* ==== debugging ==== */
 
@@ -42,15 +47,28 @@
 
 /* ==== things we need from FluidSynth, that aren't in the API ==== */
 
-/* in fluid_settings.h: */
-typedef int (*fluid_int_update_t)(void* data, char* name, int value);
-int fluid_settings_register_int(fluid_settings_t* settings, char* name, int min,
-                                int max, int def, int hints,
-                                fluid_int_update_t fun, void* data);
+#ifndef USE_AUGMENTED_FLUIDSYNTH_API
+/* Damn, we really do need this: */
+int fluid_synth_all_sounds_off(fluid_synth_t* synth, int chan);
+#endif
 
 /* ==== fluidsynth-dssi ==== */
 
-#define FSD_MAX_CHANNELS  256  /* derived from FluidSynth's virtual channel limit */
+#define FSD_MAX_CHANNELS  255  /* FluidSynth's virtual channel limit (n.b. NO_CHANNEL in fluid_voice.h) */
+
+/* FSD_CHANNEL_COUNT is the number of channels FluidSynth-DSSI tells
+ * libfluidsynth to create at startup.  It can be up to FSD_MAX_CHANNELS,
+ * but be aware that for each channel, libfluidsynth will zero and copy out
+ * two buffers every process cycle, so it's best to set FSD_CHANNEL_COUNT
+ * to no more than the maximum number of simultaneous FluidSynth-DSSI
+ * instances you'll need. */
+#define FSD_CHANNEL_COUNT  16
+
+/* -FIX- These should be in a header file shared with FluidSynth-DSSI_gtk.c: */
+#define FSD_MAX_POLYPHONY     256
+#define FSD_DEFAULT_POLYPHONY 256
+
+#define FSD_MAX_BURST_SIZE  512
 
 typedef enum {
     PORT_OUTPUT_LEFT     = 0,
@@ -76,9 +94,10 @@
     fsd_sfont_t    *soundfont;
     LADSPA_Data    *output_l;
     LADSPA_Data    *output_r;
+#ifndef NWRITE_FLOAT_WORKS_CORRECTLY
     LADSPA_Data    *tmpbuf_l;
     LADSPA_Data    *tmpbuf_r;
-    LADSPA_Data     tmpbuf_unaligned[2 * FLUID_BUFSIZE + 4];
+#endif
 };
 
 struct _fsd_sfont_t {
@@ -94,15 +113,21 @@
     pthread_mutex_t   mutex;
     int               mutex_grab_failed;
     unsigned long     instance_count;
+#ifndef NWRITE_FLOAT_WORKS_CORRECTLY
+    unsigned long     fluid_bufsize;
     unsigned long     burst_remains;
+#endif
     char             *project_directory;
     fluid_settings_t *fluid_settings;
     fluid_synth_t    *fluid_synth;
     fsd_sfont_t      *soundfonts;
     float             gain;
+#ifdef USE_AUGMENTED_FLUIDSYNTH_API
     int               polyphony;
-    int               original_nvoice;
-    fsd_instance_t   *channel_map[FSD_MAX_CHANNELS];
+#endif
+    fsd_instance_t   *channel_map[FSD_CHANNEL_COUNT];
+    LADSPA_Data       bit_bucket[FSD_MAX_BURST_SIZE];
+    LADSPA_Data      *fx_buckets[2];
 };
 
 #endif /* _FLUIDSYNTH_DSSI_H */