summaryrefslogtreecommitdiff
path: root/apps/codecs/wav_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wav_enc.c')
-rw-r--r--apps/codecs/wav_enc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c
index 974a903310..ff49238303 100644
--- a/apps/codecs/wav_enc.c
+++ b/apps/codecs/wav_enc.c
@@ -24,14 +24,6 @@
24 24
25CODEC_ENC_HEADER 25CODEC_ENC_HEADER
26 26
27#ifdef USE_IRAM
28extern char iramcopy[];
29extern char iramstart[];
30extern char iramend[];
31extern char iedata[];
32extern char iend[];
33#endif
34
35struct riff_header 27struct riff_header
36{ 28{
37 uint8_t riff_id[4]; /* 00h - "RIFF" */ 29 uint8_t riff_id[4]; /* 00h - "RIFF" */
@@ -65,7 +57,6 @@ struct riff_header
65#define PCM_SAMP_PER_CHUNK 2048 57#define PCM_SAMP_PER_CHUNK 2048
66#define PCM_CHUNK_SIZE (PCM_SAMP_PER_CHUNK*4) 58#define PCM_CHUNK_SIZE (PCM_SAMP_PER_CHUNK*4)
67 59
68static struct codec_api *ci;
69static int num_channels; 60static int num_channels;
70uint32_t sample_rate; 61uint32_t sample_rate;
71uint32_t enc_size; 62uint32_t enc_size;
@@ -321,17 +312,10 @@ static bool init_encoder(void)
321} /* init_encoder */ 312} /* init_encoder */
322 313
323/* main codec entry point */ 314/* main codec entry point */
324enum codec_status codec_start(struct codec_api* api) 315enum codec_status codec_main(void)
325{ 316{
326 bool cpu_boosted; 317 bool cpu_boosted;
327 318
328 ci = api; // copy to global api pointer
329
330#ifdef USE_IRAM
331 ci->memcpy(iramstart, iramcopy, iramend - iramstart);
332 ci->memset(iedata, 0, iend - iedata);
333#endif
334
335 if (!init_encoder()) 319 if (!init_encoder())
336 { 320 {
337 ci->enc_codec_loaded = -1; 321 ci->enc_codec_loaded = -1;