C#中函数库方式重复播放MP3音乐
2024-08-28 16:30:19
public void play()
{
this.TemStr = "";
this.TemStr = this.TemStr.PadLeft(0x7f, Convert.ToChar(" "));
APIClass.mciSendString(@"close temp_alias", null, , );
//int ret = APIClass.mciSendString(@"open """ + this.TemStr + @""" alias temp_alias", null, 0, 0);
int ret = APIClass.mciSendString(this.Name, null, , );
//int ret = APIClass.mciSendString("play media", this.TemStr, this.TemStr.Length, 0);
ret = APIClass.mciSendString("play temp_alias repeat", null, , );
this.mc.state = State.mPlaying;
}
这种方式很适合用于开发智能广播系统或是定时闹钟程序。
P.S: 注释掉的两行是用于非重复播放
最新文章
- 【leetcode】Subsets (Medium) ☆
- 【Python】Django 聚合 Count与Sum用法,注意点
- POJ2001-Shortest Prefixes-Trie树应用
- 全自动化的 Android 编译管线
- MongoDB中shell基本使用
- yarn状态机的可视化
- RMAN-06217: not connected to auxiliary database with a net service name
- [POJ 1410] Intersection(线段与矩形交)
- jQuery(九)、ajax对象操作
- FZU - 1901 Period II(kmp所有循环节)
- Xadmin弹出窗口
- c#构造函数对string类型赋初值
- Chrome 的 Material Design Refresh UI初探
- 在Visual Studio中使用层关系图描述系统架构、技术栈
- Java中队列
- [Exception JavaWeb 1] - Cause: com.microsoft.sqlserver.jdbc.SQLServerException: '@P2' 附近有语法错误。
- 温故而知新 forEach 无法中断(break)的问题
- 20145327实验三 敏捷开发与XP实践
- google离线小恐龙-备份
- ThoughtWorks测试
热门文章
- rpm的使用:查询、安装、卸载、升级
- centos关闭ipv6
- jquery从零起步学
- 通过设置nginx的client_max_body_size解决nginx+php上传大文件的问题
- bzoj 3100 排列
- 【BZOJ】1782: [Usaco2010 Feb]slowdown 慢慢游
- 端到端测试,protractor测试的教程
- Swift, Playgrounds, and XCPlayground
- 查找(二分、hash、桶)
- k8s资源应用的自由伸缩Scale(up/down)