1 /* FluidSynth - A Software Synthesizer 2 * 3 * Copyright (C) 2003 Peter Hanappe and others. 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public License 7 * as published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the Free 17 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 * 02110-1301, USA 19 */ 20 21 22 #ifndef _FLUID_RVOICE_MIXER_H 23 #define _FLUID_RVOICE_MIXER_H 24 25 #include "fluidsynth_priv.h" 26 #include "fluid_rvoice.h" 27 #include "fluid_ladspa.h" 28 29 typedef struct _fluid_rvoice_mixer_t fluid_rvoice_mixer_t; 30 31 #define FLUID_MIXER_MAX_BUFFERS_DEFAULT (8192/FLUID_BUFSIZE) 32 33 34 void fluid_rvoice_mixer_set_finished_voices_callback( 35 fluid_rvoice_mixer_t* mixer, 36 void (*func)(void*, fluid_rvoice_t*), 37 void* userdata); 38 39 40 int fluid_rvoice_mixer_render(fluid_rvoice_mixer_t* mixer, int blockcount); 41 int fluid_rvoice_mixer_get_bufs(fluid_rvoice_mixer_t* mixer, 42 fluid_real_t*** left, fluid_real_t*** right); 43 44 fluid_rvoice_mixer_t* new_fluid_rvoice_mixer(int buf_count, int fx_buf_count, 45 fluid_real_t sample_rate); 46 47 void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t*); 48 49 void fluid_rvoice_mixer_set_samplerate(fluid_rvoice_mixer_t* mixer, fluid_real_t samplerate); 50 void fluid_rvoice_mixer_set_reverb_enabled(fluid_rvoice_mixer_t* mixer, int on); 51 void fluid_rvoice_mixer_set_chorus_enabled(fluid_rvoice_mixer_t* mixer, int on); 52 void fluid_rvoice_mixer_set_mix_fx(fluid_rvoice_mixer_t* mixer, int on); 53 int fluid_rvoice_mixer_set_polyphony(fluid_rvoice_mixer_t* handler, int value); 54 int fluid_rvoice_mixer_add_voice(fluid_rvoice_mixer_t* mixer, fluid_rvoice_t* voice); 55 void fluid_rvoice_mixer_set_chorus_params(fluid_rvoice_mixer_t* mixer, int set, 56 int nr, double level, double speed, 57 double depth_ms, int type); 58 void fluid_rvoice_mixer_set_reverb_params(fluid_rvoice_mixer_t* mixer, int set, 59 double roomsize, double damping, 60 double width, double level); 61 void fluid_rvoice_mixer_reset_fx(fluid_rvoice_mixer_t* mixer); 62 void fluid_rvoice_mixer_reset_reverb(fluid_rvoice_mixer_t* mixer); 63 void fluid_rvoice_mixer_reset_chorus(fluid_rvoice_mixer_t* mixer); 64 65 void fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t* mixer, int thread_count, 66 int prio_level); 67 68 #ifdef LADSPA 69 void fluid_rvoice_mixer_set_ladspa(fluid_rvoice_mixer_t* mixer, 70 fluid_LADSPA_FxUnit_t* ladspa); 71 #endif 72 73 #endif 74 75