How to cancel an AudioSource.PlayScheduled() call

Title is pretty self explanatory. But here’s a brief description of my problem:

I’m using playscheduled to switch tracks on beat/bar. The issue is that sometimes, some event happens and I would like to cancel a specific queued track from being played.

Using AudioSource.Stop() will only stop the currently played track, the scheduled tracked will still play afterwards.

Any ideas? Is there a method to call that I am missing?

After much trial and error, I after creating a whole new scene to test the various options I have realized that AudioSource.Stop() WILL stop a scheduled track from playing. It was my error that was causing my queueing system to schedule a new track after I have sent a cancel call.

To see this working just schedule a track and print AudioSource.isPlaying. You will notice that even thou the source is not currently playing, scheduling it will set this variable to “true”. Once you call AudioSource.Stop(), the variable will be set back to false and the scheduled track will never play.