3 #define MAX_CHANNELS 16
5 #define Period2Freq(period) ((3546897.f * 65536.f) / (period))
9 int16 aFrames, aVolume;
10 int16 dFrames, dVolume;
12 int16 rFrames, rVolume;
29 struct hvl_plsentry *pls_Entries;
37 uint8 ins_FilterLowerLimit;
38 uint8 ins_FilterUpperLimit;
39 uint8 ins_FilterSpeed;
40 uint8 ins_SquareLowerLimit;
41 uint8 ins_SquareUpperLimit;
42 uint8 ins_SquareSpeed;
43 uint8 ins_VibratoDelay;
44 uint8 ins_VibratoSpeed;
45 uint8 ins_VibratoDepth;
46 uint8 ins_HardCutRelease;
47 uint8 ins_HardCutReleaseFrames;
48 struct hvl_envelope ins_Envelope;
49 struct hvl_plist ins_PList;
54 uint8 pos_Track[MAX_CHANNELS];
55 int8 pos_Transpose[MAX_CHANNELS];
73 int16 vc_NextTranspose;
75 struct hvl_envelope vc_ADSR;
76 struct hvl_instrument *vc_Instrument;
79 uint16 vc_InstrPeriod;
80 uint16 vc_TrackPeriod;
81 uint16 vc_VibratoPeriod;
83 int16 vc_NoteMaxVolume;
84 uint16 vc_PerfSubVolume;
90 uint8 vc_IgnoreSquare;
92 int16 vc_VolumeSlideUp;
93 int16 vc_VolumeSlideDown;
95 uint8 vc_HardCutRelease;
96 int16 vc_HardCutReleaseF;
97 uint8 vc_PeriodSlideOn;
98 int16 vc_PeriodSlideSpeed;
99 int16 vc_PeriodSlidePeriod;
100 int16 vc_PeriodSlideLimit;
101 int16 vc_PeriodSlideWithLimit;
102 int16 vc_PeriodPerfSlideSpeed;
103 int16 vc_PeriodPerfSlidePeriod;
104 uint8 vc_PeriodPerfSlideOn;
105 int16 vc_VibratoDelay;
106 int16 vc_VibratoSpeed;
107 int16 vc_VibratoCurrent;
108 int16 vc_VibratoDepth;
112 int16 vc_SquareLowerLimit;
113 int16 vc_SquareUpperLimit;
116 int16 vc_SquareSlidingIn;
117 int16 vc_SquareReverse;
121 int16 vc_FilterSpeed;
122 int16 vc_FilterUpperLimit;
123 int16 vc_FilterLowerLimit;
126 int16 vc_FilterSlidingIn;
127 int16 vc_IgnoreFilter;
128 int16 vc_PerfCurrent;
131 struct hvl_plist *vc_PerfList;
132 int8 *vc_AudioPointer;
133 int8 *vc_AudioSource;
134 uint8 vc_NoteDelayOn;
136 int16 vc_NoteDelayWait;
137 int16 vc_NoteCutWait;
138 int16 vc_AudioPeriod;
139 int16 vc_AudioVolume;
142 int8 vc_SquareTempBuffer[0x80];
143 int8 vc_VoiceBuffer[0x282*4];
145 uint8 vc_TrackMasterVolume;
147 int16 vc_VoicePeriod;
149 uint32 vc_SetPan; // New for 1.4
150 uint32 vc_PanMultLeft;
151 uint32 vc_PanMultRight;
152 uint32 vc_RingSamplePos;
154 int8 *vc_RingMixSource;
155 uint8 vc_RingPlantPeriod;
156 int16 vc_RingInstrPeriod;
157 int16 vc_RingBasePeriod;
158 int16 vc_RingAudioPeriod;
159 int8 *vc_RingAudioSource;
160 uint8 vc_RingNewWaveform;
161 uint8 vc_RingWaveform;
162 uint8 vc_RingFixedPeriod;
163 int8 vc_RingVoiceBuffer[0x282*4];
172 int8 *ht_WaveformTab[MAX_CHANNELS];
174 uint16 ht_PositionNr;
175 uint8 ht_SpeedMultiplier;
176 uint8 ht_TrackLength;
178 uint8 ht_InstrumentNr;
181 uint32 ht_PlayingTime;
184 int16 ht_StepWaitFrames;
186 uint16 ht_PosJumpNote;
187 uint8 ht_GetNewPosition;
188 uint8 ht_PatternBreak;
189 uint8 ht_SongEndReached;
193 struct hvl_position *ht_Positions;
194 struct hvl_step ht_Tracks[256][64];
195 struct hvl_instrument *ht_Instruments;
196 struct hvl_voice ht_Voices[MAX_CHANNELS];
199 int32 ht_defpanright;
203 void hvl_DecodeFrame( struct hvl_tune *ht, int8 *buf1, int8 *buf2, int32 bufmod );
204 void hvl_InitReplayer( void );
205 BOOL hvl_InitSubsong( struct hvl_tune *ht, uint32 nr );
206 struct hvl_tune *hvl_LoadTune( TEXT *name, uint32 freq, uint32 defstereo );
207 void hvl_FreeTune( struct hvl_tune *ht );
209 struct hvl_tune *tune;