Skip to main content

Python bindings to the Fmod Ex library.

Project description

Pyfmodex

This is pyfmodex, an FMOD Engine Python binding using ctypes.

Installation

To install, first make sure that you have the FMOD Engine library for you platform somewhere in your path, so Python will be able to find it. On Linux, libraries are searched for in LD_LIBRARY_PATH. Alternatively, you can set PYFMODEX_DLL_PATH or PYFMODEX_STUDIO_DLL_PATH as an environment variable to specify the library path. This can also be done inside Python setting os.environ["PYFMODEX_DLL_PATH"] or os.environ["PYFMODEX_STUDIO_DLL_PATH"] before importing pyfmodex. To download the FMOD Engine library, visit http://www.fmod.org/download. The library is free to download, but requires a free account to be made first.

Then, install pyfmodex via pip, easy_install or the setup.py way. Note that the minimum supported Python version is Python 3.6.

Usage

To verify if everything works, open a Python REPL and try importing pyfmodex:

import pyfmodex

If there is no error: good, it worked. :-)

Playing a sound is a little bit more complicated than the import, but nothing horrible. Try the following simple script:

import pyfmodex

system = pyfmodex.System()
system.init()
sound = system.create_sound("somefile.mp3")
channel = sound.play()

while channel.is_playing:
    pass

Of course, somefile.mp3 must be replaced with something that actually exists. :-)

Note that the while loop is necessary (at least in this simple example) to keep the main thread alive long enough.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfmodex-0.7.2.tar.gz (111.8 kB view details)

Uploaded Source

Built Distribution

pyfmodex-0.7.2-py3-none-any.whl (126.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfmodex-0.7.2.tar.gz.

File metadata

  • Download URL: pyfmodex-0.7.2.tar.gz
  • Upload date:
  • Size: 111.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/10

File hashes

Hashes for pyfmodex-0.7.2.tar.gz
Algorithm Hash digest
SHA256 d9ad3d7841a1c4cf4733cbedc69389f84c58a640d23d0ffa083ad6080f35103c
MD5 e82c351d613256405fe292b9a89b3b67
BLAKE2b-256 0aed6106a55d98868c0edb82aa8ee4fa5fa89712acbe2ab5a307adf962ac67fb

See more details on using hashes here.

File details

Details for the file pyfmodex-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: pyfmodex-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 126.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Windows/10

File hashes

Hashes for pyfmodex-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c42112b788e80ee7b4b57ae25bbbc0a98eb1e32a8e7c9e1246698cdf72efa9d
MD5 7e9a2dddc3fcdd5549ed289befebe5f1
BLAKE2b-256 2c7bf7fdcdf6a6e8fd951c41e91baae8c1cecfffc2ed3199157afd6ab5728716

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page