资源简介
新人写的代码。希望各位指教,不敢赚积分啦。没有找到免费下载,搞了个最低分,分享出来。

代码片段和文件信息
/* This class has been written by
* Corinna John (Hannover Germany)
* cj@binary-universe.net
*
* You may do with this code whatever you like
* except selling it or claiming any rights/ownership.
*
* Please send me a little feedback about what you‘re
* using this code for and what changes you‘d like to
* see in later versions. (And please excuse my bad english.)
*
* WARNING: This is experimental code.
* Please do not expect “Release Quality“.
* */
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace AviFile
{
public class AudioStream : AviStream{
public int CountBitsPerSample{
get{ return waveFormat.wBitsPerSample; }
}
public int CountSamplesPerSecond{
get{ return waveFormat.nSamplesPerSec; }
}
public int CountChannels{
get{ return waveFormat.nChannels; }
}
/// the stream‘s format
private Avi.PCMWAVEFORMAT waveFormat = new Avi.PCMWAVEFORMAT();
/// Initialize an AudioStream for an existing stream
/// The file that contains the stream
/// An IAVISTREAM from [aviFile]
public AudioStream(int aviFile IntPtr aviStream){
this.aviFile = aviFile;
this.aviStream = aviStream;
int size = Marshal.SizeOf(waveFormat);
Avi.AVIStreamReadFormat(aviStream 0 ref waveFormat ref size);
Avi.AVISTREAMINFO streamInfo = GetStreamInfo(aviStream);
}
/// Read the stream‘s header information
/// The IAVISTREAM to read from
/// AVISTREAMINFO
private Avi.AVISTREAMINFO GetStreamInfo(IntPtr aviStream){
Avi.AVISTREAMINFO streamInfo = new Avi.AVISTREAMINFO();
int result = Avi.AVIStreamInfo(aviStream ref streamInfo Marshal.SizeOf(streamInfo));
if(result != 0) {
throw new Exception(“Exception in AVIStreamInfo: “+result.ToString());
}
return streamInfo;
}
/// Read the stream‘s header information
/// AVISTREAMINFO
public Avi.AVISTREAMINFO GetStreamInfo(){
if(writeCompressed){
return GetStreamInfo(compressedStream);
}else{
return GetStreamInfo(aviStream);
}
}
/// Read the stream‘s format information
/// PCMWAVEFORMAT
public Avi.PCMWAVEFORMAT GetFormat(){
Avi.PCMWAVEFORMAT format = new Avi.PCMWAVEFORMAT();
int size = Marshal.SizeOf(format);
int result = Avi.AVIStreamReadFormat(aviStream 0 ref format ref size);
return format;
}
/// Returns all data needed to copy the stream
/// Do not forget to call Marshal.FreeHGlobal and release the raw data pointer
/// Receives the header information
/// Receives the format
/// Receives the length o
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-21 15:53 SyncChatClient\
目录 0 2017-11-21 15:53 SyncChatClient\.vs\
目录 0 2017-11-21 15:53 SyncChatClient\.vs\SyncChatClient\
目录 0 2017-11-21 15:53 SyncChatClient\.vs\SyncChatClient\v14\
文件 71680 2017-11-23 21:21 SyncChatClient\.vs\SyncChatClient\v14\.suo
目录 0 2017-11-23 21:21 SyncChatClient\SyncChatClient\
文件 189 2017-09-19 21:14 SyncChatClient\SyncChatClient\App.config
文件 4464 2017-11-02 20:14 SyncChatClient\SyncChatClient\AudioStream.cs
文件 12672 2017-11-13 14:45 SyncChatClient\SyncChatClient\Avi.cs
文件 14643 2017-11-02 20:14 SyncChatClient\SyncChatClient\AviManager.cs
文件 3626 2017-11-02 20:14 SyncChatClient\SyncChatClient\AviPla
文件 1093 2017-11-02 20:14 SyncChatClient\SyncChatClient\AviStream.cs
文件 5139 2017-11-02 20:14 SyncChatClient\SyncChatClient\EditableVideoStream.cs
文件 4799 2017-11-20 23:07 SyncChatClient\SyncChatClient\Form1.Designer.cs
文件 8868 2017-11-23 21:21 SyncChatClient\SyncChatClient\Form1.cs
文件 5817 2017-11-20 23:07 SyncChatClient\SyncChatClient\Form1.resx
文件 529 2017-09-19 21:29 SyncChatClient\SyncChatClient\Program.cs
目录 0 2017-11-21 15:53 SyncChatClient\SyncChatClient\Properties\
文件 2520 2004-06-13 18:26 SyncChatClient\SyncChatClient\Properties\AssemblyInfo.cs
文件 4464 2005-08-04 04:32 SyncChatClient\SyncChatClient\Properties\AudioStream.cs
文件 12672 2012-11-11 18:23 SyncChatClient\SyncChatClient\Properties\Avi.cs
文件 14643 2012-11-11 02:56 SyncChatClient\SyncChatClient\Properties\AviManager.cs
文件 3626 2004-12-18 05:59 SyncChatClient\SyncChatClient\Properties\AviPla
文件 1093 2004-12-18 06:01 SyncChatClient\SyncChatClient\Properties\AviStream.cs
文件 5139 2004-12-18 08:30 SyncChatClient\SyncChatClient\Properties\EditableVideoStream.cs
文件 2841 2017-09-19 21:14 SyncChatClient\SyncChatClient\Properties\Resources.Designer.cs
文件 5612 2017-09-19 21:14 SyncChatClient\SyncChatClient\Properties\Resources.resx
文件 1101 2017-09-19 21:14 SyncChatClient\SyncChatClient\Properties\Settings.Designer.cs
文件 249 2017-09-19 21:14 SyncChatClient\SyncChatClient\Properties\Settings.settings
文件 25282 2012-11-13 03:35 SyncChatClient\SyncChatClient\Properties\VideoStream.cs
文件 6056 2017-11-02 20:18 SyncChatClient\SyncChatClient\SyncChatClient.csproj
............此处省略32个文件信息
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论