Results 1 to 4 of 4

Thread: ClanLib sound switch from dsound to openal?

  1. #1

    Default ClanLib sound switch from dsound to openal?

    Wouldn't it be better to use openal for the sound module of ClanLib since openal is portable? It would remove the need to write OS-specific code for Windows with DirectSound.

  2. #2

    Default

    Actually, that would also be interesting, since Microsoft actually dropped hardware acceleration on (at least some parts of) DirectSound. OpenAL is the way to go. However, I'm kind of worried how good is the support of that on Linux though. The last time I checked, the Linux OpenAL was quite a bit outdated compared to their mac and windows counterparts.

  3. #3

    Default

    I see, I did not realize that the Linux OpenAL was outdated. But since OpenAL is advertised as the OpenGL analog for audio and sound, it seems natural to use it over OS-specific APIs like DSound (yah, I remember reading something about how OpenAL outperforming DSound on Vista) and the other code that is currently in the ClanLibSound module.

    I would be interested in helping with this. However, I have not had any experience with OpenAL as of yet. I do have a little understanding of how the OpenGL/AL state machines work though. Could someone please provide a little more explanation regarding the purposes/interactions of/between the various classes of the Sound module?

    I would have just sucked it up and went with DirectSound, but I cannot download the sdk because it requires a validation. I have learned to despise Microsoft.
    Last edited by imnotbncre8ive; 10-27-2007 at 08:22 PM.

  4. #4
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Just to make a few things clear. OpenGL and OpenAL got nothing to do with each other, except that the guys that did OpenAL obviously was inspired by the naming and possible also the design of OpenGL.

    Regarding whether clanSound would be better off wrapping OpenAL, I do not really know. I havn't studied the OpenAL API and therefore don't really have an opinion whether it needs wrapping at all or if an updated clanSound would benefit from using it as a backend or not.

    About DirectSound hardware acceleration, Microsoft is generally becoming increasingly annoying in the way they keep deprecating everything they do every 3 year. You therefore now have DirectSound, XACT and the Vista sound engine.

    To make matters worse, it seems not even Microsoft anymore knows which of the APIs it prefers. XACT is basically a 'clanSound' mixer targeted for their Xbox platform, which means that it along with XInput is extremely lame in regards to supporting anything else than what the Xbox supports itself. So XACT's only DSP effect is Reverb, and XInput is a primitive API just barely covering the features of the Xbox 360 controller.

    The Vista sound engine is only supported on Vista, making it sorta pointless to target at the moment, plus from what I could tell on the API it seemed like the guys doing it had only professional audio recording in mind, maybe forgetting features that are commonly used by low-latency game sound mixing (such as refilling parts of a ring buffer just ahead of the playback). Maybe they have a better solution for that than what I had in mind, but either way the API doesn't exactly help you plot a solution vector for these kinds of problems.

    Generally the hardware support is so horrible for DirectSound (what exactly is Microsoft's hardware compatibility labs doing?) that you cannot really rely on any hardware acceleration for real. Take a look at the list of sound cards with known compatibility problems with Battlefield 2142 for an example of just how many mainstream cards that have broken drivers. This thing alone is a reason for not wanting to do a sound library.

    I am not sure if OpenAL really solves all these problems, because at least in UT3 I noticed that OpenAL sound is disabled per default in the game, making you wonder why exactly that is. Of course Epic Megagames could just be cautious, or maybe OpenAL cannot fall back to DirectSound when lacking drivers?

    If I were to upgrade clanSound one day, I think I would make it still use DirectSound for the Windows platform. The main difference (besides completely redesigning the API of clanSound and its implementation) would be that it would create a 5.1 or 7.1 sound buffer, thus end up with the same sound mixing code for both Windows, Linux and OS X, and at the same time allow you to play complex surround samples and do 3d positioning of sound. If this is what OpenAL already does on Windows I don't know - but that's how I would do it.

Similar Threads

  1. Sound Input
    By shade37337 in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 09-22-2007, 01:01 AM
  2. ClanLib 0.8 Sound
    By Nikitto46 in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 09-07-2007, 10:56 AM
  3. weather and sound
    By in forum RTsoft Tavern
    Replies: 4
    Last Post: 08-11-2007, 09:36 PM
  4. Vorbis Sound not right
    By DLehr in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 02-16-2007, 03:02 AM
  5. Turning of sound
    By Daij-Djan in forum RTsoft Tavern
    Replies: 1
    Last Post: 03-31-2004, 09:52 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •