Exemplo n.º 1
0
JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_getDollarZero
(JNIEnv *env, jclass cls, jlong ptr) {
  pthread_mutex_lock(&mutex);
  int dz = libpd_getdollarzero((void *)ptr);
  pthread_mutex_unlock(&mutex);
  return dz;
}
Exemplo n.º 2
0
//--------------------------------------------------------------------
Patch PdBase::openPatch(const std::string& patch, const std::string& path) {
    // [; pd open file folder(
	void* handle = libpd_openfile(patch.c_str(), path.c_str());
	if(handle == NULL) {
		return Patch(); // return empty Patch
	}
	int dollarZero = libpd_getdollarzero(handle);
	return Patch(handle, dollarZero, patch, path);
}