sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
audsrv.h
Go to the documentation of this file.
1
12
13
#ifndef AUDSRV_H
14
#define AUDSRV_H
15
17
#define AUDSRV_IRX 0x870884e
18
19
#define MIN_VOLUME 0
20
#define MAX_VOLUME 100
21
28
#define AUDSRV_ERR_NOERROR 0x0000
29
#define AUDSRV_ERR_NOT_INITIALIZED 0x0001
30
#define AUDSRV_ERR_RPC_FAILED 0x0002
31
#define AUDSRV_ERR_FORMAT_NOT_SUPPORTED 0x0003
32
#define AUDSRV_ERR_OUT_OF_MEMORY 0x0004
33
#define AUDSRV_ERR_ARGS 0x0005
34
#define AUDSRV_ERR_NO_DISC 0x0006
35
#define AUDSRV_ERR_NO_MORE_CHANNELS 0x0007
36
#define AUDSRV_ERR_FAILED_TO_LOAD_ADPCM 0x0010
37
#define AUDSRV_ERR_FAILED_TO_CREATE_SEMA 0x0011
39
41
typedef
struct
audsrv_fmt_t
42
{
43
int
freq
;
44
int
bits
;
45
int
channels
;
46
}
audsrv_fmt_t
;
47
49
typedef
struct
audsrv_adpcm_t
50
{
51
int
pitch
;
52
int
loop
;
53
int
channels
;
54
void
*
buffer
;
55
int
size
;
56
}
audsrv_adpcm_t
;
57
58
#ifdef __cplusplus
59
extern
"C"
{
60
#endif
61
63
typedef
int (*
audsrv_callback_t
)(
void
*arg);
64
70
75
int
audsrv_init
(
void
);
76
81
int
audsrv_quit
(
void
);
82
88
int
audsrv_set_format
(
struct
audsrv_fmt_t
*fmt);
89
95
int
audsrv_wait_audio
(
int
bytes);
96
102
int
audsrv_set_volume
(
int
volume);
103
110
int
audsrv_play_audio
(
const
char
*chunk,
int
bytes);
111
116
int
audsrv_stop_audio
(
void
);
117
119
int
audsrv_get_error
(
void
);
120
122
const
char
*
audsrv_get_error_string
(
void
);
123
125
int
audsrv_available
(
void
);
126
128
int
audsrv_queued
(
void
);
129
139
int
audsrv_on_fillbuf
(
int
amount,
audsrv_callback_t
cb,
void
*arg);
140
142
150
int
audsrv_play_cd
(
int
track);
152
int
audsrv_stop_cd
(
void
);
154
int
audsrv_get_cdpos
(
void
);
156
int
audsrv_get_trackpos
(
void
);
158
int
audsrv_get_numtracks
(
void
);
160
int
audsrv_get_track_offset
(
int
track);
162
int
audsrv_pause_cd
(
void
);
164
int
audsrv_resume_cd
(
void
);
166
int
audsrv_play_sectors
(
int
start,
int
end);
168
int
audsrv_get_cd_status
(
void
);
170
int
audsrv_get_cd_type
(
void
);
172
int
audsrv_on_cdda_stop
(
audsrv_callback_t
cb,
void
*arg);
174
181
186
int
audsrv_adpcm_init
(
void
);
187
195
int
audsrv_adpcm_set_volume_and_pan
(
int
ch,
int
vol,
int
pan);
196
198
#define audsrv_adpcm_set_volume(ch, vol) audsrv_adpcm_set_volume_and_pan(ch, vol, 0)
199
207
int
audsrv_load_adpcm
(
audsrv_adpcm_t
*adpcm,
void
*buffer,
int
size);
208
216
int
audsrv_ch_play_adpcm
(
int
ch,
audsrv_adpcm_t
*adpcm);
217
219
#define audsrv_play_adpcm(adpcm) audsrv_ch_play_adpcm(-1, adpcm)
220
225
int
audsrv_is_adpcm_playing
(
int
ch,
audsrv_adpcm_t
*adpcm);
226
231
int
audsrv_free_adpcm
(
audsrv_adpcm_t
*adpcm);
232
234
235
#ifdef __cplusplus
236
}
237
#endif
238
239
#endif
audsrv_callback_t
int(*) audsrv_callback_t(void *arg)
Definition
audsrv.h:63
audsrv_play_sectors
int audsrv_play_sectors(int start, int end)
audsrv_resume_cd
int audsrv_resume_cd(void)
audsrv_pause_cd
int audsrv_pause_cd(void)
audsrv_get_cdpos
int audsrv_get_cdpos(void)
audsrv_get_numtracks
int audsrv_get_numtracks(void)
audsrv_on_cdda_stop
int audsrv_on_cdda_stop(audsrv_callback_t cb, void *arg)
audsrv_stop_cd
int audsrv_stop_cd(void)
audsrv_play_cd
int audsrv_play_cd(int track)
audsrv_get_cd_status
int audsrv_get_cd_status(void)
audsrv_get_trackpos
int audsrv_get_trackpos(void)
audsrv_get_track_offset
int audsrv_get_track_offset(int track)
audsrv_get_cd_type
int audsrv_get_cd_type(void)
audsrv_is_adpcm_playing
int audsrv_is_adpcm_playing(int ch, audsrv_adpcm_t *adpcm)
audsrv_ch_play_adpcm
int audsrv_ch_play_adpcm(int ch, audsrv_adpcm_t *adpcm)
audsrv_adpcm_init
int audsrv_adpcm_init(void)
audsrv_load_adpcm
int audsrv_load_adpcm(audsrv_adpcm_t *adpcm, void *buffer, int size)
audsrv_adpcm_set_volume_and_pan
int audsrv_adpcm_set_volume_and_pan(int ch, int vol, int pan)
audsrv_free_adpcm
int audsrv_free_adpcm(audsrv_adpcm_t *adpcm)
audsrv_init
int audsrv_init(void)
audsrv_quit
int audsrv_quit(void)
audsrv_queued
int audsrv_queued(void)
audsrv_get_error_string
const char * audsrv_get_error_string(void)
audsrv_play_audio
int audsrv_play_audio(const char *chunk, int bytes)
audsrv_available
int audsrv_available(void)
audsrv_get_error
int audsrv_get_error(void)
audsrv_set_volume
int audsrv_set_volume(int volume)
audsrv_stop_audio
int audsrv_stop_audio(void)
audsrv_on_fillbuf
int audsrv_on_fillbuf(int amount, audsrv_callback_t cb, void *arg)
audsrv_wait_audio
int audsrv_wait_audio(int bytes)
audsrv_set_format
int audsrv_set_format(struct audsrv_fmt_t *fmt)
audsrv_adpcm_t
Definition
audsrv.h:50
audsrv_adpcm_t::buffer
void * buffer
Definition
audsrv.h:54
audsrv_adpcm_t::loop
int loop
Definition
audsrv.h:52
audsrv_adpcm_t::channels
int channels
Definition
audsrv.h:53
audsrv_adpcm_t::size
int size
Definition
audsrv.h:55
audsrv_adpcm_t::pitch
int pitch
Definition
audsrv.h:51
audsrv_fmt_t
Definition
audsrv.h:42
audsrv_fmt_t::bits
int bits
Definition
audsrv.h:44
audsrv_fmt_t::freq
int freq
Definition
audsrv.h:43
audsrv_fmt_t::channels
int channels
Definition
audsrv.h:45
audsrv-compat
include
audsrv.h
Generated by
1.18.0