Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    112112            \o Description
    113113        \row
    114             \o Frequency
     114            \o Sample Rate
    115115            \o Samples per second of audio data in Hertz.
    116116        \row
     
    144144    Values are initialized as follows:
    145145    \list
    146     \o frequency()  = -1
    147     \o channels()  = -1
     146    \o sampleRate()  = -1
     147    \o channelCount() = -1
    148148    \o sampleSize() = -1
    149149    \o byteOrder()  = QAudioFormat::Endian(QSysInfo::ByteOrder)
     
    225225
    226226/*!
    227    Sets the frequency to \a frequency.
     227   Sets the sample rate to \a samplerate Hertz.
     228
     229   \since 4.7
     230*/
     231
     232void QAudioFormat::setSampleRate(int samplerate)
     233{
     234    d->frequency = samplerate;
     235}
     236
     237/*!
     238   \obsolete
     239
     240   Use setSampleRate() instead.
    228241*/
    229242
     
    234247
    235248/*!
    236     Returns the current frequency value.
     249    Returns the current sample rate in Hertz.
     250
     251    \since 4.7
     252*/
     253
     254int QAudioFormat::sampleRate() const
     255{
     256    return d->frequency;
     257}
     258
     259/*!
     260   \obsolete
     261
     262   Use sampleRate() instead.
    237263*/
    238264
     
    243269
    244270/*!
    245    Sets the channels to \a channels.
     271   Sets the channel count to \a channels.
     272
     273   \since 4.7
     274*/
     275
     276void QAudioFormat::setChannelCount(int channels)
     277{
     278    d->channels = channels;
     279}
     280
     281/*!
     282   \obsolete
     283
     284   Use setChannelCount() instead.
    246285*/
    247286
     
    252291
    253292/*!
    254     Returns the current channel value.
     293    Returns the current channel count value.
     294
     295    \since 4.7
     296*/
     297
     298int QAudioFormat::channelCount() const
     299{
     300    return d->channels;
     301}
     302
     303/*!
     304    \obsolete
     305
     306    Use channelCount() instead.
    255307*/
    256308
Note: See TracChangeset for help on using the changeset viewer.