summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiooutput_win32_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudiooutput_win32_p.cpp')
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index 4bcbd09..13bce58 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -56,8 +56,6 @@
QT_BEGIN_NAMESPACE
-static CRITICAL_SECTION waveOutCriticalSection;
-
static const int minimumIntervalTime = 50;
QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat& audioFormat):
@@ -107,16 +105,16 @@ void CALLBACK QAudioOutputPrivate::waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
case WOM_CLOSE:
return;
case WOM_DONE:
- EnterCriticalSection(&waveOutCriticalSection);
+ EnterCriticalSection(&qAudio->waveOutCriticalSection);
if(qAudio->finished || qAudio->buffer_size == 0 || qAudio->period_size == 0) {
- LeaveCriticalSection(&waveOutCriticalSection);
+ LeaveCriticalSection(&qAudio->waveOutCriticalSection);
return;
}
qAudio->waveFreeBlockCount++;
if(qAudio->waveFreeBlockCount >= qAudio->buffer_size/qAudio->period_size)
qAudio->waveFreeBlockCount = qAudio->buffer_size/qAudio->period_size;
qAudio->feedback();
- LeaveCriticalSection(&waveOutCriticalSection);
+ LeaveCriticalSection(&qAudio->waveOutCriticalSection);
break;
default:
return;