updated osgaudio.cpp

12 views
Skip to first unread message

Per Nordqvist

unread,
Jul 22, 2010, 8:24:53 PM7/22/10
to osgaudi...@googlegroups.com
Hi list,

I am just starting to learn this API and in the process I have updated
osgaudio.cpp
to use the new SoundUpdateCB instead of the SoundNode class.
I am happy to trade it for a comment or two.

I tried to keep changes minimal but had to add a dummy osg::Group
to attach the CB to. I have been using the standard v2.0 rc-1, openal
soft & osg 2.8.2 under fedora 8
to compile it.

Cheers and thanks for the good work so far,

Per Nordqvist

osgaudio.cpp

Paul Martz

unread,
Jul 23, 2010, 2:19:37 PM7/23/10
to osgaudi...@googlegroups.com

Thanks for the feedback.

Yes, we weren't sure that the SoundNode class (legacy from osgAL) was entirely
thread safe, as it updated OpenAL during cull. It did some pretty interesting
tricks to try to ensure this happened only in one of the cull traversals. But,
this type of operation is better performed during update, so the SoundUpdateCB
seemed like the better solution, all things considered.

The other big API change from osgAL was changing how the Listener position is
determined, which now requires some application intervention (in osgAL this was
handled automatically).

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

Doug McCorkle

unread,
Jul 26, 2010, 10:57:40 PM7/26/10
to osgaudi...@googlegroups.com
Hey Paul,

What did you think of the changes? Can we commit them?

Doug

Paul Martz

unread,
Jul 28, 2010, 11:14:51 AM7/28/10
to osgaudi...@googlegroups.com
Sorry, was out of the office all day yesterday, so no chance to reply until now.
I can try to take a look at the code sometime today. Expect another post from me
shortly.
-Paul

Paul Martz

unread,
Jul 28, 2010, 1:01:33 PM7/28/10
to osgaudi...@googlegroups.com
This code is now committed. Thanks for the contribution. At some point I'd like
to remove SoundNode usage from all the examples and replace with SoundUpdateCB,
as you have done here.
-Paul
Reply all
Reply to author
Forward
0 new messages