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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user