public virtual void testSubscription() { Assert.False(LibPD.Exists("baz")); Assert.False(LibPD.Subscribe(null)); Assert.True(LibPD.Subscribe("baz")); Assert.True(LibPD.Exists("baz")); Assert.False(LibPD.Unsubscribe(null)); Assert.False(LibPD.Unsubscribe("")); Assert.True(LibPD.Unsubscribe("baz")); Assert.False(LibPD.Exists("baz")); }
public bool WriteArray(string arrayName, int offset, float[] data, int amountOfValues) { if (!LibPD.Exists(arrayName)) { return(false); } if (LibPD.ArraySize(arrayName) != amountOfValues) { ResizeArray(arrayName, amountOfValues); } int success = LibPD.WriteArray(arrayName, offset, data, amountOfValues); return(success == 0); }