Added support for setting volume in xine plugin, manual adjustment of volume

in osgmove example, and clamping to 0 to 1.0 range in quicktime plugin
This commit is contained in:
Robert Osfield
2007-11-04 16:08:05 +00:00
parent 6f47d924d6
commit 2e2ddba49e
3 changed files with 56 additions and 4 deletions

View File

@@ -26,6 +26,7 @@
#include "QuicktimeImageStream.h"
#include <osg/Notify>
#include <osg/Timer>
#include <osg/Math>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Thread>
@@ -132,7 +133,7 @@ void QuicktimeImageStream::quit(bool wiatForThreadToExit)
void QuicktimeImageStream::setVolume(float volume)
{
_movieData->setVolume(volume);
_movieData->setVolume(osg::minimum(osg::maximum(volume,0.0f),1.0f));
}
// Get and Set the playback volume of the stream.