Update Fluidsynth to 2.0.1
[ardour.git] / libs / fluidsynth / src / fluid_tuning.h
index d974139276d80473ee0f71e392fea4df6d06d269..3afe2c65ad7d4bfec3bc28767161e79b0b006937 100644 (file)
@@ -3,16 +3,16 @@
  * Copyright (C) 2003  Peter Hanappe and others.
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  * 02110-1301, USA
 
 #include "fluidsynth_priv.h"
 
-struct _fluid_tuning_t {
-  char* name;
-  int bank;
-  int prog;
-  double pitch[128];  /* the pitch of every key, in cents */
-  int refcount;         /* Tuning reference count */
+struct _fluid_tuning_t
+{
+    char *name;
+    int bank;
+    int prog;
+    double pitch[128];  /* the pitch of every key, in cents */
+    fluid_atomic_int_t refcount;         /* Tuning reference count */
 };
 
-fluid_tuning_t* new_fluid_tuning(const char* name, int bank, int prog);
-void delete_fluid_tuning (fluid_tuning_t *tuning);
-fluid_tuning_t *fluid_tuning_duplicate (fluid_tuning_t *tuning);
-void fluid_tuning_ref (fluid_tuning_t *tuning);
-int fluid_tuning_unref (fluid_tuning_t *tuning, int count);
+fluid_tuning_t *new_fluid_tuning(const char *name, int bank, int prog);
+void delete_fluid_tuning(fluid_tuning_t *tuning);
+fluid_tuning_t *fluid_tuning_duplicate(fluid_tuning_t *tuning);
+void fluid_tuning_ref(fluid_tuning_t *tuning);
+int fluid_tuning_unref(fluid_tuning_t *tuning, int count);
 
-void fluid_tuning_set_name(fluid_tuning_t* tuning, char* name);
-char* fluid_tuning_get_name(fluid_tuning_t* tuning);
+int fluid_tuning_set_name(fluid_tuning_t *tuning, const char *name);
+char *fluid_tuning_get_name(fluid_tuning_t *tuning);
 
 #define fluid_tuning_get_bank(_t) ((_t)->bank)
 #define fluid_tuning_get_prog(_t) ((_t)->prog)
 
-void fluid_tuning_set_pitch(fluid_tuning_ttuning, int key, double pitch);
+void fluid_tuning_set_pitch(fluid_tuning_t *tuning, int key, double pitch);
 #define fluid_tuning_get_pitch(_t, _key) ((_t)->pitch[_key])
 
-void fluid_tuning_set_octave(fluid_tuning_t* tuning, const double* pitch_deriv);
+void fluid_tuning_set_octave(fluid_tuning_t *tuning, const double *pitch_deriv);
 
-void fluid_tuning_set_all(fluid_tuning_t* tuning, const double* pitch);
+void fluid_tuning_set_all(fluid_tuning_t *tuning, const double *pitch);
 #define fluid_tuning_get_all(_t) (&(_t)->pitch[0])