com.icdif.audio.io
Class AudioDevice

java.lang.Object
  extended by com.icdif.audio.io.AudioDevice

public class AudioDevice
extends java.lang.Object

A class that allows the passage of PCM float data to the audio device

Author:
wanderer

Constructor Summary
AudioDevice()
          Initializes the audio system
 
Method Summary
 void playSamples(float[] samples)
          Passes the samples to the soundcard that plays them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioDevice

public AudioDevice()
            throws javax.sound.sampled.LineUnavailableException
Initializes the audio system

Throws:
javax.sound.sampled.LineUnavailableException - when the audio is not available
Method Detail

playSamples

public void playSamples(float[] samples)
Passes the samples to the soundcard that plays them. Note: The samples have to be sampled at 44100Hz, mono and have to be in the range [-1,1].

Parameters:
samples - The Samples to play