From aa0d32f29a6608593173df14cc7741c7e8d2a4a7 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sun, 8 Apr 2018 12:18:38 +0200 Subject: [PATCH] remove unused fluid_voice_write() --- src/rvoice/fluid_rvoice_dsp.c | 2 +- src/synth/fluid_voice.c | 29 ----------------------------- src/synth/fluid_voice.h | 2 -- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/rvoice/fluid_rvoice_dsp.c b/src/rvoice/fluid_rvoice_dsp.c index 8ae64046..8275b11e 100644 --- a/src/rvoice/fluid_rvoice_dsp.c +++ b/src/rvoice/fluid_rvoice_dsp.c @@ -28,7 +28,7 @@ * Interpolates audio data (obtains values between the samples of the original * waveform data). * - * Variables loaded from the voice structure (assigned in fluid_voice_write()): + * Variables loaded from the voice structure (assigned in fluid_rvoice_write()): * - dsp_data: Pointer to the original waveform data * - dsp_phase: The position in the original waveform data. * This has an integer and a fractional part (between samples). diff --git a/src/synth/fluid_voice.c b/src/synth/fluid_voice.c index 69623931..91633a22 100644 --- a/src/synth/fluid_voice.c +++ b/src/synth/fluid_voice.c @@ -384,35 +384,6 @@ fluid_real_t fluid_voice_gen_value(const fluid_voice_t* voice, int num) } } - -/** - * Synthesize a voice to a buffer. - * - * @param voice Voice to synthesize - * @param dsp_buf Audio buffer to synthesize to (#FLUID_BUFSIZE in length) - * @return Count of samples written to dsp_buf (can be 0) - * - * Panning, reverb and chorus are processed separately. The dsp interpolation - * routine is in (fluid_rvoice_dsp.c). - */ -int -fluid_voice_write (fluid_voice_t* voice, fluid_real_t *dsp_buf) -{ - int result; - if (!voice->can_access_rvoice) - return 0; - - result = fluid_rvoice_write(voice->rvoice, dsp_buf); - - if (result == -1) - return 0; - - if ((result < FLUID_BUFSIZE) && fluid_voice_is_playing(voice)) /* Voice finished by itself */ - fluid_voice_off(voice); - - return result; -} - /* * fluid_voice_start */ diff --git a/src/synth/fluid_voice.h b/src/synth/fluid_voice.h index 179804cb..bda95cc8 100644 --- a/src/synth/fluid_voice.h +++ b/src/synth/fluid_voice.h @@ -120,8 +120,6 @@ 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); -int fluid_voice_write (fluid_voice_t* voice, fluid_real_t *dsp_buf); - int fluid_voice_init(fluid_voice_t* voice, fluid_sample_t* sample, fluid_zone_range_t *inst_zone_range, fluid_channel_t* channel, int key, int vel,