summaryrefslogtreecommitdiff
path: root/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Runtime/Midi/PortMidi/MidiStream.cs
blob: e4d804478516fa532e1ba48cd52895267b1a90c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;

namespace PortMidi
{
    public abstract class MidiStream : IDisposable
    {
        internal IntPtr stream;
        internal Int32 device;

        protected MidiStream(IntPtr stream, Int32 deviceID)
        {
            this.stream = stream;
            this.device = deviceID;
        }

        public void Abort()
        {
            PortMidiMarshal.Pm_Abort(stream);
        }

        public void Close()
        {
            Dispose();
        }

        public void Dispose()
        {
            PortMidiMarshal.Pm_Close(stream);
        }

        public void SetFilter(MidiFilter filters)
        {
            PortMidiMarshal.Pm_SetFilter(stream, filters);
        }

        public void SetChannelMask(int mask)
        {
            PortMidiMarshal.Pm_SetChannelMask(stream, mask);
        }
    }
}