- Joined
- Jun 14, 2021
- Messages
- 1
- Reaction score
- 0
I have a sound that I wish to play.
My code;
This code is in a subroutine that I call. What happens is that it restarts the sound each time it runs. What I want is that is the sound to continue playing until it is told not to.
My code;
Python:
[...]
if var_camera_flip == 1:
if var_camera != 4:
pygame.mixer.Channel(2).play(pygame.mixer.Sound(r'audio\camera\camera motor.mp3'), -1)
else:
pygame.mixer.Channel(2).stop()
else:
pygame.mixer.Channel(2).stop()
[...]
This code is in a subroutine that I call. What happens is that it restarts the sound each time it runs. What I want is that is the sound to continue playing until it is told not to.