diff options
Diffstat (limited to 'apps/codecs/wav_enc.c')
-rw-r--r-- | apps/codecs/wav_enc.c | 18 |
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 | ||
25 | CODEC_ENC_HEADER | 25 | CODEC_ENC_HEADER |
26 | 26 | ||
27 | #ifdef USE_IRAM | ||
28 | extern char iramcopy[]; | ||
29 | extern char iramstart[]; | ||
30 | extern char iramend[]; | ||
31 | extern char iedata[]; | ||
32 | extern char iend[]; | ||
33 | #endif | ||
34 | |||
35 | struct riff_header | 27 | struct 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 | ||
68 | static struct codec_api *ci; | ||
69 | static int num_channels; | 60 | static int num_channels; |
70 | uint32_t sample_rate; | 61 | uint32_t sample_rate; |
71 | uint32_t enc_size; | 62 | uint32_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 */ |
324 | enum codec_status codec_start(struct codec_api* api) | 315 | enum 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; |