Skip to content

Commit

Permalink
Logical Sounds: Stop previous sounds from origin
Browse files Browse the repository at this point in the history
The logical sound manager now enforces a "one sound per origin" rule.
If a new sound is started, any currently playing sound from the same origin
is considered stopped.

See: https://sourceforge.net/tracker/?func=detail&aid=2872128&group_id=74815&atid=542099
  • Loading branch information
skyjake committed Mar 2, 2012
1 parent 86681b4 commit 2a4256a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/engine/portable/src/s_logic.c
Expand Up @@ -153,6 +153,12 @@ void Sfx_StartLogical(int id, mobj_t *origin, boolean isRepeating)
return;
}

if(origin)
{
// Stop all previous sounds from this origin (only one per origin).
Sfx_StopLogical(0, origin);
}

id &= ~DDSF_FLAG_MASK;
node = Sfx_CreateLogical(id);
node->origin = origin;
Expand Down

0 comments on commit 2a4256a

Please sign in to comment.