Vector,

It should be possible, but the answer is going to depend on your implementation, what libraries you are using, and so on.

For example, if the play sound action is synchronous, then maybe you could start it up in another thread, and interrupt that thread if you want to cancel the sound.

If it’s asynchronous, maybe you need to retain a reference to the sound object and then invoke a stop() call when the other button is pressed.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python@programming.dev
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • ethstaker
  • megavids
  • osvaldo12
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • tacticalgear
  • cisconetworking
  • normalnudes
  • anitta
  • provamag3
  • Leos
  • JUstTest
  • lostlight
  • All magazines