Microchip logo
Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

PIC32 Audio Decoders

Microchip offers a comprehensive list of Audio Decoders of many audio applications which include the following decoders:

AAC: A proprietary audio coding standard for lossy digital audio compression. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at the same bit rate.

MP3: An audio coding format for digital audio. It uses a form of lossy data compression to encode data using inexact approximations and partial data discarding to reduce file sizes, typically by a factor of 10, in comparison with a CD while retaining a sound quality comparable to uncompressed audio.

FLAC: An audio coding format for lossless compression of digital audio. Digital audio compressed by FLAC's algorithm can typically be reduced to between 50 to 60 percent of its original size and decompress to an identical copy of the original audio data.

WAVE: Is a standard for storing an audio bitstream on PCs. The usual bitstream encoding is the linear pulse-code modulation (LPCM) format.

SPEEX: An audio compression format designed for speech that may be used on VoIP applications and podcasts. It is based on the CELP speech coding algorithm.

OPUS: A lossy audio coding format designed to efficiently code speech and general audio in a single format, while remaining low-latency enough for real-time interactive communication.

WMA: (Windows Media Audio): A series of audio codecs and their corresponding audio coding formats developed by Microsoft. It is a proprietary technology that forms part of the Windows Media framework.

ADPCM: Is a method for converting analog signals into PCM (Pulse Code Modulation) which is a standard format for Digital Audio in computers, telephony, and other Digital Audio Applications.

The FLAC, OPUS, SPEEX, WAVE, and ADPCM decoder libraries are available for free with the download of MPLAB Harmony.

The AAC, MP3, and WMA decoder libraries are available for purchase from Microchip Direct for the source code/binary for development purposes.

These decoders can be used with the PIC32MX and higher performance PIC32 devices.

Decoder and Encoder Libraries

PIC32 MP3 Decoder Library
+

The Microchip Compact MP3 Decoder Features:

  • Implements MPEG-1, MPEG-2 and MPEG-2.5 Layer III decoder.
  • Simple user interface – initialize decoder and pass MP3 data
  • Optimized C callable APIs
  • Assembly optimized implementation for overall performance
  • Supports variable bit rate (VBR).
  • Supports sampling frequencies (Khz): 8, 11.025, 12, 16, 22.05, 24, 32, 44.1 and 48
  • Supports bit rates (kbps): 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 192, 224, 256 and 320

The MP3 Decoder is available in both source as well as binary formats.

  • Compact MP3 Decoder Library for Harmony Non-Modifiable Binary Code: Part Number # SW320022-1HPM

The MP3 Decoder requires a minimum of 47KB of Flash and 19.85KB of SRAM.

  • Input buffer for one MP3 Frame: 1538 byte for most cases, however for high sample frequency and bit rate audio data, 6144 byte is recommended.
  • The Output buffer: 4608 byte for an 1152 samples, stereo 16bit-audio.
Note that some implementations/applications of the MP3 decoder are still subject to patent protection.
PIC32 Microsoft WMA Decoder Library
+

The Microchip WMA Decoder can decode audio signals sampled at up to 48 kHz with up to two discrete channels. The WMA Decoder also supports VBR and CBR encoded audio stream. In most circumstances, .WMA files are contained in Advance Systems Format (ASF), which is supported by the WMA Decoder. Microchip technology provides software libraries allowing customers to build audio applications with high quality and professional results. The WMA Decoder library is optimized (C/ASM.)

The PIC32 WMA Decoder Library is only available to Microsoft audio/video component licensees. WMA 9 is the currently supported format.

PIC32 AAC Decoder Library
+

The PIC32 Advanced Audio Coding (AAC) Decoder library provides easy to use APIs for decoding an audio stream encoded using Advanced Audio Coding (AAC) encoding. The AAC Decoder Library is available both as source code as well as a Binary.

The AAC Decoder requires 62 MIPS (peak) and 34 MIPS (average) and is ideal for PIC32MX or higher performance devices. 61 KB of Flash and 12 KB of RAM is the memory footprint for the AAC Decoder.

The PIC32 AAC Decoder library supports the following:

  • Sample Rates: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2 and 96 KHz
  • Bit Rates: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 kbps and VBR

Microchip offers AAC Decoder library both in non-modifiable binary code and source code formats that enables usage on high performance PIC32MX devices. The decoder is a low complexity decoder AAC – LC with support for parsing ADTS headers only. The ADTS format works for Bluetooth and limited to some “*.AAC” and “*.AC3” files

