org.kc7bfi.jflac.apps
Class SndPlayer

java.lang.Object
  extended by org.kc7bfi.jflac.apps.SndPlayer

public class SndPlayer
extends Object

Play.java

A simple class that plays audio from given file names.

Uses the Java Sound SourceDataLine interface to stream the sound. Converts compressed encodings (ALAW, ULAW, MP3) to PCM.

Author:
Dan Becker, beckerdo@io.com

Constructor Summary
SndPlayer()
           
 
Method Summary
static void main(String[] args)
          Plays audio from given file names.
static void playAudioFile(String fileName)
          Play audio from the given file name.
static void playAudioStream(AudioInputStream audioInputStream)
          Plays audio from the given audio input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SndPlayer

public SndPlayer()
Method Detail

main

public static void main(String[] args)
Plays audio from given file names.

Parameters:
args - Command line parameters

playAudioFile

public static void playAudioFile(String fileName)
Play audio from the given file name.

Parameters:
fileName - The file to play

playAudioStream

public static void playAudioStream(AudioInputStream audioInputStream)
Plays audio from the given audio input stream.

Parameters:
audioInputStream - The audio stream to play


Copyright © 2004-2011. All Rights Reserved.