summaryrefslogtreecommitdiff
path: root/apps/codecs/mpa.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-02-10 16:34:16 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-02-10 16:34:16 +0000
commit97f369a5876762a6f4181a8b44c85cb894ebc5f3 (patch)
treecb604ca0ee2fac52bf92635a1c136f1f97f64918 /apps/codecs/mpa.c
parentce3b774b212defb26f166d77251a11ce14cec73e (diff)
SWCODEC: Annoying neatness update. Use intptr_t for codec_configure_callback and dsp_configure and stop all the silly type casting of intergral types to pointers to set dsp configuration and watermarks. Shouldn't have any effect on already compiled codecs at all. Will fix any important patches in the tracker so they compile.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12259 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/mpa.c')
-rw-r--r--apps/codecs/mpa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index 4c99778071..7bc546b1aa 100644
--- a/apps/codecs/mpa.c
+++ b/apps/codecs/mpa.c
@@ -78,10 +78,10 @@ enum codec_status codec_main(void)
/* Create a decoder instance */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(MAD_F_FRACBITS));
- ci->configure(DSP_SET_CLIP_MIN, (int *)-MAD_F_ONE);
- ci->configure(DSP_SET_CLIP_MAX, (int *)(MAD_F_ONE - 1));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*16));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, MAD_F_FRACBITS);
+ ci->configure(DSP_SET_CLIP_MIN, -MAD_F_ONE);
+ ci->configure(DSP_SET_CLIP_MAX, MAD_F_ONE - 1);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
next_track:
status = CODEC_OK;
@@ -93,7 +93,7 @@ next_track:
while (!*ci->taginfo_ready && !ci->stop_codec)
ci->sleep(1);
- ci->configure(DSP_SWITCH_FREQUENCY, (int *)ci->id3->frequency);
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
current_frequency = ci->id3->frequency;
codec_set_replaygain(ci->id3);
@@ -212,16 +212,16 @@ next_track:
/* Check if sample rate and stereo settings changed in this frame. */
if (frame.header.samplerate != current_frequency) {
current_frequency = frame.header.samplerate;
- ci->configure(DSP_SWITCH_FREQUENCY, (int *)current_frequency);
+ ci->configure(DSP_SWITCH_FREQUENCY, current_frequency);
}
if (MAD_NCHANNELS(&frame.header) == 2) {
if (current_stereo_mode != STEREO_NONINTERLEAVED) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
current_stereo_mode = STEREO_NONINTERLEAVED;
}
} else {
if (current_stereo_mode != STEREO_MONO) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
current_stereo_mode = STEREO_MONO;
}
}