Hi,

> > * Fixed master volume from guint8 -> int (would break restoring on BE
> > systems)
> 
> So master volume, sound mute, sound volume, cannot be unsigned?

Sure they can, it's just that passing a pointer to a guint8 to a function
expecting an int* is inviting trouble. An alternative fix would be to
alter the function signature.

> > * When initializing the handle, transfer the command before the song so
> the
> > sound server has a chance to expect it (*)
> >
> > (*) That's the original sound server behaviour and fixes DoSound() on
> UNIX.
> 
> That could be a problem for the event sound server... I think it will cause
> a race condition where the event ss may try to initialise a song when there
> is no data waiting to be initialised. Is it best to alter the UNIX sound
> driver or the event sound server? (The latter could be messy and painful but
> if necessary could be done.)

It would require a change in the sound server protocol, which would be
messy and painful and pretty hard to do- how should the server know that
the data it's receiving is bulk data rather than a sequence of sound
operations?

I guess altering the protocol to send a sequence

        (START_SONG_TRANFER, handle, size)
        <song bulk data, $size bytes>
        (INIT_SONG, handle, size)

i.e. a notification before /and/ after the transmission would take care of
this problem.

A better approach would be to make the sound server implementation signal
to the sound subsystem that it expects an SHM rather than a piped transfer
and handle the two cases appropriately differently.


llap,
 Christoph


Reply via email to