08-07-2024, 04:57 AM
(This post was last modified: 08-07-2024, 04:58 AM by TerryRitchie.)
(08-07-2024, 12:58 AM)SMcNeill Wrote: Not to say it's a bad idea or anything, but how the heck would one implement it?I'm suggesting that _SNDSTOPCOPY would stop all copies of a sound playing at once. Yeah, I agree, managing which copy to stop would be just the same as manually keeping track of sound copy handles using _SNDCOPY.
Let's say me hero has a zappy gun. I load the "pew pew" sound file.
I fire off three zaps.
_SNDPLAYCOPY "pew pew"
_SNDPLAYCOPY "pew pew"
_SNDPLAYCOPY "pew pew"
Now, the second one hits the enemy. How would _SNDSTOPCOPY know to stop that second "pew pew" and not the first or third? Wouldn't it need a handle to specify which sound to actually stop?
And if it does, then wouldn't it basically be the exact same as _SNDCOPY?
How could you ever specify which copy to stop, without a handle, and if you have a handle, why wouldn't the existing commands already handle the issue?
What I'm running into is when a level of a game has been completed, for example, all of those copies of sound keep right on humming along with no way to instantly stop them. I try to keep these sound bites very short, a second or less, but even with that it's still difficult to time everything just right for a smooth transition to the next level. If a sound bite is over a second and gets copied a few times then it's completely unmanageable.