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:
committed by
Qt by Nokia
parent
e3a8c165ea
commit
fbac3a0647
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user