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:
parent
a2fbc277fc
commit
87c4907054
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user