com.b3dgs.lionengine.audio
Interface Midi


public interface Midi

Handle midi routine. A midi is light sound, designed to be played as a background music.


Method Summary
 long getTicks()
          Get total number of ticks.
 void play(boolean repeat)
          Play music.
 void setLoop(long first, long last)
          Set loop area.
 void setStart(long tick)
          Set starting tick.
 void stop()
          Stop music.
 

Method Detail

play

void play(boolean repeat)
Play music. The music will be played until the end. In case of a loop, music will be played in loop. Music are played in a separated thread.

Parameters:
repeat - loop flag.

setStart

void setStart(long tick)
Set starting tick.

Parameters:
tick - starting tick.

setLoop

void setLoop(long first,
             long last)
Set loop area.

Parameters:
first - first tick.
last - last tick.

getTicks

long getTicks()
Get total number of ticks.

Returns:
total number of ticks.

stop

void stop()
Stop music. The music will be stopped, but not deleted.