pygame2.openal.constants – Constants for OpenAL
This module contains the constants used throughout the
pygame2.openal module.
OpenAL constants separate into two different types, general constants, which
are prefixed with AL_ and context/device specific constants, which are
prefixed with ALC_.
Buffer Constants
Those constants are used by the pygame2.openal.Buffers.set_prop()
and pygame2.openal.Buffers.get_prop() methods.
-
pygame2.openal.constants.AL_FREQUENCY
- The frequency of the buffer (and its data) in Hz. The provided value
must be an integer.
-
pygame2.openal.constants.AL_BITS
- The bit depth of the buffer. The provided value must be an integer.
-
pygame2.openal.constants.AL_CHANNELS
- The number of channels for the buffered data. The provided value
must be an integer greater than 0.
-
pygame2.openal.constants.AL_SIZE
- The size of the buffered data in bytes.
-
pygame2.openal.constants.AL_DATA
- The original location the buffered data came from. This is generally
useless, as the original data location was probably freed after the
data was buffered.
Source Constants
Those constants are used by the pygame2.openal.Sources.set_prop()
and pygame2.openal.Sources.get_prop() methods.
-
pygame2.openal.constants.AL_PITCH
- The pitch multiplier. The provided value must be a positive floating
point value.
-
pygame2.openal.constants.AL_GAIN
- The source gain. The provided value should be a positive floating
point value.
-
pygame2.openal.constants.AL_MAX_DISTANCE
- Used with the Inverse Clamped Distance Model to set the distance
where there will no longer be any attenuation of the source. The
provided value must be an integer or floating point value.
-
pygame2.openal.constants.AL_ROLLOFF_FACTOR
- The rolloff ratge for the source. The provided value should be an
integer or floating point value.
-
pygame2.openal.constants.AL_REFERENCE_DISTANCE
- The distance under which the volume for the source would normally
drop by half. The provided value should be an integer or floating
point value.
-
pygame2.openal.constants.AL_MIN_GAIN
- The minimum source gain. The provided value must be a postive
floating point value.
-
pygame2.openal.constants.AL_MAX_GAIN
- The maximum source gain. The provided value must be a postive
floating point value.
-
pygame2.openal.constants.AL_CONE_OUTER_GAIN
- The gain when outside the oriented cone. The provided value must be a
postive floating point value.
-
pygame2.openal.constants.AL_CONE_INNER_ANGLE
- The gain when inside the oriented cone. The provided value must be a
postive floating point value.
-
pygame2.openal.constants.AL_CONE_OUTER_ANGLE
- The outer angle of the sound cone in degrees. The provided value must
be a integer or floating point value.
-
pygame2.openal.constants.AL_POSITION
- The X, Y, Z position of the source. The provided value must be a
triplet of floating point values.
-
pygame2.openal.constants.AL_VELOCITY
- The X, Y, Z velocity of the source. The provided value must be a
triplet of floating point values.
-
pygame2.openal.constants.AL_DIRECTION
- The X, Y, Z direction of the source. The provided value must be a
triplet of integer or floating point values.
-
pygame2.openal.constants.AL_SOURCE_RELATIVE
- Determines if the positions of the source are relative to the
listener. The provided value must be an integer.
-
pygame2.openal.constants.AL_SOURCE_TYPE
The type of the source. This will be a value of
-
pygame2.openal.constants.AL_LOOPING
- Turns looping on (AL_TRUE) or off (AL_FALSE).
-
pygame2.openal.constants.AL_BUFFER
- The ID of the attached buffer.
-
pygame2.openal.constants.AL_SOURCE_STATE
The state of the source. This will be a value of
-
pygame2.openal.constants.AL_BUFFERS_QUEUED
- The number of buffers queued on this source.
-
pygame2.openal.constants.AL_BUFFERS_PROCESSED
- The number of buffers in the queue that have been processed.
-
pygame2.openal.constants.AL_SEC_OFFSET
- The source playback position, in seconds.
-
pygame2.openal.constants.AL_SAMPLE_OFFSET
- The source playback position, in samples.
-
pygame2.openal.constants.AL_BYTE_OFFSET
- The source playback position, in bytes.
Source Type Constants
The following constants indicate the type of the source.
-
pygame2.openal.constants.AL_UNDETERMINED
- The type could not be determined.
-
pygame2.openal.constants.AL_STATIC
- It is a static source (e.g. a fixed buffer).
-
pygame2.openal.constants.AL_STREAMING
- It is a streaming source.
Source State Constants
The following constants indicate the state of the source.
-
pygame2.openal.constants.AL_STOPPED
- The source playback is stopped.
-
pygame2.openal.constants.AL_PLAYING
- The source is currently playing.
-
pygame2.openal.constants.AL_PAUSED
- The source playback is paused.
Listener Constants
Those constants are used by the pygame2.openal.Listener.set_prop()
and pygame2.openal.Listener.get_prop() methods.
-
pygame2.openal.constants.AL_GAIN
- The master gain. The provided value should be a positive floating
point value.
-
pygame2.openal.constants.AL_POSITION
- The X, Y, Z position of the listener. The provided value must be a
triplet of floating point values.
-
pygame2.openal.constants.AL_VELOCITY
- The X, Y, Z velocity of the listener. The provided value must be a
triplet of floating point values.
-
pygame2.openal.constants.AL_ORIENTATION
- The orientation of the listener, expressed as “at” and “up” vectors
(6 elements) of floating point values.
Distance Model Constants
Those constance are used by the
pygame2.openal.Context.distance_model property.
-
pygame2.openal.constants.AL_DISTANCE_MODEL
- Constant for querying or setting the current distance model. This is
implicitly done in pygame2.openal.Context.distance_model.
-
pygame2.openal.constants.AL_INVERSE_DISTANCE
- TODO
-
pygame2.openal.constants.AL_INVERSE_DISTANCE_CLAMPED
- TODO
-
pygame2.openal.constants.AL_LINEAR_DISTANCE
- TODO
-
pygame2.openal.constants.AL_LINEAR_DISTANCE_CLAMPED
- TODO
-
pygame2.openal.constants.AL_EXPONENT_DISTANCE
- TODO
-
pygame2.openal.constants.AL_EXPONENT_DISTANCE_CLAMPED
- TODO
-
pygame2.openal.constants.AL_NONE
- TODO
Doppler Shift Constants
The following constants are used for doppler effects using
pygame2.openal.Context.doppler_factor and
pygame2.openal.Context.speed_of_sound. They are used for compatibility
reasons and interoperability with other code, but usually not needed within
the pygame2.openal module.
-
pygame2.openal.constants.AL_DOPPLER_FACTOR
- Used to receive the currently set doppler factor value.
-
pygame2.openal.constants.AL_SPEED_OF_SOUND
- Used to receive the currently set speed of sound value.
Context and Device Constants
The following constants are used in conjunction with OpenAL Contexts and
Devices.
-
pygame2.openal.constants.ALC_FREQUENCY
- The pygame2.openal.Context output frequency. This can be set by
passing a matching value tuple to the pygame2.openal.Context
constructor.
-
pygame2.openal.constants.ALC_MONO_SOURCES
- The requested number of mono source for the pygame2.openal.Context.
This can be set by passing a matching value tuple to the
pygame2.openal.Context constructor.
-
pygame2.openal.constants.ALC_STEREO_SOURCES
- The requested number of stereo source for the pygame2.openal.Context.
This can be set by passing a matching value tuple to the
pygame2.openal.Context constructor.
-
pygame2.openal.constants.ALC_REFRESH
- The update rate of the context processing. This can be set by passing a
matching value tuple to the pygame2.openal.Context constructor.
-
pygame2.openal.constants.ALC_SYNC
- Indicates a synchronous context. This can be set by passing a matching value
tuple to the pygame2.openal.Context constructor.
Error Constants
The following constants indicate OpenAL errors. They are usually mapped against
pygame2.Error instances with a matching description. They are only used
for compatibility reasons and interoperability with other code, but usually not
needed within the pygame2.openal module.
-
pygame2.openal.constants.AL_NO_ERROR
- No error.
-
pygame2.openal.constants.AL_INVALID_NAME
- A bad name (ID) was passed to an OpenAL function.
-
pygame2.openal.constants.AL_INVALID_ENUM
- An invalid enum value was passed to an OpenAL function.
-
pygame2.openal.constants.AL_INVALID_VALUE
- An invalid value was passed to an OpenAL function.
-
pygame2.openal.constants.AL_INVALID_OPERATION
- The requested operation is not valid.
-
pygame2.openal.constants.AL_OUT_OF_MEMORY
- The requested operation resulted in OpenAL running out of memory.
-
pygame2.openal.constants.ALC_NO_ERROR
- No error.
-
pygame2.openal.constants.ALC_INVALID_DEVICE
- A bad device was passed to an OpenAL function.
-
pygame2.openal.constants.ALC_INVALID_CONTEXT
- A bad context was passed to an OpenAL function.
-
pygame2.openal.constants.ALC_INVALID_ENUM
- An unknown enum value was passed to an OpenAL function.
-
pygame2.openal.constants.ALC_INVALID_VALUE
- An invalid value was passed to an OpenAL function.
-
pygame2.openal.constants.ALC_OUT_OF_MEMORY
- The requested operation resulted in OpenAL running out of memory.
Miscellaneous Constants
-
pygame2.openal.constants.AL_TRUE
- OpenAL boolean representing ‘True’.
-
pygame2.openal.constants.AL_FALSE
- OpenAL boolean representing ‘False’.
-
pygame2.openal.constants.ALC_TRUE
- OpenAL Context boolean representing ‘True’.
-
pygame2.openal.constants.ALC_FALSE
- OpenAL Context boolean representing ‘False’.
-
pygame2.openal.constants.ALC_MAJOR_VERSION
- Context constant for querying the context/device major version
(currently not supported in pygame2.openal).
-
pygame2.openal.constants.ALC_MINOR_VERSION
- Context constant for querying the context/device minor version
(currently not supported in pygame2.openal).
-
pygame2.openal.constants.ALC_ATTRIBUTES_SIZE
- Context constant for querying the default attribute size
(currently not supported in pygame2.openal).
-
pygame2.openal.constants.ALC_ALL_ATTRIBUTES
- Context constant for querying all attributes
(currently not supported in pygame2.openal).
-
pygame2.openal.constants.ALC_CAPTURE_SAMPLES
- Context constant for querying a pygame2.openal.CaptureDevice for
available samples to receive. This is implicitly done in
pygame2.openal.CaptureDevice.get_samples().
-
pygame2.openal.constants.ALC_DEFAULT_DEVICE_SPECIFIER
- Constant for querying the default output device name, OpenAL detected.
This is implicitly done in
pygame2.openal.get_default_ouput_device_name().
-
pygame2.openal.constants.ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
- Constant for querying the default capture device name, OpenAL detected.
This is implicitly done in
pygame2.openal.get_default_capture_device_name().
-
pygame2.openal.constants.ALC_DEVICE_SPECIFIER
- Constant for querying the available output devices, OpenAL detected.
This is is implicitly done in pygame2.openal.list_output_devices().
-
pygame2.openal.constants.ALC_ALL_DEVICES_SPECIFIER
- Constant for querying the available output devices, OpenAL detected.
This is is implicitly done in pygame2.openal.list_output_devices().
-
pygame2.openal.constants.ALC_CAPTURE_DEVICE_SPECIFIER
- Constant for querying the available capture devices, OpenAL detected.
This is is implicitly done in pygame2.openal.list_capture_devices().
-
pygame2.openal.constants.ALC_EXTENSIONS
- Constant for querying the available context extensions, OpenAL detected
(currently not supported in pygame2.openal)
-
pygame2.openal.constants.AL_VENDOR
- Queries the OpenAL vendor (use with pygame2.openal.al_get_string()).
-
pygame2.openal.constants.AL_VERSION
- Queries the OpenAL version (use with pygame2.openal.al_get_string()).
-
pygame2.openal.constants.AL_RENDERER
- Queries the OpenAL renderer (use with pygame2.openal.al_get_string()).
-
pygame2.openal.constants.AL_EXTENSIONS
- Queries the OpenAL extensions (use with pygame2.openal.al_get_string()).
TODO
-
pygame2.openal.constants.ALC_CHAN_CD_LOKI
-
pygame2.openal.constants.ALC_CHAN_MAIN_LOKI
-
pygame2.openal.constants.ALC_CHAN_PCM_LOKI
-
pygame2.openal.constants.ALC_CONNECTED
-
pygame2.openal.constants.ALC_DEFAULT_ALL_DEVICES_SPECIFIER
-
pygame2.openal.constants.AL_BYTE_RW_OFFSETS_EXT
-
pygame2.openal.constants.AL_DOPPLER_VELOCITY
-
pygame2.openal.constants.AL_DYNAMIC_COPY_EXT
-
pygame2.openal.constants.AL_DYNAMIC_READ_EXT
-
pygame2.openal.constants.AL_DYNAMIC_WRITE_EXT
-
pygame2.openal.constants.AL_EXTENSIONS
-
pygame2.openal.constants.AL_FORMAT_IMA_ADPCM_MONO16_EXT
-
pygame2.openal.constants.AL_FORMAT_IMA_ADPCM_STEREO16_EXT
-
pygame2.openal.constants.AL_FORMAT_MONO_DOUBLE_EXT
-
pygame2.openal.constants.AL_FORMAT_MONO_IMA4
-
pygame2.openal.constants.AL_FORMAT_REAR8
-
pygame2.openal.constants.AL_FORMAT_REAR16
-
pygame2.openal.constants.AL_FORMAT_REAR32
-
pygame2.openal.constants.AL_FORMAT_STEREO_DOUBLE_EXT
-
pygame2.openal.constants.AL_FORMAT_STEREO_IMA4
-
pygame2.openal.constants.AL_FORMAT_VORBIS_EXT
-
pygame2.openal.constants.AL_FORMAT_WAVE_EXT
-
pygame2.openal.constants.AL_ILLEGAL_COMMAND
-
pygame2.openal.constants.AL_ILLEGAL_ENUM
-
pygame2.openal.constants.AL_PENDING
-
pygame2.openal.constants.AL_PROCESSED
-
pygame2.openal.constants.AL_READ_ONLY_EXT
-
pygame2.openal.constants.AL_READ_WRITE_EXT
-
pygame2.openal.constants.AL_WRITE_ONLY_EXT
-
pygame2.openal.constants.AL_SAMPLE_RW_OFFSETS_EXT
-
pygame2.openal.constants.AL_SAMPLE_SINK_EXT
-
pygame2.openal.constants.AL_SAMPLE_SOURCE_EXT
-
pygame2.openal.constants.AL_STATIC_COPY_EXT
-
pygame2.openal.constants.AL_STATIC_READ_EXT
-
pygame2.openal.constants.AL_STATIC_WRITE_EXT
-
pygame2.openal.constants.AL_UNUSED