Inheritance: IDisposable
Example #1
0
        public static _AudioConverter CreateInstance(AudioStreamBasicDescription srcFormat, AudioStreamBasicDescription destFormat)
        {
            _AudioConverter inst = new _AudioConverter();
            int             err_code;

            unsafe {
                IntPtr ptr  = inst._audioConverter;
                IntPtr pptr = (IntPtr)(&ptr);
                err_code = AudioConverterNew(ref srcFormat, ref destFormat, pptr);
            }
            if (err_code != 0)
            {
                throw new ArgumentException(String.Format("Error code:{0}", err_code));
            }
            return(inst);
        }
 public static _AudioConverter CreateInstance(AudioStreamBasicDescription srcFormat, AudioStreamBasicDescription destFormat)            
 {
     _AudioConverter inst = new _AudioConverter();
     int err_code;
     unsafe{
         IntPtr ptr = inst._audioConverter;
         IntPtr pptr =(IntPtr)(&ptr);
         err_code = AudioConverterNew(ref srcFormat, ref destFormat, pptr);
     }
     if (err_code != 0)
     {
         throw new ArgumentException(String.Format("Error code:{0}", err_code));
     }
     return inst;
 }