27#include "debug_printf.h"
58 initialize_rpc_client();
65 case AUDSRV_SET_FORMAT:
69 case AUDSRV_WAIT_AUDIO:
73 case AUDSRV_PLAY_AUDIO:
77 case AUDSRV_STOP_AUDIO:
81 case AUDSRV_SET_VOLUME:
97 case AUDSRV_GET_CDPOS:
101 case AUDSRV_GET_TRACKPOS:
105 case AUDSRV_SET_THRESHOLD:
106 ret = audsrv_set_threshold(data[0]);
109 case AUDSRV_GET_NUMTRACKS:
113 case AUDSRV_GET_TRACKOFFSET:
117 case AUDSRV_PLAY_SECTORS:
121 case AUDSRV_GET_CD_STATUS:
125 case AUDSRV_GET_CD_TYPE:
129 case AUDSRV_PAUSE_CD:
133 case AUDSRV_RESUME_CD:
141 case AUDSRV_LOAD_ADPCM:
144 case AUDSRV_PLAY_ADPCM:
148 case AUDSRV_IS_ADPCM_PLAYING:
152 case AUDSRV_FREE_ADPCM:
156 case AUDSRV_SET_ADPCM_VOL:
157 ret = audsrv_adpcm_set_volume(data[0], data[1], data[2]);
160 case AUDSRV_AVAILABLE:
188 DPRINTF(
"creating rpc server\n");
190 SifSetRpcQueue(&
qd, GetThreadId());
191 SifRegisterRpc(&
sd0, AUDSRV_IRX, (
void *)
rpc_command, rpc_buffer, NULL, NULL, &
qd);
195int initialize_rpc_thread()
198 DPRINTF(
"rpc server thread 0x%x started\n", rpc_tid);
199 return (rpc_tid > 0);
#define AUDSRV_INIT_ADPCM
int audsrv_get_numtracks()
int audsrv_is_adpcm_playing(int ch, audsrv_adpcm_t *adpcm)
int audsrv_play_audio(const char *chunk, int bytes)
int audsrv_ch_play_adpcm(int ch, audsrv_adpcm_t *adpcm)
int audsrv_play_cd(int track)
int audsrv_get_trackpos()
int audsrv_load_adpcm(audsrv_adpcm_t *adpcm, void *buffer, int size)
int audsrv_set_volume(int volume)
int audsrv_wait_audio(int bytes)
int audsrv_get_track_offset(int track)
int audsrv_set_format(struct audsrv_fmt_t *fmt)
int audsrv_get_cd_status()
int audsrv_format_ok(int freq, int bits, int channels)
int audsrv_cd_play_sectors(int start, int end)
int create_thread(void *func, int priority, void *param)
static void rpc_server_thread(void *arg)
static SifRpcServerData_t sd0
static SifRpcDataQueue_t qd
static void * rpc_command(int func, unsigned *data, int size)