Changeset 846 for trunk/src/multimedia/audio/qaudiooutput_mac_p.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/multimedia/audio/qaudiooutput_mac_p.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 61 61 #include <QtCore/qdebug.h> 62 62 63 #include <QtMultimedia/qaudiodeviceinfo.h>64 63 #include <QtMultimedia/qaudiooutput.h> 65 64 66 65 #include "qaudio_mac_p.h" 67 66 #include "qaudiooutput_mac_p.h" 67 68 68 69 69 … … 279 279 errorCode = QAudio::OpenError; 280 280 else { 281 281 282 isOpen = false; 282 283 audioDeviceId = AudioDeviceID(did); … … 300 301 QAudioOutputPrivate::~QAudioOutputPrivate() 301 302 { 303 302 304 close(); 303 305 } … … 359 361 streamFormat = toAudioStreamBasicDescription(audioFormat); 360 362 361 UInt32 size = sizeof(deviceFormat); 362 if (AudioUnitGetProperty(audioUnit, 363 kAudioUnitProperty_StreamFormat, 364 kAudioUnitScope_Input, 365 0, 366 &deviceFormat, 367 &size) != noErr) { 368 qWarning() << "QAudioOutput: Unable to retrieve device format"; 369 return false; 370 } 371 363 UInt32 size = sizeof(streamFormat); 372 364 if (AudioUnitSetProperty(audioUnit, 373 365 kAudioUnitProperty_StreamFormat, … … 393 385 } 394 386 395 periodSizeBytes = (numberOfFrames * streamFormat.mSampleRate / deviceFormat.mSampleRate) * 396 streamFormat.mBytesPerFrame; 387 periodSizeBytes = numberOfFrames * streamFormat.mBytesPerFrame; 397 388 if (internalBufferSize < periodSizeBytes * 2) 398 389 internalBufferSize = periodSizeBytes * 2; … … 436 427 QIODevice* op = device; 437 428 438 if (!audio Format.isValid() || !open()) {429 if (!audio) || !open()) { 439 430 stateCode = QAudio::StoppedState; 440 431 errorCode = QAudio::OpenError;
Note:
See TracChangeset
for help on using the changeset viewer.