Merge branch '2.0.x'

Closes #500
This commit is contained in:
derselbst 2019-01-12 16:54:35 +01:00
commit b98ba5bc63
2 changed files with 14 additions and 9 deletions

View File

@ -81,6 +81,7 @@ FluidSynths major version was bumped. The API was reworked, deprecated functions
<strong><span style="color:red">Important changes that may not result in a compilation error but may cause your app to misbehave:</span></strong>
- all public \c fluid_settings_* functions that return an integer which is not meant to be interpreted as bool consistently return either FLUID_OK or FLUID_FAILED
- fluid_settings_setstr() cannot be used to set integer (toggle) settings with "yes" or "no" values anymore. Use fluid_settings_setint() instead, for example: <br /><code>fluid_settings_setint(settings, "synth.reverb.active", 0)</code> instead of <code>fluid_settings_setstr(settings, "synth.reverb.active", "no")</code>
- explicit client unregistering is required for fluid_sequencer_register_client() and fluid_sequencer_register_fluidsynth()
- all public functions consistently receive signed integers for soundfont ids, bank and program numbers
- use unique device names for the "audio.portaudio.device" setting
@ -90,8 +91,9 @@ FluidSynths major version was bumped. The API was reworked, deprecated functions
- all public \c delete_* functions return void and are safe when called with NULL
- the shell command handler was decoupled internally, as a consequence the param list of new_fluid_server() and new_fluid_cmd_handler() was adapted
- \c fluid_settings_set* functions no longer silently register unknown settings but return an error instead
- reverb: roomsize is now limited to an upper threshold of 1.0 to avoid exponential volume increase
- rename fluid_mod_new() and fluid_mod_delete() to match naming conventions: new_fluid_mod() and delete_fluid_mod()
- rename \c fluid_mod_new() and \c fluid_mod_delete() to match naming conventions: new_fluid_mod() and delete_fluid_mod()
- rename chorus getters to match naming conventions: fluid_synth_get_chorus_speed() and fluid_synth_get_chorus_depth()
- fluid_synth_remove_sfont() returns FLUID_OK or FLUID_FAILED
- introduce a separate data type for sequencer client IDs: #fluid_seq_id_t
@ -594,8 +596,8 @@ void createsynth()
{
fluid_settings_t* settings;
settings = new_fluid_settings();
fluid_settings_setstr(settings, "synth.reverb.active", "yes");
fluid_settings_setstr(settings, "synth.chorus.active", "no");
fluid_settings_setint(settings, "synth.reverb.active", 0);
fluid_settings_setint(settings, "synth.chorus.active", 0);
synth = new_fluid_synth(settings);
adriver = new_fluid_audio_driver(settings, synth);
sequencer = new_fluid_sequencer2(0);

View File

@ -457,7 +457,7 @@ fluid_settings_set(fluid_settings_t *settings, const char *name, fluid_setting_n
else
{
/* path ends prematurely */
FLUID_LOG(FLUID_WARN, "'%s' is not a node. Name of the setting was '%s'", tokens[n], name);
FLUID_LOG(FLUID_ERR, "'%s' is not a node. Name of the setting was '%s'", tokens[n], name);
return FLUID_FAILED;
}
@ -550,7 +550,7 @@ fluid_settings_register_str(fluid_settings_t *settings, const char *name, const
}
else
{
FLUID_LOG(FLUID_WARN, "Type mismatch on setting '%s'", name);
FLUID_LOG(FLUID_ERR, "Failed to register string setting '%s' as it already exists with a different type", name);
}
}
@ -612,7 +612,7 @@ fluid_settings_register_num(fluid_settings_t *settings, const char *name, double
else
{
/* type mismatch */
FLUID_LOG(FLUID_WARN, "Type mismatch on setting '%s'", name);
FLUID_LOG(FLUID_ERR, "Failed to register numeric setting '%s' as it already exists with a different type", name);
}
}
@ -674,7 +674,7 @@ fluid_settings_register_int(fluid_settings_t *settings, const char *name, int de
else
{
/* type mismatch */
FLUID_LOG(FLUID_WARN, "Type mismatch on setting '%s'", name);
FLUID_LOG(FLUID_ERR, "Failed to register int setting '%s' as it already exists with a different type", name);
}
}
@ -936,6 +936,7 @@ fluid_settings_setstr(fluid_settings_t *settings, const char *name, const char *
if((fluid_settings_get(settings, name, &node) != FLUID_OK)
|| (node->type != FLUID_STR_TYPE))
{
FLUID_LOG(FLUID_ERR, "Unknown string setting '%s'", name);
goto error_recovery;
}
@ -1313,6 +1314,7 @@ fluid_settings_setnum(fluid_settings_t *settings, const char *name, double val)
if((fluid_settings_get(settings, name, &node) != FLUID_OK)
|| (node->type != FLUID_NUM_TYPE))
{
FLUID_LOG(FLUID_ERR, "Unknown numeric setting '%s'", name);
goto error_recovery;
}
@ -1320,7 +1322,7 @@ fluid_settings_setnum(fluid_settings_t *settings, const char *name, double val)
if(val < setting->min || val > setting->max)
{
FLUID_LOG(FLUID_DBG, "requested set value for %s out of range", name);
FLUID_LOG(FLUID_ERR, "requested set value for '%s' out of range", name);
goto error_recovery;
}
@ -1497,6 +1499,7 @@ fluid_settings_setint(fluid_settings_t *settings, const char *name, int val)
if((fluid_settings_get(settings, name, &node) != FLUID_OK)
|| (node->type != FLUID_INT_TYPE))
{
FLUID_LOG(FLUID_ERR, "Unknown integer parameter '%s'", name);
goto error_recovery;
}
@ -1504,7 +1507,7 @@ fluid_settings_setint(fluid_settings_t *settings, const char *name, int val)
if(val < setting->min || val > setting->max)
{
FLUID_LOG(FLUID_DBG, "requested set value for %s out of range", name);
FLUID_LOG(FLUID_ERR, "requested set value for setting '%s' out of range", name);
goto error_recovery;
}