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 SampledSound

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

All Implemented Interfaces:
  SoundFileIface

    public class SampledSound

extends java.lang.Object
implements SoundFileIface

This class represents a sampled sound file like, that can be easily played via its play() method. It is not based on the Java Sound API, but simply uses the Applet-Soundplayer. You will use this class for playing wave files (.wav) basically. No compressed sound formats like mp3 or ogg are supported.

Author:
  Frank Bruns

Constructor Summary
`SampledSound(java.lang.String path, boolean loop)` Initializes the sampled sound object with the sound file specified by the path parameter.

Method Summary
`java.lang.String` | `getSoundPath()` Returns the file path to the sound file.
`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

### SampledSound

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

  Initializes the sampled sound object with the sound file specified by the path parameter.

  Parameters:
    `path` - path to a sound file
    `loop` - loop the sound 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

### 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

### play

    public void play()

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

  Specified by:
    `play` in interface `SoundFileIface`

### 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