Class SoundBuffer

java.lang.Object
com.ardor3d.audio.SoundBuffer

public class SoundBuffer extends Object
The SoundBuffer class is used to wrap audio data along with the format in which the data is stored.

SoundSystem License:

You are free to use this library for any purpose, commercial or otherwise. You may modify this library or source code, and distribute it any way you like, provided the following conditions are met:
1) You may not falsely claim to be the author of this library or any unmodified portion of it.
2) You may not copyright this library or a modified version of it and then sue me for copyright infringement.
3) If you modify the source code, you must clearly document the changes made before redistributing the modified source code, so other users know it is not the original code.
4) You are not required to give me credit for this library in any derived work, but if you do, you must also mention my website: http://www.paulscode.com
5) I the author will not be responsible for any damages (physical, financial, or otherwise) caused by the use if this library or any part of it.
6) I the author do not guarantee, warrant, or make any representations, either expressed or implied, regarding the use of this library or any part of it.

Author: Paul Lamb
http://www.paulscode.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    byte[]
    The actual audio data.
    The audio format in which the data is stored.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SoundBuffer(byte[] audioData, AudioFormat audioFormat)
    Constructor: Wraps the specified data with the specified audio format.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes handles to all instantiated objects.
    void
    trimData(int maxLength)
    Trims down the size of the audio data if it is larger than the specified maximum length.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • audioData

      public byte[] audioData
      The actual audio data.
    • audioFormat

      public AudioFormat audioFormat
      The audio format in which the data is stored.
  • Constructor Details

    • SoundBuffer

      public SoundBuffer(byte[] audioData, AudioFormat audioFormat)
      Constructor: Wraps the specified data with the specified audio format.
      Parameters:
      audioData - The actual audio data.
      audioFormat - The audio format in which the data is stored.
  • Method Details

    • cleanup

      public void cleanup()
      Removes handles to all instantiated objects.
    • trimData

      public void trimData(int maxLength)
      Trims down the size of the audio data if it is larger than the specified maximum length.
      Parameters:
      maxLength - Maximum size this buffer may be.