Re: [Plib-users] More than four samples playing ?
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-09-29 05:46:55
|
Michael Wessels wrote: > > Hi all, > in my program I am using ssl and I am intersting to play more than 4 > samples in the same time. > What does I have to change in the ssl-sources for this ? > Who can give me the answer ? When I wrote SL, it was on a 33MHz 486 - so performance was kinda critical! Hence I wrote separate routines for mixing one, two, three and four samples. That got the time to play four sounds down to about 7% of the CPU time - which seemed acceptable...so I stopped there. On modern CPU's, the amount of time consumed by SL is almost too small to measure - so we could comfortably rip out the carefully coded and optimised code and just use some simple 'for' loops instead...allowing users to play as many sound samples at one time as they feel like expending CPU time on. The existing routines are not exactly simple though because they are doing software volume control - as well as pitch-changes, envelopes, etc. I think it's worth doing this rewrite of the inner guts of SL - but I certainly don't have time to attack it myself. At this point, I have to wonder whether we wouldn't be better off latching onto a *standard* for doing this stuff - and right now, the best bet appears to be OpenAL. So, I'm even more reluctant to attack the innards of SL if we are likely to toss it all away and use OpenAL anyway. This is a hard call...but since I don't (personally) have either the time or the immediate inclination to implement either option...it's going to depend on who does want to work on it. FWIW, I don't think OpenAL is quite ready for 'prime time' use yet... but it's showing signs of becoming something very neat. I'd certainly like to play with putting 'sound nodes' into SSG at some future time because OpenAL has spatialised 3D sounds. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |