Class Processor

java.lang.Object
com.realtime.crossfire.jxclient.sound.Processor
All Implemented Interfaces:
Runnable

public class Processor extends Object implements Runnable
A thread that plays a music file over and over until terminated.
  • Constructor Details

    • Processor

      public Processor(@NotNull @NotNull CharSequence name, @NotNull @NotNull AudioFileLoader audioFileLoader)
      Creates a new instance.
      Parameters:
      name - the music name to play
      audioFileLoader - the audio file loader for loading audio files
  • Method Details

    • terminate

      public void terminate(boolean fadeOut)
      Stops playing music. The music is faded out rather than cut off.
      Parameters:
      fadeOut - Whether tp fade out the music (true) or to cut it off (false).
    • run

      public void run()
      Specified by:
      run in interface Runnable