Esempio n. 1
0
JNIEXPORT jint JNICALL Java_org_puredata_core_PdBase_sendSymbol
(JNIEnv *env, jclass cls, jstring jrecv, jstring jsym) {
  if (!jrecv) return -2;
  const char *crecv = (char *) (*env)->GetStringUTFChars(env, jrecv, NULL);
  const char *csym = (char *) (*env)->GetStringUTFChars(env, jsym, NULL);
  pthread_mutex_lock(&mutex);
  jint err = libpd_symbol(crecv, csym);
  pthread_mutex_unlock(&mutex);
  (*env)->ReleaseStringUTFChars(env, jrecv, crecv);
  (*env)->ReleaseStringUTFChars(env, jsym, csym);
  return err;
}
Esempio n. 2
0
void PdBase::sendSymbol(const std::string& dest, const std::string& symbol) {
	libpd_symbol(dest.c_str(), symbol.c_str());
}