CSharpSynth.Wave.WaveHelper.ToInt24 C# (CSharp) Метод

ToInt24() публичный статический Метод

public static ToInt24 ( byte buffer, int index ) : Int32
buffer byte
index int
Результат System.Int32
        public static Int32 ToInt24(byte[] buffer, int index)
        {
            if (buffer[index+2] > 127)
              return BitConverter.ToInt32(new byte[] { buffer[index], buffer[index+1], buffer[index+2], 255 }, 0);
            else
              return BitConverter.ToInt32(new byte[] { buffer[index], buffer[index+1], buffer[index+2], 0 }, 0);
        }