Re: [linux-audio-dev] Audio engine stuff

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

Subject: Re: [linux-audio-dev] Audio engine stuff
From: Benno Senoner (sbenno_AT_gardena.net)
Date: to helmi  17 2000 - 14:20:38 EST


On Thu, 17 Feb 2000, Juhana Sadeharju wrote:
> >From: Benno Senoner <sbenno_AT_gardena.net>
> >
> >> What is a lock-free ringbuffer?
> >
> >lock-free : you read and maniplulate the buffer pointers
>
> My shmrec works like this and uses SIGSTOP and SIGCONT.
> If disk thread applies SIGSTOP to itself, A/D process sends SIGCONT
> to it when there is enough data.
>
> Can this be done more better than with kill() and those above signals?
>
> I'm using signals because I don't want to spend semaphores or such IPC
> resources. For example, bplay/brec spends about all semaphores to
> quard multiple buffers which forms the whole buffer system.
>
> JuhanaMy experience says , that for a disk buffer thread, it's not very
important if you get not woken up very fast, since the real slow operations
are the disk I/O calls read() , write() mmap().
Therefore I prefer to check if there is space left to refll in the buffer,
otherwise I sleep 50ms or so.
I think sending SIGSTOP and SIGCONT is waay overkill ,
checking the number of samples and calling usleep() is way simpler.
And the pratical performance you get is about the same in both cases.

Benno.


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

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:27 EST