1
Fork 0
sm64/src/audio/data.h

118 lines
2.6 KiB
C
Raw Normal View History

2019-12-01 21:52:53 -05:00
#ifndef AUDIO_DATA_H
#define AUDIO_DATA_H
2019-08-25 00:46:40 -04:00
2020-06-02 12:44:34 -04:00
#include <PR/ultratypes.h>
2019-08-25 00:46:40 -04:00
#include "internal.h"
2020-06-02 12:44:34 -04:00
#include "types.h"
2019-08-25 00:46:40 -04:00
#define AUDIO_LOCK_UNINITIALIZED 0
#define AUDIO_LOCK_NOT_LOADING 0x76557364
#define AUDIO_LOCK_LOADING 0x19710515
#define NUMAIBUFFERS 3
// constant .data
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
extern struct AudioSessionSettingsEU gAudioSessionPresets[];
#else
2019-11-03 14:36:27 -05:00
extern struct AudioSessionSettings gAudioSessionPresets[18];
2020-02-03 00:51:26 -05:00
#endif
2019-08-25 00:46:40 -04:00
extern u16 D_80332388[128]; // unused
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
extern f32 gPitchBendFrequencyScale[256];
#else
2019-08-25 00:46:40 -04:00
extern f32 gPitchBendFrequencyScale[255];
2020-02-03 00:51:26 -05:00
#endif
2019-08-25 00:46:40 -04:00
extern f32 gNoteFrequencies[128];
extern u8 gDefaultShortNoteVelocityTable[16];
extern u8 gDefaultShortNoteDurationTable[16];
extern s8 gVibratoCurve[16];
extern struct AdsrEnvelope gDefaultEnvelope[3];
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
extern s16 gEuUnknownWave7[256];
extern s16 *gWaveSamples[6];
#else
2019-08-25 00:46:40 -04:00
extern s16 *gWaveSamples[4];
2020-02-03 00:51:26 -05:00
#endif
#ifdef VERSION_EU
extern u8 euUnknownData_8030194c[4];
extern u16 gHeadsetPanQuantization[0x10];
extern s32 euUnknownData_80301950[32];
extern struct NoteSubEu gZeroNoteSub;
extern struct NoteSubEu gDefaultNoteSub;
#else
2019-08-25 00:46:40 -04:00
extern u16 gHeadsetPanQuantization[10];
2020-02-03 00:51:26 -05:00
#endif
2019-08-25 00:46:40 -04:00
extern f32 gHeadsetPanVolume[128];
extern f32 gStereoPanVolume[128];
extern f32 gDefaultPanVolume[128];
extern f32 gVolRampingLhs136[128];
extern f32 gVolRampingRhs136[128];
extern f32 gVolRampingLhs144[128];
extern f32 gVolRampingRhs144[128];
extern f32 gVolRampingLhs128[128];
extern f32 gVolRampingRhs128[128];
// non-constant .data
extern s16 gTatumsPerBeat;
extern s8 gUnusedCount80333EE8;
2020-09-20 11:15:47 -04:00
extern s32 gAudioHeapSize; // AUDIO_HEAP_SIZE
extern s32 gAudioInitPoolSize; // AUDIO_INIT_POOL_SIZE
2019-08-25 00:46:40 -04:00
extern volatile s32 gAudioLoadLock;
// .bss
2019-12-01 21:52:53 -05:00
extern volatile s32 gAudioFrameCount;
2020-02-03 00:51:26 -05:00
// number of DMAs performed during this frame
#ifdef VERSION_EU
extern s32 gCurrAudioFrameDmaCount;
#else
extern volatile s32 gCurrAudioFrameDmaCount;
#endif
2019-08-25 00:46:40 -04:00
extern s32 gAudioTaskIndex;
extern s32 gCurrAiBufferIndex;
extern u64 *gAudioCmdBuffers[2];
extern u64 *gAudioCmd;
extern struct SPTask *gAudioTask;
extern struct SPTask gAudioTasks[2];
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
extern f32 D_EU_802298D0;
extern s32 gRefreshRate;
#endif
2020-06-02 12:44:34 -04:00
extern s16 *gAiBuffers[NUMAIBUFFERS];
2019-08-25 00:46:40 -04:00
extern s16 gAiBufferLengths[NUMAIBUFFERS];
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
#define AIBUFFER_LEN (0xa0 * 17)
#else
#define AIBUFFER_LEN (0xa0 * 16)
#endif
2019-08-25 00:46:40 -04:00
extern u32 gUnused80226E58[0x10];
extern u16 gUnused80226E98[0x10];
2019-12-01 21:52:53 -05:00
extern u32 gAudioRandom;
2019-08-25 00:46:40 -04:00
2020-02-03 00:51:26 -05:00
#ifdef VERSION_EU
#define UNUSED_COUNT_80333EE8 24
#define AUDIO_HEAP_SIZE 0x2c500
2020-09-20 11:15:47 -04:00
#define AUDIO_INIT_POOL_SIZE 0x2c00
2020-02-03 00:51:26 -05:00
#else
#define UNUSED_COUNT_80333EE8 16
#define AUDIO_HEAP_SIZE 0x31150
2020-09-20 11:15:47 -04:00
#define AUDIO_INIT_POOL_SIZE 0x2500
2020-02-03 00:51:26 -05:00
#endif
2020-06-02 12:44:34 -04:00
#endif // AUDIO_DATA_H