This project has moved and is read-only. For the latest updates, please go here.

How to stop a audio file from playing in FireAndForgetAudioSample?

Aug 31, 2016 at 2:55 AM
I currently use the following to play a sound file:
This file is very long and I want to stop playing the file mid-way. How do I accomplish this?

Furthermore, Can I play other sound files after the "sound.mp3" file has been stopped?

Assistance is appreciated.
Aug 31, 2016 at 9:31 AM
Well the whole point of fire and forget is that you "forget" about the file once you've started playing it. If you want to remember it, and control it, then create your own MixingSampleProvider and add and remove inputs as needed.

And yes, you can play other files after one has stopped, so long as your mixer is set up to always produce sound (i.e. silence) even when no inputs are connected