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

## simogl.effect.sound
Class SampledSound

    java.lang.Object
      simogl.effect.sound.SampledSound

    public class SampledSound

extends java.lang.Object

This class represents a sampled file like .wav files, that can be easily played via its play() method. It is not based on the Java Sound API, but simply uses the Applet-Soundplayer.

Author:
  Frank Bruns

Constructor Summary
`SampledSound()` Creates a new ampled sound object without providing an initial sound file.
`SampledSound(java.lang.String path)` Initializes the sampled sound object with the sound file specified by the path parameter.

Method Summary
`void` | `play(boolean loop)` Plays the audio file currently assigned to the sampled sound object
`void` | `setSound(java.lang.String path)` Assignes a sound file to the sampled sound object
`void` | `stop()` Stops the currently playing 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)

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

  Parameters:
    `path` - path to a sound file

### SampledSound

    public SampledSound()

  Creates a new ampled sound object without providing an initial sound file.

Method Detail

### setSound

    public void setSound(java.lang.String path)

  Assignes a sound file to the sampled sound object

  Parameters:
    `path` - path to the sound file

### play

    public void play(boolean loop)

  Plays the audio file currently assigned to the sampled sound object

  Parameters:
    `loop` - play sound in loop? --> true = yes, false = no

### stop

    public void stop()

  Stops the currently playing sound file

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