0

I have a sound byte i want to loop continuously as the user is presented with a set of case statements. So once the while statement which has both the case statements and play sound loop is triggered, I want the sound loop to keep playing while not blocking the users ability to interact with each of the case statements.

Basically at this point i have two things happening

1: blocking loop from playsound prevents case statements from ever appearing or being initiated

2: playsound is only triggered once the user presses a key...i don't want to wait for a user key command, i want it to play continuously

Thanks guys

Pardon_me
  • 715
  • 2
  • 8
  • 20

2 Answers2

0

You could always fork a child, playsound in the parent code and then wait() for the child (which contains case statements) to terminate.

kronion
  • 711
  • 4
  • 14
0

ok figured it out I can add SND_LOOP to the end of my playsound function thanks all!

Pardon_me
  • 715
  • 2
  • 8
  • 20