The Joyride Labs no longer actively work on this project. A lot of the information on this website is outdated. See this blog post to find out more.
Nikki and the Robots

Here we write about Nikki and the Robots development and other news. Be sure to subscribe! Visit our reddit forum and join IRC for even more info!

Sound Libraries

WARNING: This is a development post. So if you're not into programming, you might find it pretty boring...
 
Over the last weeks, I tried to find a good library for sound output. The library should be able to do the following:
  • compile on all relevant platforms without to much hassle
  • play background music from compressed files
  • play sounds triggered by input events without notable lag (for jump sounds, etc.)
First, I looked at Phonon, which is a multimedia API that is part of Qt. But -- apart from being not quite finished and still somewhat buggy -- it's an API for playing multimedia content. That does exclude playing sounds in real time, which is of course something we need.
 
Then I gave SDL a try. On Linux it works very well. But I found compiling SDL on Windows XP rather painful, and I didn't manage to get it compiled with the DirectSound backend, which seems to be necessary to get a low latency for triggered sounds. (I think the backend that was used, is called "waveout", and always has a latency of at least 250ms).
 
At that point, I was not sure, if a nice and easy solution could be found at all... till i tried out SFML. It's meant to be a modern replacement for SDL. It's written in C++ (but has complete C-Bindings) and the project looks very alive. As usual, triggered sounds on Windows XP were being played with a lag. But the people at the SFML forums were quite helpful and suggested using the svn version. That version works fine both on Linux and Windows XP. So, after a long and painful search, Joyride Laboratories proudly presents the sound library, that we will most probably use:
 
SMFL 2.0
 
That is, if it also works nicely on Windows Vista, Windows 7 and Mac OS X.

Tags: , , ,

3 Responses to “Sound Libraries”

  1. Tener says:

    What are the chances that you will publish open source Haskell bindings to SFML?

  2. Iwan says:

    Way ahead of ya!

    This old post above was probably pushed to the Haskell planet due to me updating it. I hope it didn’t cause any annoyances.

  3. [...] myself work at Joyride Labs on a Linux/OSX/Windows game. Our engine code is open source, we sometimes share insights about our code (this is often Haskell-related and we should do this more often), our [...]

Leave a Reply