Package soundPlayback

Class PlaybackProcess

All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class PlaybackProcess extends PamInstantProcess
Pam Process for sound playback (controls data from multiple channels and then passes it on to the PlaybackSystem.

For file analysis, playback is through a chosen sound card. For playback of real time data, the playbackSystem is ideally handled by the real time acquisition system - so samples stay synchronised.

Author:
Doug Gillespie
See Also:
  • Constructor Details

    • PlaybackProcess

      public PlaybackProcess(PlaybackControl playbackControl)
  • Method Details

    • prepareProcess

      public void prepareProcess()
      Description copied from class: PamProcess
      Called for each process before any of them receive the PamStart command
      Overrides:
      prepareProcess in class PamProcess
    • prepareProcess

      public boolean prepareProcess(double sourceSampleRate)
    • resetDecimator

      public void resetDecimator()
      Called from speed slider on sidebar.
    • setSampleRate

      public void setSampleRate(float sampleRate, boolean notify)
      Description copied from interface: PamObserver
      New sample rate
      Specified by:
      setSampleRate in interface PamObserver
      Overrides:
      setSampleRate in class PamProcess
      Parameters:
      notify - Notify other PamObservers and PamObservables in the chain.
    • pamStart

      public void pamStart()
      Description copied from class: PamProcess
      Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).
      Specified by:
      pamStart in class PamProcess
    • pamStop

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • newData

      public void newData(PamObservable o, PamDataUnit arg)
      Overrides:
      newData in class PamProcess
    • noteNewSettings

      public void noteNewSettings()
      Specified by:
      noteNewSettings in interface PamObserver
      Overrides:
      noteNewSettings in class PamProcess
    • getSampleRate

      public float getSampleRate()
      Note that this is the sample rate of the input data, not the playback output data. Probably best not to call it !
      Overrides:
      getSampleRate in class PamProcess
      Returns:
      The sample rate in the process
    • getSourceSampleRate

      public double getSourceSampleRate()
      Get the source data sample rate.
      Returns:
    • setUpFilter

      public void setUpFilter()
      Setup a high pass filter on the data. This will run before the decimator to keep it all simple !
    • setGain

      public void setGain(int gaindB)
    • getSampleRateData

      public PBSampleRateData getSampleRateData()
      Returns:
      the sampleRateData
    • getPreProcesses

      public ArrayList<PlaybackPreprocess> getPreProcesses()
      Returns:
      the preProcesses
    • getCompatibleDataUnits

      public ArrayList getCompatibleDataUnits()
      Description copied from class: PamProcess
      A list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.
      Overrides:
      getCompatibleDataUnits in class PamProcess
      Returns:
      a list of PamDataBlock sub class types which can be used as parent data blocks for the process.