annotate Plugins/Input/mpg123/resample.c @ 1339:cf44bc209040 trunk

[svn] - improve resampling rate detection algorithm - remove debugging code
author nenolod
date Tue, 27 Jun 2006 20:32:51 -0700
parents 109698f652b9
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1335
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
1 /* libmpgdec: An advanced MPEG layer 1/2/3 decoder.
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
2 * resample.c: A dynamic resampler.
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
3 *
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
4 * Copyright (C) 2005-2006 William Pitcock <nenolod@nenolod.net>
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
5 * Portions copyright (C) 1995-1999 Michael Hipp
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
6 *
1335
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
7 * This program is free software; you can redistribute it and/or modify
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
8 * it under the terms of the GNU General Public License as published by
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
10 * (at your option) any later version.
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
11 *
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
12 * This program is distributed in the hope that it will be useful,
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
15 * GNU General Public License for more details.
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
16 *
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
17 * You should have received a copy of the GNU General Public License
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
18 * along with this program; if not, write to the Free Software
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
20 */
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
21
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
22 #include <stdlib.h>
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
23 #include <math.h>
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
24 #include <string.h>
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
25
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
26 #include "mpg123.h"
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
27
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
28 #define WRITE_SAMPLE(samples,sum,clip) \
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
29 if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
30 else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
31 else { *(samples) = sum; }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
32
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
33 #define NTOM_MUL (32768)
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
34 static unsigned long ntom_val[2] = { NTOM_MUL>>1,NTOM_MUL>>1 };
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
35 static unsigned long ntom_step = NTOM_MUL;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
36
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
37
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
38 void mpgdec_synth_ntom_set_step(long m,long n)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
39 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
40 if(n >= 96000 || m >= 96000 || m == 0 || n == 0) {
1335
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
41 fprintf(stderr,"resampler: illegal rates\n");
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
42 exit(1);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
43 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
44
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
45 n *= NTOM_MUL;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
46 ntom_step = n / m;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
47
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
48 if(ntom_step > 8*NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
49 fprintf(stderr,"max. 1:8 conversion allowed!\n");
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
50 exit(1);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
51 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
52
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
53 ntom_val[0] = ntom_val[1] = NTOM_MUL>>1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
54 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
55
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
56 int mpgdec_synth_ntom_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
57 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
58 short samples_tmp[8*64];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
59 short *tmp1 = samples_tmp + channel;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
60 int i,ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
61 int pnt1 = 0;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
62
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
63 ret = mpgdec_synth_ntom(bandPtr,channel,(unsigned char *) samples_tmp,&pnt1);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
64 samples += channel + *pnt;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
65
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
66 for(i=0;i<(pnt1>>2);i++) {
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
67 *samples = mpgdec_conv16to8[*tmp1>>AUSHIFT];
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
68 samples += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
69 tmp1 += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
70 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
71 *pnt += pnt1>>1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
72
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
73 return ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
74 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
75
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
76 int mpgdec_synth_ntom_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
77 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
78 short samples_tmp[8*64];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
79 short *tmp1 = samples_tmp;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
80 int i,ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
81 int pnt1 = 0;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
82
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
83 ret = mpgdec_synth_ntom(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
84 samples += *pnt;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
85
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
86 for(i=0;i<(pnt1>>2);i++) {
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
87 *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
88 tmp1 += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
89 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
90 *pnt += pnt1 >> 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
91
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
92 return ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
93 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
94
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
95 int mpgdec_synth_ntom_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
96 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
97 short samples_tmp[8*64];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
98 short *tmp1 = samples_tmp;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
99 int i,ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
100 int pnt1 = 0;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
101
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
102 ret = mpgdec_synth_ntom(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
103 samples += *pnt;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
104
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
105 for(i=0;i<(pnt1>>2);i++) {
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
106 *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
107 *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
108 tmp1 += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
109 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
110 *pnt += pnt1 >> 1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
111
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
112 return ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
113 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
114
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
115 int mpgdec_synth_ntom_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
116 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
117 short samples_tmp[8*64];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
118 short *tmp1 = samples_tmp;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
119 int i,ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
120 int pnt1 = 0;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
121
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
122 ret = mpgdec_synth_ntom(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
123 samples += *pnt;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
124
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
125 for(i=0;i<(pnt1>>2);i++) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
126 *( (short *)samples) = *tmp1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
127 samples += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
128 tmp1 += 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
129 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
130 *pnt += pnt1 >> 1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
131
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
132 return ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
133 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
134
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
135
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
136 int mpgdec_synth_ntom_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
137 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
138 int i,ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
139 int pnt1 = *pnt;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
140
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
141 ret = mpgdec_synth_ntom(bandPtr,0,samples,pnt);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
142 samples += pnt1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
143
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
144 for(i=0;i<((*pnt-pnt1)>>2);i++) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
145 ((short *)samples)[1] = ((short *)samples)[0];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
146 samples+=4;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
147 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
148
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
149 return ret;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
150 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
151
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
152
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
153 int mpgdec_synth_ntom(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
154 {
970
0f294f2b0a9b [svn] - integer-mode decoding accuracy improvements
nenolod
parents: 128
diff changeset
155 static mpgdec_real buffs[2][2][0x110];
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
156 static const int step = 2;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
157 static int bo = 1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
158 short *samples = (short *) (out + *pnt);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
159
970
0f294f2b0a9b [svn] - integer-mode decoding accuracy improvements
nenolod
parents: 128
diff changeset
160 mpgdec_real *b0,(*buf)[0x110];
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
161 int clip = 0;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
162 int bo1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
163 int ntom;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
164
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
165 if(!channel) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
166 bo--;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
167 bo &= 0xf;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
168 buf = buffs[0];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
169 ntom = ntom_val[1] = ntom_val[0];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
170 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
171 else {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
172 samples++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
173 out += 2; /* to compute the right *pnt value */
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
174 buf = buffs[1];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
175 ntom = ntom_val[1];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
176 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
177
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
178 if(bo & 0x1) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
179 b0 = buf[0];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
180 bo1 = bo;
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
181 mpgdec_dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
182 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
183 else {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
184 b0 = buf[1];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
185 bo1 = bo+1;
1098
b5ae09a6c2f1 [svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents: 970
diff changeset
186 mpgdec_dct64(buf[0]+bo,buf[1]+bo+1,bandPtr);
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
187 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
188
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
189
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
190 {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
191 register int j;
1335
109698f652b9 [svn] - dynamic resampler with interpolation, no special GUI options for it yet though (this replaces the mpg123 "way" of doing it)
nenolod
parents: 1098
diff changeset
192 mpgdec_real *window = mpgdec_decwin + 16 - bo1;
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
193
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
194 for (j=16;j;j--,window+=0x10)
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
195 {
970
0f294f2b0a9b [svn] - integer-mode decoding accuracy improvements
nenolod
parents: 128
diff changeset
196 mpgdec_real sum;
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
197
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
198 ntom += ntom_step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
199 if(ntom < NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
200 window += 16;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
201 b0 += 16;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
202 continue;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
203 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
204
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
205 sum = *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
206 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
207 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
208 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
209 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
210 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
211 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
212 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
213 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
214 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
215 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
216 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
217 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
218 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
219 sum += *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
220 sum -= *window++ * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
221
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
222 while(ntom >= NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
223 WRITE_SAMPLE(samples,sum,clip);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
224 samples += step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
225 ntom -= NTOM_MUL;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
226 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
227 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
228
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
229 ntom += ntom_step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
230 if(ntom >= NTOM_MUL)
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
231 {
970
0f294f2b0a9b [svn] - integer-mode decoding accuracy improvements
nenolod
parents: 128
diff changeset
232 mpgdec_real sum;
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
233 sum = window[0x0] * b0[0x0];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
234 sum += window[0x2] * b0[0x2];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
235 sum += window[0x4] * b0[0x4];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
236 sum += window[0x6] * b0[0x6];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
237 sum += window[0x8] * b0[0x8];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
238 sum += window[0xA] * b0[0xA];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
239 sum += window[0xC] * b0[0xC];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
240 sum += window[0xE] * b0[0xE];
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
241
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
242 while(ntom >= NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
243 WRITE_SAMPLE(samples,sum,clip);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
244 samples += step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
245 ntom -= NTOM_MUL;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
246 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
247 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
248
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
249 b0-=0x10,window-=0x20;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
250 window += bo1<<1;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
251
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
252 for (j=15;j;j--,b0-=0x20,window-=0x10)
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
253 {
970
0f294f2b0a9b [svn] - integer-mode decoding accuracy improvements
nenolod
parents: 128
diff changeset
254 mpgdec_real sum;
128
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
255
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
256 ntom += ntom_step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
257 if(ntom < NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
258 window -= 16;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
259 b0 += 16;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
260 continue;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
261 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
262
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
263 sum = -*(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
264 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
265 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
266 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
267 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
268 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
269 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
270 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
271 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
272 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
273 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
274 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
275 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
276 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
277 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
278 sum -= *(--window) * *b0++;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
279
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
280 while(ntom >= NTOM_MUL) {
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
281 WRITE_SAMPLE(samples,sum,clip);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
282 samples += step;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
283 ntom -= NTOM_MUL;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
284 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
285 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
286 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
287
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
288 ntom_val[channel] = ntom;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
289 *pnt = ((unsigned char *) samples - out);
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
290
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
291 return clip;
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
292 }
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
293
f6ceb8f4ad5c [svn] Optimized decoders, and custom resampler. We don't use these yet.
nenolod
parents:
diff changeset
294