However, in the example I present below, multiple instances clearly overlap. I'm gonna both paste the code and attach a zip file. I used "caco/sight" as the test sound because it's relatively long and illustrates the issue well.
SNDINFO:
Code: Select all
$alias Test_Sound caco/sight
$limit Test_Sound 1 256
// $singular Test_Sound
Code: Select all
version "3.3"
class TestActor : Actor
{
Default
{
+NOINTERACTION;
}
States
{
Spawn:
TNT1 A 3 A_StartSound("Test_Sound");
Loop;
Death:
Stop;
}
}
class TestActor2 : Actor
{
Default
{
+NOINTERACTION;
}
States
{
Spawn:
TNT1 A 3 A_StartSound("Test_Sound", flags: CHANF_NOSTOP);
Loop;
Death:
Stop;
}
}
1. Start a new game.
2. Open console and execute "summon TestActor". Hear the sounds.
3. Start a new game.
4. Open console and execute "summon TestActor2". Hear the sounds.
Expected results: both actors to sound the same: 1 sound plays until it ends, only then the next sound starts playing.
Actual results: TestActor1 starts playing the next sound each 3rd frame, despite "$limit Test_Sound 1 256" in the SNDINFO.
BTW, $singular in this example does not limit the sound instance to 1 either, which can be tested by commenting the line 3 and uncommenting the line 4 in the SNDINFO.
If I misunderstand what $limit is supposed to do, is it possible add a feature that implements such behavior? Using A_StartSound with CHANF_NOSTOP flag is not always possible. For example, see this topic: viewtopic.php?f=122&t=73990. Also, I'm sure there are other cases when it is simpler to achieve this limitation through SNDINFO rather than by using A_StartSound with CHANF_NOSTOP flag.