A Note Concerning Analysis of Pure Sine Signals Transmitted Using the AAC Codec

In audio testing, FFT analysis of a pure sinusoid transmitted through a device under test (DUT) is a time-honored tradition. It can provide a wealth of information about the DUT and forms the basis for computation of many audio metrics such as level and gain, frequency, distortion and noise, etc.

FFT analysis can also be applied to signals transmitted using a codec, such as the codecs used to compress signals transmitted over the Bluetooth A2DP profile (codecs such as SBC, aptX, AAC, etc.). It should be noted, however, that some codecs modify the signal in a way that causes the FFT spectrum of a pure tone to appear radically different than what you would typically expect. For example, Figure 1 shows the FFT spectrum of a 1 kHz sine signal at a level of -1 dBFS transmitted from a current smart phone using the SBC codec and the AAC codec.  Except for some small discrete peaks at high frequency, the FFT of the signal transmitted via the SBC codec is quite similar to the FFT of a signal that has not been compressed. It has one large dominant peak at the frequency of the sine wave that towers above the noise floor.

Figure 1. FFT of a 1 kHz sine signal transmitted over Bluetooth A2DP using the SBC and AAC codecs.

The FFT of the sine signal transmitted via the AAC codec, however is radically different, with energy smeared around the discrete 1 kHz peak from about 400 Hz to 5 kHz. This difference appears to be due to the AAC codec causing amplitude modulation of the signal. This can be seen in Figure 2, in which the RMS level of the two signals above is plotted versus time at a high reading rate. As shown, the signal transmitted via AAC fluctuates in level by approximately 5%. This amplitude fluctuation causes the smearing visible in the FFT spectrum. It should also be noted that the degree of amplitude modulation depends on the level of the sine signal — higher level signals have a higher percentage of modulation.

This modulation can also be reduced by setting the AAC codec to use a fixed bit rate rather than a variable bit rate. The graphs shown here were measured with the AAC codec set to variable bit rate. When tested with the AAC codec in fixed bit rate mode, the amplitude modulation was reduced from about 5% to 1.5%).

Please note that the purpose of this article is not to imply in any way that the AAC codec is inferior[1]. It is merely to make users aware of this phenomenon so that they are not surprised like we were when we first tried measuring the FFT spectrum of a sine signal transmitted via AAC.


[1] A2DP codecs are intended for music, not sinusoids, and no one intentionally listens to pure sine tones. Furthermore, many codecs used for transmitting speech are designed to filter out sine signals.