internal AudioBuffer(Port port, uint bufferSize, StructPointer <float> pointer) { BufferSize = (int)bufferSize; Port = port; PointerWrapper = pointer; Audio = PointerWrapper.Array; }
internal AudioBuffer(Port port, uint bufferSize, StructPointer<float> pointer) { BufferSize = (int)bufferSize; Port = port; PointerWrapper = pointer; Audio = PointerWrapper.Array; }
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(); } }
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 (); } }
internal unsafe MidiInEvent(UnsafeStructs.jack_midi_event_t inEvent) { Time = (int)inEvent.time; _bytePointer = new StructPointer <byte> ((IntPtr)inEvent.buffer, inEvent.size); }
internal AudioBuffer GetAudioBuffer(uint nframes) { StructPointer <float> buffer = GetBuffer(nframes); return(new AudioBuffer(this, nframes, buffer)); }
internal unsafe MidiInEvent(UnsafeStructs.jack_midi_event_t inEvent) { Time = (int)inEvent.time; _bytePointer = new StructPointer<byte> ((IntPtr)inEvent.buffer, inEvent.size); }