PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2snd.h File Reference
#include <tamtypes.h>
#include <libsd.h>
+ Include dependency graph for ps2snd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STREAM_STEREO   1
 
#define STREAM_END_CLOSE   0x0000
 
#define STREAM_END_REPEAT   0x1000
 
#define BINDID_PS2SND   0x80068000
 
#define PS2SND_Init   4
 
#define PS2SND_SetParam   5
 
#define PS2SND_GetParam   6
 
#define PS2SND_SetSwitch   7
 
#define PS2SND_GetSwitch   8
 
#define PS2SND_SetAddr   9
 
#define PS2SND_GetAddr   10
 
#define PS2SND_SetCoreAttr   11
 
#define PS2SND_GetCoreAttr   12
 
#define PS2SND_Note2Pitch   13
 
#define PS2SND_Pitch2Note   14
 
#define PS2SND_ProcBatch   15
 
#define PS2SND_ProcBatchEx   16
 
#define PS2SND_VoiceTrans   17
 
#define PS2SND_BlockTrans   18
 
#define PS2SND_VoiceTransStatus   19
 
#define PS2SND_BlockTransStatus   20
 
#define PS2SND_SetTransCallback   21
 
#define PS2SND_SetIRQCallback   22
 
#define PS2SND_SetEffectAttr   23
 
#define PS2SND_GetEffectAttr   24
 
#define PS2SND_ClearEffectWorkArea   25
 
#define PS2SND_SetTransIntrHandler   26
 
#define PS2SND_SetSpu2IntrHandler   27
 
#define PS2SND_StreamOpen   64
 
#define PS2SND_StreamClose   65
 
#define PS2SND_StreamPlay   66
 
#define PS2SND_StreamPause   67
 
#define PS2SND_StreamSetPosition   68
 
#define PS2SND_StreamGetPosition   69
 
#define PS2SND_StreamSetVolume   70
 
#define PS2SND_QueryMaxFreeMemSize   99 /* XXX: Hack until i can figure out how to do it right */
 

Functions

int sndStreamOpen (char *file, u32 voices, u32 flags, u32 bufaddr, u32 bufsize)
 
int sndStreamClose (void)
 
int sndStreamPlay (void)
 
int sndStreamPause (void)
 
int sndStreamSetPosition (int block)
 
int sndStreamGetPosition (void)
 
int sndStreamSetVolume (int left, int right)
 
u32 sndQueryMaxFreeMemSize ()
 

Detailed Description

PS2SND definitions.

Definition in file ps2snd.h.

Macro Definition Documentation

◆ STREAM_STEREO

#define STREAM_STEREO   1

Definition at line 22 of file ps2snd.h.

◆ STREAM_END_CLOSE

#define STREAM_END_CLOSE   0x0000

Definition at line 23 of file ps2snd.h.

◆ STREAM_END_REPEAT

#define STREAM_END_REPEAT   0x1000

Definition at line 24 of file ps2snd.h.

◆ BINDID_PS2SND

#define BINDID_PS2SND   0x80068000

Definition at line 26 of file ps2snd.h.

◆ PS2SND_Init

#define PS2SND_Init   4

Definition at line 28 of file ps2snd.h.

◆ PS2SND_SetParam

#define PS2SND_SetParam   5

Definition at line 29 of file ps2snd.h.

◆ PS2SND_GetParam

#define PS2SND_GetParam   6

Definition at line 30 of file ps2snd.h.

◆ PS2SND_SetSwitch

#define PS2SND_SetSwitch   7

Definition at line 31 of file ps2snd.h.

◆ PS2SND_GetSwitch

#define PS2SND_GetSwitch   8

Definition at line 32 of file ps2snd.h.

◆ PS2SND_SetAddr

#define PS2SND_SetAddr   9

Definition at line 33 of file ps2snd.h.

◆ PS2SND_GetAddr

#define PS2SND_GetAddr   10

Definition at line 34 of file ps2snd.h.

◆ PS2SND_SetCoreAttr

#define PS2SND_SetCoreAttr   11

Definition at line 35 of file ps2snd.h.

◆ PS2SND_GetCoreAttr

#define PS2SND_GetCoreAttr   12

Definition at line 36 of file ps2snd.h.

◆ PS2SND_Note2Pitch

#define PS2SND_Note2Pitch   13

