ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.182 by elmex, Sat Jul 21 20:30:41 2007 UTC vs.
Revision 1.183 by root, Sun Jul 22 17:17:17 2007 UTC

1969sub audio_music_start { 1969sub audio_music_start {
1970 my $path = $MUSIC_PLAYING->{path} 1970 my $path = $MUSIC_PLAYING->{path}
1971 or return; 1971 or return;
1972 1972
1973 CFPlus::DB::prefetch_file $path, 1024_000, sub { 1973 CFPlus::DB::prefetch_file $path, 1024_000, sub {
1974 return unless $SDL_MIXER;
1975
1974 # music might have changed... 1976 # music might have changed...
1975 $path eq $MUSIC_PLAYING->{path} 1977 $path eq $MUSIC_PLAYING->{path}
1976 or return &audio_music_start (); 1978 or return &audio_music_start ();
1977 1979
1978 $MUSIC_PLAYER = new_from_file CFPlus::MixMusic $path; 1980 $MUSIC_PLAYER = new_from_file CFPlus::MixMusic $path;
1993 } 1995 }
1994} 1996}
1995 1997
1996sub audio_music_changed { 1998sub audio_music_changed {
1997 return unless $CFG->{bgm_enable}; 1999 return unless $CFG->{bgm_enable};
2000 return unless $SDL_MIXER;
1998 2001
1999 # default MUSIC_WANT == MUSIC_DEFAULT 2002 # default MUSIC_WANT == MUSIC_DEFAULT
2000 @MUSIC_WANT = { path => CFPlus::find_rcfile "music/$MUSIC_DEFAULT" } unless @MUSIC_WANT; 2003 @MUSIC_WANT = { path => CFPlus::find_rcfile "music/$MUSIC_DEFAULT" } unless @MUSIC_WANT;
2001 2004
2002 # if the currently playing song is acceptable, let it continue 2005 # if the currently playing song is acceptable, let it continue
2062 }; 2065 };
2063 } 2066 }
2064 } else { 2067 } else {
2065 status "unable to open sound config: $!"; 2068 status "unable to open sound config: $!";
2066 } 2069 }
2070 } else {
2071 undef $SDL_MIXER;
2067 } 2072 }
2068} 2073}
2069 2074
2070sub audio_shutdown { 2075sub audio_shutdown {
2071 CFPlus::Mix_CloseAudio if $SDL_MIXER; 2076 CFPlus::Mix_CloseAudio if $SDL_MIXER;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines