English
Language : 

VS1053B Datasheet, PDF (55/79 Pages) List of Unclassifed Manufacturers – Ogg Vorbis/MP3/AAC/WMA/MIDI AUDIO CODEC
VLSI
Solution y
VS1053b preliminary
VS1053B
9. OPERATION
If you know beforehand how much you are going to record, you may fill in the complete header before
any actual data. However, if you don’t know how much you are going to record, you have to fill in the
header size datas F , S and D after finishing recording.
The 128 words (256 bytes) of an ADPCM block are read from SCI HDAT0 and written into file as
follows. The high 8 bits of SCI HDAT0 should be written as the first byte to a file, then the low 8 bits.
Note that this is contrary to the default operation of some 16-bit microcontrollers, and you may have to
take extra care to do this right.
A way to see if you have written the file in the right way is to check bytes 2 and 3 (the first byte counts
as byte 0) of each 256-byte block. Byte 3 should always be zero.
Below is an example of a valid header for a 44.1 kHz stereo IMA ADPCM file that had a final length of
10038844 (0x992E3C) bytes:
0000 52 49 46 46 34 2e 99 00 57 41 56 45 66 6d 74 20 |RIFF4...WAVEfmt |
0010 14 00 00 00 11 00 02 00 44 ac 00 00 a7 ae 00 00 |........D.......|
0020 00 02 04 00 02 00 f9 01 66 61 63 74 04 00 00 00 |........fact....|
0030 14 15 97 00 64 61 74 61 00 2e 99 00
|....data....|
9.8.4 Playing ADPCM Data
In order to play back your IMA ADPCM recordings, you have to have a file with a header as described
in Chapter 9.8.3. If this is the case, all you need to do is to provide the ADPCM file through SDI as you
would with any audio file.
9.8.5 Sample Rate Considerations
VS10xx chips that support IMA ADPCM playback are capable of playing back ADPCM files with
any sample rate. However, some other programs may expect IMA ADPCM files to have some exact
sample rates, like 8000 or 11025 Hz. Also, some programs or systems do not support sample rates below
8000 Hz.
If you want better quality with the expense of increased data rate, you can use higher sample rates, for
example 16 kHz.
Version 0.5, 2007-12-03
55