Example #1
0
        public WMResampler()
        {
            //create a resampler instance
            var obj = new WMResamplerObject();

            _mediaObject    = new MediaObject(Marshal.GetComInterfaceForObject((IMediaObject)obj, typeof(IMediaObject)));
            _resamplerprops =
                new WMResamplerProps(Marshal.GetComInterfaceForObject(obj as IWMResamplerProps,
                                                                      typeof(IWMResamplerProps)));

            _obj = obj;
        }
Example #2
0
 private void Dispose(bool disposing)
 {
     if (_resamplerprops != null)
     {
         _resamplerprops.Dispose();
         _resamplerprops = null;
     }
     if (_mediaObject != null)
     {
         _mediaObject.Dispose();
         _mediaObject = null;
     }
     if (_obj != null)
     {
         Marshal.ReleaseComObject(_obj);
         _obj = null;
     }
 }