Giter Site home page Giter Site logo

pyfmodex-qol's Introduction

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.

pyfmodex-qol's People

Contributors

tyrylu avatar bbbart avatar simracingstudio avatar marcelomanzo avatar k0lb3 avatar ahmedahmedeg avatar rafffel avatar cdansantana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.