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

## org.newdawn.slick.openal
Class NullAudio

    java.lang.Object
      org.newdawn.slick.openal.NullAudio

All Implemented Interfaces:
  Audio

    public class NullAudio

extends java.lang.Object
implements Audio

A null implementation used to provide an object reference when sound has failed.

Author:
  kevin

Constructor Summary
`NullAudio()`

Method Summary
`int` | `getBufferID()` Get the ID of the OpenAL buffer holding this data (if any).
`float` | `getPosition()` Return the current playing position in the sound
`boolean` | `isPlaying()` Check if the sound is playing as sound fx
`int` | `playAsMusic(float pitch, float gain, boolean loop)` Play this sound as music
`int` | `playAsSoundEffect(float pitch, float gain, boolean loop)` Play this sound as a sound effect
`int` | `playAsSoundEffect(float pitch, float gain, boolean loop, float x, float y, float z)` Play this sound as a sound effect
`boolean` | `setPosition(float position)` Seeks to a position in the music.
`void` | `stop()` Stop the sound effect

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

Constructor Detail

### NullAudio

    public NullAudio()

Method Detail

### getBufferID

    public int getBufferID()

  Description copied from interface: `Audio`
  Get the ID of the OpenAL buffer holding this data (if any). This method is not valid with streaming resources.

  Specified by:
    `getBufferID` in interface `Audio`
  Returns:
    The ID of the OpenAL buffer holding this data
  See Also:
    `Audio.getBufferID()`

### getPosition

    public float getPosition()

  Description copied from interface: `Audio`
  Return the current playing position in the sound

  Specified by:
    `getPosition` in interface `Audio`
  Returns:
    The current position in seconds.
  See Also:
    `Audio.getPosition()`

### isPlaying

    public boolean isPlaying()

  Description copied from interface: `Audio`
  Check if the sound is playing as sound fx

  Specified by:
    `isPlaying` in interface `Audio`
  Returns:
    True if the sound is playing
  See Also:
    `Audio.isPlaying()`

### playAsMusic

    public int playAsMusic(float pitch,
                           float gain,
                           boolean loop)

  Description copied from interface: `Audio`
  Play this sound as music

  Specified by:
    `playAsMusic` in interface `Audio`
  Parameters:
    `pitch` - The pitch of the play back
    `gain` - The gain of the play back
    `loop` - True if we should loop
  Returns:
    The ID of the source playing the sound
  See Also:
    `Audio.playAsMusic(float, float, boolean)`

### playAsSoundEffect

    public int playAsSoundEffect(float pitch,
                                 float gain,
                                 boolean loop)

  Description copied from interface: `Audio`
  Play this sound as a sound effect

  Specified by:
    `playAsSoundEffect` in interface `Audio`
  Parameters:
    `pitch` - The pitch of the play back
    `gain` - The gain of the play back
    `loop` - True if we should loop
  Returns:
    The ID of the source playing the sound
  See Also:
    `Audio.playAsSoundEffect(float, float, boolean)`

### playAsSoundEffect

    public int playAsSoundEffect(float pitch,
                                 float gain,
                                 boolean loop,
                                 float x,
                                 float y,
                                 float z)

  Description copied from interface: `Audio`
  Play this sound as a sound effect

  Specified by:
    `playAsSoundEffect` in interface `Audio`
  Parameters:
    `pitch` - The pitch of the play back
    `gain` - The gain of the play back
    `loop` - True if we should loop
    `x` - The x position of the sound
    `y` - The y position of the sound
    `z` - The z position of the sound
  Returns:
    The ID of the source playing the sound
  See Also:
    `Audio.playAsSoundEffect(float, float, boolean, float, float, float)`

### setPosition

    public boolean setPosition(float position)

  Description copied from interface: `Audio`
  Seeks to a position in the music.

  Specified by:
    `setPosition` in interface `Audio`
  Parameters:
    `position` - Position in seconds.
  Returns:
    True if the setting of the position was successful
  See Also:
    `Audio.setPosition(float)`

### stop

    public void stop()

  Description copied from interface: `Audio`
  Stop the sound effect

  Specified by:
    `stop` in interface `Audio`
  See Also:
    `Audio.stop()`

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

Copyright © 2006 New Dawn Software. All Rights Reserved.