Esempio n. 1
0
 internal AudioBuffer(Port port, uint bufferSize, StructPointer <float> pointer)
 {
     BufferSize     = (int)bufferSize;
     Port           = port;
     PointerWrapper = pointer;
     Audio          = PointerWrapper.Array;
 }
Esempio n. 2
0
 internal AudioBuffer(Port port, uint bufferSize, StructPointer<float> pointer)
 {
     BufferSize = (int)bufferSize;
     Port = port;
     PointerWrapper = pointer;
     Audio = PointerWrapper.Array;
 }
Esempio n. 3
0
        internal static unsafe void WriteToJackMidi(this MidiEventCollection <MidiOutEvent> midiEvents, uint nframes)
        {
            float *portBuf = PortApi.GetBuffer(midiEvents.Port._port, nframes);

            MidiApi.ClearBuffer(portBuf);
            foreach (MidiOutEvent midiEvent in midiEvents)
            {
                byte *buffer = MidiApi.ReserveEvent(portBuf, (uint)midiEvent.Time, (uint)midiEvent.MidiData.Length);
                StructPointer <byte> bufferPointer = new StructPointer <byte> ((IntPtr)buffer, (uint)midiEvent.MidiData.Length);
                bufferPointer.Array = midiEvent.MidiData;
                bufferPointer.CopyToPointer();
            }
        }
Esempio n. 4
0
 internal static unsafe void WriteToJackMidi(this MidiEventCollection<MidiOutEvent> midiEvents, uint nframes)
 {
     float* portBuf = PortApi.GetBuffer (midiEvents.Port._port, nframes);
     MidiApi.ClearBuffer (portBuf);
     foreach (MidiOutEvent midiEvent in midiEvents) {
         byte* buffer = MidiApi.ReserveEvent (portBuf, (uint)midiEvent.Time, (uint)midiEvent.MidiData.Length);
         StructPointer<byte> bufferPointer = new StructPointer<byte> ((IntPtr)buffer, (uint)midiEvent.MidiData.Length);
         bufferPointer.Array = midiEvent.MidiData;
         bufferPointer.CopyToPointer ();
     }
 }
Esempio n. 5
0
 internal unsafe MidiInEvent(UnsafeStructs.jack_midi_event_t inEvent)
 {
     Time         = (int)inEvent.time;
     _bytePointer = new StructPointer <byte> ((IntPtr)inEvent.buffer, inEvent.size);
 }
Esempio n. 6
0
        internal AudioBuffer GetAudioBuffer(uint nframes)
        {
            StructPointer <float> buffer = GetBuffer(nframes);

            return(new AudioBuffer(this, nframes, buffer));
        }
Esempio n. 7
0
 internal unsafe MidiInEvent(UnsafeStructs.jack_midi_event_t inEvent)
 {
     Time = (int)inEvent.time;
     _bytePointer = new StructPointer<byte> ((IntPtr)inEvent.buffer, inEvent.size);
 }