set ``appbufsz'' to the required buffer size, rather than setting
``bufsz'' which is deprecated and doesn't work in all cases. This allows mplayer to work without underruns whatever the the buffer size used by aucat is. set the block size to 10ms, otherwise depending on the defaults, the blocksize may be too large for mplayer, causing video to stutter. move "-ao libsndio" to "-ao sndio", suggested by naddy@ ok naddy@
This commit is contained in:
parent
265aa818cb
commit
c8c58e1ab4
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.141 2008/12/15 21:30:07 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.142 2008/12/28 19:09:13 ratchov Exp $
|
||||
|
||||
# May not be hard to add more.
|
||||
ONLY_FOR_ARCHS= amd64 i386 powerpc sparc64 arm
|
||||
@ -9,7 +9,7 @@ V= 1.0rc2
|
||||
N= mplayer
|
||||
DISTNAME= MPlayer-${V}
|
||||
DIST_SUBDIR= ${N}
|
||||
PKGNAME= ${N}-${V}p15
|
||||
PKGNAME= ${N}-${V}p16
|
||||
CATEGORIES= x11 multimedia
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
static ao_info_t info = {
|
||||
"libsndio audio output",
|
||||
"libsndio",
|
||||
"sndio",
|
||||
"Alexandre Ratchov <alex@caoua.org>",
|
||||
""
|
||||
};
|
||||
@ -110,7 +110,8 @@ static int init(int rate, int channels, int format, int flags)
|
||||
}
|
||||
par.rate = rate;
|
||||
par.pchan = channels;
|
||||
par.bufsz = par.rate * 250 / 1000; /* 250ms buffer */
|
||||
par.appbufsz = par.rate * 250 / 1000; /* 250ms buffer */
|
||||
par.round = par.rate * 10 / 1000; /* 10ms block size */
|
||||
if (!sio_setpar(hdl, &par)) {
|
||||
mp_msg(MSGT_AO, MSGL_ERR, "ao2: couldn't set params\n");
|
||||
return 0;
|
||||
@ -135,7 +136,7 @@ static int init(int rate, int channels, int format, int flags)
|
||||
ao_data.channels = par.pchan;
|
||||
ao_data.format = format;
|
||||
ao_data.bps = bpf * par.rate;
|
||||
ao_data.buffersize = par.bufsz * bpf;
|
||||
ao_data.buffersize = par.appbufsz * bpf;
|
||||
ao_data.outburst = par.round * bpf;
|
||||
sio_onmove(hdl, movecb, NULL);
|
||||
realpos = playpos = 0;
|
||||
@ -242,7 +243,7 @@ static void audio_resume(void)
|
||||
{
|
||||
int n, count, todo;
|
||||
|
||||
todo = par.bufsz * par.pchan * par.bps;
|
||||
todo = par.appbufsz * par.pchan * par.bps;
|
||||
|
||||
/*
|
||||
* libsndio starts automatically if enough data is available;
|
||||
|
Loading…
Reference in New Issue
Block a user