From 1211fd1120f970b02ee75a2fee0e50877119fc2e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Mar 2009 18:13:58 +0000 Subject: [PATCH] Changed audio playing so that it only happens for a single movie to avoid problems with audio stalling. --- examples/osgmovie/osgmovie.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp index 10ccaf62b..6d5f5274e 100644 --- a/examples/osgmovie/osgmovie.cpp +++ b/examples/osgmovie/osgmovie.cpp @@ -499,6 +499,8 @@ int main(int argc, char** argv) bool useAudioSink = false; while(arguments.read("--audio")) { useAudioSink = true; } + + unsigned int numAudioStreamsEnabled = 0; for(int i=1;igetName()<<"]"<setAudioSink(new SDLAudioSink(audioStream)); + + if (numAudioStreamsEnabled==0) + { + audioStream->setAudioSink(new SDLAudioSink(audioStream)); + + ++numAudioStreamsEnabled; + } #endif }