diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-06-23 18:44:50 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-06-23 18:44:50 +1000 |
commit | 16fba41d5079aec39d299dbf5481758320443dab (patch) | |
tree | 9ee0b8e8aec9b3e04ac71ecc934f84a7056b8ec5 /drivers/gaudio/vs1053/gaudio_play_config.h | |
parent | 8d1ce488005f6d08cc11c7842b8bc53be9cb3bb0 (diff) | |
download | uGFX-16fba41d5079aec39d299dbf5481758320443dab.tar.gz uGFX-16fba41d5079aec39d299dbf5481758320443dab.tar.bz2 uGFX-16fba41d5079aec39d299dbf5481758320443dab.zip |
Added support for playing arbitrary format audio files with an intelligent audio processor like the VS1053 codec.
Demo added.
Diffstat (limited to 'drivers/gaudio/vs1053/gaudio_play_config.h')
-rw-r--r-- | drivers/gaudio/vs1053/gaudio_play_config.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gaudio/vs1053/gaudio_play_config.h b/drivers/gaudio/vs1053/gaudio_play_config.h index bd2af503..51a3d273 100644 --- a/drivers/gaudio/vs1053/gaudio_play_config.h +++ b/drivers/gaudio/vs1053/gaudio_play_config.h @@ -14,10 +14,23 @@ /* Driver hardware support. */ /*===========================================================================*/ +/* Note: + * The VS1053 has an internal processor which can decode many file formats directly. + * If you want to use anything other than raw PCM then you should use GAUDIO_PLAY_FORMAT_FILE and pipe + * the entire file as if it was sound data. It doesn't matter if you choose the mono or stereo channel + * as the codec chip automatically detects the real format itself. + * No testing is made of the file format - if there is an error it can only be detected by the codec chip + * and its behaviour is undefined (we haven't tested). + * Note that some formats require a firmware patch to be installed to play correctly. + * In this case define VS1053_FIRMWARE_PATCH as TRUE in your gfxconf.h file and include the patch file + * in your project directory. The patch file MUST be called "vs1053_patch.plg". + */ #define GAUDIO_PLAY_MAX_SAMPLE_FREQUENCY 48000 -#define GAUDIO_PLAY_NUM_FORMATS 2 +#define GAUDIO_PLAY_NUM_FORMATS 3 #define GAUDIO_PLAY_FORMAT1 ARRAY_DATA_16BITSIGNED #define GAUDIO_PLAY_FORMAT2 ARRAY_DATA_8BITUNSIGNED +#define GAUDIO_PLAY_FORMAT3 ARRAY_DATA_UNKNOWN +#define GAUDIO_PLAY_FORMAT_FILE ARRAY_DATA_UNKNOWN #define GAUDIO_PLAY_NUM_CHANNELS 2 #define GAUDIO_PLAY_CHANNEL0_IS_STEREO FALSE #define GAUDIO_PLAY_CHANNEL1_IS_STEREO TRUE |