diff options
Diffstat (limited to 'apps/codecs/flac.c')
-rw-r--r-- | apps/codecs/flac.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index 4f5f0b1eaa..b3cba32c82 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c | |||
@@ -22,17 +22,6 @@ | |||
22 | 22 | ||
23 | CODEC_HEADER | 23 | CODEC_HEADER |
24 | 24 | ||
25 | #ifdef USE_IRAM | ||
26 | extern char iramcopy[]; | ||
27 | extern char iramstart[]; | ||
28 | extern char iramend[]; | ||
29 | extern char iedata[]; | ||
30 | extern char iend[]; | ||
31 | #endif | ||
32 | |||
33 | struct codec_api* rb; | ||
34 | struct codec_api* ci; | ||
35 | |||
36 | /* The output buffers containing the decoded samples (channels 0 and 1) */ | 25 | /* The output buffers containing the decoded samples (channels 0 and 1) */ |
37 | int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR_FLAC_DECODED0; | 26 | int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR_FLAC_DECODED0; |
38 | int32_t decoded1[MAX_BLOCKSIZE] IBSS_ATTR; | 27 | int32_t decoded1[MAX_BLOCKSIZE] IBSS_ATTR; |
@@ -423,7 +412,7 @@ bool flac_seek_offset(FLACContext* fc, uint32_t offset) { | |||
423 | } | 412 | } |
424 | 413 | ||
425 | /* this is the codec entry point */ | 414 | /* this is the codec entry point */ |
426 | enum codec_status codec_start(struct codec_api* api) | 415 | enum codec_status codec_main(void) |
427 | { | 416 | { |
428 | int8_t *buf; | 417 | int8_t *buf; |
429 | FLACContext fc; | 418 | FLACContext fc; |
@@ -436,14 +425,6 @@ enum codec_status codec_start(struct codec_api* api) | |||
436 | int retval; | 425 | int retval; |
437 | 426 | ||
438 | /* Generic codec initialisation */ | 427 | /* Generic codec initialisation */ |
439 | rb = api; | ||
440 | ci = api; | ||
441 | |||
442 | #ifdef USE_IRAM | ||
443 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | ||
444 | ci->memset(iedata, 0, iend - iedata); | ||
445 | #endif | ||
446 | |||
447 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); | 428 | ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |
448 | ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128)); | 429 | ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128)); |
449 | 430 | ||
@@ -455,7 +436,7 @@ enum codec_status codec_start(struct codec_api* api) | |||
455 | /* Need to save offset for later use (cleared indirectly by flac_init) */ | 436 | /* Need to save offset for later use (cleared indirectly by flac_init) */ |
456 | samplesdone=ci->id3->offset; | 437 | samplesdone=ci->id3->offset; |
457 | 438 | ||
458 | if (codec_init(api)) { | 439 | if (codec_init()) { |
459 | LOGF("FLAC: Error initialising codec\n"); | 440 | LOGF("FLAC: Error initialising codec\n"); |
460 | retval = CODEC_ERROR; | 441 | retval = CODEC_ERROR; |
461 | goto exit; | 442 | goto exit; |