Use QAtomicInt::load() and ::store()

The operator=(int) and implicit int cast operators are deprecated
and will be removed.

Change-Id: I5091d705fba45195239c901f210355e09e123faa
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This commit is contained in:
Bradley T. Hughes
2011-11-01 13:37:41 +01:00
committed by Qt by Nokia
parent e3a8c165ea
commit fbac3a0647
3 changed files with 9 additions and 9 deletions

View File

@@ -894,14 +894,14 @@ void QAudioInputPrivate::audioThreadStop()
void QAudioInputPrivate::audioThreadStart()
{
startTimers();
audioThreadState = Running;
audioThreadState.store(Running);
AudioOutputUnitStart(audioUnit);
}
void QAudioInputPrivate::audioDeviceStop()
{
AudioOutputUnitStop(audioUnit);
audioThreadState = Stopped;
audioThreadState.store(Stopped);
threadFinished.wakeOne();
}
@@ -960,7 +960,7 @@ OSStatus QAudioInputPrivate::inputCallback(void* inRefCon,
QAudioInputPrivate* d = static_cast<QAudioInputPrivate*>(inRefCon);
const int threadState = d->audioThreadState.fetchAndAddAcquire(0);
const int threadState = d->audioThreadState.loadAcquire();
if (threadState == Stopped)
d->audioDeviceStop();
else {