Package soundPlayback

Class ClipPlayback

java.lang.Object
soundPlayback.ClipPlayback

public class ClipPlayback extends Object
Some static functions to playback sound clips. Should eventually amalgamate this a bit with the main SoundPlayback module used by the viewer!
Author:
doug
  • Method Details

    • getInstance

      public static ClipPlayback getInstance()
      Get the singleton clip playback object.
      Returns:
      clip playback class.
    • isPlaying

      public boolean isPlaying()
      Is it currently playing
      Returns:
    • stopPlayback

      public boolean stopPlayback()
      Stop any currently active clip.
      Returns:
    • playClip

      public boolean playClip(double[][] clipData, float sampleRate, boolean autoScale)
      Play one or two channels of audio data back through the default sound card. no control over speed, i.e. doesn't use playback speed controls (could change this ? )
      Will stop playback of any currently playing clips first.
      Parameters:
      clipData - one or two channels of audio data.
      sampleRate - playback sample rate
      autoScale - if true, will autoscale the data to full range of system (i.e. max val will be 32767).
      Returns:
      true if played OK, false otherwise.