Sound api status

Hello everyone.

I am new to SDL and interested in using the audio API. We are looking to port
our audio code that currently uses DirectSound to a cross-platform Audio API.

choose from… SDL_Mixer, SDL_Sound, or just normal SDL (SDL_Audio?).

I am having trouble sorting out which API is the one to use. They seem to all
do similar things. Questions I have are: which one’s are still supported, do
they work together, which versions are current, etc. Why would I pick one over
the other? Is there up to date documentation somewhere?

Thanks in advance!

-Clay>From my initial investigation, there seems to be 3 different audio APIs to

Use SDL mixer.

Normal SDL audio can’t mix sounds. SDL_sound can’t mix sounds either…

I think there is an experimental mixer for SDL_sound though.On 6/9/06, Clayton Thomsen <clayton.thomsen at plexsysipi.com> wrote:

Hello everyone.

I am new to SDL and interested in using the audio API. We are looking to port
our audio code that currently uses DirectSound to a cross-platform Audio API.

From my initial investigation, there seems to be 3 different audio APIs to
choose from… SDL_Mixer, SDL_Sound, or just normal SDL (SDL_Audio?).

I am having trouble sorting out which API is the one to use. They seem to all
do similar things. Questions I have are: which one’s are still supported, do
they work together, which versions are current, etc. Why would I pick one over
the other? Is there up to date documentation somewhere?

Thanks in advance!

-Clay


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

You should actually use the three of them:

  • SDL provides the basic functionality
  • SDL_Sound provides you with decoders for many sound formats (OGG, MP3,
    WAV, etc.)
  • SDL_Mixer provides you with the capability of playing a background
    music + several SFX and manages all the mixing stuff.

hope this helps.

santi

Clayton Thomsen wrote:> Hello everyone.

I am new to SDL and interested in using the audio API. We are looking to port
our audio code that currently uses DirectSound to a cross-platform Audio API.

From my initial investigation, there seems to be 3 different audio APIs to
choose from… SDL_Mixer, SDL_Sound, or just normal SDL (SDL_Audio?).

I am having trouble sorting out which API is the one to use. They seem to all
do similar things. Questions I have are: which one’s are still supported, do
they work together, which versions are current, etc. Why would I pick one over
the other? Is there up to date documentation somewhere?

Thanks in advance!

-Clay


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

No, actually they all have different purposes.

The SDL audio API only provides a raw output buffer, which is good if
your application already does all sorts of sound processing, but if
that’s not the case you’ll want a higher level audio API like
SDL_mixer or OpenAL.

SDL_mixer provides loading, mixing and playback of sound samples. It
also provides MIDI playback (either through native interfaces or using
a built-in timidity engine). It uses the SDL audio API for its output
buffer.

SDL_sound is an audio format decoding library, providing more formats
than SDL_mixer. The two can be used together.

Also, keep in mind that there’s also OpenAL, which provides similar
features than SDL_mixer but with full 3D capabilities, and doesn’t
depend on SDL (though you’ll probably want to use SDL for other tasks
such as video and input). I’d recommend using that for your project
(unless the raw output buffer provided by SDL is sufficient).On 6/8/06, Clayton Thomsen <clayton.thomsen at plexsysipi.com> wrote:

Hello everyone.

I am new to SDL and interested in using the audio API. We are looking to port
our audio code that currently uses DirectSound to a cross-platform Audio API.

From my initial investigation, there seems to be 3 different audio APIs to
choose from… SDL_Mixer, SDL_Sound, or just normal SDL (SDL_Audio?).

I am having trouble sorting out which API is the one to use. They seem to all
do similar things. Questions I have are: which one’s are still supported, do
they work together, which versions are current, etc. Why would I pick one over
the other? Is there up to date documentation somewhere?

  • SR