java.lang.Object
games.stendhal.client.sound.system.SignalProcessor
games.stendhal.client.sound.system.processors.Interruptor

public class Interruptor extends SignalProcessor
Signal processor stage to pause sound signals.
Author:
silvio
  • Constructor Details

    • Interruptor

      public Interruptor()
  • Method Details

    • play

      public void play()
    • pause

      public void pause(Time delay)
    • stop

      public void stop(Time delay)
    • request

      public boolean request()
      Description copied from class: SignalProcessor
      This will call the generate() method of the first SignalProcessor in the processing chain
      Overrides:
      request in class SignalProcessor
      Returns:
      true, until the stream is finished
    • modify

      protected void modify(float[] data, int frames, int channels, int rate)
      Description copied from class: SignalProcessor
      This function should be overwritten by all classes that want to modify an PCM audio stream. The audio data is uniform and interleaved. uniform: Each sample has a value between -1.0 and 1.0 interleaved: The channels are not separated. They are bundled in frames e.g. if there is stereo PCM data: data[0] and data[1] are the left and right channels of sample 0 data[2] and data[3] are the left and right channels of sample 1 data[4] and data[5] are the left and right channels of sample 2 and so on ... The number of samples can be calculated by: frames * channels
      Overrides:
      modify in class SignalProcessor
      Parameters:
      data - the audio data
      frames - the number of sample frames contained in "data"
      channels - number of channels
      rate - the sample rate