Show
Ignore:
Timestamp:
01/18/10 13:43:02 (3 years ago)
Author:
robert
Message:

From Serge Lages, "Here is a patch to allow setting an audio volume with the AudioSink? interface, I've also modified the ffmpeg plugin code to implement the ImageStream?'s setVolume method with its AudioSink?."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp

    r10925 r10961  
    113113} 
    114114 
     115void FFmpegDecoderAudio::setVolume(float volume) 
     116{ 
     117    if (m_audio_sink.valid()) 
     118    { 
     119        m_audio_sink->setVolume(volume); 
     120    } 
     121} 
     122 
     123float FFmpegDecoderAudio::getVolume() const 
     124{ 
     125    if (m_audio_sink.valid()) 
     126    { 
     127        return m_audio_sink->getVolume(); 
     128    } 
     129    return 0.0f; 
     130} 
    115131 
    116132void FFmpegDecoderAudio::run()