added minimum system version to Info.plist, added suspended flag to OpenAL handle

This commit is contained in:
John Preston 2015-06-03 14:57:14 +03:00
parent db96605332
commit 16aafe28d5
3 changed files with 9 additions and 3 deletions

View file

@ -450,7 +450,7 @@ AudioCapture *audioCapture() {
return capture;
}
AudioPlayerFader::AudioPlayerFader(QThread *thread) : _timer(this), _suspendFlag(false) {
AudioPlayerFader::AudioPlayerFader(QThread *thread) : _timer(this), _suspendFlag(false), _suspended(true) {
moveToThread(thread);
_timer.moveToThread(thread);
_suspendTimer.moveToThread(thread);
@ -570,6 +570,7 @@ void AudioPlayerFader::onTimer() {
void AudioPlayerFader::onSuspendTimer() {
QMutexLocker lock(&_suspendMutex);
if (_suspendFlag) {
_suspended = true;
alcSuspendContext(audioContext);
}
}
@ -582,7 +583,10 @@ void AudioPlayerFader::processContext() {
QMutexLocker lock(&_suspendMutex);
_suspendFlag = false;
emit stopSuspend();
alcProcessContext(audioContext);
if (_suspended) {
_suspended = false;
alcProcessContext(audioContext);
}
}
class AudioPlayerLoader {

View file

@ -172,7 +172,7 @@ private:
QTimer _timer, _suspendTimer;
QMutex _suspendMutex;
bool _suspendFlag;
bool _suspendFlag, _suspended;
};

View file

@ -12,6 +12,8 @@
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.21</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>