projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added variable to improve code readability
[rocksndiamonds.git]
/
src
/
libgame
/
sound.c
diff --git
a/src/libgame/sound.c
b/src/libgame/sound.c
index f911d2388bf854c9cc372d59d4e64debd6882aaa..5f497c386c56c6dda9088ecfd87940cd3bcfd36c 100644
(file)
--- a/
src/libgame/sound.c
+++ b/
src/libgame/sound.c
@@
-524,6
+524,17
@@
void StartMixer(void)
(int)sqrt((float)(SOUND_MAX_LEFT2RIGHT * SOUND_MAX_LEFT2RIGHT - i * i));
}
(int)sqrt((float)(SOUND_MAX_LEFT2RIGHT * SOUND_MAX_LEFT2RIGHT - i * i));
}
+boolean isSoundPlaying(int nr)
+{
+ int i;
+
+ for (i = audio.first_sound_channel; i < audio.num_channels; i++)
+ if (mixer[i].active && mixer[i].nr == nr)
+ return TRUE;
+
+ return FALSE;
+}
+
// THE STUFF ABOVE IS ONLY USED BY THE SOUND SERVER CHILD PROCESS
// ============================================================================
// THE STUFF ABOVE IS ONLY USED BY THE SOUND SERVER CHILD PROCESS
// ============================================================================