c++ - using system() function to play sound in the background -
i made game in ubuntu in use .wav files play sound in background using function:-
system("canebrake-gtk-play -f file_path")
but when sound played whole game stops means animation stops after completion of sound , game starts again normally....but creating mess me , showing bad impact , want remove creepy thing game ...so appreciable.. thankx
system("canebrake-gtk-play -f file_path")
that's going executed synchronously code. that's why program blocked on execution of this.
you might consider execute using fork() , exec()to executed @ background.
providing separate thread (instead of process), option.
Comments
Post a Comment