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."

This commit is contained in:
Robert Osfield
2010-01-18 12:43:02 +00:00
parent 5a37ed8a9f
commit 6f3966038f
5 changed files with 33 additions and 0 deletions

View File

@@ -112,6 +112,22 @@ void FFmpegDecoderAudio::close(bool waitForThreadToExit)
}
}
void FFmpegDecoderAudio::setVolume(float volume)
{
if (m_audio_sink.valid())
{
m_audio_sink->setVolume(volume);
}
}
float FFmpegDecoderAudio::getVolume() const
{
if (m_audio_sink.valid())
{
return m_audio_sink->getVolume();
}
return 0.0f;
}
void FFmpegDecoderAudio::run()
{