Re: Win32Lib: PlaySound/setVisible solution
- Posted by "Brian K. Broker" <bkb at CNW.COM> Nov 03, 1999
- 571 views
On Wed, 3 Nov 1999, Dan Moyer wrote: > I took your demo solution & simplified it, from a "play list" orientation > into just a "while" test loop of the SND_NOSTOP return (see below for > snippet), so I could just feed PlaySound a series of wave files & the while > loop would test to see if the preceding was finished & then when it was it > would play the next & so forth till it did all of them. (This would be > simpler to integrate into my application.) This is the approach I first took and found that the 'busy-waiting' produced the same result as SYNC. That's why I took the timer-based approach. You need to give the system time to think about performing the setVisible. My approach only requires an additional onTimer routine so I don't see why this method won't work for you. > Bottom line seems to be that there's not much point in me using ASYNC mode, > if in order to make multiple files play in sequence I end up with something > indistinguishable from SYNC mode. > > Anyway, it was interesting, & I thank you for you effort. Your comments > about your demo were crystal clear & really very helpful. Hope it wasn't a > total waste of time for you. A learning experience is never a waste of time... Good luck with whatever you decide to do. -- Brian