Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.rico.engine.effect.sound
Class Mp3Sound

    java.lang.Object
      de.rico.engine.effect.sound.Mp3Sound

All Implemented Interfaces:
  SoundFileIface

    public class Mp3Sound

extends java.lang.Object
implements SoundFileIface

This class represents an mp3 sound file that can be played

Author:
  Frank Bruns

Constructor Summary
`Mp3Sound(java.lang.String path, boolean loop)` Creates a new mp3 sound wich can optionally be looped.

Method Summary
`java.lang.String` | `getSoundPath()` Returns the file path to the sound file.
`boolean` | `hasFinished()` Determines if the current sound has finished playing, because it came to an end.
`boolean` | `isLooped()` Determines if the sound was specified to be looped.
`void` | `play()` Starts playing the assigned sound file.
`void` | `stop()` Stops playing the assigned sound file.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Mp3Sound

    public Mp3Sound(java.lang.String path,
                    boolean loop)

  Creates a new mp3 sound wich can optionally be looped.

  Parameters:
    `path` - path to the sound file (.mp3)
    `loop` - loop the file? --> true=yes, false=no

Method Detail

### getSoundPath

    public java.lang.String getSoundPath()

  Description copied from interface: `SoundFileIface`
  Returns the file path to the sound file.

  Specified by:
    `getSoundPath` in interface `SoundFileIface`
  Returns:
    file path to the sound file

### play

    public void play()

  Description copied from interface: `SoundFileIface`
  Starts playing the assigned sound file.

  Specified by:
    `play` in interface `SoundFileIface`

### isLooped

    public boolean isLooped()

  Description copied from interface: `SoundFileIface`
  Determines if the sound was specified to be looped.

  Specified by:
    `isLooped` in interface `SoundFileIface`
  Returns:
    is looped? --> true=yes, false=no

### hasFinished

    public boolean hasFinished()

  Determines if the current sound has finished playing, because it came to an end.

  Returns:
    sound has finished? --> true=yes, false=no

### stop

    public void stop()

  Description copied from interface: `SoundFileIface`
  Stops playing the assigned sound file.

  Specified by:
    `stop` in interface `SoundFileIface`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD