Re: [linux-audio-user] Indexing the Read Pointer in /dev/dsp

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] Indexing the Read Pointer in /dev/dsp
From: Malcolm Baldridge (linux-audio_AT_paypc.com)
Date: Wed May 05 2004 - 00:03:09 EEST


> That sounds impressive. Someone correct me if I am wrong, but
> Jack requires X windows for just about everything.

NO WAY! All Jack does is handle audio. In true (and proper) Unix
tradition, it's more than happy enough to operate without X. My program
does. It runs on a server w/o a monitor or any installed X libraries...
it's a file/web/db/network/firewall server, really. The audio stuff is just
to log phonecalls placed through an AT&T MERLIN sitting next to it. Oh
yeah, I also feed the MERLIN's music-on-hold from the output side of the
sound hardware. It works VERY well.

> My program idles by reading the samples and looking for any
> that are a given value above or below 0X80 which is the value one gets
> from the A/D converter under silence.

That's about a -21dB squelch, depending on your input impedance and whatnot
which sounds about right. It also assumes a 0 DC bias. With PC hardware,
these aren't givens. :)

> If there is a swing through 0 to the other side of the cycle,
> a flag gets set. I make sure that several 0 crossings go by to avoid
> transient trips and then I set the VOX delay timer which tells the
> rest of the program to store samples in the output file.

Yeah, that's reasonable.

> There is a buffer between the input and output so as to
> preserve the wave form and not chop it off.
>
> I burn roughly 25 megs for each hour of captured audio.

My 8-32Khz VBR MP3s of 16-bit samples @ 11,025Hz sampling results in
slightly smaller files. Nominal bitrates of most conversations end up
around 24-27kbps.

> I don't see anything wrong with making a new file for each
> recording, but I think there is a limit to the number of files one can
> have in a directory. That is the only pitfall I can see.

With reiserfs, not really. I've had a million files in one directory
without drama or significant performance loss. I'd not do this with ext2
though. ext3 offers a "hashed" directory index option at format-time - I've
never tested it.

> There is one more bell to this program. If the sample read is
> 0 or 1 at one extreme or 0Xfe or 0Xff at the other, I send the bell
> character to warn that the audio is probably going in to clipping and
> to reduce the input level. The warning functions like a peak indicator.

Cute. :)

Luthien Tinuviel saw one aspect of Beren very clearly: Quality,

=MB=

-- 
A focus on Quality.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue May 04 2004 - 23:58:27 EEST