auditory.sampled
Class BoomBox

java.lang.Object
  extended by auditory.sampled.BoomBox
All Implemented Interfaces:
java.util.EventListener, javax.sound.sampled.LineListener

public class BoomBox
extends java.lang.Object
implements javax.sound.sampled.LineListener

A Boombox renders/presents sampled auditory content


Constructor Summary
BoomBox(Content content)
          Explicit Value Constructor
 
Method Summary
 void addLineListener(javax.sound.sampled.LineListener listener)
          Add a LineListener to this Content
 void removeLineListener(javax.sound.sampled.LineListener listener)
          Remove a LineListener
 void start()
          Render the Content without blocking
 void start(boolean block)
          Render this Content
 void update(javax.sound.sampled.LineEvent evt)
          Handle LineEvents (required by LineListener)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoomBox

public BoomBox(Content content)
Explicit Value Constructor

Parameters:
content - The Content
Method Detail

addLineListener

public void addLineListener(javax.sound.sampled.LineListener listener)
Add a LineListener to this Content

Parameters:
listener - The LineListener to add

start

public void start()
           throws javax.sound.sampled.LineUnavailableException
Render the Content without blocking

Throws:
javax.sound.sampled.LineUnavailableException

start

public void start(boolean block)
           throws javax.sound.sampled.LineUnavailableException
Render this Content

Parameters:
block - true to block the calling thread until the clip stops
Throws:
javax.sound.sampled.LineUnavailableException

removeLineListener

public void removeLineListener(javax.sound.sampled.LineListener listener)
Remove a LineListener

Parameters:
listener - The LineListener to add

update

public void update(javax.sound.sampled.LineEvent evt)
Handle LineEvents (required by LineListener)

Specified by:
update in interface javax.sound.sampled.LineListener
Parameters:
evt - The LineEvent of interest


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers