QAudioFormat Class ReferenceThe QAudioFormat class stores audio parameter information. More... #include <QAudioFormat> This class was introduced in Qt 4.6. Public Types
Public Functions
Detailed DescriptionThe QAudioFormat class stores audio parameter information. An audio format specifies how data in an audio stream is arranged, i.e, how the stream is to be interpreted. The encoding itself is specified by the codec() used for the stream. In addition to the encoding, QAudioFormat contains other parameters that further specify how the audio data is arranged. These are the frequency, the number of channels, the sample size, the sample type, and the byte order. The following table describes these in more detail.
You can obtain audio formats compatible with the audio device used through functions in QAudioDeviceInfo. This class also lets you query available parameter values for a device, so that you can set the parameters yourself. See the QAudioDeviceInfo class description for details. You need to know the format of the audio streams you wish to play. Qt does not set up formats for you. Member Type Documentationenum QAudioFormat::Endian
enum QAudioFormat::SampleType
Member Function DocumentationQAudioFormat::QAudioFormat ()Construct a new audio format. Values are initialized as follows:
QAudioFormat::QAudioFormat ( const QAudioFormat & other )Construct a new audio format using other. QAudioFormat::~QAudioFormat ()Destroy this audio format. QAudioFormat::Endian QAudioFormat::byteOrder () constReturns the current byteOrder value. See also setByteOrder(). int QAudioFormat::channelCount () constReturns the current channel count value. This function was introduced in Qt 4.7. See also setChannelCount(). QString QAudioFormat::codec () constReturns the current codec value. See also setCodec() and QAudioDeviceInfo::supportedCodecs(). bool QAudioFormat::isValid () constReturns true if all of the parameters are valid. int QAudioFormat::sampleRate () constReturns the current sample rate in Hertz. This function was introduced in Qt 4.7. See also setSampleRate(). int QAudioFormat::sampleSize () constReturns the current sample size value. See also setSampleSize(). QAudioFormat::SampleType QAudioFormat::sampleType () constReturns the current SampleType value. See also setSampleType(). void QAudioFormat::setByteOrder ( QAudioFormat::Endian byteOrder )Sets the byteOrder to byteOrder. See also byteOrder(). void QAudioFormat::setChannelCount ( int channels )Sets the channel count to channels. This function was introduced in Qt 4.7. See also channelCount(). void QAudioFormat::setCodec ( const QString & codec )Sets the codec to codec. See also codec() and QAudioDeviceInfo::supportedCodecs(). void QAudioFormat::setSampleRate ( int samplerate )Sets the sample rate to samplerate Hertz. This function was introduced in Qt 4.7. See also sampleRate(). void QAudioFormat::setSampleSize ( int sampleSize )Sets the sample size to the sampleSize specified. See also sampleSize(). void QAudioFormat::setSampleType ( QAudioFormat::SampleType sampleType )Sets the sampleType to sampleType. See also sampleType(). bool QAudioFormat::operator!= ( const QAudioFormat & other ) constReturns true if this QAudioFormat is not equal to the other QAudioFormat; otherwise returns false. All elements of QAudioFormat are used for the comparison. QAudioFormat & QAudioFormat::operator= ( const QAudioFormat & other )Assigns other to this QAudioFormat implementation. bool QAudioFormat::operator== ( const QAudioFormat & other ) constReturns true if this QAudioFormat is equal to the other QAudioFormat; otherwise returns false. All elements of QAudioFormat are used for the comparison. X
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |