35 lines
813 B
Text
35 lines
813 B
Text
|
$NetBSD: patch-ab,v 1.1.1.1 2002/11/15 17:28:57 wiz Exp $
|
||
|
|
||
|
--- src/audio.c.orig Thu Aug 8 11:02:58 2002
|
||
|
+++ src/audio.c
|
||
|
@@ -87,6 +87,7 @@ void audio_set_volume( int level )
|
||
|
}
|
||
|
void audio_fade_out( int channel, int ms )
|
||
|
{
|
||
|
+ if ( !audio_ok ) return;
|
||
|
Mix_FadeOutChannel( channel, ms );
|
||
|
}
|
||
|
|
||
|
@@ -113,6 +114,7 @@ Wav* wav_load( char *fname, int channel
|
||
|
}
|
||
|
void wav_free( Wav *wav )
|
||
|
{
|
||
|
+ if ( !audio_ok ) return;
|
||
|
if ( wav ) {
|
||
|
if ( wav->chunk )
|
||
|
Mix_FreeChunk( wav->chunk );
|
||
|
@@ -132,11 +134,13 @@ void wav_play( Wav *wav )
|
||
|
}
|
||
|
void wav_play_at( Wav *wav, int channel )
|
||
|
{
|
||
|
+ if ( !audio_ok ) return;
|
||
|
wav->channel = channel;
|
||
|
wav_play( wav );
|
||
|
}
|
||
|
void wav_fade_out( Wav *wav, int ms )
|
||
|
{
|
||
|
+ if ( !audio_ok ) return;
|
||
|
Mix_FadeOutChannel( wav->channel, ms );
|
||
|
}
|
||
|
|