PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ps2snd.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2005, James Lee (jbit<at>jbit<dot>net)
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
16#ifndef __PS2SND_H__
17#define __PS2SND_H__
18
19#include <tamtypes.h>
20#include <libsd.h>
21
22#define STREAM_STEREO 1
23#define STREAM_END_CLOSE 0x0000
24#define STREAM_END_REPEAT 0x1000
25
26#define BINDID_PS2SND 0x80068000
27
28#define PS2SND_Init 4
29#define PS2SND_SetParam 5
30#define PS2SND_GetParam 6
31#define PS2SND_SetSwitch 7
32#define PS2SND_GetSwitch 8
33#define PS2SND_SetAddr 9
34#define PS2SND_GetAddr 10
35#define PS2SND_SetCoreAttr 11
36#define PS2SND_GetCoreAttr 12
37#define PS2SND_Note2Pitch 13
38#define PS2SND_Pitch2Note 14
39#define PS2SND_ProcBatch 15
40#define PS2SND_ProcBatchEx 16
41#define PS2SND_VoiceTrans 17
42#define PS2SND_BlockTrans 18
43#define PS2SND_VoiceTransStatus 19
44#define PS2SND_BlockTransStatus 20
45#define PS2SND_SetTransCallback 21
46#define PS2SND_SetIRQCallback 22
47#define PS2SND_SetEffectAttr 23
48#define PS2SND_GetEffectAttr 24
49#define PS2SND_ClearEffectWorkArea 25
50#define PS2SND_SetTransIntrHandler 26
51#define PS2SND_SetSpu2IntrHandler 27
52
53#define PS2SND_StreamOpen 64
54#define PS2SND_StreamClose 65
55#define PS2SND_StreamPlay 66
56#define PS2SND_StreamPause 67
57#define PS2SND_StreamSetPosition 68
58#define PS2SND_StreamGetPosition 69
59#define PS2SND_StreamSetVolume 70
60
61
62#define PS2SND_QueryMaxFreeMemSize 99 /* XXX: Hack until i can figure out how to do it right */
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68#ifdef _EE
69int sndLoadSample(void *buf, u32 spuaddr, int size);
70u32 sndQueryMaxFreeMemSize(void);
71#endif
72
73int sndStreamOpen(char *file, u32 voices, u32 flags, u32 bufaddr, u32 bufsize);
74int sndStreamClose(void);
75int sndStreamPlay(void);
76int sndStreamPause(void);
77int sndStreamSetPosition(int block);
78int sndStreamGetPosition(void);
79int sndStreamSetVolume(int left, int right);
80u32 sndQueryMaxFreeMemSize();
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* __PS2SND_H__ */