private void TestWaveFormatExPCM() { int iDataSize = 5; WaveFormatEx w1 = new WaveFormatEx(); FillWave(w1, 0); w1.cbSize = (short)(iDataSize); w1.wFormatTag = 1; IntPtr ip = w1.GetPtr(); WaveFormatEx w2 = WaveFormatEx.PtrToWave(ip) as WaveFormatEx; Marshal.FreeCoTaskMem(ip); // Equals won't work cuz of the cbSize issue //Debug.Assert(w1 == w2); }
private void TestWaveFormatEx() { WaveFormatEx w1 = new WaveFormatEx(); FillWave(w1, 0); IntPtr ip = w1.GetPtr(); WaveFormatEx w2 = WaveFormatEx.PtrToWave(ip); Marshal.FreeCoTaskMem(ip); Debug.Assert(w1 == w2); }