The trade-off between slightly reduced audio quality and transmission or storage size is outweighed by the latter for most practical audio applications in which users may not perceive the loss in playback rendition quality. For example, one compact disk (CD) holds approximately one hour of uncompressed (PCM) high fidelity music, less than 2 hours of music compressed losslessly, or 7 hours of music compressed in the MP3 format at medium bit rates.
Lets examine compressed audio format taking as the example of "GSM 6.10". This format is used to compress the mobile operators talking on mobile phones. GSM is used by over 3 billion people across more than 212 countries and territories.
AudioCompressionManager.GetWaveFormat can look inside the audio format.
FormatTag = 49 is "GSM 6.10" format.
Channels = 1 is mono.
SamplesPerSec = quantity of digitized values in the second (or sampling): 8000 Hz, 11025 Hz, 22050 Hz, 44100 Hz.
BitsPerSample = 0, not matter for this format.
BlockAlign = 65. Mean the size of the compressed block.
AvgBytesPerSec is byterate(Bitrate equal byterate * 8) = 1625. For "GSM 6.10 22050 Hz; Mono".
The code below can be used to see "GSM 6.10" audio format in more detail.
private void WhatIsCompressedAudioFormat()
{
foreach (FormatDetails fd in AudioCompressionManager.GetFormatList(AudioCompressionManager.Gsm610FormatTag, true))
{
WaveFormat wf = AudioCompressionManager.GetWaveFormat(fd.FormatHandle);
string format = "Format: [{0}], FormatTag: {1}, Channels: {2}, SamplesPerSec: {3}, BitsPerSample: {4}, BlockAlign: {5}, AvgBytesPerSec: {6}";
Console.WriteLine(format, fd, wf.wFormatTag, wf.nChannels, wf.nSamplesPerSec, wf.wBitsPerSample, wf.nBlockAlign, wf.nAvgBytesPerSec);
}
}
Audio Library needed for this example is here(Alvas.Audio Free Trial).
No comments:
Post a Comment