BogheCore.Sip.MyAVSession.SendT140Buffer C# (CSharp) Метод

SendT140Buffer() защищенный Метод

protected SendT140Buffer ( doubango_rt.BackEnd.rt_tmedia_t140_data_type_t dataType, byte bufferBytes ) : bool
dataType doubango_rt.BackEnd.rt_tmedia_t140_data_type_t
bufferBytes byte
Результат bool
        protected bool SendT140Buffer(tmedia_t140_data_type_t dataType, byte[] bufferBytes)
        {
            if (bufferBytes != null && bufferBytes.Length > 0)
            {
            #if WINDOWS_PHONE
                return mSession.sendT140Data(dataType, Encoding.UTF8.GetString(bufferBytes, 0, bufferBytes.Length));
            #else
                IntPtr dataPtr = Marshal.AllocHGlobal(bufferBytes.Length);
                Marshal.Copy(bufferBytes, 0, dataPtr, bufferBytes.Length);
                bool ret = mSession.sendT140Data(dataType, dataPtr, (uint)bufferBytes.Length);
                Marshal.FreeHGlobal(dataPtr);
                return ret;
            #endif
            }
            else
            {
            #if WINDOWS_PHONE
                return mSession.sendT140Data(dataType);
            #else
                return mSession.sendT140Data(dataType, IntPtr.Zero, 0);
            #endif
            }
        }