org.kc7bfi.jflac.apps
Class SeekTablePlayer

java.lang.Object
  extended by org.kc7bfi.jflac.apps.SeekTablePlayer
All Implemented Interfaces:
FrameListener, PCMProcessor

public class SeekTablePlayer
extends Object
implements PCMProcessor, FrameListener

Play a FLAC file application.

Author:
kc7bfi

Constructor Summary
SeekTablePlayer()
           
 
Method Summary
static void main(String[] args)
          The main routine.
 void play(String inFileName, int fromSeekPoint, int toSeekPoint)
          Decode and play an input FLAC file.
 void processError(String msg)
          Process a decoder error.
 void processFrame(Frame frame)
          Called for each data frame read.
 void processMetadata(Metadata metadata)
          Called for each Metadata frame read.
 void processPCM(ByteData pcm)
          Process the decoded PCM bytes.
 void processStreamInfo(StreamInfo streamInfo)
          Process the StreamInfo block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeekTablePlayer

public SeekTablePlayer()
Method Detail

play

public void play(String inFileName,
                 int fromSeekPoint,
                 int toSeekPoint)
          throws IOException,
                 LineUnavailableException
Decode and play an input FLAC file.

Parameters:
inFileName - The input FLAC file name
fromSeekPoint - The starting Seek Point
toSeekPoint - The ending Seek Point (non-inclusive)
Throws:
IOException - Thrown if error reading file
LineUnavailableException - Thrown if error playing file

processStreamInfo

public void processStreamInfo(StreamInfo streamInfo)
Process the StreamInfo block.

Specified by:
processStreamInfo in interface PCMProcessor
Parameters:
streamInfo - the StreamInfo block
See Also:
PCMProcessor.processStreamInfo(org.kc7bfi.jflac.metadata.StreamInfo)

processPCM

public void processPCM(ByteData pcm)
Process the decoded PCM bytes.

Specified by:
processPCM in interface PCMProcessor
Parameters:
pcm - The decoded PCM data
See Also:
org.kc7bfi.jflac.PCMProcessor#processPCM(org.kc7bfi.jflac.util.ByteSpace)

processMetadata

public void processMetadata(Metadata metadata)
Called for each Metadata frame read.

Specified by:
processMetadata in interface FrameListener
Parameters:
metadata - The metadata frame read

processFrame

public void processFrame(Frame frame)
Called for each data frame read.

Specified by:
processFrame in interface FrameListener
Parameters:
frame - The data frame read

processError

public void processError(String msg)
Process a decoder error.

Specified by:
processError in interface FrameListener
Parameters:
msg - The error message
See Also:
FrameListener.processError(java.lang.String)

main

public static void main(String[] args)
The main routine.

args[0] is the input file name

Parameters:
args - Command line arguments


Copyright © 2004-2011. All Rights Reserved.