Skip to content

Commit

Permalink
SFX|Audio|Client: Ensure a sample is loaded in a channel before compa…
Browse files Browse the repository at this point in the history
…ring ids
  • Loading branch information
danij-deng committed Dec 15, 2013
1 parent e24c481 commit 7821ff6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doomsday/client/src/audio/s_sfx.cpp
Expand Up @@ -641,15 +641,15 @@ int Sfx_StartSound(sfxsample_t *sample, float volume, float freq, mobj_t *emitte
for(int i = 0; i < numChannels; ++i, ch++)
{
if(!ch->buffer) continue;
if(!(ch->buffer->flags & SFXBF_PLAYING)) continue;

DENG2_ASSERT(ch->buffer->sample != 0);
if(ch->buffer->sample->id != sample->id) continue;

if(ch->buffer->flags & SFXBF_PLAYING)
if(myPrio >= channelPrios[i] && (!selCh || channelPrios[i] <= lowPrio))
{
if(myPrio >= channelPrios[i] && (!selCh || channelPrios[i] <= lowPrio))
{
selCh = ch;
lowPrio = channelPrios[i];
}
selCh = ch;
lowPrio = channelPrios[i];
}
}

Expand Down

0 comments on commit 7821ff6

Please sign in to comment.