soundPlayback
Interface FilePlaybackDevice

All Known Implementing Classes:
NIFilePlayback, SoundCardFilePlayback

public interface FilePlaybackDevice

Interface to device types that can be used to play back sound when acquisition is reading audio files. For real time acquisition, playback must generally be over the same device as is used for input. however, for file acquisition, playback can be over anything. Hence each playback device may easily end up being used in two different says - for playback of data from that particular device and also for playback of file data.

Author:
Doug Gillespie

Method Summary
 java.lang.String[] getDeviceNames()
           
 java.lang.String getName()
           
 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.
 

Method Detail

getName

java.lang.String getName()
Returns:
a name for this type of playback device

getDeviceNames

java.lang.String[] getDeviceNames()
Returns:
a list of device names

getNumPlaybackChannels

int getNumPlaybackChannels(int devNum)
Get's the number of playback channels for a given device.

Parameters:
devNum - device number
Returns:
number of channels

preparePlayback

boolean preparePlayback(PlaybackParameters playbackParameters)
Prepare playback

Parameters:
playbackParameters - parameters
Returns:
true if all Ok. S

playData

boolean playData(RawDataUnit[] data)
Play some data. The length of the data array must correspond to the number of channels.

Parameters:
data - array of raw audio data units.
Returns:
true if played OK.

stopPlayback

boolean stopPlayback()
Stop playback, clean up buffers, etc.

Returns:
true if all cleaned up Ok.