How do I get SDL_mixer to 'share' audio?

(This is all taking place in Windows 98 w/ a Creative Soundblaster Live)

If I use:

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

then whenever my application has focus, other applications don’t have access
to the sound card. I know things like Winamp & Starcraft have no problem
playing sound & music at the same time together… Does anyone have any
idea what I might be doing wrong? Major thanks in advance–
Peace,
Amit Jain

then whenever my application has focus, other applications don’t have access
to the sound card. I know things like Winamp & Starcraft have no problem
playing sound & music at the same time together… Does anyone have any
idea what I might be doing wrong? Major thanks in advance

Probably we’re setting a wrong flag in the DirectSound backend. Don’t have
anything more insightful to say than that.

–ryan.

Weren’t there things like cooperate levels which you need to specify for
your direct sound object and it might be that sdl is trying to set the
highest one available. Anyway- take a look at sources and look for
initialization functions for direct audio and especially for
SetCooperativeLevel and adjust them if you need and then recompile sdl. :slight_smile:

Can anybody correct me, if i’m wrong?

Kovacs> ----- Original Message -----

From: icculus@icculus.org (Ryan C. Gordon)
To:
Sent: Sunday, March 10, 2002 4:31 AM
Subject: Re: [SDL] How do I get SDL_mixer to ‘share’ audio?

then whenever my application has focus, other applications don’t have
access

to the sound card. I know things like Winamp & Starcraft have no
problem

playing sound & music at the same time together… Does anyone have any
idea what I might be doing wrong? Major thanks in advance

Probably we’re setting a wrong flag in the DirectSound backend. Don’t have
anything more insightful to say than that.

–ryan.


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

then whenever my application has focus, other applications don’t have access
to the sound card. I know things like Winamp & Starcraft have no problem
playing sound & music at the same time together… Does anyone have any
idea what I might be doing wrong? Major thanks in advance

Probably we’re setting a wrong flag in the DirectSound backend. Don’t have
anything more insightful to say than that.

–ryan.

Under win2k, I tried playing an mp3 w/ winamp while simultaneously
playing an ogg + wav with a sdl mixer app. All three played well w/ each
other.

IDirectSound_SetCooperativeLevel(…) is what controls this, and sam seems
to be setting it appriorately in /SDL12/src/audio/windx5/SDL_dx5audio.c
– which would explain why it works for me :).

DaveOn Sat, 9 Mar 2002, Ryan C. Gordon wrote:


David MacCormack
@David_MacCormack

:wq
damn!

Ryan, Kovacs, David, thank you very much for your help. This is
what I did, if anyone’s interested:

src/audio/windx5/SDL_dx5audio.c:432, changed DSSCL_WRITEPRIMARY to
DSSCL_NORMAL

I haven’t tested this out on 2k or XP but hopefully they’ll work
too. Although looking through all that code, THANK GOD for SDL :
)–
Peace,
Amit Jain

Super-Junior/Sub-Senior, Stevens Institute of Technology
http://www.omlettesoft.com/

===================================================================
Web Hosting @ its best. http://www.hoster.com