SDL-mirror/src/audio
Sam Lantinga 477689ac83 Fixed bug #1011
Daniel Ellis      2010-06-25 15:20:31 PDT

SDL based applications sometimes display the wrong application name in the
Sound Preferences dialog when using pulseaudio.

I can see from the code that the SDL pulse module is initiating a new pulse
audio context and passing an application name using the function
get_progname().

The get_progname() function returns the name of the current process. However,
the process name is often not a suitable name to use. For example, the OpenShot
video editor is a python application, and so "python" is displayed in the Sound
Preferences window (see Bug #596504), when it should be displaying "OpenShot".

PulseAudio allows applications to specify the application name, either at the
time the context is created (as SDL does currently), or by special environment
variables (see http://www.pulseaudio.org/wiki/ApplicationProperties). If no
name is specified, then pulseaudio will determine the name based on the
process.

If you specify the application name when initiating the pulseaudio context,
then that will override any application name specified using an environment
variable.

As libsdl is a library, I believe the solution is for libsdl to not specify any
application name when initiating a pulseaudio context, which will enable
applications to specify the application name using environment variables. In
the case that the applications do not specify anything, pulseaudio will fall
back to using the process name anyway.

The attached patch removes the get_progname() function and passes NULL as the
application name when creating the pulseaudio context, which fixes the issue.
2011-01-23 21:55:04 -08:00
..
alsa Merged r5549:5550 from branches/SDL-1.2: ALSA 6-channel swizzle fix. 2010-02-12 17:14:41 +00:00
android Fixed audio buffer lifecycle and implemented audio shutdown 2011-01-13 12:32:55 -08:00
arts Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
baudio Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
bsd Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
disk Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
dma Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
dmedia Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
dsp Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
dummy Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
esd Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
fusionsound Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
iphoneos Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
macosx Removed support for 10.3.9 2010-12-01 12:23:16 -08:00
mme Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
nas Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
nds Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
paudio Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
pulseaudio Fixed bug #1011 2011-01-23 21:55:04 -08:00
qsa Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
sun Fixed bug #926 2010-01-24 21:10:53 +00:00
ums Fixed bug #926 2010-01-24 21:10:53 +00:00
windib Removed test for "driver is valid, but doesn't see any audio devices." 2010-01-26 06:01:33 +00:00
windx5 Fixed bug 993 2010-07-18 11:15:02 -07:00
SDL_audio.c Fixed bug #925 2011-01-20 18:04:05 -08:00
SDL_audio_c.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_audiocvt.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_audiodev.c Fixed compile warning. 2010-07-13 22:22:43 -07:00
SDL_audiodev_c.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_audiomem.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_audiotypecvt.c Fixed crashing loading 48KHz audio, contributed by Terry Welsh 2010-09-18 18:15:08 -07:00
SDL_mixer.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_mixer_m68k.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_mixer_m68k.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_mixer_MMX.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_mixer_MMX.h Merged r5070:5071 from branches/SDL-1.2: forcibly disable buggy MMX mixers. 2010-01-10 07:48:14 +00:00
SDL_mixer_MMX_VC.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_mixer_MMX_VC.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_sysaudio.h Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_wave.c Fixed bug #926 2010-01-24 21:10:53 +00:00
SDL_wave.h Fixed bug #926 2010-01-24 21:10:53 +00:00
sdlgenaudiocvt.pl Fixed crashing loading 48KHz audio, contributed by Terry Welsh 2010-09-18 18:15:08 -07:00