diff options
author | quou <quou@disroot.org> | 2023-05-07 21:30:20 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-07 21:30:20 +1000 |
commit | 19760d58ea09b9c345a0c845e89143ddcc5d6507 (patch) | |
tree | 673e17ad8659a30e9abd9613b76ca081a0b3e147 /sound.c | |
parent | f3ee0b0b2ddcf4484cd61aa2b33e49d9cc35779a (diff) |
Fix a crash when running with no_sound
Diffstat (limited to 'sound.c')
-rw-r--r-- | sound.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -63,6 +63,7 @@ Song_Func get_current_song_f() { } void play_beep(int pitch, int length) { +#if !no_sound Beep* beep; #if DEBUG @@ -75,6 +76,7 @@ void play_beep(int pitch, int length) { beep = &sys.beeps[sys.beep_count++]; beep->pitch = pitch; beep->length = length; +#endif } void sound_mix(unsigned char* stream, int len) { @@ -85,7 +87,6 @@ void sound_mix(unsigned char* stream, int len) { f = get_current_song_f(); for (i = 0; i < len; i++) { -/* stream[i] = sys.t % 50;*/ stream[i] = f(sys.t) / 5; for (j = sys.beep_count - 1; j >= 0; j--) { beep = &sys.beeps[j]; |