1 2 /* 3 * Diverse Bristol audio routines. 4 * Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2012 5 * 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #ifndef ENV_H 23 #define ENV_H 24 25 #define STATE_DONE BRISTOL_KEYDONE /* 4 */ 26 #define STATE_RELEASE BRISTOL_KEYOFF /* 2 */ 27 #define STATE_START 10 28 #define STATE_ATTACK 11 29 #define STATE_DECAY 12 30 #define STATE_SUSTAIN 13 31 32 #define LINEAR_ATTACK 1 33 34 typedef struct BristolENV { 35 bristolOPSpec spec; 36 float samplerate; 37 float duration; 38 unsigned int flags; 39 } bristolENV; 40 41 typedef struct BristolENVlocal { 42 unsigned int flags; 43 float cgain; 44 float egain; 45 int cstate; 46 } bristolENVlocal; 47 48 #endif /* ENV_H */ 49 50