Implement VolumeSampleProvider to gain in and output

fixup! Implement VolumeSampleProvider to gain in and output
This commit is contained in:
Roland Rossgotterer
2019-09-20 21:46:51 +02:00
committed by Mat Sutcliffe
parent 8b1fb1baca
commit 8d1eea25b1
6 changed files with 119 additions and 31 deletions

View File

@@ -74,8 +74,8 @@ namespace BlackCore
int opusBytesEncoded() const;
void setOpusBytesEncoded(int opusBytesEncoded);
float volume() const;
void setVolume(float volume);
double volume() const;
void setVolume(double volume);
void start(const QAudioDeviceInfo &inputDevice);
void stop();
@@ -95,9 +95,9 @@ namespace BlackCore
bool m_started = false;
int m_opusBytesEncoded = 0;
float m_volume = 1.0f;
double m_volume = 1.0;
int m_sampleCount = 0;
float m_maxSampleInput = 0;
qint16 m_maxSampleInput = 0;
const int c_sampleCountPerEvent = 4800;
const float maxDb = 0;