[osg-users] osgal with multiple sounds
jdlyga at gmail.com
Wed Sep 10 13:40:54 PDT 2008
I found a solution!
In the osgAL multiple sounds example's createSound function, the
allocateSource function needs to be called before setPlay instead of after
setPlay. The allocateSource funciton is important, since it allocates a
hardware soundsource for each sound being added to the scenegraph.
Anyway, here is how the fixed code looks in createSound. This is at or near
line 386 in osgalmultiple.cpp:
osg::ref_ptr<osgAL::SoundState> sound_state = new
The two sounds now play simultaneously, as intended.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users