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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
alGenSources(1, &alMainSource); checkAlError();
|
alGenSources(1, &alMainSource);
|
||||||
alSourcef(alMainSource, AL_GAIN, 1.f); checkAlError();
|
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();
|
|
||||||
|
|
||||||
// init master volume
|
// init master volume
|
||||||
alListenerf(AL_GAIN, Settings::getInstance().getOutVolume() * 0.01f);
|
alListenerf(AL_GAIN, Settings::getInstance().getOutVolume() * 0.01f);
|
||||||
|
@ -553,12 +550,6 @@ void Audio::subscribeOutput(ALuint& sid)
|
||||||
assert(sid);
|
assert(sid);
|
||||||
outSources << 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:"
|
qDebug() << "Audio source" << sid << "created. Sources active:"
|
||||||
<< outSources.size();
|
<< outSources.size();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user