29 int main(
int argc,
char **argv)
43 printf(
"sample: kicking IRXs\n");
45 printf(
"libsd loadmodule %d\n", ret);
47 printf(
"sample: loading audsrv\n");
49 printf(
"audsrv loadmodule %d\n", ret);
54 printf(
"sample: failed to initialize audsrv\n");
63 printf(
"set format returned %d\n", err);
76 printf(
"audsrv_on_fillbuf failed with err=%d\n", err);
80 wav = fopen(
"host:song_22k.wav",
"rb");
83 printf(
"failed to open wav file\n");
88 fseek(wav, 0x30, SEEK_SET);
90 printf(
"starting play loop\n");
95 ret = fread(chunk, 1,
sizeof(chunk), wav);
102 if (ret <
sizeof(chunk))
113 printf(
"\r%d bytes sent..", bytes);
116 if (played == 512)
break;
122 printf(
"sample: stopping audsrv\n");
125 printf(
"sample: ended\n");
const char * audsrv_get_error_string()
#define AUDSRV_ERR_NOERROR
int audsrv_play_audio(const char *chunk, int bytes)
int audsrv_set_volume(int volume)
int audsrv_on_fillbuf(int amount, audsrv_callback_t cb, void *arg)
int audsrv_set_format(struct audsrv_fmt_t *fmt)
int SifLoadModule(const char *path, int arg_len, const char *args)
s32 CreateSema(ee_sema_t *sema)
s32 iSignalSema(s32 sema_id)
s32 WaitSema(s32 sema_id)
static int fillbuffer(void *arg)
int main(int argc, char **argv)
void SifInitRpc(int mode)