summaryrefslogtreecommitdiff
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index cb727ce01e..12a24a7c9b 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -53,14 +53,6 @@ CODEC_ENC_HEADER
53#define putlong(c, s) if(s+sz <= 32) { cc = (cc << s) | c; sz+= s; } \ 53#define putlong(c, s) if(s+sz <= 32) { cc = (cc << s) | c; sz+= s; } \
54 else { putbits(cc, sz); cc = c; sz = s; } 54 else { putbits(cc, sz); cc = c; sz = s; }
55 55
56#ifdef USE_IRAM
57extern char iramcopy[];
58extern char iramstart[];
59extern char iramend[];
60extern char iedata[];
61extern char iend[];
62#endif
63
64typedef struct { 56typedef struct {
65 int type; /* 0=(MPEG2 - 22.05,24,16kHz) 1=(MPEG1 - 44.1,48,32kHz) */ 57 int type; /* 0=(MPEG2 - 22.05,24,16kHz) 1=(MPEG1 - 44.1,48,32kHz) */
66 int mode; /* 0=stereo, 1=jstereo, 2=dual, 3=mono */ 58 int mode; /* 0=stereo, 1=jstereo, 2=dual, 3=mono */
@@ -181,7 +173,6 @@ static unsigned pcm_chunk_size IBSS_ATTR;
181static unsigned samp_per_frame IBSS_ATTR; 173static unsigned samp_per_frame IBSS_ATTR;
182 174
183static config_t cfg IBSS_ATTR; 175static config_t cfg IBSS_ATTR;
184static struct codec_api *ci;
185static char *res_buffer; 176static char *res_buffer;
186 177
187static const uint8_t ht_count_const[2][2][16] = 178static const uint8_t ht_count_const[2][2][16] =
@@ -2460,18 +2451,11 @@ static bool enc_init(void)
2460 return true; 2451 return true;
2461} /* enc_init */ 2452} /* enc_init */
2462 2453
2463enum codec_status codec_start(struct codec_api* api) 2454enum codec_status codec_main(void)
2464{ 2455{
2465 bool cpu_boosted; 2456 bool cpu_boosted;
2466 2457
2467 /* Generic codec initialisation */ 2458 /* Generic codec initialisation */
2468 ci = api;
2469
2470#ifdef USE_IRAM
2471 memcpy(iramstart, iramcopy, iramend - iramstart);
2472 memset(iedata, 0, iend - iedata);
2473#endif
2474
2475 if (!enc_init()) 2459 if (!enc_init())
2476 { 2460 {
2477 ci->enc_codec_loaded = -1; 2461 ci->enc_codec_loaded = -1;