1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Remove redundant source init code

This commit is contained in:
tux3 2016-01-23 16:22:32 +01:00
parent a2fbc277fc
commit 87c4907054
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -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();
}