nidaqdev
Class NIFilePlayback

java.lang.Object
  extended by nidaqdev.NIFilePlayback
All Implemented Interfaces:
FilePlaybackDevice

public class NIFilePlayback
extends java.lang.Object
implements FilePlaybackDevice


Field Summary
private  java.util.ArrayList<NIDeviceInfo> deviceInfo
           
private  FilePlayback filePlayback
           
private  Nidaq niDaq
           
private  int[] niDeviceLUT
          converts usable NI devices (ones with playback channels) to numbers used by the NI interface to identify the different cards on the system .
private  java.lang.String[] niDeviceNames
           
private  boolean prepared
           
 
Constructor Summary
NIFilePlayback(FilePlayback filePlayback)
           
 
Method Summary
 java.lang.String[] getDeviceNames()
           
 java.lang.String getName()
           
private  void getNIDevices()
           
 int getNumPlaybackChannels(int devNum)
          Get's the number of playback channels for a given device.
 boolean playData(RawDataUnit[] data)
          Play some data.
 boolean preparePlayback(PlaybackParameters playbackParameters)
          Prepare playback
 boolean stopPlayback()
          Stop playback, clean up buffers, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prepared

private volatile boolean prepared

filePlayback

private FilePlayback filePlayback

niDeviceLUT

private int[] niDeviceLUT
converts usable NI devices (ones with playback channels) to numbers used by the NI interface to identify the different cards on the system .


niDeviceNames

private java.lang.String[] niDeviceNames

niDaq

private Nidaq niDaq

deviceInfo

private java.util.ArrayList<NIDeviceInfo> deviceInfo
Constructor Detail

NIFilePlayback

public NIFilePlayback(FilePlayback filePlayback)
Method Detail

getNIDevices

private void getNIDevices()

getDeviceNames

public java.lang.String[] getDeviceNames()
Specified by:
getDeviceNames in interface FilePlaybackDevice
Returns:
a list of device names

getName

public java.lang.String getName()
Specified by:
getName in interface FilePlaybackDevice
Returns:
a name for this type of playback device

getNumPlaybackChannels

public int getNumPlaybackChannels(int devNum)
Description copied from interface: FilePlaybackDevice
Get's the number of playback channels for a given device.

Specified by:
getNumPlaybackChannels in interface FilePlaybackDevice
Parameters:
devNum - device number
Returns:
number of channels

playData

public boolean playData(RawDataUnit[] data)
Description copied from interface: FilePlaybackDevice
Play some data. The length of the data array must correspond to the number of channels.

Specified by:
playData in interface FilePlaybackDevice
Parameters:
data - array of raw audio data units.
Returns:
true if played OK.

preparePlayback

public boolean preparePlayback(PlaybackParameters playbackParameters)
Description copied from interface: FilePlaybackDevice
Prepare playback

Specified by:
preparePlayback in interface FilePlaybackDevice
Parameters:
playbackParameters - parameters
Returns:
true if all Ok. S

stopPlayback

public boolean stopPlayback()
Description copied from interface: FilePlaybackDevice
Stop playback, clean up buffers, etc.

Specified by:
stopPlayback in interface FilePlaybackDevice
Returns:
true if all cleaned up Ok.