【VFB】播放MID、WAV文件
MIDI初始化
Function winmmInitMidi As Integer
Function = mciSendString( "open sequencer", Null, 0, 0 ) = 0
End Function
播放文件
Function winmmPlayMidi( ByVal filename As String ) As Integer
If( mciSendString( "open " + filename + " alias mymidifile", Null, 0, 0 ) <> 0 ) Then
Return 0
End If
Function = mciSendString( "play mymidifile", Null, 0, 0 ) = 0
End Function
停止播放
Function winmmStopMidi( ) As Integer
mciSendString( "stop mymidifile", Null, 0, 0 )
Function = mciSendString( "close mymidifile", Null, 0, 0 ) = 0
End Function
释放
Function winmmEndMidi As Integer
Function = mciSendString( "close sequencer", Null, 0, 0 ) = 0
End Function
WAV
Function winmmPlayWave( ByVal filename As String ) As Integer
Function = sndPlaySound( filename, SND_ASYNC )
End Function
然而还是mci那套,论播放MIDI时你能指定合成器么? 0xAA55 发表于 2018-3-8 17:52
然而还是mci那套,论播放MIDI时你能指定合成器么?
用 MCI 命令
楼主大能,感谢感谢
页:
[1]