src/multimedia/audio/qaudioinput.cpp
changeset 25 e24348a560a6
parent 22 79de32ba3296
child 30 5dc02b23752f
equal deleted inserted replaced
23:89e065397ea6 25:e24348a560a6
   209      error() is set to QAudio::NoError and the stateChanged() signal is emitted.
   209      error() is set to QAudio::NoError and the stateChanged() signal is emitted.
   210 
   210 
   211      If a problem occurs during this process the error() is set to QAudio::OpenError,
   211      If a problem occurs during this process the error() is set to QAudio::OpenError,
   212      state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
   212      state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
   213 
   213 
       
   214     In either case, the stateChanged() signal may be emitted either synchronously
       
   215     during execution of the start() function or asynchronously after start() has
       
   216     returned to the caller.
       
   217 
   214      \sa {Symbian Platform Security Requirements}
   218      \sa {Symbian Platform Security Requirements}
   215 
   219 
   216      \sa QIODevice
   220      \sa QIODevice
   217 */
   221 */
   218 
   222 
   231     and the stateChanged() signal is emitted.
   235     and the stateChanged() signal is emitted.
   232 
   236 
   233     If a problem occurs during this process the error() is set to QAudio::OpenError,
   237     If a problem occurs during this process the error() is set to QAudio::OpenError,
   234     state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
   238     state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
   235 
   239 
       
   240     In either case, the stateChanged() signal may be emitted either synchronously
       
   241     during execution of the start() function or asynchronously after start() has
       
   242     returned to the caller.
       
   243 
   236     \sa {Symbian Platform Security Requirements}
   244     \sa {Symbian Platform Security Requirements}
   237 
   245 
   238     \sa QIODevice
   246     \sa QIODevice
   239 */
   247 */
   240 
   248 
   276 /*!
   284 /*!
   277     Stops processing audio data, preserving buffered audio data.
   285     Stops processing audio data, preserving buffered audio data.
   278 
   286 
   279     Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
   287     Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
   280     emit stateChanged() signal.
   288     emit stateChanged() signal.
       
   289 
       
   290     Note: signal will always be emitted during execution of the resume() function.
   281 */
   291 */
   282 
   292 
   283 void QAudioInput::suspend()
   293 void QAudioInput::suspend()
   284 {
   294 {
   285     d->suspend();
   295     d->suspend();
   298 {
   308 {
   299      d->resume();
   309      d->resume();
   300 }
   310 }
   301 
   311 
   302 /*!
   312 /*!
   303     Sets the audio buffer size to \a value milliseconds.
   313     Sets the audio buffer size to \a value bytes.
   304 
   314 
   305     Note: This function can be called anytime before start(), calls to this
   315     Note: This function can be called anytime before start(), calls to this
   306     are ignored after start(). It should not be assumed that the buffer size
   316     are ignored after start(). It should not be assumed that the buffer size
   307     set is the actual buffer size used, calling bufferSize() anytime after start()
   317     set is the actual buffer size used, calling bufferSize() anytime after start()
   308     will return the actual buffer size being used.
   318     will return the actual buffer size being used.
   313 {
   323 {
   314     d->setBufferSize(value);
   324     d->setBufferSize(value);
   315 }
   325 }
   316 
   326 
   317 /*!
   327 /*!
   318     Returns the audio buffer size in milliseconds.
   328     Returns the audio buffer size in bytes.
   319 
   329 
   320     If called before start(), returns platform default value.
   330     If called before start(), returns platform default value.
   321     If called before start() but setBufferSize() was called prior, returns value set by setBufferSize().
   331     If called before start() but setBufferSize() was called prior, returns value set by setBufferSize().
   322     If called after start(), returns the actual buffer size being used. This may not be what was set previously
   332     If called after start(), returns the actual buffer size being used. This may not be what was set previously
   323     by setBufferSize().
   333     by setBufferSize().