ref: 074026b37ee26e78ae1c25907d2b7211b3e5fe91
parent: 01a743cd351d146e9b9ea7f7ca5b1c05e01da68e
parent: 5160ceb4512b8bb5839df898a4aff0c6779578c5
author: Simon Howard <[email protected]>
date: Sat Feb 21 19:32:49 EST 2015
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -422,7 +422,7 @@
sha1_context_t context;
sha1_digest_t hash;
char *filename;
- int i;
+ unsigned int i;
// Don't bother doing a hash if we're never going to find anything.
if (subst_music_len == 0)
@@ -734,7 +734,8 @@
char name[9];
byte *data;
FILE *fs;
- int lumpnum, h;
+ unsigned int lumpnum;
+ size_t h;
fs = fopen(filename, "w");
--- a/src/strife/s_sound.c
+++ b/src/strife/s_sound.c
@@ -277,7 +277,7 @@
channel_t* c;
// Find an open channel
- for (cnum=0 ; cnum<snd_channels ; cnum++)
+ for (cnum=0 ; cnum<snd_channels ; cnum++)
{
if (!channels[cnum].sfxinfo)
{
@@ -286,6 +286,11 @@
else if (origin && channels[cnum].origin == origin &&
(isvoice || cnum != i_voicehandle)) // haleyjd
{
+ // haleyjd 20150220: [STRIFE] missing sound channel priority check
+ // Is a higher priority sound by same origin already playing?
+ if(!isvoice && sfxinfo->priority > channels[cnum].sfxinfo->priority)
+ return -1;
+
S_StopChannel(cnum);
break;
}