blob: 41e7b394b11eb02b0cbdcd1ddb43b845afbc52b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$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 );
}
|