Definition at line 37 of file ps2snd.h.

◆ PS2SND_Pitch2Note

#define PS2SND_Pitch2Note   14

Definition at line 38 of file ps2snd.h.

◆ PS2SND_ProcBatch

#define PS2SND_ProcBatch   15

Definition at line 39 of file ps2snd.h.

◆ PS2SND_ProcBatchEx

#define PS2SND_ProcBatchEx   16

Definition at line 40 of file ps2snd.h.

◆ PS2SND_VoiceTrans

#define PS2SND_VoiceTrans   17

Definition at line 41 of file ps2snd.h.

◆ PS2SND_BlockTrans

#define PS2SND_BlockTrans   18

Definition at line 42 of file ps2snd.h.

◆ PS2SND_VoiceTransStatus

#define PS2SND_VoiceTransStatus   19

Definition at line 43 of file ps2snd.h.

◆ PS2SND_BlockTransStatus

#define PS2SND_BlockTransStatus   20

Definition at line 44 of file ps2snd.h.

◆ PS2SND_SetTransCallback

#define PS2SND_SetTransCallback   21

Definition at line 45 of file ps2snd.h.

◆ PS2SND_SetIRQCallback

#define PS2SND_SetIRQCallback   22

Definition at line 46 of file ps2snd.h.

◆ PS2SND_SetEffectAttr

#define PS2SND_SetEffectAttr   23

Definition at line 47 of file ps2snd.h.

◆ PS2SND_GetEffectAttr

#define PS2SND_GetEffectAttr   24

Definition at line 48 of file ps2snd.h.

◆ PS2SND_ClearEffectWorkArea

#define PS2SND_ClearEffectWorkArea   25

Definition at line 49 of file ps2snd.h.

◆ PS2SND_SetTransIntrHandler

#define PS2SND_SetTransIntrHandler   26

Definition at line 50 of file ps2snd.h.

◆ PS2SND_SetSpu2IntrHandler

#define PS2SND_SetSpu2IntrHandler   27

Definition at line 51 of file ps2snd.h.

◆ PS2SND_StreamOpen

#define PS2SND_StreamOpen   64

Definition at line 53 of file ps2snd.h.

◆ PS2SND_StreamClose

#define PS2SND_StreamClose   65

Definition at line 54 of file ps2snd.h.

◆ PS2SND_StreamPlay

#define PS2SND_StreamPlay   66

Definition at line 55 of file ps2snd.h.

◆ PS2SND_StreamPause

#define PS2SND_StreamPause   67

Definition at line 56 of file ps2snd.h.

◆ PS2SND_StreamSetPosition

#define PS2SND_StreamSetPosition   68

Definition at line 57 of file ps2snd.h.

◆ PS2SND_StreamGetPosition

#define PS2SND_StreamGetPosition   69

Definition at line 58 of file ps2snd.h.

◆ PS2SND_StreamSetVolume

#define PS2SND_StreamSetVolume   70

Definition at line 59 of file ps2snd.h.

◆ PS2SND_QueryMaxFreeMemSize

#define PS2SND_QueryMaxFreeMemSize   99 /* XXX: Hack until i can figure out how to do it right */

Definition at line 62 of file ps2snd.h.

Function Documentation

◆ sndStreamOpen()

int sndStreamOpen ( char *  file,
u32  voices,
u32  flags,
u32  bufaddr,
u32  bufsize 
)

Definition at line 236 of file ps2snd.c.

◆ sndStreamClose()

int sndStreamClose ( void  )

Definition at line 251 of file ps2snd.c.

◆ sndStreamPlay()

int sndStreamPlay ( void  )

Definition at line 258 of file ps2snd.c.

◆ sndStreamPause()

int sndStreamPause ( void  )

Definition at line 266 of file ps2snd.c.

◆ sndStreamSetPosition()

int sndStreamSetPosition ( int  block)

Definition at line 273 of file ps2snd.c.

◆ sndStreamGetPosition()

int sndStreamGetPosition ( void  )

Definition at line 290 of file ps2snd.c.

◆ sndStreamSetVolume()

int sndStreamSetVolume ( int  left,
int  right 
)

Definition at line 281 of file ps2snd.c.

◆ sndQueryMaxFreeMemSize()

u32 sndQueryMaxFreeMemSize ( )

Definition at line 229 of file ps2snd.c.