Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-02-03

OpenAL library wrapper for Factor

I've written a wrapper for the OpenAL sound library for Factor.

It's a thin alien wrapper around the C interface and was pretty easy to write given Factor's great C FFI support (called 'alien'). It has been tested under Windows and Linux and should be easy to get going for the Mac.

You'll need to install OpenAL and ALUT. Binaries for these are available from the OpenAL download page. With Ubuntu Linux you can install these libraries with:

apt-get install libopenal-dev libalut-dev

Note that you need the 'dev' versions for Factor to find the shared libraries.

Under Windows make sure you put the alut.dll file somewhere in your path. To test it from within Factor:

"libs/openal" require
USE: openal
play-hello

This should play the default 'Hello World' example. I want to use this to add sound to my Space Invaders emulator.

Tags


This site is accessable over tor as hidden service mh7mkfvezts5j6yu.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-44/


Tags

Archives
Links