From 5427a4ebf50b87810ffef36eaae31dabdf366a53 Mon Sep 17 00:00:00 2001 From: derselbst Date: Mon, 30 Oct 2017 11:33:23 +0100 Subject: [PATCH] refactor delete_fluid_voice() to return void return value was ignored anyway --- src/synth/fluid_voice.c | 8 +++----- src/synth/fluid_voice.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/synth/fluid_voice.c b/src/synth/fluid_voice.c index 5029b5af..bd765aef 100644 --- a/src/synth/fluid_voice.c +++ b/src/synth/fluid_voice.c @@ -217,19 +217,17 @@ new_fluid_voice(fluid_real_t output_rate) /* * delete_fluid_voice */ -int +void delete_fluid_voice(fluid_voice_t* voice) { - fluid_return_val_if_fail(voice != NULL, FLUID_OK); + fluid_return_if_fail(voice != NULL); if (!voice->can_access_rvoice || !voice->can_access_overflow_rvoice) { - /* stop rvoice before deleting voice! */ - return FLUID_FAILED; + FLUID_LOG(FLUID_WARN, "Deleting voice %u which has locked rvoices!", voice->id); } FLUID_FREE(voice->overflow_rvoice); FLUID_FREE(voice->rvoice); FLUID_FREE(voice); - return FLUID_OK; } /* fluid_voice_init diff --git a/src/synth/fluid_voice.h b/src/synth/fluid_voice.h index 5b0442bf..0127b173 100644 --- a/src/synth/fluid_voice.h +++ b/src/synth/fluid_voice.h @@ -111,7 +111,7 @@ struct _fluid_voice_t fluid_voice_t* new_fluid_voice(fluid_real_t output_rate); -int delete_fluid_voice(fluid_voice_t* voice); +void delete_fluid_voice(fluid_voice_t* voice); void fluid_voice_start(fluid_voice_t* voice); void fluid_voice_calculate_gen_pitch(fluid_voice_t* voice);