<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QAudioFormat Class Reference ## [[QtMultimedia](index.htm) module] 該QAudioFormat類存儲音頻的參數信息。[More...](#details) ### Types * `enum Endian { BigEndian, LittleEndian }` * `enum SampleType { Unknown, SignedInt, UnSignedInt, Float }` ### Methods * `__init__ (self)` * `__init__ (self, QAudioFormat?other)` * `Endian byteOrder (self)` * `int channelCount (self)` * `int channels (self)` * `QString codec (self)` * `int frequency (self)` * `bool isValid (self)` * `int sampleRate (self)` * `int sampleSize (self)` * `SampleType sampleType (self)` * `setByteOrder (self, Endian?byteOrder)` * `setChannelCount (self, int?channelCount)` * `setChannels (self, int?channels)` * `setCodec (self, QString?codec)` * `setFrequency (self, int?frequency)` * `setSampleRate (self, int?sampleRate)` * `setSampleSize (self, int?sampleSize)` * `setSampleType (self, SampleType?sampleType)` ### Special Methods * `bool __eq__ (self, QAudioFormat?other)` * `bool __ne__ (self, QAudioFormat?other)` * * * ## Detailed Description 該QAudioFormat類存儲音頻的參數信息。 一種音頻格式指定如何在一個音頻數據流的數據排列,即,如何將數據流將被解釋。編碼本身是由指定的[codec](qaudioformat.html#codec)()用于視頻流。 除了編碼, QAudioFormat包含進一步指定的音頻數據是如何排列的其它參數。這些是頻率,信道數,樣本大小,樣本類型和字節順序。下表詳細描述了這些。 | Parameter | Description | | --- | --- | | Sample Rate | Samples per second of audio data in Hertz. | | Number of channels | The number of audio channels (typically one for mono or two for stereo) | | Sample size | How much data is stored in each sample (typically 8 or 16 bits) | | Sample type | Numerical representation of sample (typically signed integer, unsigned integer or float) | | Byte order | Byte ordering of sample (typically little endian, big endian) | 您可以獲取通過在函數中使用的音頻設備兼容的音頻格式[QAudioDeviceInfo](qaudiodeviceinfo.html)。這個類也可以讓你查詢一個設備可用的參數值,這樣你可以自己設置參數。請參閱[QAudioDeviceInfo](qaudiodeviceinfo.html)類描述的細節。你需要知道你想要播放的音頻流的格式。 Qt不設置格式為您服務。 * * * ## Type Documentation ``` QAudioFormat.Endian ``` | Constant | Value | Description | | --- | --- | --- | | `QAudioFormat.BigEndian` | `QSysInfo.BigEndian` | 樣品是Big Endian字節序 | | `QAudioFormat.LittleEndian` | `QSysInfo.LittleEndian` | 樣品是little endian字節順序 | ``` QAudioFormat.SampleType ``` | Constant | Value | Description | | --- | --- | --- | | `QAudioFormat.Unknown` | `0` | 沒有設置 | | `QAudioFormat.SignedInt` | `1` | 樣品有符號整數 | | `QAudioFormat.UnSignedInt` | `2` | 樣品是無符號intergers | | `QAudioFormat.Float` | `3` | 樣品彩車 | * * * ## Method Documentation ``` QAudioFormat.__init__ (self) ``` 構造一個新的音頻格式。 值被初始化如下: * [sampleRate](qaudioformat.html#sampleRate)() = -1 * [channelCount](qaudioformat.html#channelCount)() = -1 * [sampleSize](qaudioformat.html#sampleSize)() = -1 * [byteOrder](qaudioformat.html#byteOrder)() = [QAudioFormat.Endian](qaudioformat.html#Endian-enum)([QSysInfo.ByteOrder](qsysinfo.html#Endian-enum)) * [sampleType](qaudioformat.html#sampleType)() = [QAudioFormat.Unknown](qaudioformat.html#SampleType-enum) `codec()` = "" ``` QAudioFormat.__init__ (self, QAudioFormat?other) ``` 構造采用了全新的音頻格式_other_。 ``` Endian QAudioFormat.byteOrder (self) ``` [ 返回當前byteOrder值。 ](qaudioformat.html#Endian-enum) [**See also**](qaudioformat.html#Endian-enum) [setByteOrder](qaudioformat.html#setByteOrder)( ) 。 ``` int QAudioFormat.channelCount (self) ``` 返回當前通道的計數值。 此功能被引入Qt的4.7 。 **See also** [setChannelCount](qaudioformat.html#setChannelCount)( ) 。 ``` int QAudioFormat.channels (self) ``` ``` QString QAudioFormat.codec (self) ``` 返回當前的編解碼器值。 **See also** [setCodec](qaudioformat.html#setCodec)()和[QAudioDeviceInfo.supportedCodecs](qaudiodeviceinfo.html#supportedCodecs)( ) 。 ``` int QAudioFormat.frequency (self) ``` ``` bool QAudioFormat.isValid (self) ``` 返回True如果所有的參數都是有效的。 ``` int QAudioFormat.sampleRate (self) ``` 返回赫茲的電流采樣率。 此功能被引入Qt的4.7 。 **See also** [setSampleRate](qaudioformat.html#setSampleRate)( ) 。 ``` int QAudioFormat.sampleSize (self) ``` 返回當前采樣大小的值。 **See also** [setSampleSize](qaudioformat.html#setSampleSize)( ) 。 ``` SampleType QAudioFormat.sampleType (self) ``` [](qaudioformat.html#SampleType-enum) [返回當前](qaudioformat.html#SampleType-enum)[SampleType](qaudioformat.html#SampleType-enum)值。 **See also** [setSampleType](qaudioformat.html#setSampleType)( ) 。 ``` QAudioFormat.setByteOrder (self, Endian?byteOrder) ``` 設置byteOrder到_byteOrder_。 **See also** [byteOrder](qaudioformat.html#byteOrder)( ) 。 ``` QAudioFormat.setChannelCount (self, int?channelCount) ``` 設置通道數_channels_。 此功能被引入Qt的4.7 。 **See also** [channelCount](qaudioformat.html#channelCount)( ) 。 ``` QAudioFormat.setChannels (self, int?channels) ``` ``` QAudioFormat.setCodec (self, QString?codec) ``` 設置編解碼器_codec_。 **See also** [codec](qaudioformat.html#codec)()和[QAudioDeviceInfo.supportedCodecs](qaudiodeviceinfo.html#supportedCodecs)( ) 。 ``` QAudioFormat.setFrequency (self, int?frequency) ``` ``` QAudioFormat.setSampleRate (self, int?sampleRate) ``` 設置采樣率_samplerate_赫茲。 此功能被引入Qt的4.7 。 **See also** [sampleRate](qaudioformat.html#sampleRate)( ) 。 ``` QAudioFormat.setSampleSize (self, int?sampleSize) ``` 將樣本大小對_sampleSize_規定。 **See also** [sampleSize](qaudioformat.html#sampleSize)( ) 。 ``` QAudioFormat.setSampleType (self, SampleType?sampleType) ``` 設置sampleType到_sampleType_。 **See also** [sampleType](qaudioformat.html#sampleType)( ) 。 ``` bool QAudioFormat.__eq__ (self, QAudioFormat?other) ``` ``` bool QAudioFormat.__ne__ (self, QAudioFormat?other) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看