Sign in to follow this  
orpeus

[SlimDX] How to tell if an XAudio2 voice is started?

Recommended Posts

Unfortunately I don't think that Xaudio2 allows you to poll a voice for its playing state. It is possible that you can use the GetState call on a source voice to tell if there are any queued buffers, but that is not really the same thing. If you are using it to play a large buffer and you may be able to use the StreamEnd event, but I believe that this will only fire if you have set the EndOfStream flag on the AudioBuffer (and maybe if you call Discontinuity) .

Hope this helps.

Share this post


Link to post
Share on other sites
Thanks for the confirmation. Unfortunately, I am looping everything, so the queue count is always 1. I'll try to avoid requiring the information, and if I do need it, I'll get State.SamplesPlayed, sleep for a few milliseconds, and check again to see if it increased.

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