Skip to content

Commit 07b900e

Browse files
authored
Update spec with mp3 to C conversion solution #18 (#19)
An information how to convert the mp3 file into C header
1 parent 6e9b41a commit 07b900e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ $ platformio init --ide=clion
138138
Then please import the project and run the PIO task: `PLATFORMIO_REBUILD_PROJECT_INDEX`.<br />
139139
Read more here: [PlatformIO & CLion integration](http://docs.platformio.org/en/latest/ide/clion.html).
140140

141+
## Additional hints
142+
143+
If you think how to convert the mp3 file into C header file, please find a [thread here](https://www.avrfreaks.net/comment/884247#comment-884247). It's as simple as calling:
144+
145+
`xxd -i your-sound.mp3 ready-to-use-c-header.h`
146+
147+
The `xxd` is available for any platform like Linux or Windows (distributed with Vim editor).
148+
It will produce something like in the example [here](https://github.com/baldram/ESP_VS1053_Library/blob/master/examples/Mp3PlayerDemo/SampleMp3.h).
149+
Of course as the file will be a part of firmware, it should be small enough according to limited microcontroller's resources The memory is at a premium ;-) I would suggest to use mp3 instead of wave, convert file from stereo to mono and use lower MP3 bit rate if possible (like 112kbps or less instead of 320kbps). Please also find [additional hints here](https://github.com/baldram/ESP_VS1053_Library/issues/18#issuecomment-408984920).
150+
151+
141152
## Credits
142153

143154
Based on library/applications:

0 commit comments

Comments
 (0)