Ejemplo n.º 1
0
        //IWMResamplerProps resamplerPropsInterface;

        /// <summary>
        /// Creates a new Resampler based on the DMO Resampler
        /// </summary>
        public WindowsMediaMp3Decoder()
        {
            mediaComObject         = new WindowsMediaMp3DecoderComObject();
            mediaObject            = new MediaObject((IMediaObject)mediaComObject);
            propertyStoreInterface = (IPropertyStore)mediaComObject;
            //resamplerPropsInterface = (IWMResamplerProps)mediaComObject;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Dispose code - experimental at the moment
        /// Was added trying to track down why Resampler crashes NUnit
        /// This code not currently being called by ResamplerDmoStream
        /// </summary>
        public void Dispose()
        {
            if (propertyStoreInterface != null)
            {
                Marshal.ReleaseComObject(propertyStoreInterface);
                propertyStoreInterface = null;
            }

            /*if(resamplerPropsInterface != null)
             * {
             * Marshal.ReleaseComObject(resamplerPropsInterface);
             * resamplerPropsInterface = null;
             * }*/
            if (mediaObject != null)
            {
                mediaObject.Dispose();
                mediaObject = null;
            }
            if (mediaComObject != null)
            {
                Marshal.ReleaseComObject(mediaComObject);
                mediaComObject = null;
            }
        }