The ADTS header Audio Data Transport Stream (ADTS) is a format, used by the MPEG TS or Shoutcast to stream audio

  • Not all .AAC audio files will play using this decoder, since they may not follow the same header or AAC-LC format for encoding
  • Music with ID3 tags will not decode
  • AAC_LTP is not support
  • Only music with the AAC-LC v4 format without ID3 tags is supported

An AAC License is available from Via Licensing:  Via Licensing

PIC32 OPUS Decoder Library
+

For the PIC32 OPUS Decoder Library, the following features are supported:

  • Bit rates from 6 kb/s to 510 kb/s
  • Sampling rates from 8 kHz (narrowband) to 48 kHz (fullband)
  • Frame sizes from 2.5 ms to 60 ms
  • Support for both constant bit rate (CBR) and variable bit rate (VBR)
  • Audio bandwidth from narrowband to fullband
  • Support for speech and music
  • Support for mono and stereo
  • Support for up to 255 channels (multi-stream frames)
  • Dynamically adjustable bit rate, audio bandwidth, and frame size
  • Good loss robustness and packet loss concealment (PLC)
  • Floating point and fixed-point implementation

The full specification, RFC 6716, including the reference implementation is available from http://www.opus-codec.org. An up-to-date implementation of the Opus standard is available from the Opus Codec downloads page by visiting: https://www.opus-codec.org/downloads/

The Opus Decoder requires 143 KB of Flash and 17KB of SRAM in stereo mode.

The PIC32 OPUS Decoder is available in MPLAB Harmony which can be downloaded at the following link: MPLAB® Harmony Integrated Software Framework

Note that the OPUS Decoder library is subject to open source licensing requirements.

PIC32 SPEEX Decoder Library
+

The PIC32 SPEEX Decoder Library has the following features:

  • Fixed-point implementation
  • Narrowband (8 kHz) and wideband (16 kHz) bit-streams
  • Wide range of bit-rates available (from 2.15 kbps to 44 kbps)
  • Perceptual enhancement (attempts to reduce the perception of the noise/distortion produced by the encoding/decoding process. In most cases, perceptual enhancement brings the sound further from the original objectively (e.g. considering only SNR), but in the end it still sounds better (subjective improvement)

Visit www.speex.org for further details and complete documentation.

The Speex Decoder requires 60 KB of Flash and 6KB of SRAM.

MPLAB Harmony can be downloaded at the following link: MPLAB® Harmony Integrated Software Framework

The PIC32 Speex Decoder library is subject to open source licensing requirements.

PIC32 FLAC Decoder Library
+

The PIC32  FLAC Decoder Library has the following features:

  • Lossless decoder.
  • Supports native FLAC format streaming.
  • No theoretical limitation on maximum sample rate and bitrate.

The FLAC Decoder requires 113 KB of Flash, SRAM size is the same size with one FLAC block size.

  • Input buffer for one FLAC Frame: 16 KB (Practically, it should be at least 1 KB, 16 KB works for most native FLAC frames)
  • Output Buffer: at least 32 KB + 32 bytes (padding bytes are required by FLAC decoder algorithm) for a 4096 samples FLAC frame.

The PIC32 FLAC Decoder Library is available in MPLAB Harmony which be downloaded at the following link: MPLAB® Harmony Integrated Software Framework

The PIC32 FLAC Decoder library is subject to open source licensing requirements.
PIC32 WAVE and ADPCM Decoder Libraries
+

The PIC32 WAVE and ADPCM decoder libraries are available for free with the download of MPLAB Harmony.

MPLAB Harmony can be downloaded at the following link: MPLAB® Harmony Integrated Software Framework

  • WAVE (.WAV) is a format is a standard for storing an audio bitstream on PCs. The usual bitstream encoding is the linear pulse-code modulation (LPCM) format.
  • ADPCM (Adaptive Differential Pulse-code Modulation) modulation (ADPCM) is a variant of differential pulse-code modulation (DPCM) and is a bitstream encoding format.
PIC32 PCM and ADPCM Encoder Libraries
+

Currently, Microchip offers PCM and ADPCM audio encoders that are included in the MPLAB® Harmony Integrated Software Framework.

  • WAVE (.WAV) is a format is a standard for storing an audio bitstream on PCs. The usual bitstream encoding is the linear pulse-code modulation (LPCM) format.
  • ADPCM (Adaptive Differential Pulse-code Modulation) modulation (ADPCM) is a variant of differential pulse-code modulation (DPCM) and is a bitstream encoding format.