irrKlang is a powerful high level API for playing back sound in 3D and 2D applications
like games, scientific visualizations and multimedia applications.
irrKlang is free for non commercial use. There is also an advanced version of irrKlang
named 'irrKlang pro' which can be purchased for a small license fee
and may be used in commercial products.
Supported File Formats
irrKlang currently plays back the following file formats:
- RIFF WAVE (*.wav)
- Ogg Vorbis (*.ogg)
- MPEG-1 Audio Layer 3 (*.mp3)
- Free Lossless Audio Codec (*.flac)
- Amiga Modules (*.mod)
- Impulse Tracker (*.it)
- Scream Tracker 3 (*.s3d)
- Fast Tracker 2 (*.xm)
In addition, it is easily possible to extend the playable file formats
If you need irrKlang to playback a file format it doesn't support yet,
just contact us and we can add it for you.
: MP3 playback is done via a plugin which comes
along with irrKlang (and its full source code) so that it is easily possible
to remove mp3 support if wished. If you are using mp3 playback in your application,
you might need to purchase an mp3 license
from Thompson Multimedia as most software using mp3s has to, although there are
special prices and conditions for games.
irrKlang is cross platform and works for the programmer the same, independent
of the platform it is running on. The following platforms are currently supported
together with the corresponding sound output backends:
- Windows 98, ME, NT 4, 2000, XP, Vista, Windows 7, Windows 8
- DirectSound 3
- DirectSound 8
- Linux / *nix
- Mac OS X (x86 as well as PPC)
The sound library works with all supported
platforms the in the same way, the programmer only has to write his game/application code once,
and it will run on all supported platforms without the need of changing one single line of code.
: Currently, the PowerPC version does not support module file (.mod, .it, .s3m, .xm) playback. All
other features are supported.
irrKlang has built-in support for 3D sound on all platforms and audio drivers. It was designed to be used in 3D games, so
it is very efficient and does not use a lot of CPU time.
The screenshot below shows irrKlang running inside irrEdit, a 3D world editor.
irrKlang is able to play short buffered sounds (e.g. gun shots) as well as huge, streamed sounds (e.g. a radio mp3) in 3D.
A conversion to mono sounds is not necessary here, irrKlang is able to do this on the fly.
Additional 3D features are:
- Fast 3D audio on low end hardware: Because some low end audio
hardware is not able to play 3D sounds without significant performance
loss or some don't support 3d audio buffers at all, irrKlang
has a high performance 3d sound buffer emulator built-in, causing
a sound experience nearly as it was a real 3d sound buffer.
- Multiple rolloff models: irrKlang supports linear as well as
All 3D sounds may of course be combined with the available sound effects
such as echo and reverb.
Supported Compilers and Languages
irrKlang currently supports the following compilers (compatible compilers as well, of course):
- Microsoft Visual C/C++ 6.0 - 2012
- GCC 3-4
- All .NET languages (C#, VisualBasic.NET, Delphi.NET, IronPhyton, F#, Haskell.NET etc.)
If you want to use irrKlang with a compiler not on this list,
just contact us and tell us about it.
The irrKlang SDK includes not only tutorials and a detailed API documentation, there are also some
useful example applications:
The screenshot above shows one of the example applications. This one is named 'irrKlang Player' and runs on all operating
systems where irrKlang is available (the image above shows Mac OS X, Windows Vista, Windows XP, Ubuntu, in this
order). Its full source code is available in the irrKlang SDK.
In addition to the doppler effect for 3D sounds irrKlang currently supports the following
sound effects, both for 3D and 2D sounds:
- Interactive 3D Audio Level 2 reverberation
- Parametric Equalizer effects
- Waves Reverb
It is possible to disable and enable these effects during playback for every
single sound, and to adjust parameters of the effects easily also if it is already active.
(Currently, these effects are only available when using the DirectSound8 driver.)
IrrKlang has an extremely simple API. The following two examples show how to start up the engine and play an MP3 file in C++ and in C#:
Playing an MP3 in C++
This code works on all supported platforms (currently Windows, Linux and MacOSX).
For more examples and information about using irrKlang in C++, take a look at the
irrKlang C++ API documentation.
using namespace irrklang;
int main(int argc, const char** argv)
// start irrKlang with default parameters
ISoundEngine* engine = createIrrKlangDevice();
return 0; // error starting up the engine
// play some sound stream, looped
char i = 0;
std::cin >> i; // wait for user to press a key
engine->drop(); // delete engine
Playing an MP3 in C#
static void Main(string args)
// start up irrKlang
ISoundEngine engine = new ISoundEngine();
// play a sound file
// wait until user presses ok to end app
"Playing, press ok to end.");
} // end main()
} // end class
} // end namespace
For more examples and information about using irrKlang in .NET languages like C#, VisualBasic, Delphi.NET
and similar take a look at the
irrKlang .NET API documentation.
It is a cross platform 2D and 3D sound engine and audio library, usable in
C++ and all .NET languages (C#, VisualBasic.NET, etc) and provides useful features like lots of built-in file format decoders
(wav, ogg, mp3, mod, xm, it, s3m...), a sophisticated streaming engine, extendable audio reading,
single and multithreading modes, 3d audio emulation for low end hardware, a plugin
system, multiple rolloff models and more. All this can be accessed via an extremely simple API.
irrKlang's current features are:
- Plays multiple file formats, .WAV, .MP3, .OGG, .MOD, .XM, .IT, .S3M...
- Buffered and streamed audio playback, in 2D and 3D.
- irrKlang is platform independent: irrKlang runs on several operating
systems including Windows 95, 98, NT, 2000, XP, Vista, Linux, Mac OS X (Intel as well as Power PC).
- Incredible simple API
- High level resource management and autodetection: The engine
can do everything for you. Just tell it to play a sound file,
and it will load, cache and/or stream sound data for you automaticly,
depending on what is best for performance and memory usage.
But if you want to specify how the engine should handle this,
you can do this as well.
- Sophisticated 3D sound engine designed to be used in games.
- Extendable: Possibility to write own file format readers/decoders
to extend the engine with it.
- Sound effects such as the doppler effect for 3D sounds
or 2D effects like echo, reverb, distortion, flanger and more.
- Exact seeking and position retrieval in streams and buffered sounds.
- Plugin System: Simply copy external created plugins to the place
where irrKlang is being used and extend its functionality with it.
- Works with multiple compilers including Microsofts VisualStudio 6.0™,
VisualStudio.NET 7.0 - 2010, and with g++3.2 - 4.0, also with support for Code::Blocks and XCode.
- Multi/Singlethreaded modes: The engine can run both multithreaded
or singlethreaded in the same thread as your application, to
make it possible to debug your application easier for example.
- Low level audio output manipulation: Possibility to alter
any aspect of a playing sound like panning, volume and 3d position.
- Sound event call backs.
- File reading functionality can be overwritten by the user, of course, making it possible
to let irrKlang read from own file archives for example.