summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.h2
-rw-r--r--apps/codecs/a52.c8
-rw-r--r--apps/codecs/aac.c10
-rw-r--r--apps/codecs/adx.c12
-rw-r--r--apps/codecs/aiff.c12
-rw-r--r--apps/codecs/alac.c10
-rw-r--r--apps/codecs/flac.c10
-rw-r--r--apps/codecs/mpa.c16
-rw-r--r--apps/codecs/mpc.c16
-rw-r--r--apps/codecs/nsf.c6
-rw-r--r--apps/codecs/shorten.c10
-rw-r--r--apps/codecs/sid.c10
-rw-r--r--apps/codecs/speex.c12
-rw-r--r--apps/codecs/vorbis.c14
-rw-r--r--apps/codecs/wav.c12
-rw-r--r--apps/codecs/wavpack.c10
-rw-r--r--apps/dsp.c18
-rw-r--r--apps/dsp.h2
-rw-r--r--apps/playback.c10
19 files changed, 100 insertions, 100 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 993ef3fecb..5d3c7039ff 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -164,7 +164,7 @@ struct codec_api {
void (*set_offset)(size_t value);
/* Configure different codec buffer parameters. */
- void (*configure)(int setting, void *value);
+ void (*configure)(int setting, intptr_t value);
void (*splash)(int ticks, bool center, const unsigned char *fmt, ...);
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c
index 2c74a0f0ea..23f5067d47 100644
--- a/apps/codecs/a52.c
+++ b/apps/codecs/a52.c
@@ -122,9 +122,9 @@ enum codec_status codec_main(void)
int retval;
/* Generic codec initialisation */
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_NONINTERLEAVED);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)28);
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*128));
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*128);
next_track:
if (codec_init()) {
@@ -135,7 +135,7 @@ next_track:
while (!ci->taginfo_ready)
ci->yield();
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
/* Intialise the A52 decoder and check for success */
state = a52_init(0);
diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c
index 7656c416fe..7c64bc9a31 100644
--- a/apps/codecs/aac.c
+++ b/apps/codecs/aac.c
@@ -51,11 +51,11 @@ enum codec_status codec_main(void)
unsigned char c = 0;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*16));
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(29));
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 29);
next_track:
err = CODEC_OK;
@@ -71,7 +71,7 @@ next_track:
sound_samples_done = ci->id3->offset;
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
codec_set_replaygain(ci->id3);
stream_create(&input_stream,ci);
diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c
index 85e55a4c38..19d8110da6 100644
--- a/apps/codecs/adx.c
+++ b/apps/codecs/adx.c
@@ -54,8 +54,8 @@ enum codec_status codec_main(void)
/* Generic codec initialisation */
/* we only render 16 bits */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)16);
- /*ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));*/
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 16);
+ /*ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*256);*/
next_track:
DEBUGF("ADX: next_track\n");
@@ -73,7 +73,7 @@ next_track:
/* Read the entire file (or as much as possible) */
DEBUGF("ADX: request initial buffer\n");
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(ci->filesize));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, ci->filesize);
ci->seek_buffer(0);
buf = ci->request_buffer(&n, ci->filesize);
if (!buf || n < 0x38) {
@@ -155,11 +155,11 @@ next_track:
bufoff = chanstart;
/* setup pcm buffer format */
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
if (channels == 2) {
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_INTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED);
} else if (channels == 1) {
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
} else {
DEBUGF("ADX CODEC_ERROR: more than 2 channels\n");
return CODEC_ERROR;
diff --git a/apps/codecs/aiff.c b/apps/codecs/aiff.c
index 628f9948ea..2e92d9353f 100644
--- a/apps/codecs/aiff.c
+++ b/apps/codecs/aiff.c
@@ -63,9 +63,9 @@ enum codec_status codec_main(void)
off_t firstblockposn; /* position of the first block in file */
/* Generic codec initialisation */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)28);
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*256);
next_track:
if (codec_init()) {
@@ -165,12 +165,12 @@ next_track:
goto done;
}
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
if (num_channels == 2) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_INTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED);
} else if (num_channels == 1) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
} else {
DEBUGF("CODEC_ERROR: more than 2 channels unsupported\n");
i = CODEC_ERROR;
diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c
index cfa713a29a..ca62538a66 100644
--- a/apps/codecs/alac.c
+++ b/apps/codecs/alac.c
@@ -42,11 +42,11 @@ enum codec_status codec_main(void)
int retval;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*128);
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(ALAC_OUTPUT_DEPTH-1));
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, ALAC_OUTPUT_DEPTH-1);
next_track:
@@ -59,7 +59,7 @@ enum codec_status codec_main(void)
while (!*ci->taginfo_ready && !ci->stop_codec)
ci->sleep(1);
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
codec_set_replaygain(ci->id3);
stream_create(&input_stream,ci);
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c
index 738e4bb391..00e0a1f242 100644
--- a/apps/codecs/flac.c
+++ b/apps/codecs/flac.c
@@ -425,10 +425,10 @@ enum codec_status codec_main(void)
int retval;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*128);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(FLAC_OUTPUT_DEPTH-1));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, FLAC_OUTPUT_DEPTH-1);
next_track:
@@ -450,9 +450,9 @@ enum codec_status codec_main(void)
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);
ci->configure(DSP_SET_STEREO_MODE, fc.channels == 1 ?
- (int *)STEREO_MONO : (int *)STEREO_NONINTERLEAVED);
+ STEREO_MONO : STEREO_NONINTERLEAVED);
codec_set_replaygain(ci->id3);
if (samplesdone) {
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;
}
}
diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c
index 8aba8e50c2..fe22c8cccb 100644
--- a/apps/codecs/mpc.c
+++ b/apps/codecs/mpc.c
@@ -77,9 +77,9 @@ enum codec_status codec_main(void)
mpc_streaminfo info;
int retval = CODEC_OK;
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)(28));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*16));
- ci->configure(CODEC_SET_FILEBUF_PRESEEK, (long *)(0));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
+ ci->configure(CODEC_SET_FILEBUF_PRESEEK, 0);
/* Create a decoder instance */
reader.read = read_impl;
@@ -107,15 +107,15 @@ next_track:
goto done;
}
frequency = info.sample_freq / 1000;
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(long)info.sample_freq);
+ ci->configure(DSP_SWITCH_FREQUENCY, info.sample_freq);
/* set playback engine up for correct number of channels */
/* NOTE: current musepack format only allows for stereo files
but code is here to handle other configurations anyway */
if (info.channels == 2)
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
else if (info.channels == 1)
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
else {
retval = CODEC_ERROR;
goto done;
@@ -136,7 +136,7 @@ next_track:
/* Complete seek handler. */
if (ci->seek_time) {
/* hack to improve seek time if filebuf goes empty */
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*512));
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*512);
mpc_int64_t new_offset = (ci->seek_time - 1)*frequency;
if (mpc_decoder_seek_sample(&decoder, new_offset)) {
samplesdone = new_offset;
@@ -144,7 +144,7 @@ next_track:
}
ci->seek_complete();
/* reset chunksize */
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*16));
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
}
#else
diff --git a/apps/codecs/nsf.c b/apps/codecs/nsf.c
index bdea847673..0ca1275d5e 100644
--- a/apps/codecs/nsf.c
+++ b/apps/codecs/nsf.c
@@ -4321,10 +4321,10 @@ enum codec_status codec_main(void)
int usingplaylist;
/* we only render 16 bits */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)16);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 16);
- ci->configure(DSP_SET_FREQUENCY, (long*)44100);
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_MONO);
+ ci->configure(DSP_SET_FREQUENCY, 44100);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
RebuildOutputTables();
diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c
index 3c099bc031..dbfc272c5a 100644
--- a/apps/codecs/shorten.c
+++ b/apps/codecs/shorten.c
@@ -45,11 +45,11 @@ enum codec_status codec_main(void)
size_t bytesleft;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*128);
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_NONINTERLEAVED);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(SHN_OUTPUT_DEPTH-1));
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, SHN_OUTPUT_DEPTH-1);
next_track:
/* Codec initialization */
@@ -79,7 +79,7 @@ next_track:
}
ci->id3->frequency = sc.sample_rate;
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(long)(sc.sample_rate));
+ ci->configure(DSP_SWITCH_FREQUENCY, sc.sample_rate);
if (sc.sample_rate) {
ci->id3->length = (sc.totalsamples / sc.sample_rate) * 1000;
diff --git a/apps/codecs/sid.c b/apps/codecs/sid.c
index 59683e9b6a..7c53e8f189 100644
--- a/apps/codecs/sid.c
+++ b/apps/codecs/sid.c
@@ -1216,8 +1216,8 @@ enum codec_status codec_main(void)
int nSamplesToRender = 0;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*256);
next_track:
if (codec_init()) {
@@ -1246,11 +1246,11 @@ next_track:
/* Make use of 44.1khz */
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)44100);
+ ci->configure(DSP_SWITCH_FREQUENCY, 44100);
/* Sample depth is 28 bit host endian */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)28);
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
/* Mono output */
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
/* Set the elapsed time to the current subsong (in seconds) */
diff --git a/apps/codecs/speex.c b/apps/codecs/speex.c
index 12d880c045..a9b333b9a6 100644
--- a/apps/codecs/speex.c
+++ b/apps/codecs/speex.c
@@ -369,9 +369,9 @@ static void *process_header(spx_ogg_packet *op,
*nframes = header->frames_per_packet;
if (*channels == 2) {
- rb->configure(DSP_SET_STEREO_MODE, (int *)STEREO_INTERLEAVED);
+ rb->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED);
} else if (*channels == 1) {
- rb->configure(DSP_SET_STEREO_MODE, (int *)STEREO_MONO);
+ rb->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
}
*extra_headers = header->extra_headers;
@@ -409,9 +409,9 @@ enum codec_status codec_main(void)
int j;
rb = ci;
- //rb->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(CHUNKSIZE*128));
- //rb->configure(DSP_DITHER, (bool *)false);
- rb->configure(DSP_SET_SAMPLE_DEPTH, (long *)16);
+ //rb->configure(CODEC_SET_FILEBUF_CHUNKSIZE, CHUNKSIZE*128);
+ //rb->configure(DSP_DITHER, false);
+ rb->configure(DSP_SET_SAMPLE_DEPTH, 16);
/* We need to flush reserver memory every track load. */
next_track:
@@ -501,7 +501,7 @@ next_page:
rb->id3->vbr = true;
rb->id3->frequency = samplerate;
- rb->configure(DSP_SET_FREQUENCY, (int *)(rb->id3->frequency));
+ rb->configure(DSP_SET_FREQUENCY, rb->id3->frequency);
/* Speex header in its own page, add the whole page
headersize */
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c
index 8ab4a95faa..5f08fb5eeb 100644
--- a/apps/codecs/vorbis.c
+++ b/apps/codecs/vorbis.c
@@ -83,13 +83,13 @@ bool vorbis_set_codec_parameters(OggVorbis_File *vf)
return false;
}
- ci->configure(DSP_SWITCH_FREQUENCY, (int *)ci->id3->frequency);
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
codec_set_replaygain(ci->id3);
if (vi->channels == 2) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_NONINTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
} else if (vi->channels == 1) {
- ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
}
return true;
@@ -112,9 +112,9 @@ enum codec_status codec_main(void)
ogg_uint32_t vf_serialnos;
ogg_int64_t vf_pcmlengths[2];
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)24);
- ci->configure(DSP_SET_CLIP_MAX, (long *)((1 << 24) - 1));
- ci->configure(DSP_SET_CLIP_MIN, (long *)-((1 << 24) - 1));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 24);
+ ci->configure(DSP_SET_CLIP_MAX, (1 << 24) - 1);
+ ci->configure(DSP_SET_CLIP_MIN, -((1 << 24) - 1));
/* Note: These are sane defaults for these values. Perhaps
* they should be set differently based on quality setting
*/
@@ -122,7 +122,7 @@ enum codec_status codec_main(void)
/* The chunk size below is magic. If set any lower, resume
* doesn't work properly (ov_raw_seek() does the wrong thing).
*/
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*256));
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*256);
/* We need to flush reserver memory every track load. */
next_track:
diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c
index ec268a3a2b..b4eaaefb64 100644
--- a/apps/codecs/wav.c
+++ b/apps/codecs/wav.c
@@ -225,9 +225,9 @@ enum codec_status codec_main(void)
/* Generic codec initialisation */
- ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)28);
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*256));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*256);
next_track:
if (codec_init()) {
@@ -379,11 +379,11 @@ next_track:
goto done;
}
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
if (channels == 2) {
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_INTERLEAVED);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED);
} else if (channels == 1) {
- ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
} else {
DEBUGF("CODEC_ERROR: more than 2 channels\n");
i = CODEC_ERROR;
diff --git a/apps/codecs/wavpack.c b/apps/codecs/wavpack.c
index 34616d75e9..680673fec7 100644
--- a/apps/codecs/wavpack.c
+++ b/apps/codecs/wavpack.c
@@ -42,10 +42,10 @@ enum codec_status codec_main(void)
int retval;
/* Generic codec initialisation */
- ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512));
- ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128));
+ ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
+ ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*128);
- ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(28));
+ ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
next_track:
@@ -57,7 +57,7 @@ enum codec_status codec_main(void)
while (!*ci->taginfo_ready && !ci->stop_codec)
ci->sleep(1);
- ci->configure(DSP_SWITCH_FREQUENCY, (long *)(ci->id3->frequency));
+ ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency);
codec_set_replaygain(ci->id3);
/* Create a decoder instance */
@@ -70,7 +70,7 @@ enum codec_status codec_main(void)
bps = WavpackGetBytesPerSample (wpc);
nchans = WavpackGetReducedChannels (wpc);
- ci->configure(DSP_SET_STEREO_MODE, nchans == 2 ? (int *)STEREO_INTERLEAVED : (int *)STEREO_MONO);
+ ci->configure(DSP_SET_STEREO_MODE, nchans == 2 ? STEREO_INTERLEAVED : STEREO_MONO);
sr_100 = ci->id3->frequency / 100;
ci->set_elapsed (0);
diff --git a/apps/dsp.c b/apps/dsp.c
index f7eb48ed03..533342ecf1 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -128,7 +128,7 @@ void sound_set_pitch(int permille)
{
pitch_ratio = permille;
- dsp_configure(DSP_SWITCH_FREQUENCY, (int *)dsp->codec_frequency);
+ dsp_configure(DSP_SWITCH_FREQUENCY, dsp->codec_frequency);
}
/* Convert at most count samples to the internal format, if needed. Returns
@@ -844,7 +844,7 @@ int dsp_stereo_mode(void)
return dsp->stereo_mode;
}
-bool dsp_configure(int setting, void *value)
+bool dsp_configure(int setting, intptr_t value)
{
dsp = &dsp_conf[current_codec];
@@ -855,7 +855,7 @@ bool dsp_configure(int setting, void *value)
sizeof(struct resample_data));
/* Fall through!!! */
case DSP_SWITCH_FREQUENCY:
- dsp->codec_frequency = ((long) value == 0) ? NATIVE_FREQUENCY : (long) value;
+ dsp->codec_frequency = (value == 0) ? NATIVE_FREQUENCY : value;
/* Account for playback speed adjustment when setting dsp->frequency
if we're called from the main audio thread. Voice UI thread should
not need this feature.
@@ -868,15 +868,15 @@ bool dsp_configure(int setting, void *value)
break;
case DSP_SET_CLIP_MIN:
- dsp->clip_min = (long) value;
+ dsp->clip_min = value;
break;
case DSP_SET_CLIP_MAX:
- dsp->clip_max = (long) value;
+ dsp->clip_max = value;
break;
case DSP_SET_SAMPLE_DEPTH:
- dsp->sample_depth = (long) value;
+ dsp->sample_depth = value;
if (dsp->sample_depth <= NATIVE_DEPTH)
{
@@ -887,10 +887,10 @@ bool dsp_configure(int setting, void *value)
}
else
{
- dsp->frac_bits = (long) value;
+ dsp->frac_bits = value;
dsp->sample_bytes = 4; /* samples are 32 bits */
- dsp->clip_max = (1 << (long)value) - 1;
- dsp->clip_min = -(1 << (long)value);
+ dsp->clip_max = (1 << value) - 1;
+ dsp->clip_min = -(1 << value);
}
dither_init();
diff --git a/apps/dsp.h b/apps/dsp.h
index 5217224797..2f676d22bc 100644
--- a/apps/dsp.h
+++ b/apps/dsp.h
@@ -210,7 +210,7 @@ int dsp_process(char *dest, const char *src[], int count);
int dsp_input_count(int count);
int dsp_output_count(int count);
int dsp_stereo_mode(void);
-bool dsp_configure(int setting, void *value);
+bool dsp_configure(int setting, intptr_t value);
void dsp_set_replaygain(bool always);
void dsp_set_crossfeed(bool enable);
void dsp_set_crossfeed_direct_gain(int gain);
diff --git a/apps/playback.c b/apps/playback.c
index f4287310b7..d256f5a4f0 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1663,7 +1663,7 @@ static void codec_seek_complete_callback(void)
{
/* If this is not a seamless seek, clear the buffer */
pcmbuf_play_stop();
- dsp_configure(DSP_FLUSH, NULL);
+ dsp_configure(DSP_FLUSH, 0);
/* If playback was not 'deliberately' paused, unpause now */
if (!paused)
@@ -1729,20 +1729,20 @@ static bool codec_seek_buffer_callback(size_t newpos)
return true;
}
-static void codec_configure_callback(int setting, void *value)
+static void codec_configure_callback(int setting, intptr_t value)
{
switch (setting) {
case CODEC_SET_FILEBUF_WATERMARK:
- conf_watermark = (unsigned long)value;
+ conf_watermark = value;
set_filebuf_watermark(buffer_margin);
break;
case CODEC_SET_FILEBUF_CHUNKSIZE:
- conf_filechunk = (unsigned long)value;
+ conf_filechunk = value;
break;
case CODEC_SET_FILEBUF_PRESEEK:
- conf_preseek = (unsigned long)value;
+ conf_preseek = value;
break;
default: