mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
refactor delete_fluid_voice() to return void
return value was ignored anyway
This commit is contained in:
parent
bf978e2b6b
commit
5427a4ebf5
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue