Re: [Plib-devel] OpenAL/plib
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-26 00:45:33
|
Alexander Rawass wrote: > > On a modern machine, we could easily wipe out the 3 sound limit - and > > increase it to (say) 32 simultaneous sounds. > > You should do that - there are many people owning a very faster computer > now. I know it - but it's a matter of time - I don't have enough time to write all this cool new stuff. > But you should also care, that the end-user can run it on his old 486 as > well - maybe by telling plibsl something like export PLIBSL_MAX_VOICES=3 > to hear only the 3 loudest sounds. Yep. SL already has the code to prioritize sounds (not necessarily the loudest - the application gets to set the priorities. > You mentioned OpenAL before, I didn't have time to look at it, but some > day I've got to go to get a better Soundsystem for my game (I really need > full 2D/3D here). That's what OpenAL does. > In my game, every object is (will be) one or more sound sources, the > sound-handler knows about the positions of sound source and hearer in space > and can therefore be calctulated, how loud the sound is and the balance between > left/right (in 2D) or even more loudspeakers. OpenAL does all that too. If we added 'sound nodes' into the SSG API, you wouldn't need to do *anything* in your game - you'd get range-dependent volume, 3D spatialisation *and* doppler shift without writing a single line of code. > I intended to call an update routine like > update_sound(soundobject,soundobject_position,hearer_position) > every frame, that sets balance and volume new, but including that in a > ssg > node would 'come more natural'. That would be really clever. Yep...although I can't claim credit for the idea - it's been done many times before. -- 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 |