Electronic Components Datasheet Search |
|
AN3143 Datasheet(PDF) 6 Page - STMicroelectronics |
|
AN3143 Datasheet(HTML) 6 Page - STMicroelectronics |
6 / 13 page Audio data encoding and storing AN3143 6/13 Doc ID 17011 Rev 1 2 Audio data encoding and storing The IMA ADPCM codec is quite popular on PC platforms and a wide range of audio software with different capabilities to process and encode audio data is available. The problematic part of encoded file storage is the file format of the ADPCM bitstream as it is not standardized in [1]. On 8-bit microcontrollers, raw data without any formatting is preferred to obtain the easiest manipulation with the coded audio file. On the Microsoft Windows® platform, a WAVEform (WAV) audio data container is often used to store linear PCM data. The WAV can also be used to store IMA ADPCM audio data. To use the WAV for storing audio bitstream, a WAV parser has to be implemented in the microcontroller decoding firmware. This is to unpack raw data so that they can be decompressed. The WAV parser increases the complexity and size of the application and does not bring many additional benefits to an 8-bit system. Fortunately, software is available which can store coded audio bitstream directly as raw data. An example includes the Sound eXchange (SOX) command-line application for audio manipulation which is distributed under a GNU general purpose license. SOX is able to: ● Resample input audio data to any target frequency ● Encode such data in IMA ADPCM format ● Save output bitstream as unformatted raw data The example command below shows the input parameters used to resample data to: ● Target frequency 15625 Hz ● Reduce volume by -12 dB ● Compress data by using the IMA ADPCM codec sox inputfilename -r 15625 outputfilename.ima gain -12 Various input file formats can be used, including PCM WAV, MP3, MP4, OGG, FLAC, and many others. See the SOX documentation for further details. 2.1 Internal Flash memory used for audio data storing The internal memory of STM8S can be used to store short audio waveforms. One 16-bit PCM sample takes half a byte when compressed by IMA ADPCM codec. The memory requirement can be evaluated using Equation 1. Equation 1 For example, a 5-second ADPCM bitstream with an 8-kHz sample rate uses 20 Kbytes of memory. The audio data can be saved to the internal memory by using “in-application programming” (IAP) or the bootloader. See the AN2659 (STM8S in-application programming (IAP) using a customized bootloader) and UM0560 (STM8L/S bootloader) for more details. Memory samplerate length 2 ⁄ × = |
Similar Part No. - AN3143 |
|
Similar Description - AN3143 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |