The AudioParameters class keeps information about audio settings.
More...
#include <audioparameters.h>
The AudioParameters class keeps information about audio settings.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 29 of file audioparameters.h.
Byte order of samples.
Enumerator |
---|
LittleEndian |
Samples are in little-endian byte order
|
BigEndian |
Samples are in big-endian byte order
|
Definition at line 35 of file audioparameters.h.
AudioParameters::AudioParameters |
( |
| ) |
|
|
default |
Constructs audio settings with the given parameters.
- Parameters
-
srate | Sampling rate. |
map | Channel map. |
format | PCM data format. |
Constructs a copy of other.
int AudioParameters::bitsPerSample |
( |
| ) |
const |
Returns sample size in bits.
Returns sample size in bits of the given pcm data format.
ByteOrder AudioParameters::byteOrder |
( |
| ) |
const |
Returns byte order for selected audio format.
int AudioParameters::channels |
( |
| ) |
const |
Returns number of channels.
Find audio format by number of bits and byte order. Returns Qmmp::UNKNOWN if format is not found.
- Parameters
-
bits | Number of used bits in the sample (precision). |
byteOrder | Byte order. |
int AudioParameters::frameSize |
( |
| ) |
const |
Returns the number of bytes required to represent one frame (a sample in each channel) in this format.
Returns true if parameters p is not equal to this parameters; otherwise returns false.
Assigns audio parameters p to this parameters.
Returns true if parameters p is equal to this parameters; otherwise returns false.
quint32 AudioParameters::sampleRate |
( |
| ) |
const |
Returns sample rate in Hz.
int AudioParameters::sampleSize |
( |
| ) |
const |
Returns sample size in bytes.
Returns sample size in bytes of the given pcm data format.
QString AudioParameters::toString |
( |
| ) |
const |
Returns string represention of the audio parameters. May be useful for debug purposes.
int AudioParameters::validBitsPerSample |
( |
| ) |
const |
Returns the number of used bits in the sample. The value shoud be less or equal to the value returned by bitsPerSample().
Returns the number of used bits in the sample of the given pcm data format.
int AudioParameters::m_precision = 16 |
|
private |
quint32 AudioParameters::m_srate = 0 |
|
private |
int AudioParameters::m_sz = 2 |
|
private |
The documentation for this class was generated from the following file: