Merge pull request #86 from tjstyle/master

Applied FLAC decoder patch to VS1003 library
This commit is contained in:
Roger Clark 2015-07-02 08:43:38 +10:00
commit 4f036873eb
3 changed files with 1089 additions and 0 deletions

View File

@ -10,11 +10,16 @@
email: avrsite@yahoo.gr email: avrsite@yahoo.gr
29 May 2015 - Added a fix for booting the VS1053B boards into 29 May 2015 - Added a fix for booting the VS1053B boards into
mp3 decoding instead of booting into MID (modeSwitch function). mp3 decoding instead of booting into MID (modeSwitch function).
01 July 2015 - Added a Flac decoder patch.
*/ */
//#include <my_SPI.h> //#include <my_SPI.h>
#include <VS1003_STM.h> #include <VS1003_STM.h>
#if defined(USEFLAC)
#include "flac.h"
#endif
#define vs1003_chunk_size 32 #define vs1003_chunk_size 32
/****************************************************************************/ /****************************************************************************/
@ -237,6 +242,9 @@ void VS1003::begin(void)
write_register(SCI_MODE, (1<<SM_SDINEW) | (1<<SM_RESET)); write_register(SCI_MODE, (1<<SM_SDINEW) | (1<<SM_RESET));
delay(1); delay(1);
await_data_request(); await_data_request();
#if defined(USEFLAC)
loadUserCode(flac_patch,FLAC_PATCHLEN);
#endif
//write_register(SCI_CLOCKF,0xB800); // Experimenting with higher clock settings //write_register(SCI_CLOCKF,0xB800); // Experimenting with higher clock settings
write_register(SCI_CLOCKF,0x6000); write_register(SCI_CLOCKF,0x6000);
delay(1); delay(1);

View File

@ -10,6 +10,7 @@
email: avrsite@yahoo.gr email: avrsite@yahoo.gr
29 May 2015 - Added a fix for booting the VS1053B boards into mp3 decoding instead of booting into MIDI. 29 May 2015 - Added a fix for booting the VS1053B boards into mp3 decoding instead of booting into MIDI.
01 July 2015 - Added a Flac decoder patch.
*/ */
//This is an additional test line //This is an additional test line
@ -20,6 +21,8 @@
// C headers // C headers
// Framework headers // Framework headers
//#define USEFLAC
#include <Arduino.h> #include <Arduino.h>
#include <SPI.h> #include <SPI.h>
/** /**

File diff suppressed because it is too large Load Diff