Add/remove source(s) in our MSVC project (libardour)
[ardour.git] / libs / fluidsynth / src / fluid_adsr_env.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 Lesser General Public License
7  * as published by the Free Software Foundation; either version 2.1 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  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser 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 #include "fluid_adsr_env.h"
22
23 DECLARE_FLUID_RVOICE_FUNCTION(fluid_adsr_env_set_data)
24 {
25     fluid_adsr_env_t *env = obj;
26     fluid_adsr_env_section_t section = param[0].i;
27     unsigned int count = param[1].i;
28     fluid_real_t coeff = param[2].real;
29     fluid_real_t increment = param[3].real;
30     fluid_real_t min = param[4].real;
31     fluid_real_t max = param[5].real;
32
33     env->data[section].count = count;
34     env->data[section].coeff = coeff;
35     env->data[section].increment = increment;
36     env->data[section].min = min;
37     env->data[section].max = max;
38 }
39