Prevent muting of DOSBox (and other SDL apps) audio when running in background (Windows port)

Here you can discuss the development of patches.

Prevent muting of DOSBox (and other SDL apps) audio when running in background (Windows port)

Postby s3freak » 2013-4-07 @ 18:10

I have spent quite a while searching for a solution to this as occasionally I like to leave DOSBox running in the background but without having its audio muted.

After searching for a while, the answer is to remove or comment out the mainwin = hwnd line under the DX5_SoundFocus function of src\audio\windx5\SDL_dx5audio.c and then recompile SDL.dll.

I include a patch if anyone is interested for their convenience. This patch should also work with other SDL based apps, not just DOSBox.
You do not have the required permissions to view the files attached to this post.
My 486 is my real DOSBox as well as my customised DOSBox!
User avatar
s3freak
Newbie
 
Posts: 19
Joined: 2013-1-06 @ 09:16

Re: Prevent muting of DOSBox (and other SDL apps) audio when running in background (Windows port)

Postby gulikoza » 2013-4-07 @ 20:52

Perhaps a better solution would be to change

format.dwFlags |= DSBCAPS_GLOBALFOCUS;

to use global focus in the first place.
Actually I don't know why SDL uses STICKYFOCUS by default.
User avatar
gulikoza
Oldbie
 
Posts: 1700
Joined: 2004-6-25 @ 14:53

Re: Prevent muting of DOSBox (and other SDL apps) audio when running in background (Windows port)

Postby s3freak » 2013-4-08 @ 06:12

Thanks for the info. At the moment, I am not enhancing my builds further, but if I get time to do so, then I will consider this method.
User avatar
s3freak
Newbie
 
Posts: 19
Joined: 2013-1-06 @ 09:16


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests