SDL_mixer vs OpenAL

Hello!

I could use some advise for my choice of audio system. We are creating a 3D
racing game which is currently developed under Linux (g++) and Windows
(mingw), using SDL and OpenGL.

I have used SDL_mixer before for another unfinished 2D game. I would be
interested in trying OpenAL instead, because of its 3D features. However, I
haven’t been able to test any tutorial samples I’ve found on my Debian Sid
box, probably because most samples I’ve found are heavily Windows/MSVC-based.
Also, I’m not sure if OpenAL is still being maintained for Linux? The
official website www.openal.org doesn’t strike me as very informative.

What we need: play multiple samples at once, change pitch of looped samples in
real time (for engine sounds), play music in background (with pause, stop
fade in/out and possibly blend one music cue into another). Windows & Linux
support.

What we want: ogg and/or mp3 playing (for music), 3D effects. Support for
other platforms, e.g. Mac.

I’d appreciate any tips and suggestions on which system to use, and why.
Suggestions for some other system than SDL_mixer/OpenAL are of course welcome
as well. :slight_smile:

Thanks in advance,
Marian.

I have used SDL_mixer before for another unfinished 2D game. I would be
interested in trying OpenAL instead, because of its 3D features. However,
I
haven’t been able to test any tutorial samples I’ve found on my Debian Sid
box, probably because most samples I’ve found are heavily
Windows/MSVC-based.
Also, I’m not sure if OpenAL is still being maintained for Linux? The
official website www.openal.org doesn’t strike me as very informative.

Yes, it is open, so never die!

What we need: play multiple samples at once, change pitch of looped
samples in
real time (for engine sounds), play music in background (with pause, stop
fade in/out and possibly blend one music cue into another). Windows &
Linux
support.

Yes, OpenAL support all of these things
You dont need to change pitch. OpenAL supports a ??? phenomenon (I dont
remember the name)
which when a sound comes to your ear, frequency is high, and when runaway
from your ear, frequency is low.
For music, play from vertex 0,0,0 (your ear) and for fade out runaway the
vertex of music

What we want: ogg and/or mp3 playing (for music), 3D effects. Support for
other platforms, e.g. Mac.

Why mp3?
music and effects MUST BE ogg!!!
OpenAL has an extension for directly ogg playing for linux and Win32. I dont
remenber if this extension apply to Mac.
Instead mp3 extension apply only to Win32 (or Linux, I dont remember - not
both)

I’d appreciate any tips and suggestions on which system to use, and why.
Suggestions for some other system than SDL_mixer/OpenAL are of course
welcome
as well. :slight_smile:

I use SDL_mixer for 2D Games
but for 3D, I use OpenAL.
(So, I never use OpenAL until now :wink: . Future is …tommorow

You can use OpenAL for all games…

“<- Chameleon ->” <cham_gss at hotmail.com> wrote:

You dont need to change pitch. OpenAL supports a ??? phenomenon
(I dont remember the name) which when a sound comes to your ear,
frequency is high, and when runaway from your ear, frequency is low.

FYI: you mean the “Doppler Effekt”.
http://www.google.com/search?q=doppler%20effekt
:slight_smile:

clemens

You dont need to change pitch. OpenAL supports a ??? phenomenon (I dont
remember the name)
which when a sound comes to your ear, frequency is high, and when runaway
from your ear, frequency is low.

Well, for speed-based engine sounds (aside from the Doppler Effect, the
“local” engine’s pitch must change depending on the current speed) I still
need to change the pitch…but I suppose that’s possible.

Why mp3?
music and effects MUST BE ogg!!!

I do prefer ogg anyway. :slight_smile:

OpenAL has an extension for directly ogg playing for linux and Win32. I
dont remenber if this extension apply to Mac.

Ok. I wasn’t sure about that point, since I only read about the ogg extension
related to Windows.

You wouldn’t know of any simple OpenAL tutorials which actually work in Linux?

Thanks,
Marian.On Sunday 16 May 2004 15:25, ← Chameleon → wrote:


“A moose is an animal with horns on the front of his head and a hunting lodge
wall on the back of it.” - Groucho Marx

You wouldn’t know of any simple OpenAL tutorials which actually work in
Linux?

I am not totally sure if it is for Linux…
http://www.devmaster.net/articles.php?catID=6

Don’t know if you’ve already seen this one or not, and it may not be of
any use to you, since one of the tutorials (at least) is for Windows…
(And the others are raw ANSI-C code with standard headers), but here’s
the link just in case:

http://www.devmaster.net/articles.php?catID=6

Marian Schedenig wrote:>On Sunday 16 May 2004 15:25, ← Chameleon → wrote:

You dont need to change pitch. OpenAL supports a ??? phenomenon (I dont
remember the name)
which when a sound comes to your ear, frequency is high, and when runaway
from your ear, frequency is low.

Well, for speed-based engine sounds (aside from the Doppler Effect, the
“local” engine’s pitch must change depending on the current speed) I still
need to change the pitch…but I suppose that’s possible.

Why mp3?
music and effects MUST BE ogg!!!

I do prefer ogg anyway. :slight_smile:

OpenAL has an extension for directly ogg playing for linux and Win32. I
dont remenber if this extension apply to Mac.

Ok. I wasn’t sure about that point, since I only read about the ogg extension
related to Windows.

You wouldn’t know of any simple OpenAL tutorials which actually work in Linux?

Thanks,
Marian.

Thanks. I knew that one and last time I tried I couldn’t get it to initialize
OpenAL correctly.

Though now that this thread has stopped to be SDL-specific, I guess it’s time
for me to take it to the OpenAL mailing list. :slight_smile:

Thanks,
Marian.On Monday 17 May 2004 16:49, Scott Harper wrote:

http://www.devmaster.net/articles.php?catID=6


“A moose is an animal with horns on the front of his head and a hunting lodge
wall on the back of it.” - Groucho Marx