fluid_rev.h
上传用户:tjmskj2
上传日期:2020-08-17
资源大小:577k
文件大小:2k
源码类别:

midi

开发平台:

C/C++

  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.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18.  * 02111-1307, USA
  19.  */
  20. #ifndef _FLUID_REV_H
  21. #define _FLUID_REV_H
  22. #include "fluidsynth_priv.h"
  23. typedef struct _fluid_revmodel_t fluid_revmodel_t;
  24. /** Flags for fluid_revmodel_set() */
  25. typedef enum
  26. {
  27.   FLUID_REVMODEL_SET_ROOMSIZE       = 1 << 0,
  28.   FLUID_REVMODEL_SET_DAMPING        = 1 << 1,
  29.   FLUID_REVMODEL_SET_WIDTH          = 1 << 2,
  30.   FLUID_REVMODEL_SET_LEVEL          = 1 << 3
  31. } fluid_revmodel_set_t;
  32. /** Value for fluid_revmodel_set() which sets all reverb parameters. */
  33. #define FLUID_REVMODEL_SET_ALL      0x0F
  34. /*
  35.  * reverb preset
  36.  */
  37. typedef struct _fluid_revmodel_presets_t {
  38.   char* name;
  39.   fluid_real_t roomsize;
  40.   fluid_real_t damp;
  41.   fluid_real_t width;
  42.   fluid_real_t level;
  43. } fluid_revmodel_presets_t;
  44. /*
  45.  * reverb
  46.  */
  47. fluid_revmodel_t* new_fluid_revmodel(void);
  48. void delete_fluid_revmodel(fluid_revmodel_t* rev);
  49. void fluid_revmodel_processmix(fluid_revmodel_t* rev, fluid_real_t *in,
  50.       fluid_real_t *left_out, fluid_real_t *right_out);
  51. void fluid_revmodel_processreplace(fluid_revmodel_t* rev, fluid_real_t *in,
  52.   fluid_real_t *left_out, fluid_real_t *right_out);
  53. void fluid_revmodel_reset(fluid_revmodel_t* rev);
  54. void fluid_revmodel_set(fluid_revmodel_t* rev, int set, float roomsize,
  55.                         float damping, float width, float level);
  56. #endif /* _FLUID_REV_H */