Example #1
0
        public static PaHostErrorInfo PA_GetLastHostErrorInfo()
        {
            IntPtr          ptr  = PA_GetLastHostErrorInfoPtr();
            PaHostErrorInfo info = (PaHostErrorInfo)Marshal.PtrToStructure(ptr, typeof(PaHostErrorInfo));

            return(info);
        }
Example #2
0
        public static HostErrorInfo FromNative(IntPtr ptr)
        {
            PaHostErrorInfo native  = Marshal.PtrToStructure <PaHostErrorInfo>(ptr);
            HostErrorInfo   managed = new HostErrorInfo();

            managed.HostApiType = (HostApiTypeId)native.hostApiType;
            managed.ErrorCode   = native.errorCode;
            managed.ErrorText   = Marshal.PtrToStringAnsi(native.errorText);
            return(managed);
        }
 public PortAudioException(PaHostErrorInfo info)
     : this(info.errorText)
 {
 }