Go to the source code of this file.
Functions |
cardinal | AudioConverter (const AudioQualityInterface &from, const AudioQualityInterface &to, const card8 *inputBuffer, card8 *outputBuffer, const cardinal inputLength, const cardinal outputLength) |
cardinal | getAlignedLength (const AudioQualityInterface &inputQuality, const AudioQualityInterface &outputQuality, const cardinal inputLength) |
bool | getConvParams (const cardinal in, const cardinal out, cardinal &a, cardinal &b, float &c) |
Function Documentation
Audio quality converter. Convert quality from a given value to a given value. Note: The "from" value must be greater than or equal to the "to" value, that is from-sampling rate >= to-sampling rate, from-bits >= to-bits, from-channels >= to-channels.
- Parameters:
-
from | Quality to convert from. |
to | Quality to convert to. |
inputBuffer | Input buffer. |
outputBuffer | Output buffer. |
inputLength | Length of the audio data in input buffer. |
outputLength | Length of the output buffer. |
- Returns:
- Length after conversion.
Get aligned output length for a conversion from given input quality and input length to output quality. Example: 12 Bit/Stereo has a 6-byte alignment: L1L1R1R2 = 48 bits = 6 Bytes.
- Parameters:
-
inputQuality | Input quality. |
outputQuality | Output quality. |
inputLength | Input length. |
- Returns:
- Aligned length.
Get parameters for audio conversion. New sampling rate = (a * OldSamplingRate) / b;
- Parameters:
-
in | Old sampling rate. |
out | New sampling rate. |
a | Reference to store a. |
b | Reference to store b. |
c | Reference to store float in / out. |
- Returns:
- true, if a and b have been found; false, if there are no such numbers for b out of the set {1,2,...,20}