2010-06-30 16:39:20 +00:00
|
|
|
/* FluidSynth - A Software Synthesizer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Peter Hanappe and others.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2017-07-12 15:45:23 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
2017-07-12 15:53:03 +00:00
|
|
|
* as published by the Free Software Foundation; either version 2.1 of
|
2010-06-30 16:39:20 +00:00
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2017-07-12 15:45:23 +00:00
|
|
|
* Lesser General Public License for more details.
|
2010-06-30 16:39:20 +00:00
|
|
|
*
|
2017-07-12 15:54:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2010-06-30 16:39:20 +00:00
|
|
|
* License along with this library; if not, write to the Free
|
2011-08-15 12:57:10 +00:00
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA
|
2010-06-30 16:39:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _FLUID_RVOICE_MIXER_H
|
|
|
|
#define _FLUID_RVOICE_MIXER_H
|
|
|
|
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
#include "fluid_rvoice.h"
|
2010-09-04 07:19:57 +00:00
|
|
|
#include "fluid_ladspa.h"
|
2010-06-30 16:39:20 +00:00
|
|
|
|
|
|
|
typedef struct _fluid_rvoice_mixer_t fluid_rvoice_mixer_t;
|
|
|
|
|
|
|
|
#define FLUID_MIXER_MAX_BUFFERS_DEFAULT (8192/FLUID_BUFSIZE)
|
|
|
|
|
2010-07-03 12:25:16 +00:00
|
|
|
|
2010-06-30 16:39:20 +00:00
|
|
|
void fluid_rvoice_mixer_set_finished_voices_callback(
|
|
|
|
fluid_rvoice_mixer_t* mixer,
|
|
|
|
void (*func)(void*, fluid_rvoice_t*),
|
|
|
|
void* userdata);
|
|
|
|
|
|
|
|
|
|
|
|
int fluid_rvoice_mixer_render(fluid_rvoice_mixer_t* mixer, int blockcount);
|
|
|
|
int fluid_rvoice_mixer_get_bufs(fluid_rvoice_mixer_t* mixer,
|
2017-07-15 16:12:17 +00:00
|
|
|
fluid_real_t*** left, fluid_real_t*** right);
|
2017-07-13 10:02:58 +00:00
|
|
|
int fluid_rvoice_mixer_get_fx_bufs(fluid_rvoice_mixer_t* mixer,
|
2017-07-15 16:12:17 +00:00
|
|
|
fluid_real_t*** fx_left, fluid_real_t*** fx_right);
|
2017-08-19 20:01:47 +00:00
|
|
|
int fluid_rvoice_mixer_get_bufcount(fluid_rvoice_mixer_t* mixer);
|
2018-03-12 17:20:46 +00:00
|
|
|
#if WITH_PROFILING
|
|
|
|
int fluid_rvoice_mixer_get_active_voices(fluid_rvoice_mixer_t* mixer);
|
|
|
|
#endif
|
2010-10-17 10:43:48 +00:00
|
|
|
fluid_rvoice_mixer_t* new_fluid_rvoice_mixer(int buf_count, int fx_buf_count,
|
|
|
|
fluid_real_t sample_rate);
|
2010-06-30 16:39:20 +00:00
|
|
|
|
|
|
|
void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t*);
|
|
|
|
|
|
|
|
void fluid_rvoice_mixer_set_samplerate(fluid_rvoice_mixer_t* mixer, fluid_real_t samplerate);
|
|
|
|
void fluid_rvoice_mixer_set_reverb_enabled(fluid_rvoice_mixer_t* mixer, int on);
|
|
|
|
void fluid_rvoice_mixer_set_chorus_enabled(fluid_rvoice_mixer_t* mixer, int on);
|
|
|
|
void fluid_rvoice_mixer_set_mix_fx(fluid_rvoice_mixer_t* mixer, int on);
|
|
|
|
int fluid_rvoice_mixer_set_polyphony(fluid_rvoice_mixer_t* handler, int value);
|
|
|
|
int fluid_rvoice_mixer_add_voice(fluid_rvoice_mixer_t* mixer, fluid_rvoice_t* voice);
|
|
|
|
void fluid_rvoice_mixer_set_chorus_params(fluid_rvoice_mixer_t* mixer, int set,
|
2018-04-08 10:34:42 +00:00
|
|
|
int nr, fluid_real_t level, fluid_real_t speed,
|
|
|
|
fluid_real_t depth_ms, int type);
|
2010-06-30 16:39:20 +00:00
|
|
|
void fluid_rvoice_mixer_set_reverb_params(fluid_rvoice_mixer_t* mixer, int set,
|
2018-04-08 10:34:42 +00:00
|
|
|
fluid_real_t roomsize, fluid_real_t damping,
|
|
|
|
fluid_real_t width, fluid_real_t level);
|
2010-06-30 16:39:20 +00:00
|
|
|
void fluid_rvoice_mixer_reset_fx(fluid_rvoice_mixer_t* mixer);
|
2012-11-18 09:30:46 +00:00
|
|
|
void fluid_rvoice_mixer_reset_reverb(fluid_rvoice_mixer_t* mixer);
|
|
|
|
void fluid_rvoice_mixer_reset_chorus(fluid_rvoice_mixer_t* mixer);
|
2010-06-30 16:39:20 +00:00
|
|
|
|
2010-07-03 12:25:16 +00:00
|
|
|
void fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t* mixer, int thread_count,
|
|
|
|
int prio_level);
|
2010-09-04 07:19:57 +00:00
|
|
|
|
|
|
|
#ifdef LADSPA
|
2017-10-25 23:03:53 +00:00
|
|
|
void fluid_rvoice_mixer_set_ladspa(fluid_rvoice_mixer_t* mixer,
|
|
|
|
fluid_ladspa_fx_t *ladspa_fx, int audio_groups);
|
2010-09-04 07:19:57 +00:00
|
|
|
#endif
|
2010-06-30 16:39:20 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|