Пример #1
0
        private bool disposedValue = false; // 要检测冗余调用

        void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (_resamplerprops != null)
                {
                    _resamplerprops.Dispose();
                    _resamplerprops = null;
                }
                if (_mediaObject != null)
                {
                    _mediaObject.Dispose();
                    _mediaObject = null;
                }

                DMOWMResamlerDestroy(nativeptr);

                disposedValue = true;
            }
        }
Пример #2
0
 WMResampler()
 {
     nativeptr       = DMOWMResamplerCreate();
     _mediaObject    = new MediaObject(DMOWMResamler_mediaObject(nativeptr), true);
     _resamplerprops = new WMResamplerProps(DMOWMResamler_resamplerprops(nativeptr), true);
 }