PrevUpHomeNext

Sources

#include <oalplus/source.hpp>

Common source operations

template <>
class ObjectOps<tag::DirectState, tag::Source>
 : public SourceName
{
public:
	void Play(void); 1
	void Pause(void); 2
	void Stop(void); 3
	void Rewind(void); 4

	SourceState State(void) const; 5

	void Relative(Boolean value); 6
	Boolean Relative(void) const; 7

	void Type(SourceType type); 8
	SourceType Type(void) const; 9

	void Looping(Boolean value); 10
	Boolean Looping(void) const; 11

	void Buffer(const BufferName& buffer); 12
	void DetachBuffers(void); 13
	void QueueBuffers(const Sequence<BufferName>& buffers); 14
	void UnqueueBuffers(const Sequence<BufferName>& buffers); 15

1

Starts the audio playback. See alSourcePlay.

2

Pauses the audio playback. See alSourcePause.

3

Stops the audio playback. See alSourceStop.

4

Rewinds the audio track. See alSourceRewind.

5

Returns the source state. See alGetSourceiv, AL_SOURCE_STATE.

6

Sets the source to relative or absoulte state. See alSourcei, AL_SOURCE_RELATIVE.

7

Returns true if the source is relative. See alGetSourceiv, AL_SOURCE_RELATIVE.

8

Sets the source type. See alSourcei, AL_SOURCE_TYPE.

9

Returns the source type. See alGetSourceiv, AL_SOURCE_TYPE.

10

Sets the looping mode. See alSourcei, AL_LOOPING.

11

Returns true if the source is in looping mode. See alGetSourceiv, AL_SOURCE_LOOPING.

12

Assigns an audio buffer to the source. See alSourcei, AL_BUFFER.

13

Detaches all queued buffers from the source. See alSourcei, AL_BUFFER.

14

Enqueues multiple buffers to the source. See alSourceQueueBuffers.

15

Enqueues multiple buffers to the source. See alSourceUnqueueBuffers.

	void Gain(ALfloat value); 1
	ALfloat Gain(void) const; 2

	void MinGain(ALfloat value); 3
	ALfloat MinGain(void) const; 4

	void MaxGain(ALfloat value); 5
	ALfloat MaxGain(void) const; 6

	void ReferenceDistance(ALfloat value); 7
	ALfloat ReferenceDistance(void) const; 8

	void RolloffFactor(ALfloat value); 9
	ALfloat RolloffFactor(void) const; 10

	void MaxDistance(ALfloat value); 11
	ALfloat MaxDistance(void) const; 12

	void Pitch(ALfloat value); 13
	ALfloat Pitch(void) const; 14

1

Sets the value of gain. See alSourcef, AL_GAIN.

2

Returns the value of gain. See alGetSourcefv, AL_GAIN.

3

Sets the minimal value of gain. See alSourcef, AL_MIN_GAIN.

4

Returns the minimal value of gain. See alGetSourcefv, AL_MIN_GAIN.

5

Sets the maximal value of gain. See alSourcef, AL_MAX_GAIN.

6

Returns the maximal value of gain. See alGetSourcefv, AL_MAX_GAIN.

7

Sets the reference distance. See alSourcef, AL_REFERENCE_DISTANCE.

8

Returns the reference distance. See alGetSourcefv, AL_REFERENCE_DISTANCE.

9

Sets the value of the rolloff factor. See alSourcef, AL_ROLLOFF_FACTOR.

10

Returns the value of the rolloff factor. See alGetSourcefv, AL_ROLLOFF_FACTOR.

11

Sets the value of max distance used with some distance models. See alSourcef, AL_MAX_DISTANCE.

12

Returns the value of max distance used with some distance models. See alGetSourcefv, AL_MAX_DISTANCE.

13

Sets the value of pitch. See alSourcef, AL_PITCH.

14

Returns the value of pitch. See alGetSourcefv, AL_PITCH.

	void Position(const Vec3f& dir); 1
	void Position(ALfloat x, ALfloat y, ALfloat z);
	Vec3f Position(void) const; 2

	void Velocity(const Vec3f& dir); 3
	void Velocity(ALfloat x, ALfloat y, ALfloat z);
	Vec3f Velocity(void) const; 4

	void Direction(const Vec3f& dir); 5
	void Direction(ALfloat x, ALfloat y, ALfloat z);
	Vec3f Direction(void) const; 6

	void ConeInnerAngle(__Anglef angle); 7
	__Anglef ConeInnerAngle(void) const; 8

	void ConeOuterAngle(__Anglef angle); 9
	__Anglef ConeOuterAngle(void) const; 10

	void ConeOuterGain(ALfloat value); 11
	ALfloat ConeOuterGain(void) const; 12

	void SecOffset(ALfloat value); 13
	void SampleOffset(ALfloat value); 14
	void ByteOffset(ALfloat value); 15
};

1

Sets the position of the source. See alSourcefv, AL_POSITION.

2

Returns the position of the source. See alGetSourcefv, AL_POSITION.

3

Sets the velocity vector of the source. See alSourcefv, AL_VELOCITY.

4

Returns the velocity vector of the source. See alGetSourcefv, AL_VELOCITY.

5

Sets the direction vector of the source. See alSourcefv, AL_DIRECTION.

6

Returns the direction vector of the source. See alGetSourcefv, AL_DIRECTION.

7

Sets the sound cone's inner angle. See alSourcef, AL_CONE_INNER_ANGLE.

8

Returns the sound cone's inner angle. See alGetSourcefv, AL_CONE_INNER_ANGLE.

9

Sets the sound cone's outer angle. See alSourcef, AL_CONE_OUTER_ANGLE.

10

Returns the sound cone's outer angle. See alGetSourcefv, AL_CONE_OUTER_ANGLE.

11

Sets the sound cone's outer gain value. See alSourcef, AL_CONE_OUTER_GAIN.

12

Returns the sound cone's outer gain value. See alGetSourcefv, AL_CONE_OUTER_GAIN.

13

Sets the Second-offset value. See alSourcef, AL_SEC_OFFSET.

14

Sets the sample-offset value. See alSourcef, AL_SAMPLE_OFFSET.

15

Sets the byte-offset value. See alSourcef, AL_BYTE_OFFSET.

Definition

typedef ObjectOps<tag::DirectState, tag::Source>
	SourceOps;

typedef Object<SourceOps> Source;

PrevUpHomeNext