#region 占位符定义
public struct Byte4
{
byte b1, b2, b3, b4;
}
public struct Byte8
{
Byte4 dummy1, dummy2;
}
public struct Byte16
{
Byte8 dummy1, dummy2;
}
public struct Byte32
{
Byte16 dummy1, dummy2;
}
public struct Byte64
{
Byte32 dummy1, dummy2;
}
public struct Byte100
{
Byte64 dummy1;
Byte32 dummy2;
Byte4 dummy3;
}
public struct Byte128
{
Byte64 dummy1, dummy2;
}
public struct Byte1K
{
Byte128 b1, b2, b3, b4, b5, b6, b7, b8;
}
public struct Byte32K
{
Byte1K k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12,k13,k14,k15,k16;
Byte1K t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
}
public struct Byte1024K
{
Byte32K k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12,k13,k14,k15,k16;
Byte32K t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
}
#endregion
/*
C++结构原型:
#define COX_BUFFER 0x8000L //单位缓冲区
#define COX_BUFFERNUM 32 //单位缓冲区数量
#define COX_BUFFERDATA ((COX_BUFFER)*(COX_BUFFERNUM)) ==> 1024K
*/
[StructLayout(LayoutKind.Sequential)]
public struct COXST_DATA
{
public byte Status; //播放状态 0-空闲;1-播完;2-正在播放;3-暂停或停止;4-发生错误(如播放文件不存在等)
public byte Type; //播放方式:0-正常播放;1-循环播放(即播放到结束后再从头播放)
public byte Source; //播放数据来源:0-来源于文件;1-来源于内存
private Byte100 Name; //播放文件路径名;char Name[100]
public uint Addr; //播放内存的地址; byte * Addr, C++指针长度为4Byte
public int Length; //播放文件(内存)的长度 LONG Length;
public byte Kind; //播放文件(内存)的类别(VCD、MPG等);
public byte Priority; //播放优先级
public DWORD BufferLen; //每次提取播放内容的长度,0为正常长度;普通应用建议可不理会此变量;DWORD BufferLen
public DWORD Pos; //文件(内存)播放的位置
public Byte100 CoxErr; //播放错误信息char CoxErr[100];
public byte BufFlag1;
public byte BufFlag2; //数据缓冲区状态标志;其中含义:0--空,1--满,2--正在送byte BufFlag[2];
public byte BufSel; //数据缓冲使用区
public uint AllNum1;
public uint AllNum2; //数据总发送次数UINT AllNum[2];
public uint SendNum1;
public uint SendNum2; //数据已发送次数UINT SendNum[2]
public Byte1024K DataBuf1;
public Byte1024K DataBuf2; //数据缓冲区byte DataBuf[2][COX_BUFFERDATA];