mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Increase MAXSOUNDS to 4096, making the maximum valid sound ID be 4093.
Keep in mind that MUSICANDSFXs with ambient sounds must still have lotags less than 999 because values >=1000 are used for the amount of reverb. (999 can't be used because the original code reads '< 999' and I'm not sure whether it has any special significance... probably not though) git-svn-id: https://svn.eduke32.com/eduke32@2093 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4d40d32014
commit
3a089f894c
3 changed files with 7 additions and 6 deletions
|
@ -312,10 +312,11 @@ void S_Cleanup(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// num + 65536 is a sound played globally for which there was no open slot to keep track of the voice
|
// num + (MAXSOUNDS*MAXSOUNDINSTANCES) is a sound played globally
|
||||||
if (num >= 65536)
|
// for which there was no open slot to keep track of the voice
|
||||||
|
if (num >= (MAXSOUNDS*MAXSOUNDINSTANCES))
|
||||||
{
|
{
|
||||||
g_soundlocks[num-65536]--;
|
g_soundlocks[num-(MAXSOUNDS*MAXSOUNDINSTANCES)]--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,7 +602,7 @@ int32_t S_PlaySound(int32_t num)
|
||||||
|
|
||||||
if (j >= MAXSOUNDINSTANCES) // still no slots available
|
if (j >= MAXSOUNDINSTANCES) // still no slots available
|
||||||
{
|
{
|
||||||
FX_SetVoiceCallback(voice, num + 65536);
|
FX_SetVoiceCallback(voice, num + (MAXSOUNDS*MAXSOUNDINSTANCES));
|
||||||
return voice;
|
return voice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#ifndef _sounds_public_
|
#ifndef _sounds_public_
|
||||||
#define _sounds_public_
|
#define _sounds_public_
|
||||||
|
|
||||||
#define MAXSOUNDS 2560
|
#define MAXSOUNDS 4096
|
||||||
#define MAXSOUNDINSTANCES 8
|
#define MAXSOUNDINSTANCES 8
|
||||||
#define LOUDESTVOLUME 150
|
#define LOUDESTVOLUME 150
|
||||||
#define MUSIC_ID -65536
|
#define MUSIC_ID -65536
|
||||||
|
|
|
@ -43,7 +43,7 @@ typedef struct {
|
||||||
char *definedname; // new
|
char *definedname; // new
|
||||||
} sound_t;
|
} sound_t;
|
||||||
|
|
||||||
#define MAXSOUNDS 2560
|
#define MAXSOUNDS 4096
|
||||||
extern sound_t g_sounds[MAXSOUNDS];
|
extern sound_t g_sounds[MAXSOUNDS];
|
||||||
|
|
||||||
int32_t S_SoundStartup(void);
|
int32_t S_SoundStartup(void);
|
||||||
|
|
Loading…
Reference in a new issue