Sign in to follow this  
orpeus

[SlimDX] AudioBuffer garbage collection

Recommended Posts

Just in case anyone else runs into this issue, I wanted to describe a problem that I ran into with XAudio2 in SlimDX. I am using looped AudioBuffers in a WPF app. When I started the audio, the tones would initially sound normal, but if I either started interacting with the app or waited for 15-30 seconds, they would start buzzing. On a hunch, I added a reference to the AudioBuffer that I was passing to my SourceVoices in a related object that I am keeping around. After doing so, the problem went away. I am assuming that the AudioBuffer was getting garbage collected in spite of the fact that the SourceVoice still needed it. I hope that this helps someone.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this