Skip to main content

Posts

Showing posts from July, 2018

Audio Formats.

We have completed our first step towards building a music player by developing a way to store the music files locally on the sd card. Now we will shift our focus towards understanding the way in which music is stored. The first audio was stored as analogue signal transcribe mechanically on a paper or glass but since then we have rapidly developed various other more efficient ways to store an audio signal. The digital formats revolutionized the whole industry as it was easier to store, process as well as replicate. Currently, we deal with various digital formats such as AIFF, AAC, MPEG standard etc. The MP3 is the MPEG-1 Audio layer 3 and is one of the most recognized audio file formats as it uses lossy data compression which drastically decreases the file sizes and is one of the reasons which caused the boom in the music industry in the 1990's. The format itself is quite complex as it uses advanced compression techniques such as the Huffman coding and so we will begin our discussio...

Reading and Writing a File.

With the introduction of  FatFs, we are now able to interface with a file system on an SD card. Note that we can easily initialize the sd card by using fatfs module along with manipulating files and there is no need to manually send any command through SPI like we did in another blog. So, we begin by taking a look at the files included with the module and including them in our build. The module can be downloaded by following the instructions given in the last blog. It will contain two folders namely Documents and Source. All the required source files, as well as header files, are located in the Source directory. The diskio.h is the low-level disk input/output header file. It basically contains macro definitions as well as function prototypes required to interface with a storage device such as an SD card. The application must specifically provide the definitions for the function prototypes which makes the fatfs module independent of the platform. Example function definitions a...