sampled
Class AudioFileListReader

java.lang.Object
  extended by sampled.AudioFileListReader
All Implemented Interfaces:
AudioSource

public class AudioFileListReader
extends java.lang.Object
implements AudioSource


Constructor Summary
AudioFileListReader(java.lang.String fileList, RawAudioFormat format, boolean cache)
          Generate a new AudioFileListReader using given file list, RawAudioFormat and cache indicator.
 
Method Summary
 boolean getPreEmphasis()
          Does the AudioSource perform pre-emphasis?
 int getSampleRate()
          Get the frame rate
 int read(double[] buf)
          Read buf.length samples from the AudioSource.
 void setPreEmphasis(boolean applyPreEmphasis, double a)
          Toggle the pre-emphasis of the audio signal
 void tearDown()
          Tear down the AudioSource (i.e.
 java.lang.String toString()
          Get a string representation of the source
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AudioFileListReader

public AudioFileListReader(java.lang.String fileList,
                           RawAudioFormat format,
                           boolean cache)
                    throws java.io.IOException
Generate a new AudioFileListReader using given file list, RawAudioFormat and cache indicator.

Parameters:
fileList -
format -
cache -
Throws:
java.io.IOException
See Also:
RawAudioFormat.create
Method Detail

getPreEmphasis

public boolean getPreEmphasis()
Description copied from interface: AudioSource
Does the AudioSource perform pre-emphasis?

Specified by:
getPreEmphasis in interface AudioSource

getSampleRate

public int getSampleRate()
Description copied from interface: AudioSource
Get the frame rate

Specified by:
getSampleRate in interface AudioSource
Returns:
number of samples per second

read

public int read(double[] buf)
         throws java.io.IOException
Description copied from interface: AudioSource
Read buf.length samples from the AudioSource.

Specified by:
read in interface AudioSource
Parameters:
buf - Previously allocated buffer to store the read audio samples.
Returns:
Number of actually read audio samples.
Throws:
java.io.IOException

setPreEmphasis

public void setPreEmphasis(boolean applyPreEmphasis,
                           double a)
Description copied from interface: AudioSource
Toggle the pre-emphasis of the audio signal

Specified by:
setPreEmphasis in interface AudioSource
Parameters:
applyPreEmphasis - apply pre-emphasis?
a - the pre-emphasis factor: x'(n) = x(n) - a*x(n-1)

tearDown

public void tearDown()
              throws java.io.IOException
Description copied from interface: AudioSource
Tear down the AudioSource (i.e. release file handlers, etc)

Specified by:
tearDown in interface AudioSource
Throws:
java.io.IOException

toString

public java.lang.String toString()
Description copied from interface: AudioSource
Get a string representation of the source

Specified by:
toString in interface AudioSource
Overrides:
toString in class java.lang.Object