diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2006-08-28 22:38:41 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2006-08-28 22:38:41 +0000 |
| commit | 4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d (patch) | |
| tree | eb6113c7491072f7b5136e24775737764e2cdede /firmware/export/id3.h | |
| parent | 65c2c58b3aa26164bd919665e4d710efa2fa7c79 (diff) | |
| download | rockbox-4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d.zip rockbox-4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d.tar.gz rockbox-4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d.tar.bz2 rockbox-4fc717a4c19a1fe0349977d7b9c86561c5a5cf2d.tar.xz | |
Added FS#2939 Encoder Codec Interface + Codecs by Antonius Hellmann with additional FM Recording support and my modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10789 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/id3.h')
| -rw-r--r-- | firmware/export/id3.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 7930cd9..dc58178 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h @@ -24,7 +24,6 @@ #include "file.h" /* Audio file types. */ -/* NOTE: When adding new audio types, also add to codec_labels[] in id3.c */ enum { AFMT_UNKNOWN = 0, /* Unknown file format */ @@ -46,9 +45,48 @@ enum { /* New formats must be added to the end of this list */ - AFMT_NUM_CODECS + AFMT_NUM_CODECS, + +#if CONFIG_CODEC == SWCODEC + /* masks to decompose parts */ + CODEC_AFMT_MASK = 0x0fff, + CODEC_TYPE_MASK = 0x7000, + + /* switch for specifying codec type when requesting a filename */ + CODEC_TYPE_DECODER = (0 << 12), /* default */ + CODEC_TYPE_ENCODER = (1 << 12) +#endif }; +#if CONFIG_CODEC == SWCODEC +#define AFMT_ENTRY(label, codec_fname, codec_enc_fname, enc_ext) \ + { label, codec_fname, codec_enc_fname, enc_ext } +#else +#define AFMT_ENTRY(label, codec_fname, codec_enc_fname, enc_ext) \ + { label } +#endif + +/* record describing the audio format */ +struct afmt_entry +{ +#if CONFIG_CODEC == SWCODEC + char label[8]; /* format label */ + char *codec_fn; /* filename of decoder codec */ + char *codec_enc_fn; /* filename of encoder codec */ + char *ext; /* default extension for file (enc only for now) */ +#else + char label[4]; +#endif +}; + +/* database of labels and codecs. add formats per above enum */ +extern const struct afmt_entry audio_formats[AFMT_NUM_CODECS]; + +#if CONFIG_CODEC == SWCODEC +/* recording quality to AFMT_* */ +extern const int rec_quality_info_afmt[9]; +#endif + struct mp3entry { char path[MAX_PATH]; char* title; |