[As-users] Sound Module getting close... just a few issues

Jeremy (sg@hacksess.com)
Sun, 23 Dec 2007 00:30:41 -0600



 allright, figure i'd post this here for better chance of sasha seeing it =P
(and maybe someone else knows answer as well).

rewrote my sound2 module code to break it down into more functions. i've had
to put the pcm handle and hardware setting vars into a struct (what fun this
was learning). and now, i need to pass this into the proc_message()
function.  however, if i understand my wording right, this function is being
called via a callback method. so i cant just append this to the current vars
that get passed into it.

essentially, i've staged it out into 2 functions to initialize the soundcard
(and may need to be reworked after more testing). but essentially the first
stage function is where the data is put into the struct. and then thats
passed into the 2nd stage init function. and then the HandleEvents()
function is called which starts the event handling loop.  now course, i can
easily pass the struct into HandleEvents(), but after this, i dont know what
to do, to get the struct into proc_message() so that when an event is
triggered, i can then pass the struct into the function that plays the
sound.

i've updated cvs with most recent code, so can reference it if needed.
( http://cvs.aftercode.net/cgi-bin/viewcvs.cgi/afterstep-stable/src/Sound2/
)

- sG

_______________________________________________
As-users mailing list
As-users@afterstep.org
http://mail.afterstep.org/mailman/listinfo/as-users