Skip to content

Uninitialize device after sound is done playing #375

Answered by mackron
NashTools asked this question in Q&A
Discussion options

You must be logged in to vote

When you read from the decoder, if the number of frames you get back is less than what you requested it means you've reached the end. Use that to determine whether or not you've reached the end. Note, however, that you cannot stop or uninitialize a device from inside the data callback which means you'll need to set a variable or something and do the uninitialization on a different thread.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NashTools
Comment options

Answer selected by NashTools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants