aboutsummaryrefslogtreecommitdiff
path: root/src/ui/inlines.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-01-20 23:03:05 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-01-20 23:03:05 +0000
commitdbcf03bb3946253d0156834cc8e49c0575c8fcc5 (patch)
tree2ccda5534f1c982842d468e846043888d7c15264 /src/ui/inlines.h
parentc05c3679e4fad5034a53ce2b7cfde8ad932faa59 (diff)
downloadqmmp-dbcf03bb3946253d0156834cc8e49c0575c8fcc5.tar.gz
qmmp-dbcf03bb3946253d0156834cc8e49c0575c8fcc5.tar.bz2
qmmp-dbcf03bb3946253d0156834cc8e49c0575c8fcc5.zip
fixed visualization
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1519 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/inlines.h')
-rw-r--r--src/ui/inlines.h85
1 files changed, 16 insertions, 69 deletions
diff --git a/src/ui/inlines.h b/src/ui/inlines.h
index d8dbc966d..e2c48d019 100644
--- a/src/ui/inlines.h
+++ b/src/ui/inlines.h
@@ -47,49 +47,27 @@ calc_mono_freq(short dest[2][256], short src[2][512], int nch)
}
}
-static inline void stereo16_from_stereopcm8(register short *l,
- register short *r,
- register uchar *c,
- long cnt)
+static inline void stereo16_from_multichannel(register short *l,
+ register short *r,
+ register short *s,
+ long cnt, int chan)
{
- while (cnt >= 4l)
+ while (cnt > 0)
{
- l[0] = c[0];
- r[0] = c[1];
- l[1] = c[2];
- r[1] = c[3];
- l[2] = c[4];
- r[2] = c[5];
- l[3] = c[6];
- r[3] = c[7];
- l += 4;
- r += 4;
- c += 8;
- cnt -= 4l;
- }
-
- if (cnt > 0l)
- {
- l[0] = c[0];
- r[0] = c[1];
- if (cnt > 1l)
- {
- l[1] = c[2];
- r[1] = c[3];
- if (cnt > 2l)
- {
- l[2] = c[4];
- r[2] = c[5];
- }
- }
+ l[0] = s[0];
+ r[0] = s[1];
+ s += chan;
+ l++;
+ r++;
+ cnt--;
}
}
static inline void stereo16_from_stereopcm16(register short *l,
- register short *r,
- register short *s,
- long cnt)
+ register short *r,
+ register short *s,
+ long cnt)
{
while (cnt >= 4l)
{
@@ -124,40 +102,9 @@ static inline void stereo16_from_stereopcm16(register short *l,
}
}
-
-static inline void mono16_from_monopcm8(register short *l,
- register uchar *c,
- long cnt)
-{
- while (cnt >= 4l)
- {
- l[0] = c[0];
- l[1] = c[1];
- l[2] = c[2];
- l[3] = c[3];
- l += 4;
- c += 4;
- cnt -= 4l;
- }
-
- if (cnt > 0l)
- {
- l[0] = c[0];
- if (cnt > 1l)
- {
- l[1] = c[1];
- if (cnt > 2l)
- {
- l[2] = c[2];
- }
- }
- }
-}
-
-
static inline void mono16_from_monopcm16(register short *l,
- register short *s,
- long cnt)
+ register short *s,
+ long cnt)
{
while (cnt >= 4l)
{