SoundManager and a sub-class of Referenced

5 views
Skip to first unread message

Doug McCorkle

unread,
Mar 15, 2011, 12:18:48 AM3/15/11
to osgaudi...@googlegroups.com
Hey Chris,

Is there a reason SoundManager is a child of Referenced and is a singleton? These two things seem to contradict each other. It seems we do not need to sub-class from Referenced.

Doug

Chris 'Xenon' Hanson

unread,
Mar 15, 2011, 12:30:27 AM3/15/11
to osgaudi...@googlegroups.com
On 3/14/2011 10:18 PM, Doug McCorkle wrote:
> Hey Chris,
> Is there a reason SoundManager is a child of Referenced and is a singleton? These two things seem to contradict each other. It seems we do not need to sub-class from Referenced.

All of this was just following how osgAL did things. osgAudio IS osgAL with FMOD
support, or at least, that's how it started. The idea was to do things identically so you
guys (and others who were already using osgAL) could just do a couple search & replaces
and be using osgAudio.

I didn't even fully understand all of osgAL when I made osgAudio, I just figured that as
long as it already worked, and I constrained my changes to substituting FMOD where I found
openAL, that it would most likely continue to work, and the goal would be accomplished.
And it was, we got an FMOD-compatible osgAL called osgAudio, complete with osgAL's design
warts. ;)

Probably the only one who really understands the original design is Anders, and I don't
see much of him around, though I think he still uses OSG.

Now that we've done more changes to it functionally, maybe we should tag a major version
number and make breaking architecture changes that make better design sense from our
current perspective.

> Doug

--
Chris 'Xenon' Hanson, omo sanza lettere. Xe...@AlphaPixel.com http://www.alphapixel.com/
Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen

Doug McCorkle

unread,
Mar 15, 2011, 8:18:03 AM3/15/11
to osgaudi...@googlegroups.com

On Mar 14, 2011, at 11:30 PM, Chris 'Xenon' Hanson wrote:

> On 3/14/2011 10:18 PM, Doug McCorkle wrote:
>> Hey Chris,
>> Is there a reason SoundManager is a child of Referenced and is a singleton? These two things seem to contradict each other. It seems we do not need to sub-class from Referenced.
>
> All of this was just following how osgAL did things. osgAudio IS osgAL with FMOD
> support, or at least, that's how it started. The idea was to do things identically so you
> guys (and others who were already using osgAL) could just do a couple search & replaces
> and be using osgAudio.
>
> I didn't even fully understand all of osgAL when I made osgAudio, I just figured that as
> long as it already worked, and I constrained my changes to substituting FMOD where I found
> openAL, that it would most likely continue to work, and the goal would be accomplished.
> And it was, we got an FMOD-compatible osgAL called osgAudio, complete with osgAL's design
> warts. ;)
>
> Probably the only one who really understands the original design is Anders, and I don't
> see much of him around, though I think he still uses OSG.
>
> Now that we've done more changes to it functionally, maybe we should tag a major version
> number and make breaking architecture changes that make better design sense from our
> current perspective.

OK. I am going to start "breaking" things then.

Doug

Doug McCorkle

unread,
Mar 15, 2011, 10:09:49 AM3/15/11
to osgaudi...@googlegroups.com
Let me know what you think.

Doug

singleton_and_functor.patch

Doug McCorkle

unread,
Mar 15, 2011, 4:47:47 PM3/15/11
to osgaudi...@googlegroups.com
This issue is resolved.

Doug

On Mar 15, 2011, at 9:09 AM, Doug McCorkle wrote:

> Let me know what you think.
>
> Doug
>
>
>

Reply all
Reply to author
Forward
0 new messages