summaryrefslogtreecommitdiff
path: root/firmware/export/id3.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/id3.h')
-rw-r--r--firmware/export/id3.h42
1 files changed, 40 insertions, 2 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index 7930cd9b70..dc58178d50 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -24,7 +24,6 @@
24#include "file.h" 24#include "file.h"
25 25
26/* Audio file types. */ 26/* Audio file types. */
27/* NOTE: When adding new audio types, also add to codec_labels[] in id3.c */
28enum { 27enum {
29 AFMT_UNKNOWN = 0, /* Unknown file format */ 28 AFMT_UNKNOWN = 0, /* Unknown file format */
30 29
@@ -46,9 +45,48 @@ enum {
46 45
47 /* New formats must be added to the end of this list */ 46 /* New formats must be added to the end of this list */
48 47
49 AFMT_NUM_CODECS 48 AFMT_NUM_CODECS,
49
50#if CONFIG_CODEC == SWCODEC
51 /* masks to decompose parts */
52 CODEC_AFMT_MASK = 0x0fff,
53 CODEC_TYPE_MASK = 0x7000,
54
55 /* switch for specifying codec type when requesting a filename */
56 CODEC_TYPE_DECODER = (0 << 12), /* default */
57 CODEC_TYPE_ENCODER = (1 << 12)
58#endif
50}; 59};
51 60
61#if CONFIG_CODEC == SWCODEC
62#define AFMT_ENTRY(label, codec_fname, codec_enc_fname, enc_ext) \
63 { label, codec_fname, codec_enc_fname, enc_ext }
64#else
65#define AFMT_ENTRY(label, codec_fname, codec_enc_fname, enc_ext) \
66 { label }
67#endif
68
69/* record describing the audio format */
70struct afmt_entry
71{
72#if CONFIG_CODEC == SWCODEC
73 char label[8]; /* format label */
74 char *codec_fn; /* filename of decoder codec */
75 char *codec_enc_fn; /* filename of encoder codec */
76 char *ext; /* default extension for file (enc only for now) */
77#else
78 char label[4];
79#endif
80};
81
82/* database of labels and codecs. add formats per above enum */
83extern const struct afmt_entry audio_formats[AFMT_NUM_CODECS];
84
85#if CONFIG_CODEC == SWCODEC
86/* recording quality to AFMT_* */
87extern const int rec_quality_info_afmt[9];
88#endif
89
52struct mp3entry { 90struct mp3entry {
53 char path[MAX_PATH]; 91 char path[MAX_PATH];
54 char* title; 92 char* title;