示例#1
0
        // Token: 0x06000006 RID: 6 RVA: 0x00002090 File Offset: 0x00000290
        internal static MIDIEvent FromStream(Stream stream)
        {
            ABinaryReader abinaryReader = new ABinaryReader(stream, Endianness.Big);
            ulong         num           = abinaryReader.ReadUIntVar();
            byte          statusByte    = abinaryReader.Read8();

            return(MIDIEvent.FromStream(abinaryReader, num, statusByte));
        }
示例#2
0
        // Token: 0x06000007 RID: 7 RVA: 0x000020BC File Offset: 0x000002BC
        internal static MIDIEvent FromStream(Stream stream, ChannelEventType eventType, int channelNumber)
        {
            if (!eventType.IsDefined <ChannelEventType>())
            {
                throw new ArgumentOutOfRangeException("eventType", eventType, "The specified ChannelEventType was not a defined value.");
            }
            if (channelNumber < 0 || channelNumber > 15)
            {
                throw new ArgumentOutOfRangeException("channelNumber", channelNumber, "The specified channel number was negative or greater than 15.");
            }
            ABinaryReader abinaryReader = new ABinaryReader(stream, Endianness.Big);
            ulong         num           = abinaryReader.ReadUIntVar();
            byte          statusByte    = (byte)((int)eventType | channelNumber);

            return(MIDIEvent.FromStream(abinaryReader, num, statusByte));
        }