From 9d89af8e24f2c932a1df6c1edbb57acc5954fd38 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 25 Mar 2011 07:19:36 +0100 Subject: Doc: Work on QAudioInput::start() functions. Task-number: QTBUG-7892 Reviewed-by: Jason McDonald --- src/multimedia/audio/qaudioinput.cpp | 17 +++++++++++++---- 1 file 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 -- cgit v0.12