Archived

This topic is now archived and is closed to further replies.

Looping Music

This topic is 6358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anybody know how to loop music using mciSendString? For instance, I would play a song using mciSendString("play song_name", 0, 0, 0); I was wondering what the command is for looping songs. Right now I am just timing how long the song has been playing and when the time is longer than the length of the song I use mciSendString("play song_name from 0", 0, 0, 0); However, I want to add a lot more songs and this way seems inefficient. Thanks in advance.

Share this post


Link to post
Share on other sites
I''m a novice C++ programmer, so I might be wrong, but I think looping music would be like an ordinary loop.(I''ve never tried because I don''t know the command to insert music.) I''d say to do
this:

while(1)
{
//music commands here
}
That''s the best I can come up with. It''s a loop that keeps on going, no matter what.

Hope I helped,
Supersaiyan

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SOrry, I read it wrong, I thought you said C++

sorry

Share this post


Link to post
Share on other sites
Well, actually I am using C++ but with Windows. Now, if I were to do what you were saying all it would do it keep starting the song over. Also, it would never pass this point in Game_Main(), because it is a never-ending loop. But I appreciate the try.



Masters Software

Share this post


Link to post
Share on other sites