So,I have this code. I want to increment count variable by not waiting this two audio files to process completely. In my code below it is very obvious that count variable will be incremented only if the two audio files done playing. Is there any idea on playing it on background or can I call a subprocess here ?
import pygame
import time
pygame.mixer.init()
count = 0
while(True):
pygame.mixer.Sound('song1.ogg').play()
time.sleep(0.54)
pygame.mixer.Sound('song2.ogg').play()
time.sleep(0.52)
count +=1
print(count)