From 87c49070541c45339ac0ca27c99694815f3c96bd Mon Sep 17 00:00:00 2001 From: tux3 Date: Sat, 23 Jan 2016 16:22:32 +0100 Subject: [PATCH] Remove redundant source init code --- src/audio/audio.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index d4f1bc318..3e8f9cdc1 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -292,11 +292,8 @@ bool Audio::initOutput(QString outDevDescr) return false; } - alGenSources(1, &alMainSource); checkAlError(); - alSourcef(alMainSource, AL_GAIN, 1.f); checkAlError(); - alSourcef(alMainSource, AL_PITCH, 1.f); checkAlError(); - alSource3f(alMainSource, AL_VELOCITY, 0.f, 0.f, 0.f); checkAlError(); - alSource3f(alMainSource, AL_POSITION, 0.f, 0.f, 0.f); checkAlError(); + alGenSources(1, &alMainSource); + checkAlError(); // init master volume alListenerf(AL_GAIN, Settings::getInstance().getOutVolume() * 0.01f); @@ -553,12 +550,6 @@ void Audio::subscribeOutput(ALuint& sid) assert(sid); outSources << sid; - // initialize source - alSourcef(sid, AL_GAIN, 1.f); checkAlError(); - alSourcef(sid, AL_PITCH, 1.f); checkAlError(); - alSource3f(sid, AL_VELOCITY, 0.f, 0.f, 0.f); checkAlError(); - alSource3f(sid, AL_POSITION, 0.f, 0.f, 0.f); checkAlError(); - qDebug() << "Audio source" << sid << "created. Sources active:" << outSources.size(); }