Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/multimedia/audio/qaudiooutput.cpp

    r651 r769  
    203203    All that is required is to open the QIODevice.
    204204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
    205216    \sa QIODevice
    206217*/
     
    208219void QAudioOutput::start(QIODevice* device)
    209220{
    210     /*
    211     -If currently not StoppedState, stop.
    212     -If previous start was push mode, delete internal QIODevice.
    213     -open audio output.
    214     -If ok, NoError and ActiveState, else OpenError and StoppedState
    215     -emit stateChanged()
    216     */
    217221    d->start(device);
    218222}
     
    222226    transfer. This QIODevice can be used to write() audio data directly.
    223227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
    224239    \sa QIODevice
    225240*/
     
    227242QIODevice* QAudioOutput::start()
    228243{
    229     /*
    230     -If currently not StoppedState, stop.
    231     -If no internal QIODevice, create one.
    232     -open audio output.
    233     -If ok, NoError and IdleState, else OpenError and StoppedState
    234     -emit stateChanged()
    235     -return internal QIODevice
    236     */
    237244    return d->start(0);
    238245}
    239246
    240247/*!
    241     Stops the audio output.
     248    Stops the audio output, detaching from the system resource.
     249
     250    Sets error() to QAudio::NoError, state() to QAudio::StoppedState and
     251    emit stateChanged() signal.
    242252*/
    243253
    244254void QAudioOutput::stop()
    245255{
    246     /*
    247     -If StoppedState, return
    248     -set to StoppedState
    249     -detach from audio device
    250     -emit stateChanged()
    251     */
    252256    d->stop();
    253257}
     
    259263void QAudioOutput::reset()
    260264{
    261     /*
    262     -drop all buffered audio, set buffers to zero.
    263     -call stop()
    264     */
    265265    d->reset();
    266266}
     
    268268/*!
    269269    Stops processing audio data, preserving buffered audio data.
     270
     271
     272
    270273*/
    271274
    272275void QAudioOutput::suspend()
    273276{
    274     /*
    275     -If not ActiveState|IdleState, return
    276     -stop processing audio, saving all buffered audio data
    277     -set NoError and SuspendedState
    278     -emit stateChanged()
    279     */
    280277    d->suspend();
    281278}
     
    283280/*!
    284281    Resumes processing audio data after a suspend().
     282
     283
     284
     285
     286
     287
     288
    285289*/
    286290
    287291void QAudioOutput::resume()
    288292{
    289     /*
    290     -If SuspendedState, return
    291     -resume audio
    292     -(PULL MODE): set ActiveState, NoError
    293     -(PUSH MODE): set IdleState, NoError
    294     -kick start audio if needed
    295     -emit stateChanged()
    296     */
    297293     d->resume();
    298294}
     
    300296/*!
    301297    Returns the free space available in bytes in the audio buffer.
     298
     299
     300
    302301*/
    303302
    304303int QAudioOutput::bytesFree() const
    305304{
    306     /*
    307     -If not ActiveState|IdleState, return 0
    308     -return space available in audio buffer in bytes
    309     */
    310305    return d->bytesFree();
    311306}
     
    354349    Sets the interval for notify() signal to be emitted.
    355350    This is based on the \a ms of audio data processed
    356     not on actual real-time. The resolution of the timer is platform specific.
     351    not on actual real-time.
     352    The minimum resolution of the timer is platform specific and values
     353    should be checked with notifyInterval() to confirm actual value
     354    being used.
    357355*/
    358356
     
    372370
    373371/*!
    374     Returns the amount of audio data processed since start()
     372    Returns the amount of audio data processed since start()
    375373    was called in microseconds.
     374
     375
     376
     377
     378
     379
     380
     381
     382
    376383*/
    377384
Note: See TracChangeset for help on using the changeset viewer.