ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Audio.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Audio.pm (file contents):
Revision 1.2 by root, Wed Jan 18 15:31:51 2012 UTC vs.
Revision 1.3 by root, Wed May 1 20:38:50 2013 UTC

17use common::sense; 17use common::sense;
18use DC (); 18use DC ();
19 19
20our $SDL_MIXER; 20our $SDL_MIXER;
21 21
22sub init { 22sub init() {
23 unless ($::SDL_MIXER) { 23 unless ($::SDL_MIXER) {
24 if (length $::CFG->{audio_driver}) { 24 if (length $::CFG->{audio_driver}) {
25 local $ENV{SDL_AUDIODRIVER} = $::CFG->{audio_driver}; 25 local $ENV{SDL_AUDIODRIVER} = $::CFG->{audio_driver};
26 DC::SDL_InitSubSystem DC::SDL_INIT_AUDIO 26 DC::SDL_InitSubSystem DC::SDL_INIT_AUDIO
27 and die "SDL::Init failed!\n"; 27 and die "SDL::Init failed!\n";
67 # simply unreliable. 67 # simply unreliable.
68 68
69 # let's check whether the default config and a few others segfault, 69 # let's check whether the default config and a few others segfault,
70 # then decide 70 # then decide
71 71
72 # user selected config 72 return if _probe; # user selected config
73 return if _probe; 73 $::CFG->{audio_driver} = "" ; return if _probe; # default sdl config
74
75 # default sdl config
76 delete $ENV{SDL_AUDIODRIVER};
77 $::CFG->{audio_driver} = "";
78 return if _probe;
79
80 $::CFG->{audio_driver} = "pulse"; 74 $::CFG->{audio_driver} = "pulse"; return if _probe;
81 return if _probe;
82
83 $::CFG->{audio_driver} = "alsa"; 75 $::CFG->{audio_driver} = "alsa" ; return if _probe;
84 return if _probe; 76 $::CFG->{audio_driver} = "esd" ; return if _probe;
85
86 $::CFG->{audio_driver} = "dsp"; 77 $::CFG->{audio_driver} = "dsp" ; return if _probe;
87 return if _probe;
88
89 $::CFG->{audio_driver} = "none"; 78 $::CFG->{audio_driver} = "none" ;
90} 79}
91 80
921; 811;
93 82
94=back 83=back

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines