From 242aa6ebd4061b1b2b3651cc0887083206932a7d Mon Sep 17 00:00:00 2001 From: anders Date: Sat, 24 Nov 2001 05:21:22 +0000 Subject: interface to libao2 changed ao_plugin added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3096 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_sgi.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'libao2/ao_sgi.c') diff --git a/libao2/ao_sgi.c b/libao2/ao_sgi.c index 74430955af..5dfc6124ed 100644 --- a/libao2/ao_sgi.c +++ b/libao2/ao_sgi.c @@ -22,13 +22,6 @@ static ao_info_t info = LIBAO_EXTERN(sgi) -// there are some globals: -// ao_samplerate -// ao_channels -// ao_format -// ao_bps -// ao_outburst -// ao_buffersize static ALconfig ao_config; static ALport ao_port; @@ -86,9 +79,9 @@ static int init(int rate, int channels, int format, int flags) { } - ao_buffersize=131072; - ao_outburst = ao_buffersize/16; - ao_channels = channels; + ao_data.buffersize=131072; + ao_data.outburst = ao_data.buffersize/16; + ao_data.channels = channels; ao_config = alNewConfig(); @@ -164,7 +157,7 @@ static int get_space() { // printf("ao_sgi, get_space: (ao_outburst %d)\n", ao_outburst); // printf("ao_sgi, get_space: alGetFillable [%d] \n", alGetFillable(ao_port)); - return alGetFillable(ao_port)*(2*ao_channels); + return alGetFillable(ao_port)*(2*ao_data.channels); } @@ -177,14 +170,14 @@ static int play(void* data, int len, int flags) { // printf("ao_sgi, play: len %d flags %d (%d %d)\n", len, flags, ao_port, ao_config); // printf("channels %d\n", ao_channels); - alWriteFrames(ao_port, data, len/(2*ao_channels)); + alWriteFrames(ao_port, data, len/(2*ao_data.channels)); return len; } -// return: how many unplayed bytes are in the buffer -static int get_delay(){ +// return: delay in seconds between first and last sample in buffer +static float get_delay(){ // printf("ao_sgi, get_delay: (ao_buffersize %d)\n", ao_buffersize); -- cgit v1.2.3