summaryrefslogtreecommitdiff
path: root/apps/codecs/mpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/mpc.c')
-rw-r--r--apps/codecs/mpc.c16
1 files changed, 8 insertions, 8 deletions
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)
77 mpc_streaminfo info; 77 mpc_streaminfo info;
78 int retval = CODEC_OK; 78 int retval = CODEC_OK;
79 79
80 ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)(28)); 80 ci->configure(DSP_SET_SAMPLE_DEPTH, 28);
81 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*16)); 81 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
82 ci->configure(CODEC_SET_FILEBUF_PRESEEK, (long *)(0)); 82 ci->configure(CODEC_SET_FILEBUF_PRESEEK, 0);
83 83
84 /* Create a decoder instance */ 84 /* Create a decoder instance */
85 reader.read = read_impl; 85 reader.read = read_impl;
@@ -107,15 +107,15 @@ next_track:
107 goto done; 107 goto done;
108 } 108 }
109 frequency = info.sample_freq / 1000; 109 frequency = info.sample_freq / 1000;
110 ci->configure(DSP_SWITCH_FREQUENCY, (long *)(long)info.sample_freq); 110 ci->configure(DSP_SWITCH_FREQUENCY, info.sample_freq);
111 111
112 /* set playback engine up for correct number of channels */ 112 /* set playback engine up for correct number of channels */
113 /* NOTE: current musepack format only allows for stereo files 113 /* NOTE: current musepack format only allows for stereo files
114 but code is here to handle other configurations anyway */ 114 but code is here to handle other configurations anyway */
115 if (info.channels == 2) 115 if (info.channels == 2)
116 ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_NONINTERLEAVED); 116 ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
117 else if (info.channels == 1) 117 else if (info.channels == 1)
118 ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_MONO); 118 ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO);
119 else { 119 else {
120 retval = CODEC_ERROR; 120 retval = CODEC_ERROR;
121 goto done; 121 goto done;
@@ -136,7 +136,7 @@ next_track:
136 /* Complete seek handler. */ 136 /* Complete seek handler. */
137 if (ci->seek_time) { 137 if (ci->seek_time) {
138 /* hack to improve seek time if filebuf goes empty */ 138 /* hack to improve seek time if filebuf goes empty */
139 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*512)); 139 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*512);
140 mpc_int64_t new_offset = (ci->seek_time - 1)*frequency; 140 mpc_int64_t new_offset = (ci->seek_time - 1)*frequency;
141 if (mpc_decoder_seek_sample(&decoder, new_offset)) { 141 if (mpc_decoder_seek_sample(&decoder, new_offset)) {
142 samplesdone = new_offset; 142 samplesdone = new_offset;
@@ -144,7 +144,7 @@ next_track:
144 } 144 }
145 ci->seek_complete(); 145 ci->seek_complete();
146 /* reset chunksize */ 146 /* reset chunksize */
147 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*16)); 147 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, 1024*16);
148 148
149 } 149 }
150 #else 150 #else