Package soundPlayback

Interface FilePlaybackDevice

All Known Implementing Classes:
ASIOFilePlaybackSystem, 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 Details

    • getName

      String getName()
      Returns:
      a name for this type of playback device
    • getDeviceNames

      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.
    • getDeviceState

      PlayDeviceState getDeviceState()
      Get device status information.
      Returns:
    • getDeviceName

      String getDeviceName()
    • getSettingsPanel

      PamDialogPanel getSettingsPanel()
      Get a settings panel for additional options. Can be null.
      Returns:
      settings panel or null for additional options.