How do I make a sound stop playing when something happens?

I want to stop a sound while it’s in the middle of playing when something happens. For example if I have a specific variable set to 1 I want a sound to play and keep playing. But once it’s set to -1, the sound will stop looping and stop playing. How do I do this?

Have you tried play/stop sound on a channel?

I seen that but got sort of confused by it. What does it mean by “channel”.

Don’t forget to check the wiki. Audio [GDevelop wiki]
Thanks