From 000819f4fe7c02c7878d0e04e7cdf81b09d040fb Mon Sep 17 00:00:00 2001 From: atmos4 Date: Fri, 26 Jul 2002 00:02:31 +0000 Subject: Improved ao_arts delay and buff er handling, patch by Szombathelyi Gy|rgy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6808 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_arts.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/libao2/ao_arts.c b/libao2/ao_arts.c index 6fa6b88cf0..d660ebbcf3 100644 --- a/libao2/ao_arts.c +++ b/libao2/ao_arts.c @@ -18,6 +18,10 @@ #define OBTAIN_BITRATE(a) (((a != AFMT_U8) || (a != AFMT_S8)) ? 16 : 8) +/* Feel free to experiment with the following values: */ +#define ARTS_PACKETS 10 /* Number of audio packets */ +#define ARTS_PACKET_SIZE_LOG2 11 /* Log2 of audio packet size */ + static arts_stream_t stream; static ao_info_t info = @@ -44,34 +48,36 @@ static int init(int rate_hz, int channels, int format, int flags) mp_msg(MSGT_AO, MSGL_ERR, "AO: [arts] %s\n", arts_error_text(err)); return 0; } - - else - mp_msg(MSGT_AO, MSGL_INFO, "AO: [arts] Connected to sound server\n"); + mp_msg(MSGT_AO, MSGL_INFO, "AO: [arts] Connected to sound server\n"); ao_data.format = format; ao_data.channels = channels; ao_data.samplerate = rate_hz; ao_data.bps = (rate_hz*channels); - ao_data.buffersize = 4096; if(format != AFMT_U8 && format != AFMT_S8) ao_data.bps*=2; - for (frag_spec = 0; (0x01<