Factors which affect quality of an audio file are:
1) Sampling rate: A sample is a representation of sound waves by using a sequence of numbers. Sampling rate is measured in samples per second, also known as Hertz (Hz). Quality of the audio can be increased by increasing the sampling rate; however, increasing it further can increase the size of the file and also it can cause distortion. CD quality sampling rate is about 44,100.
2) Bit depth: Bit depth refers to number of bits per sample. Bit depth for CD quality audio is 16 bits per sample. Higher bit depth means high audio quality since there will be more bits of data per sample.
3) Compression: Quality of the audio also depends on the quality of compression. If the compression is effective, sampling rate and the bit depth will be higher and thus quality of audio will be high.
4) Number of audio channels: Number of audio channels directly affects the quality of the audio. Single channel audio is known as mono, and double channel audio is referred to as stereo. The more number of channels a audio has, the higher will be its quality.