PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ahx.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef __AHX_H__
17#define __AHX_H__
18
20{
21 int Note;
22 int Fixed;
23 int Waveform;
24 int FX[2], FXParam[2];
25};
26
28{
29 int Speed, Length;
30 struct AHXPListEntry *Entries;
31};
32
34{
35 int aFrames, aVolume;
36 int dFrames, dVolume;
37 int sFrames;
38 int rFrames, rVolume;
39};
40
42{
43 char *Name;
44 int Volume; // 0..64
45 int WaveLength; // 0..5 (shifts)
46 struct AHXEnvelope Envelope;
47 int FilterLowerLimit, FilterUpperLimit, FilterSpeed;
48 int SquareLowerLimit, SquareUpperLimit, SquareSpeed;
49 int VibratoDelay, VibratoDepth, VibratoSpeed;
50 int HardCutRelease, HardCutReleaseFrames;
51 struct AHXPList PList;
52};
53
55{
56 int Track[4], Transpose[4];
57};
58
59struct AHXStep
60{
61 int Note, Instrument, FX, FXParam;
62};
63
64struct AHXSong
65{
66 char *Name;
67 int Restart, PositionNr, TrackLength, TrackNr, InstrumentNr, SubsongNr;
68 int Revision, SpeedMultiplier;
69 int *Subsongs;
70};
71
73{
74 // Read those variables for mixing!
75 int VoiceVolume, VoicePeriod;
76 char VoiceBuffer[0x281]; // for oversampling optimization!
77 int Track, Transpose;
78 int NextTrack, NextTranspose;
79 int ADSRVolume; // fixed point 8:8
80 struct AHXEnvelope ADSR; // frames/delta fixed 8:8
81 struct AHXInstrument *Instrument; // current instrument
82 int InstrPeriod, TrackPeriod, VibratoPeriod;
83 int NoteMaxVolume, PerfSubVolume, TrackMasterVolume;
84 int NewWaveform, Waveform, PlantSquare, PlantPeriod, IgnoreSquare;
85 int TrackOn, FixedNote;
86 int VolumeSlideUp, VolumeSlideDown;
87 int HardCut, HardCutRelease, HardCutReleaseF;
88 int PeriodSlideSpeed, PeriodSlidePeriod, PeriodSlideLimit, PeriodSlideOn, PeriodSlideWithLimit;
89 int PeriodPerfSlideSpeed, PeriodPerfSlidePeriod, PeriodPerfSlideOn;
90 int VibratoDelay, VibratoCurrent, VibratoDepth, VibratoSpeed;
91 int SquareOn, SquareInit, SquareWait, SquareLowerLimit, SquareUpperLimit, SquarePos, SquareSign, SquareSlidingIn, SquareReverse;
92 int FilterOn, FilterInit, FilterWait, FilterLowerLimit, FilterUpperLimit, FilterPos, FilterSign, FilterSpeed, FilterSlidingIn, IgnoreFilter;
93 int PerfCurrent, PerfSpeed, PerfWait;
94 int WaveLength;
95 struct AHXPList *PerfList;
96 int NoteDelayWait, NoteDelayOn, NoteCutWait, NoteCutOn;
97 char *AudioSource;
98 int AudioPeriod, AudioVolume;
99 char SquareTempBuffer[0x80];
100};
101
103{
104 char LowPasses[0x31588];
105 char Triangle04[0x04], Triangle08[0x08], Triangle10[0x10], Triangle20[0x20], Triangle40[0x40], Triangle80[0x80];
106 char Sawtooth04[0x04], Sawtooth08[0x08], Sawtooth10[0x10], Sawtooth20[0x20], Sawtooth40[0x40], Sawtooth80[0x80];
107 char Squares[0x1000];
108 char WhiteNoiseBig[0x780];
109 char HighPasses[0x31588];
110};
111
112void AHXPlayer_Init();
113int AHXPlayer_LoadSongBuffer(void *Buffer, int Len);
114#ifdef WIN32
115int AHXPlayer_LoadSong(char *Filename);
116#endif
117int AHXPlayer_InitSubsong(int Nr);
118void AHXPlayer_NextPosition();
119void AHXPlayer_PrevPosition();
120void AHXPlayer_VoiceOnOff(int Voice, int OnOff);
121void AHXPlayer_SetAudio(int v);
122void AHXPlayer_PListCommandParse(int v, int FX, int FXParam);
123void AHXPlayer_PlayIRQ();
124void AHXPlayer_ProcessStep(int v);
125void AHXPlayer_ProcessFrame(int v);
126void AHXPlayer_SetBoost(int boostval);
127void AHXPlayer_SetOversampling(int enable);
128
129void AHXOutput_MixBuffer(short *target);
130
131#endif /* __AHX_H__ */
Definition ahx.h:28
Definition ahx.h:20
Definition ahx.h:65
Definition ahx.h:60
Definition ahx.h:73