[nas] Patch for libaudiooss

Tobias Diedrich td at informatik.uni-hannover.de
Fri Jul 20 12:57:51 MDT 2001


Erik Inge Bolsø wrote:

> >The thing is that mplayer writes more than a fragment in one write,
> >but libaudiooss would only decrease the number of available fragments
> >by one per write regardless how big the write is.
> 
> Ah. Now that could be fixed.

Yes, and fixing that made me realize the other Problem which I
wanted to solve using a separate thread. (^_^)

> 1) NAS (libaudio) isn't multithread-safe itself. 
[...]
> 2) See Q120 here: http://www.lambdacs.com/cpt/FAQ.html
>    ... in general, mixing threads and fork() seems to be troublesome. Thus
> your creation of a soundplayer thread will probably be troublesome with
> many applications that use fork().

Hmm, ok so it's not a good idea to use threads in this case...
So how about this:
Instead I could create a pipe and fork so I would do the communication
with nas in a separate process and write the audio data to the pipe.
I would probably need another pipe for communication (emulating ioctls).

-- 
Tobias							     PGP-Key: 0x9AC7E0BC
echo ${SIGNATURE}



More information about the Nas mailing list