Analyzing a raw audio stream using the FFTReal library.
Spectrum demonstrates how the Qt Multimedia module can be used to analyze an audio stream while recording it, and also play the recorded stream.
![]()
Because Qt Multimedia allows the application to access the raw audio stream, the data can either be inspected or modified by the application. The Spectrum Analyzer example displays three pieces of information while audio is being either captured or played back:
A representation of the frequency spectrum, shown at the lower left
The current RMS level of the audio stream, and the recent ‘high watermark’ level, shown at the lower right
Spectrum analysis is performed by calculating the Fast Fourier Transform (FFT) of a segment of audio data. An open-source library, FFTReal , against which the application is dynamically linked, is used to compute the transform.
要运行范例从 Qt Creator ,打开 欢迎 模式,然后选择范例从 范例 . For more information, visit Building and Running an Example.