Esempio n. 1
0
        private void TestCreate()
        {
#if ALLOW_UNTESTED_INTERFACES
            int hr;

            IAudioStreamSample pSample = null;
            IAudioData         pData   = new foo() as IAudioData;

            hr = m_ams.CreateSample(pData, 0, out pSample);
            MsError.ThrowExceptionForHR(hr);
#endif
        }
Esempio n. 2
0
 public int ReleaseMediaStream()
 {
     int hr = MSStatus.MS_S_FALSE;
     if (IsValid)
     {
         hr = CompletionStatus((int)COMPLETION_STATUS_FLAGS.COMPSTAT_ABORT, System.Threading.Timeout.Infinite);
         if ( MSStatus.Succeed(hr) )
         {
             _pAudioSample = null;
             Marshal.ReleaseComObject(_pAudioStream);
             _pAudioStream = null;
             Marshal.FinalReleaseComObject(_pAudioData);
             _pAudioData = null;
         }
     }
     return hr;
 }