summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-24 19:49:04 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-24 19:49:04 +0000
commit0729b928ce14eafc09efe484bf19df2346880159 (patch)
treea8561f21607bab954580fb8a6b3fafbb33e691c9 /firmware
parent516d277958019ba27362d5f9fcc5ee70acc87c45 (diff)
downloadrockbox-0729b928ce14eafc09efe484bf19df2346880159.tar.gz
rockbox-0729b928ce14eafc09efe484bf19df2346880159.zip
Recording: Add AIFF recording to SWCODEC. Note: AIFF playback chokes on sample rates other than 44.1kHz whether recorded or created and saved with an external program. Recorded files will still open in an external editor however.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11583 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/enc_base.c2
-rw-r--r--firmware/export/enc_base.h8
-rw-r--r--firmware/export/id3.h3
-rw-r--r--firmware/id3.c4
4 files changed, 15 insertions, 2 deletions
diff --git a/firmware/enc_base.c b/firmware/enc_base.c
index e346064fe2..6cd421142c 100644
--- a/firmware/enc_base.c
+++ b/firmware/enc_base.c
@@ -19,6 +19,8 @@
19#include "config.h" 19#include "config.h"
20#include "audio.h" 20#include "audio.h"
21 21
22/** aiff_enc.codec **/
23
22/** mp3_enc.codec **/ 24/** mp3_enc.codec **/
23 25
24/* These are in descending order rather than in MPEG frequency index 26/* These are in descending order rather than in MPEG frequency index
diff --git a/firmware/export/enc_base.h b/firmware/export/enc_base.h
index 85101ac7fd..1be796ec8f 100644
--- a/firmware/export/enc_base.h
+++ b/firmware/export/enc_base.h
@@ -24,6 +24,14 @@
24 24
25/** encoder config structures **/ 25/** encoder config structures **/
26 26
27/** aiff_enc.codec **/
28struct aiff_enc_config
29{
30#if 0
31 unsigned long sample_depth;
32#endif
33};
34
27/** mp3_enc.codec **/ 35/** mp3_enc.codec **/
28#define MP3_BITR_CAP_8 (1 << 0) 36#define MP3_BITR_CAP_8 (1 << 0)
29#define MP3_BITR_CAP_16 (1 << 1) 37#define MP3_BITR_CAP_16 (1 << 1)
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index 3d24e2006e..b099aed716 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -78,6 +78,7 @@ enum rec_format_indexes
78 /* start formats */ 78 /* start formats */
79 79
80 REC_FORMAT_PCM_WAV, 80 REC_FORMAT_PCM_WAV,
81 REC_FORMAT_AIFF,
81 REC_FORMAT_WAVPACK, 82 REC_FORMAT_WAVPACK,
82 REC_FORMAT_MPA_L3, 83 REC_FORMAT_MPA_L3,
83 84
@@ -93,7 +94,7 @@ enum rec_format_indexes
93 REC_FORMAT_CFG_NUM_BITS = 2 94 REC_FORMAT_CFG_NUM_BITS = 2
94}; 95};
95 96
96#define REC_FORMAT_CFG_VAL_LIST "wave,wvpk,mpa3" 97#define REC_FORMAT_CFG_VAL_LIST "aiff,wave,wvpk,mpa3"
97 98
98/* get REC_FORMAT_* corresponding AFMT_* */ 99/* get REC_FORMAT_* corresponding AFMT_* */
99extern const int rec_format_afmt[REC_NUM_FORMATS]; 100extern const int rec_format_afmt[REC_NUM_FORMATS];
diff --git a/firmware/id3.c b/firmware/id3.c
index 90b5b3bdee..74cea7f037 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -64,7 +64,7 @@ const struct afmt_entry audio_formats[AFMT_NUM_CODECS] =
64#if CONFIG_CODEC == SWCODEC 64#if CONFIG_CODEC == SWCODEC
65 /* Audio Interchange File Format */ 65 /* Audio Interchange File Format */
66 [AFMT_AIFF] = 66 [AFMT_AIFF] =
67 AFMT_ENTRY("AIFF", "aiff", NULL, "aiff\0aif\0"), 67 AFMT_ENTRY("AIFF", "aiff", "aiff_enc", "aiff\0aif\0"),
68 /* Uncompressed PCM in a WAV file */ 68 /* Uncompressed PCM in a WAV file */
69 [AFMT_PCM_WAV] = 69 [AFMT_PCM_WAV] =
70 AFMT_ENTRY("WAV", "wav", "wav_enc", "wav\0" ), 70 AFMT_ENTRY("WAV", "wav", "wav_enc", "wav\0" ),
@@ -108,6 +108,7 @@ const int rec_format_afmt[REC_NUM_FORMATS] =
108 /* give AFMT_UNKNOWN by default */ 108 /* give AFMT_UNKNOWN by default */
109 [0 ... REC_NUM_FORMATS-1] = AFMT_UNKNOWN, 109 [0 ... REC_NUM_FORMATS-1] = AFMT_UNKNOWN,
110 /* add new entries below this line */ 110 /* add new entries below this line */
111 [REC_FORMAT_AIFF] = AFMT_AIFF,
111 [REC_FORMAT_MPA_L3] = AFMT_MPA_L3, 112 [REC_FORMAT_MPA_L3] = AFMT_MPA_L3,
112 [REC_FORMAT_WAVPACK] = AFMT_WAVPACK, 113 [REC_FORMAT_WAVPACK] = AFMT_WAVPACK,
113 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV, 114 [REC_FORMAT_PCM_WAV] = AFMT_PCM_WAV,
@@ -119,6 +120,7 @@ const int afmt_rec_format[AFMT_NUM_CODECS] =
119 /* give -1 by default */ 120 /* give -1 by default */
120 [0 ... AFMT_NUM_CODECS-1] = -1, 121 [0 ... AFMT_NUM_CODECS-1] = -1,
121 /* add new entries below this line */ 122 /* add new entries below this line */
123 [AFMT_AIFF] = REC_FORMAT_AIFF,
122 [AFMT_MPA_L3] = REC_FORMAT_MPA_L3, 124 [AFMT_MPA_L3] = REC_FORMAT_MPA_L3,
123 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK, 125 [AFMT_WAVPACK] = REC_FORMAT_WAVPACK,
124 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV, 126 [AFMT_PCM_WAV] = REC_FORMAT_PCM_WAV,