[Scummvm-devel] Threading issues and mutexes :-)

Marcus Comstedt marcus at mc.pp.se
Mon Jun 3 04:57:06 CEST 2002


Lionel Ulmer <lionel.ulmer at free.fr> writes:

> > Probably wouldn't make any sense to implement mutexes in the Dreamcast
> > port since it doesn't implement threads. 
> 
> Well, how do you implement sound output then ? The problem I have is not
> with MIDI, but on the streaming audio in TheDig or FullThrottle : ie

Currently: AdLib.  I have not tested Dig or FT, so I don't know if
they would have any sound.  I know I don't get any intro music in
Sam&Max.  MI2, Tentacle and Loom CD get complete sound though.


> ScummVM's engine is modifying the data in one mixer while the sound thread
> may well be using it.
> 
> Now that I think of it, the best way would be to move all the Mixer stuff in
> the OSystem interface (why not a OSystem_SND one :-) ) thus the mutex stuff
> would remain private to this interface and we would not have to make
> hypothesises on how the OSystem class is implementing sound output in the
> engine itself.

Sounds good.  There should still be some shared code you can call from
said OS-interface of couse, to avoid code duplication.

If possible, this shared code should be "stand-alone", i.e. not
depending on accessing global variables like the Scumm object.  Then I
could easily compile it for the ARM sound cpu on the Dreamcast.

Hmm.  I think I should take a look at the MIDI code to see what needs
to be done to actually make it work.  If we could pull this off, it
would be way cool.  :-)


  // Marcus






More information about the Scummvm-devel mailing list