Skip to content

Commit

Permalink
correct return value checking for fluidsynth_register_adriver.c
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Jan 2, 2018
1 parent 068cba9 commit fe37923
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/fluidsynth_register_adriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ int main()

fluid_settings_t* settings = new_fluid_settings();
res = fluid_settings_setstr(settings, "audio.driver", DRV[i]);

/* settings API will be refactored to return FLUID_OK|FAILED next major release
* returning TRUE or FALSE is deprecated
*/
#if FLUIDSYNTH_VERSION_MAJOR >= 2
if(res != FLUID_OK)
#else
if(res == 0)
#endif
{
puts("audio.driver set err");
return -1;
Expand Down

0 comments on commit fe37923

Please sign in to comment.