Commits

Anonymous committed af9b6f9

Started pygame2.openal documentation.

Comments (0)

Files changed (6)

 * freetype: correct error messages (e.g. on trying to scale pcf fonts)
 * freetype: brush up docs and examples
 * openal: check integrity and references for sources, buffers and listeners.
+* Check for leakage on accessing buffers (BufferProxy).
 
 Things to FIX:
 ==============

doc/src/openal_constants.rst

 .. module:: pygame2.openal.constants
    :synopsis: Constants used throughout the :mod:`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_*.
+
 Format Constants
 ----------------
 
    Provide a detailled description about how the data will be streamed
    to the sound system.
 
-
 .. data:: AL_FORMAT_MONO8
 
    Mono (1 channel) 8-bit data.
 
    The type of the source. This will be a value of
 
-     * AL_UNDETERMINED
-     * AL_STATIC
-     * AL_STREAMING
+     * :data:`AL_UNDETERMINED`
+     * :data:`AL_STATIC`
+     * :data:`AL_STREAMING`
 
 .. data:: AL_LOOPING
 
 
 .. data:: AL_BUFFER
 
-   The ID of the attached buffer
+   The ID of the attached buffer.
 
 .. data:: AL_SOURCE_STATE
 
    The state of the source. This will be a value of
 
-     * AL_STOPPED
-     * AL_PLAYING
-     * AL_PAUSED
+     * :data:`AL_STOPPED`
+     * :data:`AL_PLAYING`
+     * :data:`AL_PAUSED`
 
 .. data:: AL_BUFFERS_QUEUED
 
 
    The source playback position, in bytes.
 
+Source Type Constants
+^^^^^^^^^^^^^^^^^^^^^
+
+The following constants indicate the type of the source.
+
+.. data:: AL_UNDETERMINED
+
+   The type could not be determined.
+
+.. data:: AL_STATIC
+
+   It is a static source (e.g. a fixed buffer).
+
+.. data:: AL_STREAMING
+
+   It is a streaming source.
+   
+Source State Constants
+^^^^^^^^^^^^^^^^^^^^^^
+
+The following constants indicate the state of the source.
+
+.. data:: AL_STOPPED
+
+   The source playback is stopped.
+
+.. data:: AL_PLAYING
+
+   The source is currently playing.
+
+.. data:: AL_PAUSED
+
+   The source playback is paused.
+
 Listener Constants
 ------------------
 
 Those constance are used by the
 :attr:`pygame2.openal.Context.distance_model` property.
 
+.. data:: AL_DISTANCE_MODEL
+
+   Constant for querying or setting the current distance model. This is
+   implicitly done in :attr:`pygame2.openal.Context.distance_model`.
+
 .. data:: AL_INVERSE_DISTANCE
 
    TODO
 
    TODO
 
+Doppler Shift Constants
+-----------------------
 
-.. todo::
+The following constants are used for doppler effects using
+:attr:`pygame2.openal.Context.doppler_factor` and
+:attr:`pygame2.openal.Context.speed_of_sound`. They are used for compatibility
+reasons and interoperability with other code, but usually not needed within
+the :mod:`pygame2.openal` module.
 
-   Complete the constant descriptions.
+.. data:: AL_DOPPLER_FACTOR
+
+   Used to receive the currently set doppler factor value.
+
+.. data:: 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.
+
+.. data:: ALC_FREQUENCY
+
+   The :class:`pygame2.openal.Context` output frequency. This can be set by
+   passing a matching value tuple to the :class:`pygame2.openal.Context`
+   constructor.
+
+.. data:: ALC_MONO_SOURCES
+
+   The requested number of mono source for the :class:`pygame2.openal.Context`.
+   This can be set by passing a matching value tuple to the
+   :class:`pygame2.openal.Context` constructor.
+
+.. data:: ALC_STEREO_SOURCES
+
+   The requested number of stereo source for the :class:`pygame2.openal.Context`.
+   This can be set by passing a matching value tuple to the
+   :class:`pygame2.openal.Context` constructor.
+
+.. data:: ALC_REFRESH
+
+   The update rate of the context processing. This can be set by passing a
+   matching value tuple to the :class:`pygame2.openal.Context` constructor.
+
+.. data:: ALC_SYNC
+
+   Indicates a synchronous context. This can be set by passing a matching value
+   tuple to the :class:`pygame2.openal.Context` constructor.
+
+Error Constants
+---------------
+
+The following constants indicate OpenAL errors. They are usually mapped against
+:exc:`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 :mod:`pygame2.openal` module.
+
+.. data:: AL_NO_ERROR
+
+   No error.
+
+.. data:: AL_INVALID_NAME
+
+   A bad name (ID) was passed to an OpenAL function.
+
+.. data:: AL_INVALID_ENUM
+
+   An invalid enum value was passed to an OpenAL function.
+
+.. data:: AL_INVALID_VALUE
+
+   An invalid value was passed to an OpenAL function.
+
+.. data:: AL_INVALID_OPERATION
+
+   The requested operation is not valid.
+
+.. data:: AL_OUT_OF_MEMORY
+
+   The requested operation resulted in OpenAL running out of memory.
+
+.. data:: ALC_NO_ERROR
+
+   No error.
+
+.. data:: ALC_INVALID_DEVICE
+
+   A bad device was passed to an OpenAL function.
+
+.. data:: ALC_INVALID_CONTEXT
+
+   A bad context was passed to an OpenAL function.
+
+.. data:: ALC_INVALID_ENUM
+
+   An unknown enum value was passed to an OpenAL function.
+
+.. data:: ALC_INVALID_VALUE
+
+   An invalid value was passed to an OpenAL function.
+
+.. data:: ALC_OUT_OF_MEMORY
+
+   The requested operation resulted in OpenAL running out of memory.
+
+Miscellaneous Constants
+-----------------------
+
+.. data:: AL_TRUE
+
+   OpenAL boolean representing 'True'.
+   
+.. data:: AL_FALSE
+   
+   OpenAL boolean representing 'False'.
+   
+.. data:: ALC_TRUE
+
+   OpenAL Context boolean representing 'True'.
+
+.. data:: ALC_FALSE
+   
+   OpenAL Context boolean representing 'False'.
+
+.. data:: ALC_MAJOR_VERSION
+
+    Context constant for querying the context/device major version
+    (currently not supported in :mod:`pygame2.openal`).
+   
+.. data:: ALC_MINOR_VERSION
+
+   Context constant for querying the context/device minor version
+   (currently not supported in :mod:`pygame2.openal`).
+
+.. data:: ALC_ATTRIBUTES_SIZE
+
+   Context constant for querying the default attribute size
+   (currently not supported in :mod:`pygame2.openal`).
+
+.. data:: ALC_ALL_ATTRIBUTES
+
+   Context constant for querying all attributes
+   (currently not supported in :mod:`pygame2.openal`).
+
+.. data:: ALC_CAPTURE_SAMPLES
+
+   Context constant for querying a :class:`pygame2.openal.CaptureDevice` for
+   available samples to receive. This is implicitly done in
+   :meth:`pygame2.openal.CaptureDevice.get_samples`.
+
+.. data:: ALC_DEFAULT_DEVICE_SPECIFIER
+
+   Constant for querying the default output device name, OpenAL detected.
+   This is implicitly done in
+   :func:`pygame2.openal.get_default_ouput_device_name`.
+   
+.. data:: ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
+
+   Constant for querying the default capture device name, OpenAL detected.
+   This is implicitly done in
+   :func:`pygame2.openal.get_default_capture_device_name`.
+
+.. data:: ALC_DEVICE_SPECIFIER
+
+   Constant for querying the available output devices, OpenAL detected.
+   This is is implicitly done in :func:`pygame2.openal.list_output_devices`.
+
+.. data:: ALC_ALL_DEVICES_SPECIFIER
+   
+   Constant for querying the available output devices, OpenAL detected.
+   This is is implicitly done in :func:`pygame2.openal.list_output_devices`.
+
+.. data:: ALC_CAPTURE_DEVICE_SPECIFIER
+
+   Constant for querying the available capture devices, OpenAL detected.
+   This is is implicitly done in :func:`pygame2.openal.list_capture_devices`.
+
+.. data:: ALC_EXTENSIONS
+
+   Constant for querying the available context extensions, OpenAL detected
+   (currently not supported in :mod:`pygame2.openal`)
+
+.. data:: AL_VENDOR
+
+   Queries the OpenAL vendor (use with :func:`pygame2.openal.al_get_string`).
+
+.. data:: AL_VERSION
+
+   Queries the OpenAL version (use with :func:`pygame2.openal.al_get_string`).
+  
+.. data:: AL_RENDERER
+
+   Queries the OpenAL renderer (use with :func:`pygame2.openal.al_get_string`).
+
+.. data:: AL_EXTENSIONS
+
+   Queries the OpenAL extensions (use with :func:`pygame2.openal.al_get_string`).
+   
+TODO
+----
+
+.. data:: ALC_CHAN_CD_LOKI
+.. data:: ALC_CHAN_MAIN_LOKI
+.. data:: ALC_CHAN_PCM_LOKI
+.. data:: ALC_CONNECTED
+.. data:: ALC_DEFAULT_ALL_DEVICES_SPECIFIER
+.. data:: AL_BYTE_RW_OFFSETS_EXT
+.. data:: AL_DOPPLER_VELOCITY
+.. data:: AL_DYNAMIC_COPY_EXT
+.. data:: AL_DYNAMIC_READ_EXT
+.. data:: AL_DYNAMIC_WRITE_EXT
+.. data:: AL_EXTENSIONS
+.. data:: AL_FORMAT_IMA_ADPCM_MONO16_EXT
+.. data:: AL_FORMAT_IMA_ADPCM_STEREO16_EXT
+.. data:: AL_FORMAT_MONO_DOUBLE_EXT
+.. data:: AL_FORMAT_MONO_IMA4
+.. data:: AL_FORMAT_REAR8
+.. data:: AL_FORMAT_REAR16
+.. data:: AL_FORMAT_REAR32
+.. data:: AL_FORMAT_STEREO_DOUBLE_EXT
+.. data:: AL_FORMAT_STEREO_IMA4
+.. data:: AL_FORMAT_VORBIS_EXT
+.. data:: AL_FORMAT_WAVE_EXT
+.. data:: AL_ILLEGAL_COMMAND
+.. data:: AL_ILLEGAL_ENUM
+.. data:: AL_PENDING
+.. data:: AL_PROCESSED
+.. data:: AL_READ_ONLY_EXT
+.. data:: AL_READ_WRITE_EXT
+.. data:: AL_WRITE_ONLY_EXT
+.. data:: AL_SAMPLE_RW_OFFSETS_EXT
+.. data:: AL_SAMPLE_SINK_EXT
+.. data:: AL_SAMPLE_SOURCE_EXT
+.. data:: AL_STATIC_COPY_EXT
+.. data:: AL_STATIC_READ_EXT
+.. data:: AL_STATIC_WRITE_EXT
+.. data:: AL_UNUSED 

