com.threerings.openal
Class Buffer

java.lang.Object
  extended by com.threerings.openal.Buffer

public class Buffer
extends Object

Represents an OpenAL buffer object.


Field Summary
protected  int _id
          The OpenAL identifier for this buffer.
protected  SoundManager _soundmgr
          The sound manager responsible for this buffer.
 
Constructor Summary
Buffer(SoundManager soundmgr)
          Creates a new buffer for the specified sound manager.
 
Method Summary
 void delete()
          Deletes this buffer, rendering it unusable.
protected  void finalize()
           
 int getId()
          Returns this buffer's OpenAL identifier.
 int getSize()
          Returns the size of this buffer.
 void setData(int format, ByteBuffer data, int frequency)
          Sets the data in this buffer.
 void setData(int format, IntBuffer data, int frequency)
          Sets the data in this buffer.
 void setData(int format, ShortBuffer data, int frequency)
          Sets the data in this buffer.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_soundmgr

protected SoundManager _soundmgr
The sound manager responsible for this buffer.


_id

protected int _id
The OpenAL identifier for this buffer.

Constructor Detail

Buffer

public Buffer(SoundManager soundmgr)
Creates a new buffer for the specified sound manager.

Method Detail

getId

public final int getId()
Returns this buffer's OpenAL identifier.


setData

public void setData(int format,
                    ByteBuffer data,
                    int frequency)
Sets the data in this buffer.


setData

public void setData(int format,
                    IntBuffer data,
                    int frequency)
Sets the data in this buffer.


setData

public void setData(int format,
                    ShortBuffer data,
                    int frequency)
Sets the data in this buffer.


getSize

public int getSize()
Returns the size of this buffer.


delete

public void delete()
Deletes this buffer, rendering it unusable.


finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable