summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad/synth.h
authorharlekin <harlekin>2002-04-19 16:08:55 (UTC)
committer harlekin <harlekin>2002-04-19 16:08:55 (UTC)
commit7ea4abeb652e6787e57a938e1ca028d25fd249ce (patch) (side-by-side diff)
treeee08f2d9d6aaa8adb1c5f07f4124da8a61eb8cd5 /core/multimedia/opieplayer/libmad/synth.h
parentcaa7ced77b9014526607f9f65c58aabe7e0ba631 (diff)
downloadopie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.zip
opie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.tar.gz
opie-7ea4abeb652e6787e57a938e1ca028d25fd249ce.tar.bz2
new libmad version, less cpu usage
Diffstat (limited to 'core/multimedia/opieplayer/libmad/synth.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/synth.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/core/multimedia/opieplayer/libmad/synth.h b/core/multimedia/opieplayer/libmad/synth.h
index 64f6a86..2c9d5c8 100644
--- a/core/multimedia/opieplayer/libmad/synth.h
+++ b/core/multimedia/opieplayer/libmad/synth.h
@@ -1,6 +1,6 @@
/*
- * mad - MPEG audio decoder
+ * libmad - MPEG audio decoder library
* Copyright (C) 2000-2001 Robert Leslie
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,20 +24,39 @@
# include "fixed.h"
# include "frame.h"
+struct mad_pcm {
+ unsigned int samplerate; /* sampling frequency (Hz) */
+ unsigned short channels; /* number of channels */
+ unsigned short length; /* number of samples per channel */
+ mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */
+};
+
struct mad_synth {
mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */
/* [ch][eo][peo][s][v] */
unsigned int phase; /* current processing phase */
- struct mad_pcm {
- unsigned int samplerate; /* sampling frequency (Hz) */
- unsigned short channels; /* number of channels */
- unsigned short length; /* number of samples per channel */
- mad_fixed_t samples[2][1152]; /* PCM output samples */
- } pcm;
+ struct mad_pcm pcm; /* PCM output */
+};
+
+/* single channel PCM selector */
+enum {
+ MAD_PCM_CHANNEL_SINGLE = 0
+};
+
+/* dual channel PCM selector */
+enum {
+ MAD_PCM_CHANNEL_DUAL_1 = 0,
+ MAD_PCM_CHANNEL_DUAL_2 = 1
+};
+
+/* stereo PCM selector */
+enum {
+ MAD_PCM_CHANNEL_STEREO_LEFT = 0,
+ MAD_PCM_CHANNEL_STEREO_RIGHT = 1
};
void mad_synth_init(struct mad_synth *);