一款很不错的录音程序,附带源代码,自行编译: 如遇到内存不能读写错误(103行),请把编译 CPU Type 从“Any CPU”改为“x86”即可。 部分代码: public const string WaveAudio = "waveaudio"; public const uint MM_MCINOTIFY = 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 mciSendCommand( uint mciId, uint uMsg, uint dwParam1, IntPtr dwParam2); [DllImport("winmm.dll", CharSet = CharSet.Ansi, BestFitMapping = true, ThrowOnUnmappableChar = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool mciGetErrorString( uint mcierr, [MarshalAs(UnmanagedType.LPStr)] System.Text.StringBuilder pszText, uint cchText); } }
2023-09-10 20:39:26 576KB c# record 录音 源码
1
此程序是在我项目中很小的一个功能。需要通过软件控制,录制话音,在存储为WAV文件。因为项目对采样率要求不高,不也需要进行变化,所以在程序里,我将采样率、位数、通道数都是设为一个固定的值。如果需要修改这几个参数,可作为参数代入
2023-04-09 12:17:19 4KB c# directx 录音
1
qt里简单的mp3录音程序,使用lame编码库. 程序执行时开始录音并编码成mp3存放在”/my.mp3”, 直到程序退出执行 说明文档: http://blog.csdn.net/jklinux/article/details/72815790
2022-10-07 15:09:27 4KB qt_mp3录音
1
使用qt模块multimedia的QAudioInput类进行录音,采集设备音频数据,以信号的形式发出。信号如下所示: signals: void inputData(const char *data, qint64 size);
2022-07-14 19:06:57 3KB qt C++ 录音
1
Android录音程序源码.zip
2022-07-11 19:09:55 59KB 安卓
Android 录音程序源码.rar
2022-07-06 14:12:08 57KB Android
新VC++ 录音程序 带播放 功能 多媒体程序源码 一个VC++新手朋友写的录音程序,带简单的播放和保存功能,界面也相当的简洁,初级用户适合参考一下。
2022-07-05 19:50:30 18KB 新VC++ 录音程序 带播放 功能
1
Android 录音程序源码.zip
2022-06-15 11:03:57 37KB 源码
Android录音程序源码.rar
2022-05-13 17:04:35 37KB android 源码软件
VB.NET录音程序源码.txt
2022-04-22 13:00:21 1KB .net 小程序