diff options
author | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-26 18:31:41 +0000 |
---|---|---|
committer | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-26 18:31:41 +0000 |
commit | 80da8b141c4672ca4380d66094976b6342ed5071 (patch) | |
tree | 631e9edd537ae9983524622a9e1ec82e24957280 /apps/codecs/wav_enc.c | |
parent | 8ef3c8a342d41c2aa5e5d8370fd4e89d4d8d937e (diff) | |
download | rockbox-80da8b141c4672ca4380d66094976b6342ed5071.tar.gz rockbox-80da8b141c4672ca4380d66094976b6342ed5071.zip |
FS#6357, patch 1: let iramcopy and bss share the same space in codecs and
plugins. Currently, in case of plugins using IRAM bss is cleared twice,
once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only
during codec initialization. Also, removed double variables in codecs
storing a pointer to codec_api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
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; |