Decoder
class encapsulates the details of decoding an MPEG
- * audio frame.
- *
- * @author MDM
- * @version 0.0.7 12/12/99
- * @since 0.0.5
- */
-@LATTICE("OUTDecoder
instance with default parameters.
- *
- * @param params
- * The Params
instance that describes the customizable
- * aspects of the decoder.
- */
- public Decoder(@DELEGATE Params params0) {
-
- if (params0 == null) {
- params0 = getDefaultParams();
- }
-
- params = params0;
-
- Equalizer eq = params.getInitialEqualizerSettings();
- if (eq != null) {
- equalizer.setFrom(eq);
- }
- }
-
- static public Params getDefaultParams() {
- return (Params) DEFAULT_PARAMS.clone();
- }
-
- // public void setEqualizer(Equalizer eq) {
- // if (eq == null)
- // eq = Equalizer.PASS_THRU_EQ;
- //
- // equalizer.setFrom(eq);
- //
- // float[] factors = equalizer.getBandFactors();
- //
- // if (filter1 != null)
- // filter1.setEQ(factors);
- //
- // if (filter2 != null)
- // filter2.setEQ(factors);
- // }
- @LATTICE("THISParams class presents the customizable aspects of the
- * decoder.
- * - * Instances of this class are not thread safe. - */ - public class Params implements Cloneable { - - // private OutputChannels outputChannels = OutputChannels.BOTH; - private OutputChannels outputChannels = new OutputChannels(0); - - private Equalizer equalizer = new Equalizer(); - - public Params() { - } - - public Object clone() { - // TODO: need to have better clone method - Params clone = new Params(); - clone.outputChannels = new OutputChannels(outputChannels.getChannelsOutputCode()); - clone.equalizer = new Equalizer(); - return clone; - // try - // { - // return super.clone(); - // } - // catch (CloneNotSupportedException ex) - // { - // throw new InternalError(this+": "+ex); - // } - } - - public void setOutputChannels(OutputChannels out) { - if (out == null) - throw new NullPointerException("out"); - - outputChannels = out; - } - - public OutputChannels getOutputChannels() { - return outputChannels; - } - - /** - * Retrieves the equalizer settings that the decoder's equalizer will be - * initialized from. - *
- * The
+ * Instances of this class are not thread safe.
+ */
+ public class Params implements Cloneable {
+
+ // private OutputChannels outputChannels = OutputChannels.BOTH;
+ private OutputChannels outputChannels = new OutputChannels(0);
+
+ private Equalizer equalizer = new Equalizer();
+
+ public Params() {
+ }
+
+ public Object clone() {
+ // TODO: need to have better clone method
+ Params clone = new Params();
+ clone.outputChannels = new OutputChannels(outputChannels.getChannelsOutputCode());
+ clone.equalizer = new Equalizer();
+ return clone;
+ // try
+ // {
+ // return super.clone();
+ // }
+ // catch (CloneNotSupportedException ex)
+ // {
+ // throw new InternalError(this+": "+ex);
+ // }
+ }
+
+ public void setOutputChannels(OutputChannels out) {
+ if (out == null)
+ throw new NullPointerException("out");
+
+ outputChannels = out;
+ }
+
+ public OutputChannels getOutputChannels() {
+ return outputChannels;
+ }
+
+ /**
+ * Retrieves the equalizer settings that the decoder's equalizer will be
+ * initialized from.
+ *
+ * The Equalizer
instance returned cannot be changed in real
- * time to affect the decoder output as it is used only to initialize the
- * decoders EQ settings. To affect the decoder's output in realtime, use the
- * Equalizer returned from the getEqualizer() method on the decoder.
- *
- * @return The Equalizer
used to initialize the EQ settings of
- * the decoder.
- */
- public Equalizer getInitialEqualizerSettings() {
- return equalizer;
- }
-
+/*
+ * 11/19/04 1.0 moved to LGPL.
+ * 01/12/99 Initial version. mdm@techie.com
+ *-----------------------------------------------------------------------
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------
+ */
+
+/**
+ * The Decoder
class encapsulates the details of decoding an MPEG
+ * audio frame.
+ *
+ * @author MDM
+ * @version 0.0.7 12/12/99
+ * @since 0.0.5
+ */
+@LATTICE("OUTDecoder
instance with default parameters.
+ *
+ * @param params
+ * The Params
instance that describes the customizable
+ * aspects of the decoder.
+ */
+ public Decoder(@DELEGATE Params params0) {
+
+ if (params0 == null) {
+ params0 = getDefaultParams();
+ }
+
+ params = params0;
+
+ Equalizer eq = params.getInitialEqualizerSettings();
+ if (eq != null) {
+ equalizer.setFrom(eq);
+ }
+ }
+
+ static public Params getDefaultParams() {
+ return (Params) DEFAULT_PARAMS.clone();
+ }
+
+ // public void setEqualizer(Equalizer eq) {
+ // if (eq == null)
+ // eq = Equalizer.PASS_THRU_EQ;
+ //
+ // equalizer.setFrom(eq);
+ //
+ // float[] factors = equalizer.getBandFactors();
+ //
+ // if (filter1 != null)
+ // filter1.setEQ(factors);
+ //
+ // if (filter2 != null)
+ // filter2.setEQ(factors);
+ // }
+ @LATTICE("THISParams class presents the customizable aspects of the
+ * decoder.
+ * Equalizer
instance returned cannot be changed in real
+ * time to affect the decoder output as it is used only to initialize the
+ * decoders EQ settings. To affect the decoder's output in realtime, use the
+ * Equalizer returned from the getEqualizer() method on the decoder.
+ *
+ * @return The Equalizer
used to initialize the EQ settings of
+ * the decoder.
+ */
+ public Equalizer getInitialEqualizerSettings() {
+ return equalizer;
+ }
+
}
\ No newline at end of file