diff options
Diffstat (limited to 'apps/codecs/adx.c')
-rw-r--r-- | apps/codecs/adx.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c index 803600b23e..608d9f0a3f 100644 --- a/apps/codecs/adx.c +++ b/apps/codecs/adx.c | |||
@@ -21,8 +21,6 @@ | |||
21 | 21 | ||
22 | CODEC_HEADER | 22 | CODEC_HEADER |
23 | 23 | ||
24 | struct codec_api *rb; | ||
25 | |||
26 | /* Maximum number of bytes to process in one iteration */ | 24 | /* Maximum number of bytes to process in one iteration */ |
27 | #define WAV_CHUNK_SIZE (1024*2) | 25 | #define WAV_CHUNK_SIZE (1024*2) |
28 | 26 | ||
@@ -38,9 +36,8 @@ struct codec_api *rb; | |||
38 | static int16_t samples[WAV_CHUNK_SIZE] IBSS_ATTR; | 36 | static int16_t samples[WAV_CHUNK_SIZE] IBSS_ATTR; |
39 | 37 | ||
40 | /* this is the codec entry point */ | 38 | /* this is the codec entry point */ |
41 | enum codec_status codec_start(struct codec_api *api) | 39 | enum codec_status codec_main(void) |
42 | { | 40 | { |
43 | struct codec_api *ci; | ||
44 | int channels; | 41 | int channels; |
45 | int sampleswritten, i; | 42 | int sampleswritten, i; |
46 | uint8_t *buf; | 43 | uint8_t *buf; |
@@ -56,16 +53,13 @@ enum codec_status codec_start(struct codec_api *api) | |||
56 | off_t chanstart, bufoff; | 53 | off_t chanstart, bufoff; |
57 | 54 | ||
58 | /* Generic codec initialisation */ | 55 | /* Generic codec initialisation */ |
59 | rb = api; | ||
60 | ci = api; | ||
61 | |||
62 | /* we only render 16 bits */ | 56 | /* we only render 16 bits */ |
63 | ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)16); | 57 | ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)16); |
64 | /*ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));*/ | 58 | /*ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));*/ |
65 | 59 | ||
66 | next_track: | 60 | next_track: |
67 | DEBUGF("ADX: next_track\n"); | 61 | DEBUGF("ADX: next_track\n"); |
68 | if (codec_init(api)) { | 62 | if (codec_init()) { |
69 | return CODEC_ERROR; | 63 | return CODEC_ERROR; |
70 | } | 64 | } |
71 | DEBUGF("ADX: after init\n"); | 65 | DEBUGF("ADX: after init\n"); |