summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioinput_mac_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudioinput_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index 7251513..bd2de52 100644
--- a/src/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
@@ -64,7 +64,7 @@
QT_BEGIN_NAMESPACE
-namespace
+namespace QtMultimediaInternal
{
static const int default_buffer_size = 4 * 1024;
@@ -169,8 +169,10 @@ public:
void reset()
{
- for (UInt32 i = 0; i < bfs->mNumberBuffers; ++i)
+ for (UInt32 i = 0; i < bfs->mNumberBuffers; ++i) {
bfs->mBuffers[i].mDataByteSize = dataSize;
+ bfs->mBuffers[i].mData = 0;
+ }
}
private:
@@ -523,7 +525,7 @@ QAudioInputPrivate::QAudioInputPrivate(const QByteArray& device, QAudioFormat co
startTime = 0;
totalFrames = 0;
audioBuffer = 0;
- internalBufferSize = default_buffer_size;
+ internalBufferSize = QtMultimediaInternal::default_buffer_size;
clockFrequency = AudioGetHostClockFrequency() / 1000;
errorCode = QAudio::NoError;
stateCode = QAudio::StoppedState;
@@ -668,13 +670,13 @@ bool QAudioInputPrivate::open()
else
internalBufferSize -= internalBufferSize % streamFormat.mBytesPerFrame;
- audioBuffer = new QAudioInputBuffer(internalBufferSize,
+ audioBuffer = new QtMultimediaInternal::QAudioInputBuffer(internalBufferSize,
periodSizeBytes,
deviceFormat,
streamFormat,
this);
- audioIO = new MacInputDevice(audioBuffer, this);
+ audioIO = new QtMultimediaInternal::MacInputDevice(audioBuffer, this);
// Init
if (AudioUnitInitialize(audioUnit) != noErr) {