Exemplo n.º 1
0
		internal void InitFromData(byte[] data, int datalength)
		{
			m_cbdata = datalength;
			m_lpData = MarshalEx.AllocHGlobal(m_cbdata);
			if ( data != null )
				Marshal.Copy(data, 0, m_lpData, m_cbdata);
			m_hdr = new WaveHdr((int)m_lpData.ToInt32(), m_cbdata);
			m_cbHeader = m_hdr.ToByteArray().Length;
			m_lpHeader = MarshalEx.AllocHGlobal(m_cbHeader);
			byte[] hdrbits = m_hdr.ToByteArray();
			Marshal.Copy(hdrbits, 0, m_lpHeader, m_cbHeader);
		}
Exemplo n.º 2
0
		public void RetrieveHeader()
		{
			byte[] headerBits = new byte[m_cbHeader];
			Marshal.Copy(m_lpHeader, headerBits, 0, m_cbHeader);
			m_hdr = new WaveHdr(headerBits);
		}