diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-07 13:13:08 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-07 13:14:27 (GMT) |
commit | 7c8980ee041e874a6c430f01b2daff4955517b03 (patch) | |
tree | aa19249a7fb469176fb22adfa9a1b702ae3be6c0 /src/multimedia/audio | |
parent | 8031eada2f81963865390b4d899631b09d4ca6f3 (diff) | |
parent | a05f73499a187c67a394893e2cc74516ccbc46f5 (diff) | |
download | Qt-7c8980ee041e874a6c430f01b2daff4955517b03.zip Qt-7c8980ee041e874a6c430f01b2daff4955517b03.tar.gz Qt-7c8980ee041e874a6c430f01b2daff4955517b03.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/gui/text/qfontengine_mac.mm
tests/auto/qdiriterator/tst_qdiriterator.cpp
Diffstat (limited to 'src/multimedia/audio')
-rw-r--r-- | src/multimedia/audio/qaudioinput.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp index 3767b95..77ecf70 100644 --- a/src/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput.cpp @@ -202,7 +202,13 @@ QAudioInput::~QAudioInput() /*! Uses the \a device as the QIODevice to transfer data. Passing a QIODevice allows the data to be transferred without any extra code. - All that is required is to open the QIODevice. + All that is required is to open the QIODevice. QAudioInput does not take + ownership of \a device. + + The QAudioInput will write to the device when new data is available. You can + subclass QIODevice and reimplement \l{QIODevice::}{writeData()} if you wish to + access the data. If you simply want to save data to a file, you can pass a + QFile to this function. If able to successfully get audio data from the systems audio device the state() is set to either QAudio::ActiveState or QAudio::IdleState, @@ -222,9 +228,12 @@ void QAudioInput::start(QIODevice* device) } /*! - Returns a pointer to the QIODevice being used to handle the data - transfer. This QIODevice can be used to read() audio data - directly. + + Returns a pointer to a new QIODevice that will be used to handle the data transfer. + This QIODevice can be used to \l{QIODevice::}{read()} audio data directly. + You will typically connect to the \l{QIODevice::}{readyRead()} signal, and + read from the device in the slot you connect to. QAudioInput keeps ownership + of the device. If able to access the systems audio device the state() is set to QAudio::IdleState, error() is set to QAudio::NoError |