summaryrefslogtreecommitdiff
path: root/uisimulator/common/mpegplay.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2002-05-15 21:59:37 +0000
committerDave Chapman <dave@dchapman.com>2002-05-15 21:59:37 +0000
commiteae6296b5673705bf49c119b6fa4b456a6909a3b (patch)
tree22a2393d9d07f13e1a84e3504ef8b9dedcfdcd85 /uisimulator/common/mpegplay.c
parent379a39b4403c243ec3de9d0412ed123321fc5124 (diff)
downloadrockbox-eae6296b5673705bf49c119b6fa4b456a6909a3b.tar.gz
rockbox-eae6296b5673705bf49c119b6fa4b456a6909a3b.zip
removed unused function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@583 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common/mpegplay.c')
-rw-r--r--uisimulator/common/mpegplay.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/uisimulator/common/mpegplay.c b/uisimulator/common/mpegplay.c
index 76e9655be6..09799ad176 100644
--- a/uisimulator/common/mpegplay.c
+++ b/uisimulator/common/mpegplay.c
@@ -117,54 +117,6 @@ signed int dither(mad_fixed_t sample, struct dither *dither)
117 return output >> scalebits; 117 return output >> scalebits;
118} 118}
119 119
120/*
121 * NAME: pack_pcm()
122 * DESCRIPTION: scale and dither MAD output
123 */
124static
125void pack_pcm(unsigned char **pcm, unsigned int nsamples,
126 mad_fixed_t const *ch1, mad_fixed_t const *ch2)
127{
128 register signed int s0, s1;
129 static struct dither d0, d1;
130
131 if (ch2) { /* stereo */
132 while (nsamples--) {
133 s0 = scale(*ch1++, &d0);
134 s1 = scale(*ch2++, &d1);
135# if SAMPLE_DEPTH == 16
136 (*pcm)[0 + 0] = s0 >> 0;
137 (*pcm)[0 + 1] = s0 >> 8;
138 (*pcm)[2 + 0] = s1 >> 0;
139 (*pcm)[2 + 1] = s1 >> 8;
140
141 *pcm += 2 * 2;
142# elif SAMPLE_DEPTH == 8
143 (*pcm)[0] = s0 ^ 0x80;
144 (*pcm)[1] = s1 ^ 0x80;
145
146 *pcm += 2;
147# else
148# error "bad SAMPLE_DEPTH"
149# endif
150 }
151 }
152 else { /* mono */
153 while (nsamples--) {
154 s0 = scale(*ch1++, &d0);
155
156# if SAMPLE_DEPTH == 16
157 (*pcm)[0] = s0 >> 0;
158 (*pcm)[1] = s0 >> 8;
159
160 *pcm += 2;
161# elif SAMPLE_DEPTH == 8
162 *(*pcm)++ = s0 ^ 0x80;
163# endif
164 }
165 }
166}
167
168#define INPUT_BUFFER_SIZE (5*8192) 120#define INPUT_BUFFER_SIZE (5*8192)
169#define OUTPUT_BUFFER_SIZE 8192 /* Must be an integer multiple of 4. */ 121#define OUTPUT_BUFFER_SIZE 8192 /* Must be an integer multiple of 4. */
170int mpeg_play(char* fname) 122int mpeg_play(char* fname)