[SDL] playing multiple sounds simultaneously (SDL_Mixer, BeOS)

Matt Pekar nimdok at jhu.edu
Tue Aug 21 05:54:01 PDT 2001


That's what I thought it should be, but when I initialize the Mixer with
say, 8 channels, SDL_Error returns:  "1 (mono) and 2 (stereo) channels
supported".

Mix_OpenAudio(frequency, MIX_DEFAULT_FORMAT, 8, chunkSize) < 0

Even though it only works for two channels, it's otherwise behaving as
expected.

Are there any variables which affect the number of channels available?

On Tue, 21 Aug 2001, Ryan C. Gordon wrote:

> > What have other people done?  Is the BeOS implementation somehow
> > limited? Am I misunderstanding the concept of channels?
>
> "Channel" in this case has nothing to do with stereo ("BeOS supports two
> channels"). Channels are an abstraction in SDL_Mixer above the OS and above
> SDL_audio. If you can play a stream of sound at all in SDL, then you can mix
> multiple streams of sound ("channels") through SDL_mixer.
>
> If you start three sounds on channels 1, 2, and 3, and start some music too,
> then all four of these sounds should mix into one stream of sound behind the
> scenes, which makes it's way to your sound card.
>
> I don't know if that clarifies anything.  :)
>
> --ryan.
>
>





More information about the SDL mailing list