Is there a way to pause/stop a mp3 file playing with mcisendstring with the “wait” option?

我与影子孤独终老i 提交于 2019-12-13 02:40:03

问题


I am currently trying to create an mp3 player with the commands offered in this answer.

Actually it's working pretty great, but right now I am trying to implement a continuos play with

mciSendString("play mp3 wait", NULL, 0, NULL);

This command is supposed to play an mp3 file from start to finish and wait until it has actually finished playing.

This is working correctly, however, I was convinced before trying it out, that pause or stop commands which work with usual play would work here as well:

mciSendString("pause mp3", NULL, 0, NULL);

mciSendString("stop mp3", NULL, 0, NULL);

However, every command seems to be unresponsive towards the running mp3.

There are no error messages or anything, it just doesn't work the way I have it right now.

Is there any way to accomplish this? Any additional parameters I would have to send with my pause/stop commands?


回答1:


You can use the wait/stop commands if the play command will be modified to avoid waiting until the *.mp3 has finished playing.

mciSendString("play mp3", NULL, 0, NULL);


来源:https://stackoverflow.com/questions/34711181/is-there-a-way-to-pause-stop-a-mp3-file-playing-with-mcisendstring-with-the-wai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!