Class Buffer

  • public class Buffer
    extends Object
    The Sound3D Buffer is a container for audio data used in the Sound3D environment.
    Athomas Goldberg
    • Method Detail

      • configure

        public void configure​(ByteBuffer data,
                              int format,
                              int freq)
        Configure the Sound3D buffer
        data - the raw audio data
        format - the format of the data: FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8 and FORMAT_STEREO16
        freq - the frequency of the data
      • delete

        public void delete()
        Delete this buffer, and free its resources.
      • getBitDepth

        public int getBitDepth()
        Get the bit-depth of the data, (8 or 16)
        the bit-depth of the data
      • getNumChannels

        public int getNumChannels()
        Get the number of channels of the data (1-Mono, 2-Stereo)
        the number of audio channels.
      • getData

        public ByteBuffer getData()
        Gets the raw data contained in this buffer.
        the raw buffer data.
      • getFrequency

        public int getFrequency()
        Gets the audio frequency of the data contained in this buffer.
        the frequency of the data
      • getSize

        public int getSize()
        Gets the size (in bytes) of the raw data containe in this buffer.
        the size of the data.