Python binding to gorilla-audio library
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 139.8 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc00b97007b18829b36cdeb5a0e57817773cf9bcf477caaad78f0c2f5094b863 |
|
MD5 | c6c9afddd0504d9f0a1e17c188100dad |
|
BLAKE2b-256 | 2a0329ca339aad440e174c5a42d4d2312477bdb56ad258af9c92ec09f1820777 |
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-win32.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-win32.whl
- Upload date:
- Size: 116.5 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc48c72c836ae6b147dc7107e39773501a8144458450aeefc8f167751f83df0 |
|
MD5 | fc73710699b7ff3bce6c80e33981e520 |
|
BLAKE2b-256 | 2611ed2b228f99557e9eac746be1a2d8026a48c551f31889b88c01bec07f8286 |
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 271.0 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 069910a4bfeb66d15a263d0b55c642bd8663d50b1bbcefb8daef649ba5bae983 |
|
MD5 | a0ed40af4ca9732b095c49b6755577d5 |
|
BLAKE2b-256 | 56f2a54f57fac80d0be785a8d12a3434efdecf64165ca75754e4815f06a99a8d |
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-manylinux1_i686.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-manylinux1_i686.whl
- Upload date:
- Size: 242.2 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94cc150de6cb722a4aa3b1b2fbe36d1b712df282c1960eafb1b535eaae66e50f |
|
MD5 | 3a10a41b26dea75bba08cac249aafa66 |
|
BLAKE2b-256 | 3717f10d52c5d3bdd55287d80915cddbb877912af3b3206986923774153b52bf |
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-macosx_10_11_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-macosx_10_11_x86_64.whl
- Upload date:
- Size: 191.3 kB
- Tags: CPython 3.5m, macOS 10.11+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9668c6a2accee40ce08204cbbcd8e0ccdad6c05c3fd2f8bf168d5a3a67cb3289 |
|
MD5 | 00baf7ab75f378b73706c3416931048c |
|
BLAKE2b-256 | 04f5b32e8baf5445ce41ce6b8c44b06e259ca21a13eafc0ebddef39cc3f08591 |
File details
Details for the file pyrilla-0.0.2-cp35-cp35m-macosx_10_6_intel.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 214.5 kB
- Tags: CPython 3.5m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d343282a2e44a03961d342edd86caf5dad3e8f1957bf2f51e630e51b6da5ddf5 |
|
MD5 | 5575c9143ee8538a29fe380810f974b0 |
|
BLAKE2b-256 | 0fdb7b6983a0c79f589cb745bfe6983dab96b340afb59d97d0af1ff7450526d8 |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-win_amd64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-win_amd64.whl
- Upload date:
- Size: 134.1 kB
- Tags: CPython 3.4m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 510bda263e9374eb91769413212eee711962f89034e7f7a959380f68bdedeee0 |
|
MD5 | 70c1454aeda8f2084334653cbab6d6cb |
|
BLAKE2b-256 | d8170b8a0a4a6fd4fb30a54e4c4989aa48dc31b1cdefb6abe68fc046a3f173cd |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-win32.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-win32.whl
- Upload date:
- Size: 120.4 kB
- Tags: CPython 3.4m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f62663fd5dba6f9627c17f4a0c35abb62ee5426406cb94eb5565c5ac46fe54 |
|
MD5 | 28bcd433c362cb0f5d28c6a53649f9a2 |
|
BLAKE2b-256 | 277844dc37f35d67cbbdc7b58adb3d863e37bd733b58d6f0b7be8af0c16d14a5 |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 272.8 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea3a9fdc6c6026642886954cc61d219be04791a461522fa32078c50df2c42600 |
|
MD5 | cdef75047301fbcc00278a85531b2489 |
|
BLAKE2b-256 | c60ff0db0db5bd09d5a7f82bdbd50e57dc38fa77014668c759185fbd1d6a265e |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-manylinux1_i686.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-manylinux1_i686.whl
- Upload date:
- Size: 244.1 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff5a56676d578cc22a2bd9181f1215779f38a9afef5eed9188c837125a05873c |
|
MD5 | 51f0f7e83d46031ace369f5c5041e2b2 |
|
BLAKE2b-256 | 7d80d08da26397cc4b62f1c41515ca5f215339cb640e9c65e2a166a586d9cd69 |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-macosx_10_11_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-macosx_10_11_x86_64.whl
- Upload date:
- Size: 191.2 kB
- Tags: CPython 3.4m, macOS 10.11+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72c18cb31c40a4eb1bf9a0e34095e68fc9a86a598408c1be6f60c25d2d0e1bf8 |
|
MD5 | 9c7de908a7ad5a52095d4dc0554509af |
|
BLAKE2b-256 | 8a31c12e8c106118c5a09180879af97fffeaa785de3b1bac56968eade987db39 |
File details
Details for the file pyrilla-0.0.2-cp34-cp34m-macosx_10_6_intel.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp34-cp34m-macosx_10_6_intel.whl
- Upload date:
- Size: 214.4 kB
- Tags: CPython 3.4m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e02897a05766915fc8748e32b63071708b24c40a269ffc3b2f9f8f1fd38823 |
|
MD5 | 1e222d42e84fc009d244fcab43a03a67 |
|
BLAKE2b-256 | 05b0824da5304149a2fbfc9274b3557c12dc3d7f0b30a961acb4d66406eca552 |
File details
Details for the file pyrilla-0.0.2-cp33-none-win32.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-none-win32.whl
- Upload date:
- Size: 120.4 kB
- Tags: CPython 3.3, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ebe1adc8ee88bfad70d128e4c1058546e9e1545ec2468d3eff3708057d06fea |
|
MD5 | b1f807c21abcd8f14a05e10127467079 |
|
BLAKE2b-256 | a0eadb3cf4b168dd2304359260f98362fd64c5a111292079bde2a593f045694d |
File details
Details for the file pyrilla-0.0.2-cp33-cp33m-win_amd64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-cp33m-win_amd64.whl
- Upload date:
- Size: 134.0 kB
- Tags: CPython 3.3m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae63793f860a016a8f5bfd834e4f06d870cedaa29273514a0b0147db9104a0d6 |
|
MD5 | 4da6595b4610d67c4837c7e0840478e0 |
|
BLAKE2b-256 | 386e183da3bc92214824921c2d0dd7cc7c773ef25b2ac70f8ee56255707ab4b9 |
File details
Details for the file pyrilla-0.0.2-cp33-cp33m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-cp33m-manylinux1_x86_64.whl
- Upload date:
- Size: 267.5 kB
- Tags: CPython 3.3m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b41de2f841fb8e6c67f2ba696cdd31d38a71166ed07f256a68c4574fc3c73cf5 |
|
MD5 | dc23435b25446216ab90c2034b713c44 |
|
BLAKE2b-256 | a6940cd77afc458da3504d85e6ef1fd756202c97d28f1353e11aa1a3cb353e2f |
File details
Details for the file pyrilla-0.0.2-cp33-cp33m-manylinux1_i686.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-cp33m-manylinux1_i686.whl
- Upload date:
- Size: 238.9 kB
- Tags: CPython 3.3m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 444edd1ed83533574f5a69834fb6ce7a06c212b08704b817238bdf829a3c7e16 |
|
MD5 | 745634f07e9869c5d068014e487c38af |
|
BLAKE2b-256 | bd5795b8be5d9f55ef67503eade7ffbd2c393ad4dde2dc6320c8cbb3b7e3cb18 |
File details
Details for the file pyrilla-0.0.2-cp33-cp33m-macosx_10_11_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-cp33m-macosx_10_11_x86_64.whl
- Upload date:
- Size: 191.1 kB
- Tags: CPython 3.3m, macOS 10.11+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4d2bb6ea04161d9d307117fb2f754006bfc9dc9d6d69b1a1f96d49ec5fb460 |
|
MD5 | fd6afe8544fbbef8fefd11ed45c0ad76 |
|
BLAKE2b-256 | 57e1176d5cf90681e8e9b043585b54a6bbb8686f82faffeb74c6b1ce25641146 |
File details
Details for the file pyrilla-0.0.2-cp33-cp33m-macosx_10_6_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp33-cp33m-macosx_10_6_x86_64.whl
- Upload date:
- Size: 214.2 kB
- Tags: CPython 3.3m, macOS 10.6+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27cc9941c0a194f87712f606870aff079140ca248a195d3da25842da7f970463 |
|
MD5 | b8ce2d42490a1c886c02cae5c86909b6 |
|
BLAKE2b-256 | d9dc68a94f3045c4295f2ecc54be9fa804dceafc435483907d02fdc1d47d6b05 |
File details
Details for the file pyrilla-0.0.2-cp27-none-macosx_10_11_intel.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-none-macosx_10_11_intel.whl
- Upload date:
- Size: 209.8 kB
- Tags: CPython 2.7, macOS 10.11+ intel
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec7d6254f35e9e9f97de078c7d866c700a2fde4940a89ddd7866ff5c1b1cbc7 |
|
MD5 | 67849363e0159d189cd2820c2e6fab66 |
|
BLAKE2b-256 | 086739e02a5f37dc82cdb2d7462df6b4c1b939e94313ba9714f1331a2e4b74e1 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 263.7 kB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27d07aa1986907a9fb406350c26c45cf537ed9c9fe2d438862a4c1fe7160d619 |
|
MD5 | 7f429b0793afacd51e26480766a5c3a9 |
|
BLAKE2b-256 | c35b8caa322a6a1c92e7371b5aaf8602b887750837af0f9207522dc96630cbfe |
File details
Details for the file pyrilla-0.0.2-cp27-cp27mu-manylinux1_i686.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27mu-manylinux1_i686.whl
- Upload date:
- Size: 236.6 kB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6daac687103aa245617ba23e36b6680f5093d2b56deb035423d4f6ce7bd1b3c |
|
MD5 | fb0ce65c285072c08d312e4da6d30803 |
|
BLAKE2b-256 | ba2ed631241e11acd3b53874cc36df3c4dbcda8338bed08e5ebaee6f1b384982 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 134.4 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22928ebd8837b1b6bcd91b9f527d763f9bd16c3f3119583889d1cee6c1aa5123 |
|
MD5 | c3f05cc9d6f02ab2232ae780fbf690c1 |
|
BLAKE2b-256 | c1a7c616cb7866b9befe4fbbf6d238365bd9d5f7496a8a9678475b8f3bc365e2 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27m-win32.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27m-win32.whl
- Upload date:
- Size: 120.3 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e633e69aff4963dcfa97e45e9621c07135de23deacb3fc04037ab8111eb546b |
|
MD5 | 9004901bc487c5fef1f5950c05d70ee7 |
|
BLAKE2b-256 | 1638fcc92ed90a2eb3b1bc981296b026455a8bcfeef2ad5b9c8eefd5242a38c1 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 263.7 kB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b6474361f4dc074fe9098426b4f3c39c0afba74862995a985b03a98e45f26d |
|
MD5 | 2baebf7a4269cd07fd82cd2470481c35 |
|
BLAKE2b-256 | 1784812d023457884200f44fed5f2f75aedf22e956f19aefda58545484baeef7 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27m-manylinux1_i686.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27m-manylinux1_i686.whl
- Upload date:
- Size: 236.5 kB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a80f09a3f11280b4049269ea8c3a14a82af1c3e1aff2f3831e787fddecee5f5d |
|
MD5 | 5735b93c58fefd92c4f86a7188d2d90f |
|
BLAKE2b-256 | 39b52b97a67b4755de81889b7d7e80bfe00da71f59f0df0b593bea4badf7c3f3 |
File details
Details for the file pyrilla-0.0.2-cp27-cp27m-macosx_10_11_x86_64.whl
.
File metadata
- Download URL: pyrilla-0.0.2-cp27-cp27m-macosx_10_11_x86_64.whl
- Upload date:
- Size: 190.9 kB
- Tags: CPython 2.7m, macOS 10.11+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f92db7480a5f15178f785848bb324799cc7c20910d81628012dd6d39cbceb15 |
|
MD5 | a8633cca360c4fefc106932e5974dfe4 |
|
BLAKE2b-256 | 0cca42b8197d304a0305670231dcd9eafb9fb041f802672c2a6dc159df02c7db |