%global _empty_manifest_terminate_build 0 Name: python-PyOpenAL Version: 0.7.11a1 Release: 1 Summary: OpenAL integration for Python License: Unilicense URL: https://github.com/Zuzu-Typ/PyOpenAL Source0: https://mirrors.nju.edu.cn/pypi/web/packages/04/a8/8c09f20724e99790952014dd70f8c1fa6ca9cbf3bef4a43e188e09b959a4/PyOpenAL-0.7.11a1.tar.gz %description # PyOpenAL PyOpenAL provides OpenAL bindings for python as well as an interface to them. It also provides a simple way to play WAVE and - if [PyOgg](https://github.com/Zuzu-Typ/PyOgg) is installed - even OGG Vorbis, OGG Opus and FLAC files. You can install it using the PyPI: pip install PyOpenAL PyOpenAL requires a shared OpenAL library (e.g. OpenAL32.dll), one of which the Windows distributions already come with ([OpenAL Soft](http://kcat.strangesoft.net/openal.html) by kcat). You can use the [official OpenAL library](http://www.openal.org/) (deprecated) or any other compatible library, like the aforementioned [OpenAL Soft library](http://kcat.strangesoft.net/openal.html), which is still actively developed. PyOpenAL provides OpenAL bindings, as you would find them in C++, meaning you can follow any [OpenAL C++ tutorial](http://www.openal.org/documentation/) with Python. OpenAL's methods expect C types as arguments, which means you will have to convert Python's types to C types using [ctypes](https://docs.python.org/3/library/ctypes.html) if you want to use them directly. Don't worry though, PyOpenAL can be used without the need to do that. I removed the support for ALUT, because it is basically impossible to build nowadays. If you want ALUT support, please use the original [python-openal from forrestv](https://github.com/forrestv/python-openal) ### Examples ##### Playing a wave file ```python # import PyOpenAL (will require an OpenAL shared library) from openal import * # import the time module, for sleeping during playback import time # open our wave file source = oalOpen("test.wav") # and start playback source.play() # check if the file is still playing while source.get_state() == AL_PLAYING: # wait until the file is done playing time.sleep(1) # release resources (don't forget this) oalQuit() ``` ##### Playing an OGG Opus file (with PyOgg) ```python # This requires PyOgg to be installed ( pip install pyogg ) from openal import * import time source = oalOpen("test.opus") source.play() while source.get_state() == AL_PLAYING: time.sleep(1) # remember, don't forget to quit oalQuit() ``` ##### Streaming a file ```python from openal import * # The following two lines are optional. You can use them, if you can't update the stream frequently enough # This one specifies how much data is supposed to be stored in each buffer (only applies for OGG Vorbis and Opus files) pyoggSetStreamBufferSize(4096*4) # This one sets the maximum amount of buffers to be created at a time oalSetStreamBufferCount(4) sourceStream = oalStream("test.ogg") sourceStream.play() while sourceStream.get_state() == AL_PLAYING: # do stuff [...] # update the stream (load new data) # if you don't do this repeatedly, the stream will suffocate sourceStream.update() oalQuit() ``` ### Using OpenAL functions ```python # Here we only import OpenAL's functions # (in case you don't need or want PyOpenAL's functions and classes) from openal.al import * from openal.alc import * [...] # It's as simple as that: alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED) # Or a little more complicated, it really depends: alSourceUnqueueBuffers(source_id, 1, ctypes.pointer(ctypes.c_uint(buffer_ids[id]))) [...] ``` ### Reference (for PyOpenAL's own classes and functions) ``` oalInit(device_specifier = None, context_attr_list = None) -> None # initializes PyOpenAL # this is called automatically, unless you set OAL_DONT_AUTO_INIT device_specifier # you can set a custom device with this context_attr_list # you can pass additional arguments to context creation oalGetInit() -> initialized # finds out wether or not PyOpenAL is initialized oalQuit() -> None # exits out of OpenAL and destroys all existing Sources and Buffers oalOpen(path, ext_hint = None) -> Source # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a Source object path # path to the file (relative or absolute) ext_hint # if the filetype is not wav, wave, ogg, vorbis or opus, you should supply a hint to the extension oalStream(path, ext_hint = None) -> SourceStream # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a SourceStream object, that streams the data # you should use this instead of Source for Soundtracks or other long tracks (as it uses less memory) # you will have to update it frequently to avoid suffocation of the stream # you can neither rewind nor loop a SourceStream (currently) path # path to the file (relative or absolute) ext_hint # if the filetype is not ogg, vorbis or opus, you should supply a hint to the extension openal.Listener() # class for hadling the listener (you) # an instance of this class is created when you import PyOpenAL. # it can be retrieved using oalGetListener() # you do NOT have to create an instance yourself Listener.move(v) # move the listener by v v # a translation vector represented as (x, y, z) Listener.move_to(v) # set the listener's position to v v # a position vector represented as (x, y, z) Listener.set_position(v) # see Listener.move_to Listener.set_orientation(v) # sets the listener's orientation to v v # orientation represented as (frontX, frontY, frontZ, upX, upY, upZ) Listener.set_velocity(v) # sets the listener's velocity to v v # velocity represented as (vX, vY, vZ) Listener.set_gain(value) # sets the listener's gain (volume) to value value openal.oalGetListener() -> Listener # returns PyOpenAL's Listener openal.Source(buffer_ = None) # class for managing a source buffer_ # where this source finds it's data Source.play() -> None # starts playing Source.stop() -> None # stops playback Source.pause() -> None # pauses playback (use play to resume) Source.rewind() -> None # goes back to the start of the track Source.pitch # the source's current pitch Source.gain # the source's current gain Source.max_distance # the source's current max_distance Source.rolloff_factor # the source's current rolloff_factor Source.reference_distance # the source's current reference_distance Source.min_gain # the source's current min_gain Source.max_gain # the source's current max_gain Source.cone_outer_angle # the source's current cone_outer_angle Source.cone_inner_angle # the source's current cone_inner_angle Source.cone_outer_gain # the source's current cone_outer_gain Source.position # the source's current position (use .x, .y, and .z to access it's items or .toTuple()) Source.velocity # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.direction # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.relative # wether or not the source is relative to the listener Source.source_type # the source's current source_type (either AL_UNDETERMINED, AL_STATIC or AL_STREAMING) Source.set_pitch(value) -> None # set the pitch for this source value # pitch Source.set_gain(value) -> None # set the gain for this source value # gain Source.set_max_distance(value) -> None # set the max_distance for this source value # max_distance Source.set_rolloff_factor(value) -> None # set the rolloff_factor for this source value # rolloff_factor Source.set_reference_distance(value) -> None # set the reference_distance for this source value # reference_distance Source.set_min_gain(value) -> None # set the min_gain for this source value # min_gain Source.set_max_gain(value) -> None # set the max_gain for this source value # max_gain Source.set_cone_outer_gain(value) -> None # set the cone_outer_gain for this source value # cone_outer_gain Source.set_cone_inner_angle(value) -> None # set the cone_inner_angle for this source value # cone_inner_angle Source.set_cone_outer_angle(value) -> None # set the cone_outer_angle for this source value # cone_outer_angle Source.set_position(value) -> None # set the position for this source value # position Source.set_velocity(value) -> None # set the velocity for this source value # velocity Source.set_looping(value) -> None # set the looping for this source value # looping Source.set_direction(value) -> None # set the direction for this source value # direction Source.set_source_relative(value) -> None # set the source_relative for this source value # source_relative Source.set_source_type(value) -> None # set the source_type for this source value # source_type Source.set_buffer(buffer_) -> None # set the buffer for this source value # buffer Source.get_state() -> state of the Source (e.g. AL_PLAYING, AL_STOPPED,etc.) # get the current state of the source openal.SourceStream(stream) # class for managing a source in streaming mode stream # where the buffer gets it's data from update() -> playing # load more data to play (if necessary). # if you don't call this frequently, the source will stop playing after it reaches the last buffer # in that case you should consider increasing the buffer size or amount using oalSetStreamBufferCount or pyoggSetStreamBufferSize openal.Buffer(*args) # class for managing OpenAL buffers args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.fill(*args) -> None # fill the buffer args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.destroy() -> None # destroy this buffer openal.StreamBuffer(stream, count) # class for managing OpenAL buffers for audio streaming stream # from where to get the data count # how many buffers to create (usually OAL_STREAM_BUFFER_COUNT, which is 2 initially) Buffer.fill_buffer(id_) -> None # fill the buffer id_ # load some data into this buffer Buffer.destroy() -> None # destroy this streambuffer oalGetEnum(enum) -> ENUM # returns a literal representation of enum enum # AL_ or ALC_ enumerator oalGetALEnum(enum) -> ENUM # returns a literal representation of an AL_ enum enum # AL_ enumerator oalGetALCEnum(enum) -> ENUM # returns a literal representation of an ALC_ enum enum # ALC_ enumerator oalGetContext() -> context # returns the context used by PyOpenAL oalGetDevice() -> device # returns the device used by PyOpenAL oalSetAutoInit(val) -> None # changes wether or not PyOpenAL initializes automatically val # wether or not to auto-init # The other methods and variables are the same as in Source # (note that you can't loop, because the file can be read only once (by now)) ``` %package -n python3-PyOpenAL Summary: OpenAL integration for Python Provides: python-PyOpenAL BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-PyOpenAL # PyOpenAL PyOpenAL provides OpenAL bindings for python as well as an interface to them. It also provides a simple way to play WAVE and - if [PyOgg](https://github.com/Zuzu-Typ/PyOgg) is installed - even OGG Vorbis, OGG Opus and FLAC files. You can install it using the PyPI: pip install PyOpenAL PyOpenAL requires a shared OpenAL library (e.g. OpenAL32.dll), one of which the Windows distributions already come with ([OpenAL Soft](http://kcat.strangesoft.net/openal.html) by kcat). You can use the [official OpenAL library](http://www.openal.org/) (deprecated) or any other compatible library, like the aforementioned [OpenAL Soft library](http://kcat.strangesoft.net/openal.html), which is still actively developed. PyOpenAL provides OpenAL bindings, as you would find them in C++, meaning you can follow any [OpenAL C++ tutorial](http://www.openal.org/documentation/) with Python. OpenAL's methods expect C types as arguments, which means you will have to convert Python's types to C types using [ctypes](https://docs.python.org/3/library/ctypes.html) if you want to use them directly. Don't worry though, PyOpenAL can be used without the need to do that. I removed the support for ALUT, because it is basically impossible to build nowadays. If you want ALUT support, please use the original [python-openal from forrestv](https://github.com/forrestv/python-openal) ### Examples ##### Playing a wave file ```python # import PyOpenAL (will require an OpenAL shared library) from openal import * # import the time module, for sleeping during playback import time # open our wave file source = oalOpen("test.wav") # and start playback source.play() # check if the file is still playing while source.get_state() == AL_PLAYING: # wait until the file is done playing time.sleep(1) # release resources (don't forget this) oalQuit() ``` ##### Playing an OGG Opus file (with PyOgg) ```python # This requires PyOgg to be installed ( pip install pyogg ) from openal import * import time source = oalOpen("test.opus") source.play() while source.get_state() == AL_PLAYING: time.sleep(1) # remember, don't forget to quit oalQuit() ``` ##### Streaming a file ```python from openal import * # The following two lines are optional. You can use them, if you can't update the stream frequently enough # This one specifies how much data is supposed to be stored in each buffer (only applies for OGG Vorbis and Opus files) pyoggSetStreamBufferSize(4096*4) # This one sets the maximum amount of buffers to be created at a time oalSetStreamBufferCount(4) sourceStream = oalStream("test.ogg") sourceStream.play() while sourceStream.get_state() == AL_PLAYING: # do stuff [...] # update the stream (load new data) # if you don't do this repeatedly, the stream will suffocate sourceStream.update() oalQuit() ``` ### Using OpenAL functions ```python # Here we only import OpenAL's functions # (in case you don't need or want PyOpenAL's functions and classes) from openal.al import * from openal.alc import * [...] # It's as simple as that: alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED) # Or a little more complicated, it really depends: alSourceUnqueueBuffers(source_id, 1, ctypes.pointer(ctypes.c_uint(buffer_ids[id]))) [...] ``` ### Reference (for PyOpenAL's own classes and functions) ``` oalInit(device_specifier = None, context_attr_list = None) -> None # initializes PyOpenAL # this is called automatically, unless you set OAL_DONT_AUTO_INIT device_specifier # you can set a custom device with this context_attr_list # you can pass additional arguments to context creation oalGetInit() -> initialized # finds out wether or not PyOpenAL is initialized oalQuit() -> None # exits out of OpenAL and destroys all existing Sources and Buffers oalOpen(path, ext_hint = None) -> Source # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a Source object path # path to the file (relative or absolute) ext_hint # if the filetype is not wav, wave, ogg, vorbis or opus, you should supply a hint to the extension oalStream(path, ext_hint = None) -> SourceStream # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a SourceStream object, that streams the data # you should use this instead of Source for Soundtracks or other long tracks (as it uses less memory) # you will have to update it frequently to avoid suffocation of the stream # you can neither rewind nor loop a SourceStream (currently) path # path to the file (relative or absolute) ext_hint # if the filetype is not ogg, vorbis or opus, you should supply a hint to the extension openal.Listener() # class for hadling the listener (you) # an instance of this class is created when you import PyOpenAL. # it can be retrieved using oalGetListener() # you do NOT have to create an instance yourself Listener.move(v) # move the listener by v v # a translation vector represented as (x, y, z) Listener.move_to(v) # set the listener's position to v v # a position vector represented as (x, y, z) Listener.set_position(v) # see Listener.move_to Listener.set_orientation(v) # sets the listener's orientation to v v # orientation represented as (frontX, frontY, frontZ, upX, upY, upZ) Listener.set_velocity(v) # sets the listener's velocity to v v # velocity represented as (vX, vY, vZ) Listener.set_gain(value) # sets the listener's gain (volume) to value value openal.oalGetListener() -> Listener # returns PyOpenAL's Listener openal.Source(buffer_ = None) # class for managing a source buffer_ # where this source finds it's data Source.play() -> None # starts playing Source.stop() -> None # stops playback Source.pause() -> None # pauses playback (use play to resume) Source.rewind() -> None # goes back to the start of the track Source.pitch # the source's current pitch Source.gain # the source's current gain Source.max_distance # the source's current max_distance Source.rolloff_factor # the source's current rolloff_factor Source.reference_distance # the source's current reference_distance Source.min_gain # the source's current min_gain Source.max_gain # the source's current max_gain Source.cone_outer_angle # the source's current cone_outer_angle Source.cone_inner_angle # the source's current cone_inner_angle Source.cone_outer_gain # the source's current cone_outer_gain Source.position # the source's current position (use .x, .y, and .z to access it's items or .toTuple()) Source.velocity # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.direction # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.relative # wether or not the source is relative to the listener Source.source_type # the source's current source_type (either AL_UNDETERMINED, AL_STATIC or AL_STREAMING) Source.set_pitch(value) -> None # set the pitch for this source value # pitch Source.set_gain(value) -> None # set the gain for this source value # gain Source.set_max_distance(value) -> None # set the max_distance for this source value # max_distance Source.set_rolloff_factor(value) -> None # set the rolloff_factor for this source value # rolloff_factor Source.set_reference_distance(value) -> None # set the reference_distance for this source value # reference_distance Source.set_min_gain(value) -> None # set the min_gain for this source value # min_gain Source.set_max_gain(value) -> None # set the max_gain for this source value # max_gain Source.set_cone_outer_gain(value) -> None # set the cone_outer_gain for this source value # cone_outer_gain Source.set_cone_inner_angle(value) -> None # set the cone_inner_angle for this source value # cone_inner_angle Source.set_cone_outer_angle(value) -> None # set the cone_outer_angle for this source value # cone_outer_angle Source.set_position(value) -> None # set the position for this source value # position Source.set_velocity(value) -> None # set the velocity for this source value # velocity Source.set_looping(value) -> None # set the looping for this source value # looping Source.set_direction(value) -> None # set the direction for this source value # direction Source.set_source_relative(value) -> None # set the source_relative for this source value # source_relative Source.set_source_type(value) -> None # set the source_type for this source value # source_type Source.set_buffer(buffer_) -> None # set the buffer for this source value # buffer Source.get_state() -> state of the Source (e.g. AL_PLAYING, AL_STOPPED,etc.) # get the current state of the source openal.SourceStream(stream) # class for managing a source in streaming mode stream # where the buffer gets it's data from update() -> playing # load more data to play (if necessary). # if you don't call this frequently, the source will stop playing after it reaches the last buffer # in that case you should consider increasing the buffer size or amount using oalSetStreamBufferCount or pyoggSetStreamBufferSize openal.Buffer(*args) # class for managing OpenAL buffers args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.fill(*args) -> None # fill the buffer args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.destroy() -> None # destroy this buffer openal.StreamBuffer(stream, count) # class for managing OpenAL buffers for audio streaming stream # from where to get the data count # how many buffers to create (usually OAL_STREAM_BUFFER_COUNT, which is 2 initially) Buffer.fill_buffer(id_) -> None # fill the buffer id_ # load some data into this buffer Buffer.destroy() -> None # destroy this streambuffer oalGetEnum(enum) -> ENUM # returns a literal representation of enum enum # AL_ or ALC_ enumerator oalGetALEnum(enum) -> ENUM # returns a literal representation of an AL_ enum enum # AL_ enumerator oalGetALCEnum(enum) -> ENUM # returns a literal representation of an ALC_ enum enum # ALC_ enumerator oalGetContext() -> context # returns the context used by PyOpenAL oalGetDevice() -> device # returns the device used by PyOpenAL oalSetAutoInit(val) -> None # changes wether or not PyOpenAL initializes automatically val # wether or not to auto-init # The other methods and variables are the same as in Source # (note that you can't loop, because the file can be read only once (by now)) ``` %package help Summary: Development documents and examples for PyOpenAL Provides: python3-PyOpenAL-doc %description help # PyOpenAL PyOpenAL provides OpenAL bindings for python as well as an interface to them. It also provides a simple way to play WAVE and - if [PyOgg](https://github.com/Zuzu-Typ/PyOgg) is installed - even OGG Vorbis, OGG Opus and FLAC files. You can install it using the PyPI: pip install PyOpenAL PyOpenAL requires a shared OpenAL library (e.g. OpenAL32.dll), one of which the Windows distributions already come with ([OpenAL Soft](http://kcat.strangesoft.net/openal.html) by kcat). You can use the [official OpenAL library](http://www.openal.org/) (deprecated) or any other compatible library, like the aforementioned [OpenAL Soft library](http://kcat.strangesoft.net/openal.html), which is still actively developed. PyOpenAL provides OpenAL bindings, as you would find them in C++, meaning you can follow any [OpenAL C++ tutorial](http://www.openal.org/documentation/) with Python. OpenAL's methods expect C types as arguments, which means you will have to convert Python's types to C types using [ctypes](https://docs.python.org/3/library/ctypes.html) if you want to use them directly. Don't worry though, PyOpenAL can be used without the need to do that. I removed the support for ALUT, because it is basically impossible to build nowadays. If you want ALUT support, please use the original [python-openal from forrestv](https://github.com/forrestv/python-openal) ### Examples ##### Playing a wave file ```python # import PyOpenAL (will require an OpenAL shared library) from openal import * # import the time module, for sleeping during playback import time # open our wave file source = oalOpen("test.wav") # and start playback source.play() # check if the file is still playing while source.get_state() == AL_PLAYING: # wait until the file is done playing time.sleep(1) # release resources (don't forget this) oalQuit() ``` ##### Playing an OGG Opus file (with PyOgg) ```python # This requires PyOgg to be installed ( pip install pyogg ) from openal import * import time source = oalOpen("test.opus") source.play() while source.get_state() == AL_PLAYING: time.sleep(1) # remember, don't forget to quit oalQuit() ``` ##### Streaming a file ```python from openal import * # The following two lines are optional. You can use them, if you can't update the stream frequently enough # This one specifies how much data is supposed to be stored in each buffer (only applies for OGG Vorbis and Opus files) pyoggSetStreamBufferSize(4096*4) # This one sets the maximum amount of buffers to be created at a time oalSetStreamBufferCount(4) sourceStream = oalStream("test.ogg") sourceStream.play() while sourceStream.get_state() == AL_PLAYING: # do stuff [...] # update the stream (load new data) # if you don't do this repeatedly, the stream will suffocate sourceStream.update() oalQuit() ``` ### Using OpenAL functions ```python # Here we only import OpenAL's functions # (in case you don't need or want PyOpenAL's functions and classes) from openal.al import * from openal.alc import * [...] # It's as simple as that: alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED) # Or a little more complicated, it really depends: alSourceUnqueueBuffers(source_id, 1, ctypes.pointer(ctypes.c_uint(buffer_ids[id]))) [...] ``` ### Reference (for PyOpenAL's own classes and functions) ``` oalInit(device_specifier = None, context_attr_list = None) -> None # initializes PyOpenAL # this is called automatically, unless you set OAL_DONT_AUTO_INIT device_specifier # you can set a custom device with this context_attr_list # you can pass additional arguments to context creation oalGetInit() -> initialized # finds out wether or not PyOpenAL is initialized oalQuit() -> None # exits out of OpenAL and destroys all existing Sources and Buffers oalOpen(path, ext_hint = None) -> Source # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a Source object path # path to the file (relative or absolute) ext_hint # if the filetype is not wav, wave, ogg, vorbis or opus, you should supply a hint to the extension oalStream(path, ext_hint = None) -> SourceStream # loads a WAVE / Ogg Vorbis / Ogg Opus / FLAC file to a SourceStream object, that streams the data # you should use this instead of Source for Soundtracks or other long tracks (as it uses less memory) # you will have to update it frequently to avoid suffocation of the stream # you can neither rewind nor loop a SourceStream (currently) path # path to the file (relative or absolute) ext_hint # if the filetype is not ogg, vorbis or opus, you should supply a hint to the extension openal.Listener() # class for hadling the listener (you) # an instance of this class is created when you import PyOpenAL. # it can be retrieved using oalGetListener() # you do NOT have to create an instance yourself Listener.move(v) # move the listener by v v # a translation vector represented as (x, y, z) Listener.move_to(v) # set the listener's position to v v # a position vector represented as (x, y, z) Listener.set_position(v) # see Listener.move_to Listener.set_orientation(v) # sets the listener's orientation to v v # orientation represented as (frontX, frontY, frontZ, upX, upY, upZ) Listener.set_velocity(v) # sets the listener's velocity to v v # velocity represented as (vX, vY, vZ) Listener.set_gain(value) # sets the listener's gain (volume) to value value openal.oalGetListener() -> Listener # returns PyOpenAL's Listener openal.Source(buffer_ = None) # class for managing a source buffer_ # where this source finds it's data Source.play() -> None # starts playing Source.stop() -> None # stops playback Source.pause() -> None # pauses playback (use play to resume) Source.rewind() -> None # goes back to the start of the track Source.pitch # the source's current pitch Source.gain # the source's current gain Source.max_distance # the source's current max_distance Source.rolloff_factor # the source's current rolloff_factor Source.reference_distance # the source's current reference_distance Source.min_gain # the source's current min_gain Source.max_gain # the source's current max_gain Source.cone_outer_angle # the source's current cone_outer_angle Source.cone_inner_angle # the source's current cone_inner_angle Source.cone_outer_gain # the source's current cone_outer_gain Source.position # the source's current position (use .x, .y, and .z to access it's items or .toTuple()) Source.velocity # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.direction # the source's current velocity (use .x, .y, and .z to access it's items or .toTuple()) Source.relative # wether or not the source is relative to the listener Source.source_type # the source's current source_type (either AL_UNDETERMINED, AL_STATIC or AL_STREAMING) Source.set_pitch(value) -> None # set the pitch for this source value # pitch Source.set_gain(value) -> None # set the gain for this source value # gain Source.set_max_distance(value) -> None # set the max_distance for this source value # max_distance Source.set_rolloff_factor(value) -> None # set the rolloff_factor for this source value # rolloff_factor Source.set_reference_distance(value) -> None # set the reference_distance for this source value # reference_distance Source.set_min_gain(value) -> None # set the min_gain for this source value # min_gain Source.set_max_gain(value) -> None # set the max_gain for this source value # max_gain Source.set_cone_outer_gain(value) -> None # set the cone_outer_gain for this source value # cone_outer_gain Source.set_cone_inner_angle(value) -> None # set the cone_inner_angle for this source value # cone_inner_angle Source.set_cone_outer_angle(value) -> None # set the cone_outer_angle for this source value # cone_outer_angle Source.set_position(value) -> None # set the position for this source value # position Source.set_velocity(value) -> None # set the velocity for this source value # velocity Source.set_looping(value) -> None # set the looping for this source value # looping Source.set_direction(value) -> None # set the direction for this source value # direction Source.set_source_relative(value) -> None # set the source_relative for this source value # source_relative Source.set_source_type(value) -> None # set the source_type for this source value # source_type Source.set_buffer(buffer_) -> None # set the buffer for this source value # buffer Source.get_state() -> state of the Source (e.g. AL_PLAYING, AL_STOPPED,etc.) # get the current state of the source openal.SourceStream(stream) # class for managing a source in streaming mode stream # where the buffer gets it's data from update() -> playing # load more data to play (if necessary). # if you don't call this frequently, the source will stop playing after it reaches the last buffer # in that case you should consider increasing the buffer size or amount using oalSetStreamBufferCount or pyoggSetStreamBufferSize openal.Buffer(*args) # class for managing OpenAL buffers args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.fill(*args) -> None # fill the buffer args # what to fill the buffer with (either y PyOgg file or a tuple / list with [format, data, length, frequency]) Buffer.destroy() -> None # destroy this buffer openal.StreamBuffer(stream, count) # class for managing OpenAL buffers for audio streaming stream # from where to get the data count # how many buffers to create (usually OAL_STREAM_BUFFER_COUNT, which is 2 initially) Buffer.fill_buffer(id_) -> None # fill the buffer id_ # load some data into this buffer Buffer.destroy() -> None # destroy this streambuffer oalGetEnum(enum) -> ENUM # returns a literal representation of enum enum # AL_ or ALC_ enumerator oalGetALEnum(enum) -> ENUM # returns a literal representation of an AL_ enum enum # AL_ enumerator oalGetALCEnum(enum) -> ENUM # returns a literal representation of an ALC_ enum enum # ALC_ enumerator oalGetContext() -> context # returns the context used by PyOpenAL oalGetDevice() -> device # returns the device used by PyOpenAL oalSetAutoInit(val) -> None # changes wether or not PyOpenAL initializes automatically val # wether or not to auto-init # The other methods and variables are the same as in Source # (note that you can't loop, because the file can be read only once (by now)) ``` %prep %autosetup -n PyOpenAL-0.7.11a1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-PyOpenAL -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 31 2023 Python_Bot - 0.7.11a1-1 - Package Spec generated