ambiera home ambiera home

irrKlang FAQ

Frequently asked questions and their answers regarding irrKlang:

General irrKlang

What does irrKlang mean?

Can I use irrKlang in my free or open source application?

Can I use irrKlang in my commercial application?

How can I contribute to irrKlang or support the project?

Can I use irrKlang's logo?

Can I use irrKlang in projects not using Irrlicht?

I want to create a commercial product using irrKlang, do have to purchase irrKlang when starting development?

Does irrKlang run on Windows Vista?

Does irrKlang make use of multiple cores?

Is there a way I can get notified once a new irrKlang release is out?

I have a question about irrKlang not answered here, where can I find help?

Programming irrKlang

Playing back an mp3 doesn't work with my program using irrKlang, what did I dowrong?

My C# program using irrKlang doesn't work on another computer, how can I make it work?

I get a BadImageFormatException when starting my application using irrKlang.

When I play a sound using play2D or play3D, irrKlang returns NULL, why?

When playing a sound in 3D space, I cannot hear it, what's the problem?

Why are there three .NET versions of irrKlang? What are their dependencies?

What's the advantage of irrKlang.NET over for example Microsoft.DirectX.AudioVideoPlayback?

How many sounds can irrKlang play at the same time?

How can I free the memory used by irrKlang's internal stored sounds?

How can I make irrKlang use Irrlicht's file system?

When using irrKlang on MacOSX, my application doesn't run/link, how do I solve this?

On Linux, irrKlang says 'Could not load libasound.so'. What can I do?



What does irrKlang mean?

Nothing special. The name irrKlang was made up from the words 'Irrlicht', the name of the free open source 3d engine which has a similar designed API like irrKlang, and 'klang', which is german for 'sound'.

Can I use irrKlang in my free or open source application?

Yes, of course. irrKlang is free for non-commercial use.

Can I use irrKlang in my commercial application?

Yes you can, but you need to purchase an irrKlang Pro license for that. irrKlang is only free for use in non-commercial products.

How can I contribute to irrKlang or support the project?

If you disovered a bug in irrKlang, just report it in the forum or send it to the author of irrKlang. Ideas and suggestions on how to improve irrKlang are always welcome. And of course, a link to irrKlang's webpage from your site or application would be very nice.
If you even want to support irrKlang financially, you can buy irrKlang and Ambiera shirts (they also look cool!) or even buy an irrKlang license.

Can I use irrKlang's logo?

If you would like to link us or display the irrKlang logo in your application using irrKlang, sure, you can use the official irrKlang logo for this.
Try one of these logos:



Resize them, if needed. However, the copyright of the logos still is owned by us, of course.

Can I use irrKlang in projects not using Irrlicht?

Absolutely. irrKlang is completely independent of Irrlicht.

I want to create a commercial product using irrKlang, do have to purchase irrKlang when starting development?

No, you don't need to purchase an irrKlang license when starting to develop your commercial product. You only need to purchase irrKlang once you start to make your commercial product public or start to sell it.
That's also a good way to use irrKlang without hassle and makes it possible to try it out and purchase the license only if you are sure that you want it. In fact, a lot of irrKlang users are doing it in this way.

Does irrKlang run on Windows Vista?

Yes, irrKlang does run on Windows Vista, there are no known problems.

Does irrKlang make use of multiple cores?

irrKlang runs in a separate thread by default, so yes, it does.

Is there a way I can get notified once a new irrKlang release is out?

If you would like to stay up to date and receive a mail once a new version of irrKlang is released, subscribe to our newsletter.

I have a question about irrKlang not answered here, where can I find help?

There is a forum available on ambiera.com, where you can exchange yourself with other users. In addition, you can directly Contact us via email.

Playing back an mp3 doesn't work with my program using irrKlang, what did I do wrong?

If irrKlang doesn't play mp3s in your application, you probably forgot to copy the mp3 playback plugin to your application directory (The location where your .exe file is). The file is named ikpMP3.DLL in windows and ikpMP3.SO in Linux. Place it where irrKlang can find it (the current working directory or the place where your application binary is) and irrKlang will load the plugin and be able to play mp3s.

I get a BadImageFormatException when starting my application using irrKlang.

Your application platform target is 'Any CPU'. Simply set the target to 'x86'. (If you use the Express edition, you need to set the Visual Studio mode to 'Expert' to see that option, use Extras -> Settings -> check Expert Options).

My C# program using irrKlang doesn't work on another computer, how can I make it work?

If your program is written in C#, VisualBasic.NET or any other .NET language and uses irrKlang to play back sounds, but doesn't work on another computer, this is usually because on that computer, the .NET Framework hasn't been installed.
It could also be the possibility that your application target is 'Any CPU'. Simply set the target to 'x86'. (If you use the Express edition, you need to set the Visual Studio mode to 'Expert' to see that option, use Extras -> Settings -> check Expert Options)
You also need to install the Visual Studio redistributable runtime on that system, which you can download freely from microsoft and can include in the installer of your application. Depending on the irrKlang version you are using, you need:

  • irrKlang.NET in bin\dotnet-1.1:
    depends on the module MSVCR71.DLL. Works with all .NET versions.
  • irrKlang.NET2.0 in bin\dotnet-2.0:
    depends on the modules MSVCR80.DLL and MSVCM80.DLL. Use the Visual Studio 2005 redistributeable (vcredist_x86)
  • irrKlang.NET4.0 in bin\dotnet-4:
    depends on the module MSVCR100.DLL. Use the Visual Studio 2010 redistributeable (vcredist_x86)

When I play a sound using play2D or play3D, irrKlang returns NULL, why?

