Ticket #25831: patch-qaudioinput-readyread.diff

File patch-qaudioinput-readyread.diff, 1.2 KB (added by sharky@…, 14 years ago)
  • src/multimedia/audio/qaudioinput_mac_p.cpp

    From 4f79cbb2b7923ff7f7cbc77dc6820d12f594311d Mon Sep 17 00:00:00 2001
    From: Justin McPherson <justin.mcpherson@nokia.com>
    Date: Wed, 16 Jun 2010 16:44:18 +1000
    Subject: [PATCH] Audio (osx); In pull mode emit readyRead() for each period received.
    
    Task-number: QTBUG-10009
    Reviewed-by:Dmytro Poplavskiy
    ---
     src/multimedia/audio/qaudioinput_mac_p.cpp |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
    index cb65f6e..b99fe11 100644
    public: 
    259259                             UInt32 inBusNumber,
    260260                             UInt32 inNumberFrames)
    261261    {
    262         const bool  wasEmpty = m_buffer->used() == 0;
     262        const bool  pullMode = m_device == 0;
    263263
    264264        OSStatus    err;
    265265        qint64      framesRendered = 0;
    public: 
    330330            framesRendered = copied / m_outputFormat.mBytesPerFrame;
    331331        }
    332332
    333         if (wasEmpty && framesRendered > 0)
     333        if (pullMode && framesRendered > 0)
    334334            emit readyRead();
    335335
    336336        return framesRendered;