登录
首页 » C# » C#录音并播放示例源码(wav/mp3格式)

C#录音并播放示例源码(wav/mp3格式)

于 2019-04-08 发布
0 244
下载积分: 1 下载次数: 0

代码说明:

C#录音并播放示例源码(wav/mp3格式)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C# 实现 MD5加密解密算法
    using System.Security.Cryptography;using    System.IO;  using    System.Text; ///MD5加密  public string MD5Encrypt(string    pToEncrypt,  string    sKey)    {       DESCryptoServiceProvider    des  =  new    DESCryptoServiceProvider();     byte[]    inputByteArray  =    Encoding.Default.GetBytes(pToEncrypt);       des.Key  =    ASCIIEncoding.ASCII.GetBytes(sKey);       des.IV  =    ASCIIEncoding.ASCII.GetBytes(sKey);       MemoryStream    ms  =  new    MemoryStream();       CryptoStream    cs  =  new    CryptoStream(ms,    des.CreateEncryptor(),CryptoStreamMode.Write);       cs.Write(inputByteArray,  0,    inputByteArray.Length);       cs.FlushFinalBlock();       StringBuilder    ret  =  new    StringBuilder();     foreach(byte    b  in    ms.ToArray())       {        ret.AppendFormat("{0:X2}",    b);       }       ret.ToString();     return    ret.ToString();      }  ///MD5解密  public string MD5Decrypt(string    pToDecrypt,  string    sKey)    {      DESCryptoServiceProvider    des  =  new    DESCryptoServiceProvider();     byte[]    inputByteArray  =  new  byte[pToDecrypt.Length  /  2];     for(int    x  =  0;    x  <    pToDecrypt.Length  /  2;    x )       {      int    i  =    (Convert.ToInt32(pToDecrypt.Substring(x  *  2,  2),  16));        inputByteArray[x]  =    (byte)i;       }       des.Key  =    ASCIIEncoding.ASCII.GetBytes(sKey);       des.IV  =    ASCIIEncoding.ASCII.GetBytes(sKey);       MemoryStream    ms  =  new    MemoryStream();       CryptoStream    cs  =  new    CryptoStream(ms,    des.CreateDecryptor(),CryptoStreamMode.Write);       cs.Write(inputByteArray,  0,    inputByteArray.Length);       cs.FlushFinalBlock();       StringBuilder    ret  =  new    StringBuilder();                  return    System.Text.Encoding.Default.GetString(ms.ToArray());      }
    2013-11-13下载
    积分:1
  • modbus tcp 服务器接口(支持多个客户端进行连接)
    基于modbus tcp协议下的tcp接口,可以使用多个客户端进行连接
    2020-12-10下载
    积分:1
  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • C# 自定义OpenFileDialog 实例源码下载
    自定义OpenFileDialog
    2013-10-03下载
    积分:1
  • IconPanel ToolTip示例源码
    IconPanel ToolTip示例源码
    2013-10-02下载
    积分:1
  • C# 仿win8进度条 例子源码下载
    C# 仿win8进度条 例子源码下载
    2015-04-17下载
    积分:1
  • DevExpress datagridview多选实现
    DevExpress datagridview多选实现
    2013-09-04下载
    积分:1
  • c# 调用大漠源码
    xDM c# 使用大漠插件. 完成 类似 按键精灵的 功能. 方法 注释 正在慢慢的 完善中 仓库githubhttps://github.com/xxxxue/xDM码云https://gitee.com/xxxxue/xDM/tree/dev准备 运行需要 .NET Framework 4.7.2 或者 手动把 类库框架版本改为 自己有的版本 效果图如何运行1. 注册 大漠dll 到com (资源在 源码的 DLL 文件夹中)2. 成功 提示3. 验证是否注册成功 (列表中存在即可,不需要引用到项目中)4.在 Visual Studio 中运行项目 查看结果 使用免费版 或者 填写 注册码 后 再运行
    2020-03-02下载
    积分:1
  • stm32教程(嵌入式开发入门教程)
    stm32基础教程(嵌入式开发入门教程)
    2019-11-20下载
    积分:1
  • 操作系统行为模拟[内存分配算法&银行家算法&进程管理]
    模拟内存分配算法模拟银行家算法模拟进程管理讲解操作系统基本算法的小例子~给朋友做示例时写的,时间有限,功能有限,不可用于生产环境
    2015-04-18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载