Path: blob/master/libs/fluidsynth/src/rvoice/fluid_adsr_env.c
4396 views
/* FluidSynth - A Software Synthesizer1*2* Copyright (C) 2003 Peter Hanappe and others.3*4* This library is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public License6* as published by the Free Software Foundation; either version 2.1 of7* the License, or (at your option) any later version.8*9* This library is distributed in the hope that it will be useful, but10* WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* You should have received a copy of the GNU Lesser General Public15* License along with this library; if not, write to the Free16* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA17* 02110-1301, USA18*/1920#include "fluid_adsr_env.h"2122DECLARE_FLUID_RVOICE_FUNCTION(fluid_adsr_env_set_data)23{24fluid_adsr_env_t *env = obj;25fluid_adsr_env_section_t section = param[0].i;26unsigned int count = param[1].i;27fluid_real_t coeff = param[2].real;28fluid_real_t increment = param[3].real;29fluid_real_t min = param[4].real;30fluid_real_t max = param[5].real;3132env->data[section].count = count;33env->data[section].coeff = coeff;34env->data[section].increment = increment;35env->data[section].min = min;36env->data[section].max = max;37}383940