社区
C#
帖子详情
如何利用C#和mci控件编写自制录音小程序
jungeuichul
2009-03-25 08:19:22
因为不了解如何使用mci编写录音程序,所以恳求各位帮忙
要利用C#编写的
...全文
211
5
打赏
收藏
如何利用C#和mci控件编写自制录音小程序
因为不了解如何使用mci编写录音程序,所以恳求各位帮忙 要利用C#编写的
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
jungeuichul
2009-03-26
打赏
举报
回复
请问有相关的代码示例吗
jungeuichul
2009-03-26
打赏
举报
回复
真的好用吗
jungeuichul
2009-03-26
打赏
举报
回复
十分感谢
occam
2009-03-25
打赏
举报
回复
http://dev.csdn.net/article/77/77561.shtm
haifeng39
2009-03-25
打赏
举报
回复
帮顶。
基于
MCI
编写
的音乐播放器
使用VC++0.6环境
编写
,使用了内置的
MCI
接口进行多媒体音频的处理,使用MFC
编写
界面。适合MFC的初学者学习。
用
MCI
32播放mp3的例子
用
MCI
32.ocx
控件
,简单实现播放mp3的例子
用
c#
写的
录音
程序源码
一款很不错的
录音
程序,附带源代码,自行编译: 如遇到内存不能读写错误(103行),请把编译 CPU Type 从“Any CPU”改为“x86”即可。 部分代码: public const string WaveAudio = "waveaudio"; public const uint MM_
MCI
NOTIFY = 0x3B9; public const uint
MCI
_NOTIFY_SUCCESSFUL = 0x0001; public const uint
MCI
_NOTIFY_SUPERSEDED = 0x0002; public const uint
MCI
_NOTIFY_ABORTED = 0x0004; public const uint
MCI
_NOTIFY_FAILURE = 0x0008; public const uint
MCI
_OPEN = 0x0803; public const uint
MCI
_CLOSE = 0x0804; public const uint
MCI
_PLAY = 0x0806; public const uint
MCI
_SEEK = 0x0807; public const uint
MCI
_STOP = 0x0808; public const uint
MCI
_PAUSE = 0x0809; public const uint
MCI
_RECORD = 0x080F; public const uint
MCI
_RESUME = 0x0855; public const uint
MCI
_SAVE = 0x0813; public const uint
MCI
_LOAD = 0x0850; public const uint
MCI
_STATUS = 0x0814; public const uint
MCI
_SAVE_FILE = 0x00000100; public const uint
MCI
_OPEN_ELEMENT = 0x00000200; public const uint
MCI
_OPEN_TYPE = 0x00002000; public const uint
MCI
_LOAD_FILE = 0x00000100; public const uint
MCI
_STATUS_POSITION = 0x00000002; public const uint
MCI
_STATUS_LENGTH = 0x00000001; public const uint
MCI
_STATUS_ITEM = 0x00000100; public const uint
MCI
_NOTIFY = 0x00000001; public const uint
MCI
_WAIT = 0x00000002; public const uint
MCI
_FROM = 0x00000004; public const uint
MCI
_TO = 0x00000008; // Structures [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_OPEN_PARMS { public IntPtr dwCallback; public uint wDeviceID; public IntPtr lpstrDeviceType; public IntPtr lpstrElementName; public IntPtr lpstrAlias; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_RECORD_PARMS { public IntPtr dwCallback; public uint dwFrom; public uint dwTo; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_PLAY_PARMS { public IntPtr dwCallback; public uint dwFrom; public uint dwTo; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_GENERIC_PARMS { public IntPtr dwCallback; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_SEEK_PARMS { public IntPtr dwCallback; public uint dwTo; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_SAVE_PARMS { public IntPtr dwCallback; public IntPtr lpfilename; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct
MCI
_STATUS_PARMS { public IntPtr dwCallback; public uint dwReturn; public uint dwItem; public uint dwTrack; } ; // Functions [DllImport("winmm.dll", CharSet = CharSet.Ansi, BestFitMapping = true, ThrowOnUnmappableChar = true)] [return: MarshalAs(UnmanagedType.U4)] public static extern uint
mci
SendCommand( uint
mci
Id, uint uMsg, uint dwParam1, IntPtr dwParam2); [DllImport("winmm.dll", CharSet = CharSet.Ansi, BestFitMapping = true, ThrowOnUnmappableChar = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool
mci
GetErrorString( uint
mci
err, [MarshalAs(UnmanagedType.LPStr)] System.Text.StringBuilder pszText, uint cchText); } }
MFC写的
mci
音乐播放器
一个使用MFC写的使用
mci
播放音频文件的
小程序
,可播放MP3等主流格式
FLASH.OCX 和 MIC32.OCX
FLASH.OCX 和 MIC32.OCX
C#
111,126
社区成员
642,541
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章