diff options
author | Tim E. Real <termtech@rogers.com> | 2011-02-13 22:55:46 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-02-13 22:55:46 +0000 |
commit | c929c936dcfec395c57b0a1836708caa961092f9 (patch) | |
tree | 4df8263200b3c7c492c0e157a3915a134188a74c /muse2/muse/driver | |
parent | b1c3f0d7ccce8feafa9f043aa5a4ee32bc78624e (diff) |
Correction: Check pthread_create return value, not handle. Test OK.
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r-- | muse2/muse/driver/dummyaudio.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/muse2/muse/driver/dummyaudio.cpp b/muse2/muse/driver/dummyaudio.cpp index d251c79f..0d495ea9 100644 --- a/muse2/muse/driver/dummyaudio.cpp +++ b/muse2/muse/driver/dummyaudio.cpp @@ -185,6 +185,7 @@ DummyAudioDevice::DummyAudioDevice() //posix_memalign((void**)&buffer, 16, sizeof(float) * dummyFrames); posix_memalign((void**)&buffer, 16, sizeof(float) * config.dummyAudioBufSize); + dummyThread = 0; realtimeFlag = false; state = Audio::STOP; _framePos = 0; @@ -440,7 +441,7 @@ void DummyAudioDevice::start(int priority) } int rv = pthread_create(&dummyThread, attributes, ::dummyLoop, this); - if(!dummyThread) + if(rv) { // p4.0.16: realTimeScheduling is unreliable. It is true even in some clearly non-RT cases. // I cannot seem to find a reliable answer to the question of "are we RT or not". @@ -450,7 +451,7 @@ void DummyAudioDevice::start(int priority) rv = pthread_create(&dummyThread, NULL, ::dummyLoop, this); } - if(rv || !dummyThread) + if(rv) fprintf(stderr, "creating dummy audio thread failed: %s\n", strerror(rv)); if (attributes) // p4.0.16 |