Personal tools

OpenAL

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Initial text)
 
m (Opengl -> OpenGL)
Line 2: Line 2:
   
 
OpenAL (short for Open Audio Library) is a library for creation of a virtual 3D world of sound. The application programmer can specify the location, the speed and the direction of the sources of sounds and of the listener.
 
OpenAL (short for Open Audio Library) is a library for creation of a virtual 3D world of sound. The application programmer can specify the location, the speed and the direction of the sources of sounds and of the listener.
This is easily combined with a 3D world created with [[Opengl]] and can very well be used to create games.
+
This is easily combined with a 3D world created with [[OpenGL]] and can very well be used to create games.
 
The sounds must be provided in the form of samples; there is no support for MIDI.
 
The sounds must be provided in the form of samples; there is no support for MIDI.
   

Revision as of 21:30, 6 April 2008

Contents

1 Introduction

OpenAL (short for Open Audio Library) is a library for creation of a virtual 3D world of sound. The application programmer can specify the location, the speed and the direction of the sources of sounds and of the listener. This is easily combined with a 3D world created with OpenGL and can very well be used to create games. The sounds must be provided in the form of samples; there is no support for MIDI.

An addition to this library is the OpenAL Utility Toolkit (ALUT). See also the Wikipedia article on OpenAL.


2 Installation

Download the OpenAL package from Hackage or with Darcs:

  darcs get http://darcs.haskell.org/packages/OpenAL/

2.1 Windows specific actions

If you downloaded from Hackage, you might want to know, How to unpack a tar file in windows

Create a directory for include files, without spaces in the name, for example:

  C:\usr\local\include

Define the environment variable C_INCLUDE_PATH and assign it the name of the include directory (the full path), for example, in a .bat file, before the build commands:

  Set C_INCLUDE_PATH=C:\usr\local\include

As you will need this variable more often, it is best to set it globally. Copy the directory include\AL from the package to

  C:\usr\local\include\AL


2.2 For all platforms

See How to install a Cabal package.


3 Tutorials

There are several tutorials for the C version of OpenAL:


4 Example

TestDevice.hs


5 More information


6 For questions