|
|
|
|
@ -22,12 +22,6 @@ extern "C" { |
|
|
|
|
static media_raw_audio_format fmt; |
|
|
|
|
static BSoundPlayer *player; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* CoreAudio helpers from mplayer/libao |
|
|
|
|
* The player fills a ring buffer, BSP retrieves data from the buffer |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
static int paused; |
|
|
|
|
static uint8 *buffer; |
|
|
|
|
static int buffer_len; |
|
|
|
|
@ -127,23 +121,17 @@ static int read_buffer(unsigned char *data, int len) |
|
|
|
|
return len; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* end of CoreAudio helpers |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void render_proc(void *theCookie, void *buffer, size_t req,
|
|
|
|
|
const media_raw_audio_format &format) |
|
|
|
|
{ |
|
|
|
|
size_t amt; |
|
|
|
|
size_t amt; |
|
|
|
|
|
|
|
|
|
while ((amt = buf_used()) < req) |
|
|
|
|
snooze(100000); |
|
|
|
|
|
|
|
|
|
read_buffer((unsigned char *)buffer, req); |
|
|
|
|
read_buffer((unsigned char *)buffer, req); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int init(struct options *options) |
|
|
|
|
{ |
|
|
|
|
char **parm = options->driver_parm; |
|
|
|
|
@ -176,7 +164,6 @@ static int init(struct options *options) |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void play(void *b, int i) |
|
|
|
|
{ |
|
|
|
|
int j = 0; |
|
|
|
|
@ -219,4 +206,3 @@ static void onpause(void) |
|
|
|
|
static void onresume(void) |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|