Hi,

> Firstly, I was just wondering what these statements related to in
> soundserver.h:
> 
> #ifdef PIPE_BUF
> #  define SOUND_SERVER_XFER_SIZE PIPE_BUF
> #else
> #  define SOUND_SERVER_XFER_SIZE 256 /* be _very_ conservative */
> #endif

PIPE_BUF is defined (on some systems) as the amount of bytes you can write
into an unnamed pipe before it blocks (i.e. before writing will trigger a
context switch). I think I wanted to do something with this back with when
the soundserver implementation started, but it's of no relevance now.

> #define SOUND_SERVER_XFER_ABORT -1
> #define SOUND_SERVER_XFER_OK 0
> #define SOUND_SERVER_XFER_WAITING 1
> #define SOUND_SERVER_XFER_TIMEOUT -1000

Those are leftovers, too. I'm not sure what they were used for.

> Secondly, why are these functions declared...
> 
> void
> sound_queue_event(int handle, int signal, int value);
[...]

I think these were introduced when some more abstraction was added to the
sound server layer.
[...]

> ... could be called via a pointer to the sound server? It creates an extra
> layer (of possible confusion) which doesn't need to be there, does it?

I believe that the intention was to make it easier to understand, but I'm
indifferent about these approaches. If you think it helps, you can
change the code to call the functions directly.

llap,
 Christoph


Reply via email to