doc/src/openalbase.xml

   <alias>pygame2.openal</alias>
   <short>basic OpenAL wrapper module</short>
   <desc>
-    Basic Pygame2 OpenAL wrapper module.
-
-    Identifiers for the property get and set methods:
+    .. todo::
+    
+       detailled description of the OpenAL model, including contexts, devices,
+       source and listener bindings and the context/state driven behaviour.
+    
+    Type identifiers for the property get and set methods:
     
     +------+------------------------------------------------------------+
     | 'b'  | Get or set a single boolean value (e.g. AL_TRUE)           |
       
       The Buffers object provides methods and properties to manipulate
       certain aspects of the buffered data and can be queued to multiple
-      sources within the same context.
+      Sources within the same context.
 
       Buffers instances cannot be created directly, but are bound to a
       :class:`Device`. To create a Buffers instance for the currently
-      active :class:`Device`, use the :meth:`Context.create_buffers`
-      method.
+      active :class:`Device`, use the :meth:`Context.create_buffers` method
+      on the currently active :class:`Context`.
     </desc>
     <example></example>
     <method name="buffer_data">
-      <call>buffer_data (bufnum, format, data, samplerate)</call>
-      <desc>
-        Buffers a chunk of *data* into one of the created buffers.
+      <call>buffer_data (bufnum, format, data, samplerate) -> None</call>
+      <desc>Buffers a chunk of *data* into one of the created buffers.
+      
+        Buffers a chunk of PCM *data* into the buffer at *bufnum*. *format*
+        describes the audio format of the data (see
+        :mod:`pygame2.openal.constants` for
+        more details). *samplerate* denotes the sample rate in Hz.
       </desc>
       <example></example>
     </method>
     <attr name="buffers">
