In article <>,
Britton  <[EMAIL PROTECTED]> wrote:
>I have been trying to write a brec-like program that will record long
>tracks of raw sound using many successive mmap()s of the same file, but it
>isn't working.  I get stuff like this:
>
>incorrect number of bytes written: Interrupted system call
>Sound: Recording overrun 
><DMA somethingorother times> out - IRQ/DRQ config error?
>
>ad nauseum
>
>Does this mean that my code is not keeping up with the sound card?
>
>Is this approach not feasible?  Here are the salient features of the
>program: 

No, it's not feasible.

The filesystem will block at inconvenient times sometimes for up to fives
seconds (this on 33MB/s UDMA AT drives).  This only gets worse if you are
doing mmap().

What you want to do is read into shared memory with one process or
thread and write to disk with another process or thread.  Depending on
your performance requirements even just two processes with select() is
enough.

-- 
Zygo Blaxell, Linux Engineer, Corel Corporation, [EMAIL PROTECTED] (work),
[EMAIL PROTECTED] (play).  It's my opinion, I tell you! Mine! All MINE!
Size of 'diff -Nurw [...] winehq corel' as of Thu Feb 11 11:14:01 EST 1999
Lines/files:  In 489 / 13, Out 6321 / 74, Both 6807 / 86

Reply via email to