MP3 WaveForm Viewer is a package that lets you learn how to use the XAudio MP3 decoder in Sync-mode. The codec relies on the use of Delphi so it needs to be installed on your computer.

Once the package is loaded into the compiler and run, the application makes use of the TPaintBox class and generates an image of the decoded audio file and shown. The result is displayed in a Scope-like waveform and the user can seek into it.

MP3 WaveForm Viewer is focused on delivering fast and accurate results but neglects quality. The codec decodes the source MP3 at its lowest quality into a mono-mix channel to increase speed.

After the pulse code modulation for the sample is decoded, it is stored in a TMemoryStream. The PCM can then be saved to a 16 bit mono file which does not contain a header, meaning that this file can not be played back in an audio editor.

Sample rate information is extracted according to the original file and can be calculated by splitting the MP3 sample rate by 4.