On Sat, Jun 06, 2009 at 05:01:26PM -0400, Ryan Flannery wrote:
> On Sat, Jun 6, 2009 at 4:43 PM, Jacob Meuser<jake...@sdf.lonestar.org> wrote:
> > On Sat, Jun 06, 2009 at 03:34:08PM -0400, Ryan Flannery wrote:
> >
> >> aucat -b 1 -l
> >
> > this '-b 1' bugs me.  you're telling aucat to process each frame
> > individually ... sort of.
> >
> > it really means "as small as possible".  in server mode, you'll
> > get the smallest buffer that the hardware supports, so the results
> > may be inconsistent on different hardware.
> >
> 
> I had thought that we both might have to specify a format/encoding for
> aucat to work correctly between our two machines, but never considered
> the buffer size.  From our dmesg's, it appears we may both have the
> same audio hardware:
> 
> my machine (lenovo T61):
> azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x03:
> apic 1 int 17 (irq 11)
> azalia0: RIRB time out
> azalia0: codecs: Analog Devices AD1984, Conexant/0x2bfa, using Analog
> Devices AD1984
> audio0 at azalia0
> 
> 
> buddy's machine (lenovo T400... I think):
> azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03:
> apic 1 int 17 (irq 11)
> azalia0: codecs: Conexant CX20561
> audio0 at azalia0
> 
> Could that be why "-b 1" is working?

I guess I need to explain better ;)

the buffer sizes do not need to match.  the buffer sizes only affect
the latency.  so when I said "the results may be inconsistent", I
meant that with '-b 1', there may be too little buffering to keep
the audio smooth, depending on the hardware.

anyway, azalia(4) rounds block sizes (there are one or more whole
blocks in the hardware buffer) to multiples of 128 bytes.  other
drivers have different rounding requirements.

> Also, with "-b 1024", the delay is around a half-second... not too bad.

'aucat -l -b 1' on azalia will get you a 512 byte hardware buffer
(two blocks of 256 bytes each), which is 2.9 ms, timewise.
'aucat -l -b 1024' gets a 2048 byte buffer, which is 11.6 ms
timewise.  'aucat -l' gets a 23296 byte buffer, or ~130 ms.  since
you are recording then playing back, you will have at least 2x
the audio hardware buffer size latency ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to