0

how can i stop looping sound in c# (visual studio)

if (ConditionTrue)
            {
                SoundPlayer simpleSound = new SoundPlayer(@"C:\Users\BIB HUTI\Desktop\beep.wav");
                simpleSound.Play();
            }



       // it keeps playing and never stops.
3
Contributors
5
Replies
16
Views
2 Years
Discussion Span
Last Post by BibhutiAlmighty
0

sorry but i need to play a sound at a specific time ( 12:00 AM). It played but didn't stop playing. Moreover, it's like an alarm and i dont want to use a button for that.

0

Ok since you are using time to start your sound, add the stop code and initiate it at let's say 12:01AM fair enough?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.