On Tue, Jan 09, 2001 at 08:00:27PM +0100, Christoph Reichenbach wrote:
> This sounds like a lot, but, except for the sound resource descriptions,
> the individual points really aren't that much to read.
Okay.. I had some fun poking around in the documentation and source for
various sound-related thingeys...
How are sound effects handled? Are they just another midi "resource" or
is it more like a "note on/note off" event pair? If I understand this
correctly, there's only one "song" playing at any given time, but any
number of other higher-priority events can kick in, on top of or instead
of the playing song.
Now correct me if I'm wrong, but the sound code that's in place does
little more than convert SCI0-->MIDI file -- there's no code to
translate that file into a proper sequence of midi events to be sent to
the device? (Granted, there are numerous midi libraries that we can
probably drop in to do this for us...)
Or.. hmm. I suppose that's what the "MT32.DRV" or whatever did --
DoSound(PLAY) tells the driver to add the contents of a resource to the
conglomeration of running resources. Everything that's running is mixed
in together, but if there are conflicts over channels, the
higher-priority one takes prescedence. Or something like that.
...the path is becoming clearer. Yay!
Things I see that are immediately lacking:
* _K_SOUND_VOLUME is, well, ignored. Needs to make the appropriate
call to the sound server.
* SOUND_COMMAND_SET_VOLUME and SET_MUTE need implementing. The FADE
operation should re-use these anyway.
* A generic sound driver design needs to be drawn up. Richard's stuff
appears to be mostly on the hardware side of things, and I think the
majority of the tough work is in the middle, especially in sequencing
the midi tracks.
+ Midi and Digital flavors
+ lowlevel: init(), destroy(), setVolume(), sendData(), etc
+ highlevel: play_resource() (ie translate into midi/pcm), etc
+ [ideas, anyone?]
Then, once the framework's in place:
* Create a soundserver_unix (do we really need more than one? Can't
the OS-dependent nitty-gritty be in the lower-level drivers?)
Have it configure itself using ~/.freesci/config
* Finish the mt-32 midi driver.
I'm still on a rather steep learning and discovery curve, so bear with
me as I try to get up to speed....
But now, I go to bed. Maybe if I stick a printout of the SCI specs
under my pillow osmosis will occur...
- Pizza
--
Solomon Peachy pizzaATfucktheusers.org
I ain't broke, but I'm badly bent. ICQ# 1318344
Patience comes to those who wait.
...It's not "Beanbag Love", it's a "Transanimate Relationship"...