PrevUpHomeNext

Buffers

#include <oalplus/buffer.hpp>

Common buffer operations

template <>
class ObjectOps<tag::DirectState, tag::Buffer>
 : public BufferName
{
public:
	void Data(
		DataFormat format,
		const ALvoid* data,
		ALsizei size,
		ALsizei frequency
	); 1

	ALsizei Frequency(void) const; 2

	ALsizei Size(void) const; 3

	ALsizei Bits(void) const; 4

	ALsizei Channels(void) const; 5

	ALfloat Duration(void) const; 6
};

1

Specifies the buffer audio sample data. See alBufferData.

2

Returns the sampling frequency (in Hz) of the data stored in this buffer. See alGetBuffer, AL_FREQUENCY.

3

Returns the size (in bytes) of the data stored in this buffer.

4

Returns the number of bits per sample of the data stored in this buffer. See alGetBuffer, AL_BITS.

5

Returns the number of channels of the data stored in this buffer. See alGetBuffer, AL_CHANNELS.

6

Returns the duration (in seconds) of the sound stored in this buffer. See alGetBuffer, AL_SIZE, AL_FREQUENCY, AL_CHANNELS, AL_CHANNELS.

Definition

typedef ObjectOps<tag::DirectState, tag::Buffer>
	BufferOps;

typedef Object<BufferOps> Buffer;

PrevUpHomeNext