diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-01-26 09:07:04 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-01-26 09:07:04 +0000 |
commit | 8be03e80bce514cdaf58c28966d44bbbec632dc8 (patch) | |
tree | 34ce7609a21ac02454e635a27654152f24d10c44 | |
parent | 4bcdd427695439735df60bc3e9cdef2fc555612b (diff) |
Make the default rate 48kHz and the default block size 10ms. These
settings ensure video players and programs using MTC are smooth by
default. Thanks to all who tested.
-rw-r--r-- | usr.bin/aucat/aucat.1 | 15 | ||||
-rw-r--r-- | usr.bin/aucat/aucat.c | 10 | ||||
-rw-r--r-- | usr.bin/aucat/dev.c | 4 |
3 files changed, 17 insertions, 12 deletions
diff --git a/usr.bin/aucat/aucat.1 b/usr.bin/aucat/aucat.1 index ab25d3e7c57..02bb5c6b817 100644 --- a/usr.bin/aucat/aucat.1 +++ b/usr.bin/aucat/aucat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: aucat.1,v 1.95 2011/12/09 22:58:50 ratchov Exp $ +.\" $OpenBSD: aucat.1,v 1.96 2012/01/26 09:07:03 ratchov Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 9 2011 $ +.Dd $Mdocdate: January 26 2012 $ .Dt AUCAT 1 .Os .Sh NAME @@ -111,6 +111,8 @@ The buffer size of the audio device in frames. A frame consists of one sample for each channel in the stream. This is the number of frames that will be buffered before being played and thus controls the playback latency. +The default is twice the block size +.Pq Fl z . .It Xo .Fl C Ar min : Ns Ar max , .Fl c Ar min : Ns Ar max @@ -244,7 +246,7 @@ Control (MMC) slave mode .Pq Fl t . .It Fl r Ar rate Sample rate in Hertz of the stream. -The default is 44100Hz. +The default is 48000. .It Fl s Ar name Add .Ar name @@ -354,8 +356,11 @@ option, and MTC is used for synchronization, the clock resolution must be 96, 100 or 120 ticks per second for maximum accuracy. -For instance, 120 ticks per second at 48000Hz corresponds -to a 400 frame block size. +For instance, 100 ticks per second at 48000Hz corresponds +to a 480 frame block size. +The default is 480 or half of the buffer size +.Pq Fl b , +if the buffer size is set. .El .Pp On the command line, diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index edfeb2484f9..142b93c2607 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.131 2012/01/10 08:04:19 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.132 2012/01/26 09:07:03 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -62,14 +62,14 @@ * sample rate if no ``-r'' is used */ #ifndef DEFAULT_RATE -#define DEFAULT_RATE 44100 +#define DEFAULT_RATE 48000 #endif /* * block size if no ``-z'' is used */ #ifndef DEFAULT_ROUND -#define DEFAULT_ROUND (44100 / 15) +#define DEFAULT_ROUND (48000 / 100) #endif /* @@ -347,9 +347,9 @@ mkdev(char *path, int mode, int bufsz, int round, int hold, int autovol) if (!bufsz) { if (!round) round = DEFAULT_ROUND; - bufsz = round * 4; + bufsz = round * 2; } else if (!round) - round = bufsz / 4; + round = bufsz / 2; d = dev_new(path, mode, bufsz, round, hold, autovol); if (d == NULL) exit(1); diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c index 9336958e2d4..67866f15ffb 100644 --- a/usr.bin/aucat/dev.c +++ b/usr.bin/aucat/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.75 2012/01/14 13:15:57 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.76 2012/01/26 09:07:03 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -283,7 +283,7 @@ dev_open(struct dev *d) else d->opar.rate = d->ipar.rate; if (d->opar.rate == 0) - d->opar.rate = d->ipar.rate = 44100; /* XXX */ + d->opar.rate = d->ipar.rate = 48000; /* XXX */ if (d->mode & MODE_THRU) d->mode &= ~MODE_AUDIOMASK; |