diff --git a/src/bindings/fluid_cmd.c b/src/bindings/fluid_cmd.c index 1a20320d..1f269e85 100644 --- a/src/bindings/fluid_cmd.c +++ b/src/bindings/fluid_cmd.c @@ -1309,13 +1309,13 @@ fluid_handle_set(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out) } else ival = atoi (av[1]); - fluid_synth_setint (synth, av[0], ival); + fluid_settings_setint (synth->settings, av[0], ival); break; case FLUID_NUM_TYPE: - fluid_synth_setnum (synth, av[0], atof (av[1])); + fluid_settings_setnum (synth->settings, av[0], atof (av[1])); break; case FLUID_STR_TYPE: - fluid_synth_setstr(synth, av[0], av[1]); + fluid_settings_setstr(synth->settings, av[0], av[1]); break; case FLUID_SET_TYPE: fluid_ostream_printf (out, "set: Parameter '%s' is a node.\n", av[0]); @@ -1340,21 +1340,21 @@ fluid_handle_get(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out) case FLUID_NUM_TYPE: { double value; - fluid_synth_getnum(synth, av[0], &value); + fluid_settings_getnum(synth->settings, av[0], &value); fluid_ostream_printf(out, "%.3f", value); break; } case FLUID_INT_TYPE: { int value; - fluid_synth_getint(synth, av[0], &value); + fluid_settings_getint(synth->settings, av[0], &value); fluid_ostream_printf(out, "%d", value); break; } case FLUID_STR_TYPE: { char* s; - fluid_synth_dupstr(synth, av[0], &s); /* ++ alloc string */ + fluid_settings_dupstr(synth->settings, av[0], &s); /* ++ alloc string */ fluid_ostream_printf(out, "%s", s ? s : "NULL"); if (s) FLUID_FREE (s); /* -- free string */ break; @@ -1398,14 +1398,14 @@ static void fluid_handle_settings_iter2(void* data, char* name, int type) switch (fluid_settings_get_type(fluid_synth_get_settings(d->synth), name)) { case FLUID_NUM_TYPE: { double value; - fluid_synth_getnum(d->synth, name, &value); + fluid_settings_getnum(d->synth->settings, name, &value); fluid_ostream_printf(d->out, "%.3f\n", value); break; } case FLUID_INT_TYPE: { int value, hints; - fluid_synth_getint(d->synth, name, &value); + fluid_settings_getint(d->synth->settings, name, &value); if(fluid_settings_get_hints (d->synth->settings, name, &hints) == FLUID_OK) { @@ -1418,7 +1418,7 @@ static void fluid_handle_settings_iter2(void* data, char* name, int type) case FLUID_STR_TYPE: { char* s; - fluid_synth_dupstr(d->synth, name, &s); /* ++ alloc string */ + fluid_settings_dupstr(d->synth->settings, name, &s); /* ++ alloc string */ fluid_ostream_printf(d->out, "%s\n", s ? s : "NULL"); if (s) FLUID_FREE (s); /* -- free string */ break; diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 8c7eb94d..b35e483f 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -4690,112 +4690,6 @@ fluid_synth_get_settings(fluid_synth_t* synth) return synth->settings; } -/** - * Convenience function to set a string setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param str Value to assign to the setting - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_setstr() in combination with fluid_synth_get_settings() instead. - */ -int -fluid_synth_setstr(fluid_synth_t* synth, const char* name, const char* str) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - - return fluid_settings_setstr(synth->settings, name, str); -} - -/** - * Convenience function to duplicate a string setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param str Location to store a pointer to the newly allocated string value - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_dupstr() in combination with fluid_synth_get_settings() instead. - * - * The returned string is owned by the caller and should be freed with free() - * when finished with it. - */ -int -fluid_synth_dupstr(fluid_synth_t* synth, const char* name, char** str) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - fluid_return_val_if_fail (str != NULL, FLUID_FAILED); - - return fluid_settings_dupstr(synth->settings, name, str); -} - -/** - * Convenience function to set a floating point setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param val Value to assign to the setting - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_setnum() in combination with fluid_synth_get_settings() instead. - */ -int -fluid_synth_setnum(fluid_synth_t* synth, const char* name, double val) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - - return fluid_settings_setnum(synth->settings, name, val); -} - -/** - * Convenience function to get a floating point setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param val Location to store the current value of the setting - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_getnum() in combination with fluid_synth_get_settings() instead. - */ -int -fluid_synth_getnum(fluid_synth_t* synth, const char* name, double* val) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - - return fluid_settings_getnum(synth->settings, name, val); -} - -/** - * Convenience function to set an integer setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param val Value to assign to the setting - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_setint() in combination with fluid_synth_get_settings() instead. - */ -int -fluid_synth_setint(fluid_synth_t* synth, const char* name, int val) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - - return fluid_settings_setint(synth->settings, name, val); -} - -/** - * Convenience function to get an integer setting of a synth. - * @param synth FluidSynth instance - * @param name Name of setting parameter - * @param val Location to store the current value of the setting - * @return FLUID_OK on success, FLUID_FAILED otherwise - * @deprecated Use fluid_settings_getint() in combination with fluid_synth_get_settings() instead. - */ -int -fluid_synth_getint(fluid_synth_t* synth, const char* name, int* val) -{ - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_return_val_if_fail (name != NULL, FLUID_FAILED); - - return fluid_settings_getint(synth->settings, name, val); -} - /** * Set a SoundFont generator (effect) value on a MIDI channel in real-time. * @param synth FluidSynth instance @@ -5112,7 +5006,6 @@ void fluid_synth_api_exit(fluid_synth_t* synth) } - /** * Set midi channel type * @param synth FluidSynth instance diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h index 23a14f6b..2a47a32b 100644 --- a/src/synth/fluid_synth.h +++ b/src/synth/fluid_synth.h @@ -173,13 +173,6 @@ struct _fluid_synth_t #endif }; -int fluid_synth_setstr(fluid_synth_t* synth, const char* name, const char* str); -int fluid_synth_dupstr(fluid_synth_t* synth, const char* name, char** str); -int fluid_synth_setnum(fluid_synth_t* synth, const char* name, double val); -int fluid_synth_getnum(fluid_synth_t* synth, const char* name, double* val); -int fluid_synth_setint(fluid_synth_t* synth, const char* name, int val); -int fluid_synth_getint(fluid_synth_t* synth, const char* name, int* val); - fluid_preset_t* fluid_synth_find_preset(fluid_synth_t* synth, unsigned int banknum, unsigned int prognum);