So you called play2D("somefile.wav") or play3D("anotherfile.ogg", pos3d) for example, and you hear the sound playing, but irrKlang doesn't return a pointer to an ISound interface?
You simply need to set the 'tracked' or 'paused' parameter to true when calling this function to make irrKlang return something. So simply call play2D("somefile", false, false, true); or play3D("anotherfile.ogg", pos3d, false, false, true), to get a pointer to the ISound.

If your problem is instead that irrKlang doesn't even play the sound and you hear nothing, maybe irrKlang wasn't able to find or open the file you specified, just take a look into the debug log, irrKlang will print the exact cause of the problem in there.

When playing a sound in 3D space, I cannot hear it, what's the problem?

Based on the size used in your 3d world, you might want to adjust the radius of your 3d sound where it can be heard. You should do this anyway, because usually sounds have a different radius (a jet engine for example is a bit louder than a bee). You can use ISound::setMinDistance() for this like shown in the 3D sound example. A bigger value means the sound can be heard more far away. If you don't want to set the min and/or max distance values for every sound, you can also use ISoundEngine::setDefault3DSoundMinDistance() and ISoundSource::getDefaultMinDistance().

Why are there three .NET versions of irrKlang? What are their dependencies?

The SDK includes three different .NET versions. One is compiled against the .NET common language runtime version 1.1, one against version 2.0 (framework 2.0, 3.0 and 3.5) and one against version 4.0:

  • irrKlang.NET in bin\dotnet-1.1:
    Compiled for .NET common language runtime version 1.1, depends on the module MSVCR71.DLL.
    Works with all .NET versions.
  • irrKlang.NET2.0 in bin\dotnet-2.0:
    Compiled for .NET common language runtime version 2.0, depends on the modules MSVCR80.DLL and MSVCM80.DLL. [One method to redistribute these is using the visual studio 2005 redistributeable (vcredist_x86), available for free from mircosoft]
  • irrKlang.NET4.0 in bin\dotnet-4:
    Compiled for .NET common language runtime version 2.0, depends on the modules MSVCR100.DLL. [One method to redistribute these is using the visual studio 2010 redistributeable (vcredist_x86), available for free from mircosoft]
Simply chose the version you think fits better to your project and your installer.

What's the advantage of irrKlang.NET over for example Microsoft.DirectX.AudioVideoPlayback?

There are several reasons why not to use Windows built-in playback support and to use a dedicated audio engine like irrKlang instead. One of the most important reasons is that when using irrKlang, playback will always work because irrKlang uses its own built-in audio decoders. When using the operating system playback instead, you can not be sure if it works on every end user PC, because it depends on the installed drivers, decoders, operating system version, and more. In addition, if playback works on a end users system, depending on the decoders he has installed, performance may be very poor. With irrKlang, playback will always work and will always be very fast.

How many sounds can irrKlang play at the same time?

For the software drivers (WinMM, ALSA, you can specify this as first parameter in the createIrrKlangDevice() function), there is no limit. For DirectSound, this depends on the DirectSound implementation (driver, operating system), but from irrKlang's side, there is no limit either.

How can I free the memory used by irrKlang's internal stored sounds?

You simply need to remove the sound source. Do this using ISoundEngine::removeSoundSource() or ISoundEngine::removeAllSoundSources() if you want to remove all sound sources. If you are using irrKlang.NET, you can also call System.GC.Collect() after this if you need the memory to be freed exactly then.
Note: Only buffered sounds can allocate a bigger amount of memory, streamed sound do not do this and occupy just some few bytes if not used.

How can I make irrKlang use Irrlicht's file system?

Just like in the 'override file access' tutorial create your own file factory. The irrKlang IFileReader interface is very similar to the Irrlicht IReadFile interface, so it is very easy to do this.
If you are using files inside archives like .zip files, be sure to package streamed audio files into another archive files than your irrlicht data, because irrKlang may access these in another thread, and archive access is not threadsafe in Irrlicht (at least until version 1.3).

When using irrKlang on MacOSX, my application doesn't run/link, how do I solve this?

If your application simply doesn't start or link, maybe it will be displaying something like

'dyld: Library not loaded: /usr/local/lib/libirrklang.dylib
Referenced from: yourapplication
Reason: image not found' in the
Then it probably didn't find the libirrklang.dylib file. To change this, take a look at the example projects: They use the install_name_tool to change the installation path of irrklang in your application. You can do this in XCode by adding a new Build Phase:
  1. add the irrklang.dynlib file to the project Frameworks.
  2. and to the Targets -> YourApplicationName -> Copy Frameworks Into .app Bundle
  3. When you now try to compile it gives this error :: dyld: Library not loaded: /usr/local/lib/libirrklang.dylib
    To fix this you must add a script phase to correct the binary so it knows where to find your dylib.
  4. Targets -> YourApplicationName -> Right Click: add New Build Phase :: Run Script Phase
  5. Get Info on the Run Script Phase and put this in for the script:
    install_name_tool -change /usr/local/lib/libirrklang.dylib @executable_path/../Frameworks/libirrklang.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME"
    And when using it in a app bundle, for example for the Mac App Store, use additionally:
    install_name_tool -id @executable_path/../Frameworks/libirrklang.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/libirrklang.dylib"
  6. And for the Input files put:
    $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME)

On Linux, irrKlang says 'Could not load libasound.so'. What can I do?

You need to have installed ALSA (libasound) for running irrKlang, but usually, this is installed on all current linux versions. So either you don't have it or something is wrong with your system. If you are running linux on a 64bit system, you need to be sure to have the 32 bit version of Alsa installed, since irrKlang is 32bit. Maybe it is only installed on usr/lib64/libasound.so, but not in usr/lib32/. Simply copy it there then.