-      <desc>The buffer identifiers used in the Buffers instance.</desc>
+      <desc>Gets the buffer identifiers used in the Buffers instance.</desc>
       <example></example>
     </attr>
     <attr name="count">
-      <desc>The number of buffers.</desc>
+      <desc>Gets the number of buffers managed in the Buffers instance.</desc>
       <example></example>
     </attr>
     <method name="get_prop">
       <call>get_prop (bufnum, prop, type) -> value or (value, ...) </call>
-      <desc>
-        Retrieves the value(s) of an OpenAL property for the Buffers.
+      <desc>Retrieves the value(s) of an OpenAL property for the Buffers.
+      
+        Retrieves the value or values of a buffer-related OpenAL property for
+        the buffer identified by *bufnum*. *prop* can be any valid buffer
+        constant and *type* **must** be a valid value type identifier for the
+        constant.
       </desc>
       <example></example>
     </method>
     <method name="set_prop">
-      <call>set_prop (</call>
-      <desc></desc>
+      <call>set_prop (bufnum, prop, value[,type]) -> None</call>
+      <desc>Sets the value(s) of an OpenAL property for the Buffers.
+      
+        Sets the value or values of a buffer-related OpenAL property for the 
+        buffer identified by *bufnum*. *prop* can be any valid buffer
+        constant, while *value* **must** be valid for the constant.
+        
+        If *type* is omitted, the function tries to guess, which type should be
+        used from the passed value(s). Guessing tries to convert values
+        implicitly, where possible, so if there are ambiguous values, it is
+        better to provide *type*.
+      </desc>
       <example></example>
     </method>
   </class>
   </class>
 
   <class name="Listener">
-    <constructor>Listener</constructor>
-    <desc>None</desc>
+    <constructor>Listener () -> NotImplementedError</constructor>
+    <desc>
+      The Listener represents the user hearing the sounds played by OpenAL in a
+      specific Context. Source playback is done relative to the position of the
+      Listener in the 3D space.
+    
+      Listener instances cannot be created directly, but are bound to a
+      :class:`Context`. To create (or get) a Listener instance for the
+      currently active :class:`Context`, use the :attr:`Context.listener`
+      property.
+    </desc>
     <example></example>
     <method name="get_prop">
-      <call>get_prop ()</call>
-      <desc></desc>
+      <call>get_prop (prop, type) -> value or (value, ...)</call>
+      <desc>Retrieves the value(s) of an OpenAL property for the Listener.
+      
+        Retrieves the value or values of a listener-related OpenAL property.
+        *prop* can be any valid listener constant and *type* **must** be a
+        valid value type identifier for the constant.
+      </desc>
       <example></example>
     </method>
     <method name="set_prop">
-      <call>set_prop ()</call>
-      <desc></desc>
+      <call>set_prop (prop, value[, type]) -> None</call>
+      <desc>Sets the value(s) of an OpenAL property for the Listener.
+      
+        Sets the value or values of a listener-related OpenAL property.
+        *prop* can be any valid listener constant, while *value* **must** be
+        valid for the constant.
+        
+        If *type* is omitted, the function tries to guess, which type should be
+        used from the passed value(s). Guessing tries to convert values
+        implicitly, where possible, so if there are ambiguous values, it is
+        better to provide *type*.
+      </desc>
       <example></example>
     </method>
   </class>
 
   <class name="Sources">
-    <constructor>Sources</constructor>
-    <desc>None</desc>
+    <constructor>Sources () -> NotImplementedError</constructor>
+    <desc>
+      Sources store locations, directions, and other attributes of an object in
+      3D space and have a buffer associated with them for playback. When the
+      program wants to play a sound, it controls execution through a source
+      object. Sources are processed independently from each other and.
+      
+      Sources instances cannot be created directly, but are bound to a
+      :class:`Context`. To create a Sources instance for the currently
+      active :class:`Context`, use the :meth:`Context.create_sources` method.
+    </desc>
     <example></example>
     <attr name="count">
-      <desc>None</desc>
+      <desc>Gets the number of sources managed in the Sources instance.</desc>
       <example></example>
     </attr>
     <method name="get_prop">
-      <call>get_prop ()</call>
-      <desc></desc>
+      <call>get_prop (sourcenum, prop, type) -> value or (value, ...)</call>
+      <desc>Retrieves the value(s) of an OpenAL property for the Sources.
+      
+        Retrieves the value or values of a sources-related OpenAL property for
+        the source identified by *sourcenum*. *prop* can be any valid source
+        constant and *type* **must** be a valid value type identifier for the
+        constant.
+      </desc>
       <example></example>
     </method>
     <method name="pause">
-      <call>pause ()</call>
-      <desc></desc>
+      <call>pause (sourcenum) -> None
+        pause ((sourcenum1, sourcenum2, ...)) -> None
+      </call>
+      <desc>Pauses a single source or a set of sources.
+      
+        Pauses a single source identified by *sourcenum* or a set of sources
+        identified by the passed sequence of source identifiers.
+      </desc>
       <example></example>
     </method>
     <method name="play">
-      <call>play ()</call>
-      <desc></desc>
+      <call>play (sourcenum) -> None
+        play ((sourcenum1, sourcenum2, ...)) -> None
+      </call>
+      <desc>Plays a single source or a set of sources.
+      
+        Plays a single source identified by *sourcenum* or a set of sources
+        identified by the passed sequence of source identifiers.
+      </desc>
       <example></example>
     </method>
     <method name="queue_buffers">
-      <call>queue_buffers ()</call>
-      <desc></desc>
+      <call>queue_buffers (sourcenum, buffers) -> None</call>
+      <desc>Queues a :class:`Buffers` on a source.
+
+        Queues a :class:`Buffers` instance holding one or multiple audio buffers
+        on the source identified by *sourcenum*. The audio buffers in *buffers*
+        will be played in sequence.
+        
+        To retrieve the number of audio buffers already processed, you can query
+        the source with the :const:`AL_BUFFERS_PROCESSED` constant.
+      </desc>
       <example></example>
     </method>
     <method name="rewind">
-      <call>rewind ()</call>
-      <desc></desc>
+      <call>rewind (sourcenum) -> None
+        rewind ((sourcenum1, sourcenum2, ...)) -> None
+      </call>
+      <desc>Rewinds a single source or a set of sources.
+      
+        Rewinds a single source identified by *sourcenum* or a set of sources
+        identified by the passed sequence of source identifiers.
+      </desc>
       <example></example>
     </method>
     <method name="set_prop">
-      <call>set_prop ()</call>
-      <desc></desc>
+      <call>set_prop (sourcenum, prop, value[, type]) -> None</call>
+      <desc>Sets the value(s) of an OpenAL property for the Sources.
+      
+        Sets the value or values of a sources-related OpenAL property for the 
+        source identified by *sourcenum*. *prop* can be any valid source
+        constant, while *value* **must** be valid for the constant.
+        
+        If *type* is omitted, the function tries to guess, which type should be
+        used from the passed value(s). Guessing tries to convert values
+        implicitly, where possible, so if there are ambiguous values, it is
+        better to provide *type*.
+      </desc>
       <example></example>
     </method>
     <attr name="sources">
-      <desc>None</desc>
+      <desc>Gets the source identifiers used in the Sources instance.</desc>
       <example></example>
     </attr>
     <method name="stop">
-      <call>stop ()</call>
-      <desc></desc>
+      <call>stop (sourcenum) -> None
+        stop ((sourcenum1, sourcenum2, ...)) -> None
+      </call>
+      <desc>Stops playing a single source or a set of sources.
+      
+        Stops playing a single source identified by *sourcenum* or a set of
+        sources identified by the passed sequence of source identifiers.
+      </desc>
       <example></example>
     </method>
     <method name="unqueue_buffers">
-      <call>unqueue_buffers ()</call>
-      <desc></desc>
+      <call>unqueue_buffers (sourcenum, buffers) -> None</call>
+      <desc>Unqueues processed :class:`Buffers` from a source
+      
+        Unqueus an already processed :class:`Buffers` with one or multiple audio
+        buffers from the source identified by *sourcenum*.
+        
+        .. note::
+        
+          This will only succeed, when all buffers within the :class`Buffers`
+          instance were processed by the source. Otherwise a
+          :exc:`pygame2.Error` will be raised.
+      </desc>
       <example></example>
     </method>
   </class>
 
   <func name="al_get_string">
-    <call>al_get_string ()</call>
-    <desc></desc>
-    <example></example>
+    <call>al_get_string (prop) -> str</call>
+    <desc>Retrieves an OpenAL string property.
+    
+      For valid property values, see :mod:`pygame2.openal.constants`.
+    </desc>
+    <example>
+      import pygame2.openal as openal
+      import pygame2.openal.constants as const
+      
+      print (openal.al_get_string (const.AL_VENDOR))
+    </example>
   </func>
   <func name="get_default_capture_device_name">
-    <call>get_default_capture_device_name ()</call>
-    <desc></desc>
+    <call>get_default_capture_device_name () -> str</call>
+    <desc>Gets the name of the default capture device.</desc>
     <example></example>
   </func>
   <func name="get_default_output_device_name">
-    <call>get_default_output_device_name ()</call>
-    <desc></desc>
+    <call>get_default_output_device_name () -> str</call>
+    <desc>Gets the name of the default output device.</desc>
     <example></example>
   </func>
   <func name="get_enum_value">
-    <call>get_enum_value ()</call>
-    <desc></desc>
+    <call>get_enum_value (name) -> long</call>
+    <desc>Gets the value of an OpenAL enumeration name.</desc>
     <example></example>
   </func>
   <func name="get_error">
-    <call>get_error ()</call>
-    <desc></desc>
+    <call>get_error () -> str</call>
+    <desc>
+      Gets the last OpenAL error message occured.
+
+      OpenAL maintains an internal error message. This message will usually
+      be given to you when a :exc:`pygame2.Error` is raised.
+
+      You will rarely need to call this function.
+      
+      .. note::
+        
+        Once called, the internal OpenAL error message will be cleared, so that
+        subsequent calls of this function will return *None*, until a new
+        OpenAL error occurs.
+    </desc>
     <example></example>
   </func>
   <func name="init">
     <call>init ()</call>
-    <desc></desc>
+    <desc>Initializes the underlying OpenAL library.
+
+      .. note::    
+        
+        This function is currently only available for compliance with other
+        pygame2 modules, but does not actually perform anything. The behaviour
+        might change in later pygame2 versions, so it is generally safe to call
+        this function.
+    </desc>
     <example></example>
   </func>
   <func name="is_extension_present">
-    <call>is_extension_present ()</call>
-    <desc></desc>
+    <call>is_extension_present (name[, device]) -> bool</call>
+    <desc>Checks, whether the specified extension is available.
+    
+      Checks, whether the extension specified by *name* is available in the
+      current OpenAL implementation. If a *device* is passed, the OpenAL's
+      :pygame2.openal.Device` will be checked for the extension.
+    </desc>
     <example></example>
   </func>
   <func name="list_capture_devices">
-    <call>list_capture_devices ()</call>
-    <desc></desc>
+    <call>list_capture_devices () -> [str, str, ...]</call>
+    <desc>Retrieves a list of available capture devices.
+    
+      Retrieves a list of available and supported capture device names. If no
+      capture devices could be found, an empty list is returned.
+    </desc>
     <example></example>
   </func>
   <func name="list_output_devices">
     <call>list_output_devices</call>
-    <desc></desc>
+    <desc>Retrieves a list of available output devices.
+    
+      Retrieves a list of available and supported output device names. If no
+      output devices could be found, an empty list is returned.
+    </desc>
     <example></example>
   </func>
   <func name="quit">
     <call>quit ()</call>
-    <desc></desc>
+    <desc>Shuts down the underlying OpenAL library.
+    
+      .. note::    
+        
+        This function is currently only available for compliance with other
+        pygame2 modules, but does not actually perform anything. The behaviour
+        might change in later pygame2 versions, so it is generally safe to call
+        this function.
+    </desc>
     <example></example>
   </func>
   <func name="set_current_context">
-    <call>set_current_context ()</call>
-    <desc></desc>
+    <call>set_current_context (context) -> bool</call>
+    <desc>Switches the current OpenAL context.
+    
+      Switches the current OpenAL context. The current OpenAL context can then
+      be influenced in various ways, such as attaching sources, buffers and
+      tweaking its settings.
+      
+      Returns True, if the context could be switched successfully, otherwise
+      False.
+    </desc>
     <example></example>
   </func>
 </module>

doc/src/sdl_constants.rst

 
    Queries the context (action) state without actually changing it.
 
-
-Various Constants
------------------
+Miscellaneous Constants
+-----------------------
 
 .. data:: BYTEORDER
 

doc/src/sdlmixer_constants.rst

 
    The music format is MP3 encoded data (using libmad as decoder).
 
-Other Constants
----------------
+Miscellaneous Constants
+-----------------------
 
 .. data:: CHANNELS
 

src/openal/sources.c

     }
     
     CLEAR_ALERROR_STATE ();
+    
+    /* TODO: if alSourcei (AL_PROCESSED) < buffers->count, an error occurs.
+     * should we reduce the amount internally? */
+    
     alSourceUnqueueBuffers ((ALuint) bufnum, ((PyBuffers*)buffers)->count,
         PyBuffers_AsBuffers(buffers));
     if (SetALErrorException (alGetError (), 0))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.