ID:119943

 BYOND Version: 493 Operating System: Windows XP Home Web Browser: Firefox 5.0 Applies to: Dream Seeker
 Status: Unverified Thus far we've been unable to verify or reproduce this bug. Or, it has been observed but it cannot be triggered with a reliable test case. You can help us out by editing your report or adding a comment with more information.
Descriptive Problem Summary:

I have multiple sound emitter objects that play a sound to players in range and will constantly update the sound's x, y, z, and volume attributes.

When multiple of these emitter objects are playing the same sound file (but different sound objects) to the same player at the same time on different channels, glitches can be heard if the volumes of the sound objects are different (in my case, two sound objects with volumes 8 and 50).

Numbered Steps to Reproduce Problem:
1. Play two or three versions of the same sound file to a player on different channels
2. While the sound is playing, constantly send updates to the sound through sound.status = SOUND_UPDATE

Code Snippet (if applicable) to Reproduce Problem:
```//Per server tick:        Listener(mob/M)            if(!(sound in M.soundChannels))                //Does not actually find the lowest channel from 800, but is computationally cheaper than other methods                //unless the list is sorted.                var/lowestChannel = 800                for(var/i in M.soundChannels)                    if(M.soundChannels[i] >= lowestChannel)                        lowestChannel = M.soundChannels[i]+1                M.soundChannels += sound                M.soundChannels[sound] = lowestChannel            if(LENGTHSQ(x,y,M.x,M.y)>d2)                return RemoveListener(M)            sound.status = SOUND_UPDATE            SoundCoordinate(M)            sound.channel = M.soundChannels[sound]            M<<sound        SoundCoordinate(mob/M)            var/dx = x-M.x, dy = y-M.y            sound.x = dx            sound.y = dy       //sin(60) * (dy)            sound.z = 0        //cos(60) * (dy)            var/r2 = (dx*dx+dy*dy)//+sound.z*sound.z)            var/vr = volume/d2            var/intensity = (d2-r2)*vr            sound.volume = intensity            //world<<"[intensity] - [sqrt(r2)] - [M.soundChannels[sound]]"        RemoveListener(mob/M)            listeners -= M            M<<sound(null,0,0,M.soundChannels[sound],volume)            M.soundChannels -= sound
```

Expected Results:

The same sound file is played on different channels with different parameters without problem.

Actual Results:

One of the instances of the sound file will override the other, and will cause occasional "blips" and similar audio glitches

Does the problem occur:
Every time? Or how often?
Every time
In other games?
Yes
In other user accounts?
Yes
On other computers?
Yes

When does the problem NOT occur?
The problem is not as discernible when the sound objects parameters are similar.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
Unknown.
 Apr 5 2012, 12:17 pm I tried to build a test case for this but I wasn't really able to hear it well enough to be sure what was going on. If you have a test case of your own I can try to reproduce the issue with that. Granted I'm not sure if this is fixable or not if I find it, as it might be more of a problem with FMod. But at least I can look into it further.
 Apr 9 2012, 1:00 pm Lummox JR changed status to 'Unverified'