Sources
Distant scream
A source is something that plays a sound in the world. It's linked to a buffer to play and it have a position and orientation in the world.
Create and Destroy
Sources are created with alGenSources() and destroyed with alDeleteSources.
Functions
alSourcePlay: Start playing the source and if it is already playing start it at the beginning.
alSourcePause: Pause the source.
alSoueceStop: Changed to source to the stopped state.
alSourceRewind
alSourceQueueBuffers
Set Parameters
These are the following options that can be set on a source with the alSourcei.
AL_BUFFER: This is used to set the id of the buffer that has the sound this source will play.
AL_POSITION: This set the position of the source. Three float values.
AL_VELOCITY
AL_DIRECTION: This set the way the source is facing. Six float values.
AL_GAIN: Scalar amplitude multiplier. Default value 1.0f.
AL_PITCH
AL_LOOPING: If this is true (default false) the source will loop it sound when playing.
AL_SOURCE_RELATIVE: If this is true (default is false) then the position, orientation of the source will be relative to the listner instead of the absolute positions in the world.
AL_REFERENCE_DISTANCE
AL_MIN_GAIN
AL_MAX_GAIN
AL_REFERENCE_DISTANCE
AL_ROLLOFF_FACTOR
AL_MAX_DISTANCE
AL_CONE_INNER_ANGLE
AL_CONE_OUTER_ANGLE
AL_CONE_OUTER_GAIN
Get Parameters
AL_SOURCE_STATE
AL_SEC_OFFSET
AL_SAMPLE_OFFSET
AL_BYTE_OFFSET
AL_SOURCE_TYPE
AL_BUFFER_QUEUED
AL_BUFFERS_PROCESSED