package net.mgsx.pd.patch;

import org.puredata.core.PdBase;

import com.badlogic.gdx.utils.Disposable;

/**
 * Puredata patch (file)
 * @author mgsx
 *
 */
public class PdPatch implements Disposable
{
	int pdHandle;

	/**
	 * Construct a patch with a valid pd handle.
	 * @param pdHandle
	 */
	public PdPatch(int pdHandle) {
		super();
		this.pdHandle = pdHandle;
	}

	@Override
	public void dispose() {
		PdBase.closePatch(pdHandle);
	}
	
	
}

@@ -25,42 +25,8 @@
 h;%0A%0A
-import org.puredata.core.PdBase;%0A%0A
 impo
@@ -64,16 +64,40 @@
 sable;%0A%0A
+import net.mgsx.pd.Pd;%0A%0A
 /**%0A * P
@@ -396,32 +396,25 @@
 %09%09Pd
-Base.closePatch(pdHandle
+.audio.close(this
 );%0A%09

fix direct access to PdBase