summaryrefslogtreecommitdiff
path: root/apps/codecs/wavpack_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wavpack_enc.c')
-rw-r--r--apps/codecs/wavpack_enc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c
index 5318abc8fb..cee8c40615 100644
--- a/apps/codecs/wavpack_enc.c
+++ b/apps/codecs/wavpack_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
35/** Types **/ 27/** Types **/
36typedef struct 28typedef struct
37{ 29{
@@ -73,7 +65,6 @@ struct riff_header
73#define PCM_CHUNK_SIZE (4*PCM_SAMP_PER_CHUNK) 65#define PCM_CHUNK_SIZE (4*PCM_SAMP_PER_CHUNK)
74 66
75/** Data **/ 67/** Data **/
76static struct codec_api *ci;
77static int8_t input_buffer[PCM_CHUNK_SIZE*2] IBSS_ATTR; 68static int8_t input_buffer[PCM_CHUNK_SIZE*2] IBSS_ATTR;
78static WavpackConfig config IBSS_ATTR; 69static WavpackConfig config IBSS_ATTR;
79static WavpackContext *wpc; 70static WavpackContext *wpc;
@@ -381,17 +372,10 @@ static bool init_encoder(void)
381 return true; 372 return true;
382} /* init_encoder */ 373} /* init_encoder */
383 374
384enum codec_status codec_start(struct codec_api* api) 375enum codec_status codec_main(void)
385{ 376{
386 bool cpu_boosted; 377 bool cpu_boosted;
387 378
388 ci = api; /* copy to global api pointer */
389
390#ifdef USE_IRAM
391 ci->memcpy(iramstart, iramcopy, iramend - iramstart);
392 ci->memset(iedata, 0, iend - iedata);
393#endif
394
395 /* initialize params and config */ 379 /* initialize params and config */
396 if (!init_encoder()) 380 if (!init_encoder())
397 { 381 {