This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Windows build Mac OS X build

pyrilla

pyrilla is a self-contained statically linked binding to gorilla-audio library - “an attempt to make a free, straightforward, cross-platform, high-level software audio mixer that supports playback of both static and streaming sounds”. Like the original it is intended for video game development.

pyrilla’s goal is to provide a python audio package that can be installed without any external dependencies with single pip install pyrilla command. It is built with cython and its API is inspired by part of great but unmantained bacon game engine.

It works without any problems on OS X, Windows, and Linux. Officially supported Python versions are py27, py33, py34, py35.

pyrilla on PyPI and supported systems

Pyrilla is wrapper on Gorilla Audio C library that is statically linked during installation. For developers convenience it is distributed on PyPI as binary wheels for Windows, OS X, and Linux. Its extensive built pipeline targets different system flavours (32/64bit) and different Python versions. On supported systems it can be easily instaled with pip:

pip install pyrilla

Most up-to-date list of provided distributions is available on pyrilla’s project page on PyPI. Depending on target platform the underlying Gorilla Audio library is compiled with slightly different settings:

Target platform Available Python versions Audio backend Arch
Windows py27, py33, py34, py35 XAudio2 Win32/Win64
Mac OS X py27, py33, py34, py35 OpenAL intel/x86_64
Linux py27, py33, py34, py35 OpenAL x86_64/i686 (32bit)

If you really need support for other platform or more Python versions then fill issue on GitHub repository for this project so I can prioritize my work. I don’t want to spend my time on providing more distributions not knowing if anyone really needs them.

Note: Linux wheels for pyrilla on PyPI are portable Linux build distributions (i.e. manylinux1) as described by PEP 513.

Source distribution (sdist) for pyrilla available on PyPI is still a bit broken. Generally it is not supposed to compile on Linux. This is going to change in future. If you want to use pyrilla on Linux you need to build it by yourself on your platform. The process is preety straightforward and described in building section of this README.

Last but not least, there is also some support for cygwin. Unfortunately there is no binary wheel on PyPI for this environment yet. If you want to use pyrilla under cygwin then you need to compile it manually.

usage

The easiest way to play single sound is to use Sound class:

from pyrilla import core

def finished(sound):
    print("sound %s finished playing" % sound)
    quit()


# note: sound file extension must be explicitely provided
sound = core.Sound("soundfile.ogg", "ogg")
# optional callback will be called when sound finishes to play
sound.play(finished)

while True:
    # update internal state of default audio manager and mixer
    # this mixes all currently played sounds, pushes buffers etc.
    core.update()

To play looped audio you need to use Voice instance that can be created from existing sound.

from pyrilla import core

sound = core.Sound("soundfile.ogg", "ogg")
voice = core.Voice(sound, loop=True)
voice.play()

while True:
    core.update()

For more features like custom managers/mixers, voice control (pitch, gain, pan) or stop/play see code samples in examples directory of this repo.

building

Building pyrilla prerequisites:

  • cython
  • cmake
  • make

If you are going to build this package then remeber that Gorilla Audio is bundled with this repository as Git submodule from my unofficial fork on GitHub (under gorilla-audio directory). You need to eaither clone this repository with --recursive Git flag or init submodules manually:

git submodule update --init --recursive

Use cmake to build build gorilla-audio

cmake gorilla-audio/build
cmake --build . --config Release
python setup.py build

For Windows (also on cygwin):

cmake -DENABLE_OPENAL:STRING=0 -DENABLE_XAUDIO2:STRING=1 -DENABLE_DIRECTSOUND:STRING=0 .
cmake --config Release --build .

Then build and install the python extension:

python setup.py build
python setup.py install

Note that building for Windows may be bit trickier. If your personal environment is broken and compilation step for Gorilla Audio does not find the correct path for DirectX SDK and/or XAudio2 lib file. If you have same problems as I have then you probably need to provide this path manually to first cmake call:

-DDIRECTX_XAUDIO2_LIBRARY=path/to/the/DirectXSdk/Lib/x86/xapobase.lib
Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyrilla-0.0.2-cp27-cp27m-macosx_10_11_x86_64.whl (190.9 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27m-manylinux1_i686.whl (236.5 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27m-manylinux1_x86_64.whl (263.7 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27mu-manylinux1_i686.whl (236.6 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27mu-manylinux1_x86_64.whl (263.7 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27m-win32.whl (120.3 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-cp27m-win_amd64.whl (134.4 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp27-none-macosx_10_11_intel.whl (209.8 kB) Copy SHA256 Checksum SHA256 cp27 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-cp33m-macosx_10_11_x86_64.whl (191.1 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-cp33m-macosx_10_6_x86_64.whl (214.2 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-cp33m-manylinux1_i686.whl (238.9 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-cp33m-manylinux1_x86_64.whl (267.5 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-cp33m-win_amd64.whl (134.0 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp33-none-win32.whl (120.4 kB) Copy SHA256 Checksum SHA256 cp33 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-macosx_10_11_x86_64.whl (191.2 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-macosx_10_6_intel.whl (214.4 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-manylinux1_i686.whl (244.1 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-manylinux1_x86_64.whl (272.8 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-win32.whl (120.4 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp34-cp34m-win_amd64.whl (134.1 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-macosx_10_11_x86_64.whl (191.3 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-macosx_10_6_intel.whl (214.5 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-manylinux1_i686.whl (242.2 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-manylinux1_x86_64.whl (271.0 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-win32.whl (116.5 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016
pyrilla-0.0.2-cp35-cp35m-win_amd64.whl (139.8 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting