On Sun, Mar 19, 2000 at 11:40:42AM -0600, Eric wrote:
-> I finally got to recording some tapes onto CD's (for some friends, hard
-> to find tapes / CD's).  Originally, I could not record full 16-bit 44100
-> sound from my sound card , as when it flushed the sound to disk, it
-> would get a bufer overflow problem.  So, I recorded some tapes in 8-bit
-> 44100 sound, but I wanted all 16-bits.  So , I built a cheasy interim
-> system, called cachewrite, which essentiall is a middle process that
-> reads from a pipe, stores it in memory, then flushes it all at once. 
-> However, the middle program I built isn't that good, but the idea is
-> Great, I believe, so:
-> 1) Is their a way to do this already in a shell command?
-> 2) Can anyone look at my garbage code, and let me know how to get it a
-> bit faster (I'm reading and writing one Byte at a time!!!)

Without having looked at the code, the first thing I would suggest is that
you read/write as many bytes of data at a throw as you can.

I'd allocate a nice big fat furry chunk of memory and treat it as a ring
buffer. Then you aren't calling malloc all the time. That has the
disadvantage of potentially eating up a lot of virtual memory.

-> 
-> The code is un-documented and not good, but I really liked the results
-> (WIthout X running, I can record 5 minutes of CD-sound into memory).
-> 
-> As opposed to attachments, I've dumped the stuff into a directory:
-> 
-> http://www.dlcwest.com/~jed/cachewrite/
-> 
-> Cheers, and please give me some feedback!!!
-> 
-> Also, 1 stupid question:
-> 1) How do you redirect sterr ???


That is shell dependant. See your shell's man page. Also look at "tee"

-- 

                -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

Reply via email to