Win32 - Midi looping with MCISendString
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm making a game, and I'm using midi files for the background music. Here's the code I'm currently using: void Game :: play_music () { // Start the music: if ( map . levelnumber % 2 == 0 ) { mciSendString ( L "open MUSIC01.MID type sequencer alias Music1" , NULL , 0 , NULL ); mciSendString ( L "play Music1" , NULL , 0 , NULL ); playing = "Music1" ; } else { mciSendString ( L "open MUSIC02.MID type sequencer alias Music2" , NULL , 0 , NULL ); mciSendString ( L "play Music2" , NULL , 0 , NULL ); playing = "Music2" ; } } This works