|
From: -oli- <ol...@fr...> - 2002-04-25 08:35:58
|
At 00:44 25.04.2002 -0400, you wrote:
>On Sun, 2002-04-21 at 10:03, -oli- wrote:
> > How can I find out from within the class NodeAudioClip if the AudioClip
> > node is [currently] child (i.e. source) of a Sound node?
>
>You can't really do that.
>
> > I need this to determine if the audio data has to be played or not,
> because
> > this check is done in the method NodeAudioClip::update().
>
>Perhaps this logic belongs in Sound rather than AudioClip.
But the determination if the clip is playing takes place in
NodeAudioClip::update(), _not_ in any method of the class NodeSound, what
makes sense, because the update()-method is called periodically from
VrmlScene::update() and the time dependance of the sound is in the
AudioClip-Node (not in the Sound-Node).
If I do it from NodeSound::render(), it would be only updated if the
scene/view changes, e.g. when the user navigates through the world.
>Remember, MovieTextures can be sound sources, too. As such, it seems like we'd
>want to reuse the same logic regardless of what our sound source is.
IMHO this has to take place in NodeMovieTexture::update().
-oli-
(Oliver Baum)
|