diff -ru fluidsynth-1.1.6/include/fluidsynth/sfont.h fluidsynth-1.1.6_new/include/fluidsynth/sfont.h
--- fluidsynth-1.1.6/include/fluidsynth/sfont.h	2012-08-16 06:01:13.000000000 +0200
+++ fluidsynth-1.1.6_new/include/fluidsynth/sfont.h	2012-10-10 12:13:41.429558355 +0200
@@ -244,7 +244,7 @@
   int pitchadj;                 /**< Fine pitch adjustment (+/- 99 cents) */
   int sampletype;               /**< Values: #FLUID_SAMPLETYPE_MONO, FLUID_SAMPLETYPE_RIGHT, FLUID_SAMPLETYPE_LEFT, FLUID_SAMPLETYPE_ROM */
   int valid;                    /**< Should be TRUE if sample data is valid, FALSE otherwise (in which case it will not be synthesized) */
-  short* data;                  /**< Pointer to the sample's data */
+  const short* data;            /**< Pointer to the sample's data */
 
   int amplitude_that_reaches_noise_floor_is_valid;      /**< Indicates if \a amplitude_that_reaches_noise_floor is valid (TRUE), set to FALSE initially to calculate. */
   double amplitude_that_reaches_noise_floor;            /**< The amplitude at which the sample's loop will be below the noise floor.  For voice off optimization, calculated automatically. */
diff -ru fluidsynth-1.1.6/src/rvoice/fluid_rvoice_dsp.c fluidsynth-1.1.6_new/src/rvoice/fluid_rvoice_dsp.c
--- fluidsynth-1.1.6/src/rvoice/fluid_rvoice_dsp.c	2012-08-16 06:01:13.000000000 +0200
+++ fluidsynth-1.1.6_new/src/rvoice/fluid_rvoice_dsp.c	2012-10-10 10:24:32.052356840 +0200
@@ -127,7 +127,7 @@
 {
   fluid_phase_t dsp_phase = voice->phase;
   fluid_phase_t dsp_phase_incr;
-  short int *dsp_data = voice->sample->data;
+  const short int *dsp_data = voice->sample->data;
   fluid_real_t *dsp_buf = voice->dsp_buf;
   fluid_real_t dsp_amp = voice->amp;
   fluid_real_t dsp_amp_incr = voice->amp_incr;
@@ -188,7 +188,7 @@
 {
   fluid_phase_t dsp_phase = voice->phase;
   fluid_phase_t dsp_phase_incr;
-  short int *dsp_data = voice->sample->data;
+  const short int *dsp_data = voice->sample->data;
   fluid_real_t *dsp_buf = voice->dsp_buf;
   fluid_real_t dsp_amp = voice->amp;
   fluid_real_t dsp_amp_incr = voice->amp_incr;
@@ -277,7 +277,7 @@
 {
   fluid_phase_t dsp_phase = voice->phase;
   fluid_phase_t dsp_phase_incr;
-  short int *dsp_data = voice->sample->data;
+  const short int *dsp_data = voice->sample->data;
   fluid_real_t *dsp_buf = voice->dsp_buf;
   fluid_real_t dsp_amp = voice->amp;
   fluid_real_t dsp_amp_incr = voice->amp_incr;
@@ -427,7 +427,7 @@
 {
   fluid_phase_t dsp_phase = voice->phase;
   fluid_phase_t dsp_phase_incr;
-  short int *dsp_data = voice->sample->data;
+  const short int *dsp_data = voice->sample->data;
   fluid_real_t *dsp_buf = voice->dsp_buf;
   fluid_real_t dsp_amp = voice->amp;
   fluid_real_t dsp_amp_incr = voice->amp_incr;
diff -ru fluidsynth-1.1.6/src/sfloader/fluid_defsfont.h fluidsynth-1.1.6_new/src/sfloader/fluid_defsfont.h
--- fluidsynth-1.1.6/src/sfloader/fluid_defsfont.h	2012-08-16 06:01:13.000000000 +0200
+++ fluidsynth-1.1.6_new/src/sfloader/fluid_defsfont.h	2012-10-10 12:06:06.125322543 +0200
@@ -402,7 +402,7 @@
   char* filename;           /* the filename of this soundfont */
   unsigned int samplepos;   /* the position in the file at which the sample data starts */
   unsigned int samplesize;  /* the size of the sample data */
-  short* sampledata;        /* the sample data, loaded in ram */
+  const short* sampledata;  /* the sample data, loaded in ram */
   fluid_list_t* sample;      /* the samples in this soundfont */
   fluid_defpreset_t* preset; /* the presets of this soundfont */
 
diff -ru fluidsynth-1.1.6/src/sfloader/fluid_ramsfont.c fluidsynth-1.1.6_new/src/sfloader/fluid_ramsfont.c
--- fluidsynth-1.1.6/src/sfloader/fluid_ramsfont.c	2012-08-16 06:01:13.000000000 +0200
+++ fluidsynth-1.1.6_new/src/sfloader/fluid_ramsfont.c	2012-10-10 12:15:31.623297754 +0200
@@ -1143,9 +1143,9 @@
 	unsigned int storedNbFrames;
 
 	/* in case we already have some data */
-  if (sample->data != NULL) {
-  	FLUID_FREE(sample->data);
-  }
+	if (sample->data != NULL) {
+		FLUID_FREE((short*)sample->data);
+	}
 
 	if (copy_data) {
 
@@ -1158,7 +1158,7 @@
 	    FLUID_LOG(FLUID_ERR, "Out of memory");
 	    return FLUID_FAILED;
 	  }
-	  FLUID_MEMSET(sample->data, 0, storedNbFrames*2 + 4*SAMPLE_LOOP_MARGIN);
+	  FLUID_MEMSET((short*)sample->data, 0, storedNbFrames*2 + 4*SAMPLE_LOOP_MARGIN);
 	  FLUID_MEMCPY((char*)(sample->data) + 2*SAMPLE_LOOP_MARGIN, data, nbframes*2);
 
 #if 0
@@ -1222,7 +1222,7 @@
 {
 	/* same as delete_fluid_sample, plus frees the data */
   if (sample->data != NULL) {
-  	FLUID_FREE(sample->data);
+    FLUID_FREE((short*)sample->data);
   }
   sample->data = NULL;
   FLUID_FREE(sample);
