Sound Positioning and Volume

This forum is currently in read-only mode.
  • This example should give an idea of what I'm trying to achieve:

    http://www.mediafire.com/file/qamdwzzi2vm/SoundTest.rar

    Basically, I'm trying to do directional sound with multiple levels, with certain parts of the sound only becoming audible when you are close to the emitting object, and the sound fading out completely the further away you are.

    I initially tried using the positional sound built in to the XAudio2 object, but this didn't seem to work correctly. The actual volume of the sound didn't decrease over a distance, rather, the sound just seemed to 'intensify' the nearer the player object got. Also, there doesn't seem to be any function in the XAudio2 object to set the range of the sound; to set the distance limit at which a sound is audible, which would be necessary for the type of layered sound I am trying to achieve.

    I set up events to change the volume of the sound manually, based on distance from the object, but using this method the sound seems to become distorted. The channels 'pop' every time the volume is changed, which makes the sound crackle as you move nearer. Also, the sound sounds crackly and slightly distorted when played at full volume (when the player is directly on top of the emitter).

    Is there any way to achieve the effect I'm going for in Construct at the moment? Am I simply missing a trick with the XAudio2 object?

    Many thanks,

    • Tom
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)