1 2 /* 3 * The Real SoundTracker - Pseudo-mixer for sample playback parameter tracing (header) 4 * 5 * Copyright (C) 2001-2019 Michael Krause 6 * Copyright (C) 2003 Yury Aliaev 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef _TRACER_H 24 #define _TRACER_H 25 26 #include "mixer.h" 27 28 typedef struct tracer_channel { 29 st_mixer_sample_info* sample; 30 31 void* data; // for updatesample() to see if sample has changed 32 int looptype; 33 guint32 length; 34 35 guint32 flags; // see below 36 float volume; // 0.0 ... 1.0 37 float panning; // 0.0 ... 1.0 38 int direction; // +1 for forward, -1 for backward 39 guint32 playend; // for a forced premature end of the sample 40 41 guint32 positionw; // current sample position (whole part of 32.32) 42 guint32 positionf; // current sample position (fractional part of 32.32) 43 guint32 freqw; // frequency (whole part of 32.32) 44 guint32 freqf; // frequency (fractional part of 32.32) 45 46 float ffreq; // filter frequency (0<=x<=1) 47 float freso; // filter resonance (0<=x<1) 48 gboolean filter_on; 49 } tracer_channel; 50 51 #define TR_FLAG_LOOP_UNIDIRECTIONAL 1 52 #define TR_FLAG_LOOP_BIDIRECTIONAL 2 53 #define TR_FLAG_SAMPLE_RUNNING 4 54 55 void tracer_trace(int mixfreq, int songpos, int patpos); 56 tracer_channel* tracer_return_channel(int number); 57 void tracer_setnumch(int n); 58 #endif 59