mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 01:03:59 +02:00
Removed volume from AudioInjectorLocalBuffer
Since it doesn't use it. Now clamping at 0-1 in the AudioInjector::getVolume() call. This is better -- one spot so it now always gets clamped.
This commit is contained in:
parent
3f3d922eca
commit
d6b99ce57e
4 changed files with 1 additions and 5 deletions
|
@ -166,7 +166,6 @@ bool AudioInjector::injectLocally() {
|
|||
|
||||
_localBuffer->open(QIODevice::ReadOnly);
|
||||
_localBuffer->setShouldLoop(_options.loop);
|
||||
_localBuffer->setVolume(_options.volume);
|
||||
|
||||
// give our current send position to the local buffer
|
||||
_localBuffer->setCurrentOffset(_currentSendOffset);
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
AudioFOA& getLocalFOA() { return _localFOA; }
|
||||
|
||||
bool isLocalOnly() const { return _options.localOnly; }
|
||||
float getVolume() const { return _options.volume; }
|
||||
float getVolume() const { return glm::clamp(_options.volume, 0.0f, 1.0f); }
|
||||
glm::vec3 getPosition() const { return _options.position; }
|
||||
glm::quat getOrientation() const { return _options.orientation; }
|
||||
bool isStereo() const { return _options.stereo; }
|
||||
|
|
|
@ -17,7 +17,6 @@ AudioInjectorLocalBuffer::AudioInjectorLocalBuffer(const QByteArray& rawAudioArr
|
|||
_shouldLoop(false),
|
||||
_isStopped(false),
|
||||
_currentOffset(0),
|
||||
_volume(1.0f)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
|
||||
void setShouldLoop(bool shouldLoop) { _shouldLoop = shouldLoop; }
|
||||
void setCurrentOffset(int currentOffset) { _currentOffset = currentOffset; }
|
||||
void setVolume(float volume) { _volume = glm::clamp(volume, 0.0f, 1.0f); }
|
||||
|
||||
private:
|
||||
qint64 recursiveReadFromFront(char* data, qint64 maxSize);
|
||||
|
@ -40,7 +39,6 @@ private:
|
|||
bool _isStopped;
|
||||
|
||||
int _currentOffset;
|
||||
float _volume;
|
||||
};
|
||||
|
||||
#endif // hifi_AudioInjectorLocalBuffer_h
|
||||
|
|
Loading…
Reference in a new issue