1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 13:51:47 -05:00

Allow volume to be set after start()

This commit is contained in:
Jon Beniston 2020-11-09 15:52:25 +00:00
parent 943ae81750
commit 162112a5c0
2 changed files with 7 additions and 1 deletions

View File

@ -189,3 +189,9 @@ qint64 AudioInput::writeData(const char *data, qint64 len)
return len;
}
void AudioInput::setVolume(float volume)
{
m_volume = volume;
if (m_audioInput != nullptr)
m_audioInput->setVolume(m_volume);
}

View File

@ -44,7 +44,7 @@ public:
uint getRate() const { return m_audioFormat.sampleRate(); }
void setOnExit(bool onExit) { m_onExit = onExit; }
void setVolume(float volume) { m_volume = volume; }
void setVolume(float volume);
private:
QMutex m_mutex;