summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioinput.cpp
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@nokia.com>2011-03-25 06:19:36 (GMT)
committerGeir Vattekar <geir.vattekar@nokia.com>2011-03-25 06:19:36 (GMT)
commit9d89af8e24f2c932a1df6c1edbb57acc5954fd38 (patch)
tree5f00503802949ac78b7c98724a1fcabae1a16367 /src/multimedia/audio/qaudioinput.cpp
parent132f301f39bde9c66db2aa460a68345409ec1802 (diff)
downloadQt-9d89af8e24f2c932a1df6c1edbb57acc5954fd38.zip
Qt-9d89af8e24f2c932a1df6c1edbb57acc5954fd38.tar.gz
Qt-9d89af8e24f2c932a1df6c1edbb57acc5954fd38.tar.bz2
Doc: Work on QAudioInput::start() functions.
Task-number: QTBUG-7892 Reviewed-by: Jason McDonald
Diffstat (limited to 'src/multimedia/audio/qaudioinput.cpp')
-rw-r--r--src/multimedia/audio/qaudioinput.cpp17
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