as.clynx.audio.enc.tools
Class ChannelConverter

java.lang.Object
  extended by as.clynx.audio.enc.tools.ChannelConverter
All Implemented Interfaces:
IConverter

public class ChannelConverter
extends java.lang.Object
implements IConverter

The class ChannelConverter.java implements IConverter an converts a passed stream to the defined no of channels.

Version:
cLynx v.1.2, JDK 6.0: 12.10.2007
Author:
Andreas Senfter - andreas@senfters.com

Constructor Summary
ChannelConverter(javax.sound.sampled.AudioFormat sourceFormat, int noTargetChannels)
          Constructor
ChannelConverter(javax.sound.sampled.AudioInputStream sourceStream, int noTargetChannels)
          Constructor
 
Method Summary
 javax.sound.sampled.AudioFormat getTargetFormat()
          returns the resulted AudioInputStream.
 javax.sound.sampled.AudioInputStream getTargetStream()
          returns the resulted AudioInputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelConverter

public ChannelConverter(javax.sound.sampled.AudioInputStream sourceStream,
                        int noTargetChannels)
                 throws javax.sound.sampled.UnsupportedAudioFileException,
                        java.io.IOException
Constructor

Parameters:
sourceStream -
noTargetChannels -
Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException

ChannelConverter

public ChannelConverter(javax.sound.sampled.AudioFormat sourceFormat,
                        int noTargetChannels)
                 throws javax.sound.sampled.UnsupportedAudioFileException,
                        java.io.IOException
Constructor

Parameters:
sourceFormat -
noTargetChannels -
Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
Method Detail

getTargetStream

public javax.sound.sampled.AudioInputStream getTargetStream()
returns the resulted AudioInputStream.

Specified by:
getTargetStream in interface IConverter
Returns:
the resulted AudioInputStream.

getTargetFormat

public javax.sound.sampled.AudioFormat getTargetFormat()
returns the resulted AudioInputStream.

Returns:
the resulted AudioInputStream.