private void TestStart()
        {
            IWMReader read = m_read as IWMReader;

            read.Pause();

            TimeCodeExtensionData tce1 = new TimeCodeExtensionData();
            TimeCodeExtensionData tce2 = new TimeCodeExtensionData();

            RA3Union l1 = new RA3Union(0L);
            RA3Union l2 = new RA3Union(123456789L);

            RA3Union l3 = new RA3Union(0);
            RA3Union l4 = new RA3Union(1234567);

            RA3Union l5 = new RA3Union(tce1);
            RA3Union l6 = new RA3Union(tce2);

            m_read.StartAtPosition(1, l1, l2, OffsetFormat.HundredNS, 1.0f, IntPtr.Zero);
            m_read.StartAtPosition(1, l3, l4, OffsetFormat.PlaylistOffset, 1.0f, IntPtr.Zero);

            // apparently SMPTE functionality is broken in WMF.  Apparently the indices aren't
            // created correctly.
            // m_read.StartAtPosition(1, l5, l6, OffsetFormat.Timecode, 1.0f, IntPtr.Zero);
        }
Ejemplo n.º 2
0
        public void Pause()
        {
            //
            // Sanity check
            //
            if (IsDisposed())
            {
                throw new COMException("Instance has been Disposed", E_Unexpected);
            }

            if (null != m_hWaveOut)
            {
                //
                // Pause the wave output device
                //
                int woe = waveOut.Pause(m_hWaveOut);
                waveOut.ThrowExceptionForError(woe);
            }

            m_pReader.Pause();
        }
Ejemplo n.º 3
0
        private void TestControl()
        {
            m_read.Start(0, 50000000, 1.0f, IntPtr.Zero);
            while (m_SampleCount == 0)
            {
                System.Threading.Thread.Sleep(1);
            }

            m_read.Pause();
            System.Threading.Thread.Sleep(100);
            int cur = m_SampleCount;

            System.Threading.Thread.Sleep(500);
            Debug.Assert(cur == m_SampleCount);

            m_read.Resume();
            System.Threading.Thread.Sleep(100);
            Debug.Assert(m_SampleCount != cur);

            m_read.Stop();
            WaitForStatus(Status.Stopped);
        }