Skip to content

Commit

Permalink
Revert sound duplication limiter
Browse files Browse the repository at this point in the history
Refs #39
  • Loading branch information
ensiform committed Apr 21, 2019
1 parent af72788 commit 27eb3f5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/client/snd_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static void S_Base_MainStartSoundEx( vec3_t origin, int entityNum, int entchanne
channel_t *ch;
sfx_t *sfx;
int i, time;
int inplay, allowed;
//int inplay, allowed;
qboolean fullVolume;

if ( !s_soundStarted || s_soundMuted ) {
Expand Down Expand Up @@ -740,18 +740,18 @@ static void S_Base_MainStartSoundEx( vec3_t origin, int entityNum, int entchanne
// pick a channel to play on

// try to limit sound duplication
if ( entityNum == listener_number )
/*if ( entityNum == listener_number )
allowed = 16;
else
allowed = 8;
allowed = 8;*/

fullVolume = qfalse;
if (localSound || S_Base_HearingThroughEntity(entityNum, origin)) {
fullVolume = qtrue;
}

ch = s_channels;
inplay = 0;
//inplay = 0;

for (i = 0; i < MAX_CHANNELS ; i++, ch++)
{
Expand All @@ -765,17 +765,17 @@ static void S_Base_MainStartSoundEx( vec3_t origin, int entityNum, int entchanne
{
S_ChannelFree(ch);
}
else
/*else
{
inplay++;
}
}*/
}
}

// too much duplicated sounds, ignore
if ( inplay > allowed ) {
/*if ( inplay > allowed ) {
return;
}
}*/

sfx->lastTimeUsed = time;

Expand Down

0 comments on commit 27eb3f5

Please sign in to comment.