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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -