2016-08-23 12:50:54 -04:00
|
|
|
/* FluidSynth - A Software Synthesizer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Peter Hanappe and others.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2018-10-17 18:41:02 -04:00
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2.1 of
|
2016-08-23 12:50:54 -04: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
|
2018-10-17 18:41:02 -04:00
|
|
|
* Lesser General Public License for more details.
|
2016-08-23 12:50:54 -04:00
|
|
|
*
|
2018-10-17 18:41:02 -04:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2016-08-23 12:50:54 -04:00
|
|
|
* License along with this library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _FLUID_REV_H
|
|
|
|
#define _FLUID_REV_H
|
|
|
|
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
|
|
|
|
typedef struct _fluid_revmodel_t fluid_revmodel_t;
|
|
|
|
|
|
|
|
|
|
|
|
/** Flags for fluid_revmodel_set() */
|
|
|
|
typedef enum
|
|
|
|
{
|
2018-10-17 18:41:02 -04:00
|
|
|
FLUID_REVMODEL_SET_ROOMSIZE = 1 << 0,
|
|
|
|
FLUID_REVMODEL_SET_DAMPING = 1 << 1,
|
|
|
|
FLUID_REVMODEL_SET_WIDTH = 1 << 2,
|
|
|
|
FLUID_REVMODEL_SET_LEVEL = 1 << 3,
|
|
|
|
|
|
|
|
/** Value for fluid_revmodel_set() which sets all reverb parameters. */
|
|
|
|
FLUID_REVMODEL_SET_ALL = FLUID_REVMODEL_SET_LEVEL
|
|
|
|
| FLUID_REVMODEL_SET_WIDTH
|
|
|
|
| FLUID_REVMODEL_SET_DAMPING
|
|
|
|
| FLUID_REVMODEL_SET_ROOMSIZE,
|
2016-08-23 12:50:54 -04:00
|
|
|
} fluid_revmodel_set_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* reverb preset
|
|
|
|
*/
|
2018-10-17 18:41:02 -04:00
|
|
|
typedef struct _fluid_revmodel_presets_t
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
fluid_real_t roomsize;
|
|
|
|
fluid_real_t damp;
|
|
|
|
fluid_real_t width;
|
|
|
|
fluid_real_t level;
|
2016-08-23 12:50:54 -04:00
|
|
|
} fluid_revmodel_presets_t;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* reverb
|
|
|
|
*/
|
2018-10-17 18:41:02 -04:00
|
|
|
fluid_revmodel_t *new_fluid_revmodel(fluid_real_t sample_rate);
|
|
|
|
void delete_fluid_revmodel(fluid_revmodel_t *rev);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-11-23 08:36:52 -05:00
|
|
|
void fluid_revmodel_processmix(fluid_revmodel_t *rev, const fluid_real_t *in,
|
2018-10-17 18:41:02 -04:00
|
|
|
fluid_real_t *left_out, fluid_real_t *right_out);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-11-23 08:36:52 -05:00
|
|
|
void fluid_revmodel_processreplace(fluid_revmodel_t *rev, const fluid_real_t *in,
|
2018-10-17 18:41:02 -04:00
|
|
|
fluid_real_t *left_out, fluid_real_t *right_out);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
void fluid_revmodel_reset(fluid_revmodel_t *rev);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2018-10-17 18:41:02 -04:00
|
|
|
void fluid_revmodel_set(fluid_revmodel_t *rev, int set, fluid_real_t roomsize,
|
|
|
|
fluid_real_t damping, fluid_real_t width, fluid_real_t level);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
2019-12-02 17:58:15 -05:00
|
|
|
int fluid_revmodel_samplerate_change(fluid_revmodel_t *rev, fluid_real_t sample_rate);
|
2016-08-23 12:50:54 -04:00
|
|
|
|
|
|
|
#endif /* _FLUID_REV_H */
|