I have a very basic understanding of audio and was hoping I could get some help to resolve a problem with the audio design in my engine. Let me give you a run-down of how I've currently got it fitting together.
I have an AudioManager that handles setting up and tear down of the XAudio2 interface as well as the master voice, and various submix voices that I can use to group sounds. I have a ResourceManager that can be used to load audio files into the required buffers ready for XAudio2 consumption. During my game, I call a method on my AudioManager to play a sound - this obtains the necessary Audio Voice and links it to the right buffer and begins playback.
The first problem I am having is that when there is a lot going on, and a lot of sounds are played at once, I get performance issues - framerates drop, and there is audio stuttering. I currently don't limit the number of concurrent sounds that can be played - can you give me any other advice on a better design, or solutions to limit impact on performance?
The second problem I am having is that if multiples of the same sound are played at the same time, it sounds like the volume has been turned up on that particular sound. I assumed this is to do with wave amplification and tried implementing a Volume Limiter effect on my submix voices. This works to a degree, and I can eliminate any distortion, but the increased volume effect is still noticeable. Can anyone suggest decent values to use for the volume limiter effects, or any other solutions to the problem?