Pushed the final changes that got audio working!
This commit is contained in:
@@ -439,10 +439,14 @@ typedef short ENVMIX_STATE[40];
|
||||
* s parameter to this command is the source in DRAM.
|
||||
*/
|
||||
#define aLoadBuffer(pkt, s) \
|
||||
{ \
|
||||
{ \
|
||||
DEBUG_PRINT("aLoadBuffer()"); \
|
||||
DEBUG_PRINT("- getting pkt"); \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
DEBUG_PRINT("- setting first word"); \
|
||||
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \
|
||||
DEBUG_PRINT("- setting second word"); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
@@ -558,6 +562,8 @@ typedef short ENVMIX_STATE[40];
|
||||
*/
|
||||
#define aSetBuffer(pkt, f, i, o, c) \
|
||||
{ \
|
||||
DEBUG_PRINT("aSetBuffer()"); \
|
||||
DEBUG_PRINT("- getting pkt"); \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
|
||||
@@ -2,49 +2,21 @@
|
||||
#define _ULTRA64_LIBAUDIO_H_
|
||||
|
||||
#include "abi.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
#ifdef VERSION_SH
|
||||
s8 medium;
|
||||
s8 magic; // tbl: 0x04, otherwise: 0x03
|
||||
|
||||
// for ctl (else zeros):
|
||||
union {
|
||||
// unused, just for clarification (big endian)
|
||||
struct {
|
||||
u8 bank;
|
||||
u8 ff;
|
||||
u8 numInstruments;
|
||||
u8 numDrums;
|
||||
} as_u8;
|
||||
|
||||
// used
|
||||
struct {
|
||||
s16 bankAndFf;
|
||||
s16 numInstrumentsAndDrums;
|
||||
} as_s16;
|
||||
} ctl;
|
||||
#endif
|
||||
u8 *offset __attribute__((aligned (8)));
|
||||
s32 len __attribute__((aligned (8)));
|
||||
} ALSeqData;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifndef VERSION_SH
|
||||
s16 revision;
|
||||
#endif
|
||||
s16 seqCount;
|
||||
#ifdef VERSION_SH
|
||||
s16 unk2;
|
||||
u8 *data;
|
||||
#if !IS_64_BIT
|
||||
s32 pad[2];
|
||||
#endif
|
||||
#endif
|
||||
unsigned short revision;
|
||||
unsigned short seqCount;
|
||||
unsigned int pad;
|
||||
ALSeqData seqArray[1];
|
||||
} ALSeqFile;
|
||||
} __attribute__((aligned (16))) ALSeqFile;
|
||||
|
||||
void alSeqFileNew(ALSeqFile *f, u8 *base);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user