Member Avatar for safaklx

I have a question about game programming with c. I should add a background music on my game, and the same time i want to move my character on it. i used that way for solution

PlaySound("sample.wav",NULL,SDN_SYNC);

playing music ok but i cant move my character...

This is a case where you need to incorporate multiple threads - one to handle the character, and another to play the music. In a single thread, only one activity can go on at a time.

Member Avatar for safaklx

That time will it play during playing game?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.