标题:求助:使用mciSendStringA无法进行循环播放MID文件
取消只看楼主
xxkj2010
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2021-11-23
结帖率:0
已结贴  问题点数:20 回复次数:0 
求助:使用mciSendStringA无法进行循环播放MID文件
源码如下:Private Declare Function mciSendStringA Lib "winmm.dll" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim yn_play As Boolean

Private Sub Command1_Click() '音乐测试
Dim k As String
k = "D:\music.mid"
  k = "OPEN " + k + " TYPE SEQUENCER ALIAS mid1" '
mciSendString k, 0&, 0, 0
If yn_play = False Then
    mciSendString "PLAY mid1 FROM 0", 0&, 0, 0 '开始播放
    mciSendString "play mid1 repeat", 0&, 0, 0'按有关说明,此语句控制循环播放,经实测却无效
    'mciSendString "CLOSE ANIMATION", 0&, 0, 0
    yn_play = True
    Command1.Caption = "停止播放"
Else
    mciSendString "STOP mid1", 0&, 0, 0 '停止播放
    mciSendString "CLOSE ANIMATION", 0&, 0, 0
    yn_play = False
    Command1.Caption = "音乐测试"
End If
   
End Sub
搜索更多相关主题的帖子: 播放 MID ByVal Long 循环 
2021-11-23 20:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-507621-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.426286 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved