/** call-seq: midi_voices() -> int Returns: the number of voices present on the port. But many ports return 0 here, which does not mean they have no voices. */ static VALUE wrap_snd_seq_port_info_get_midi_voices(VALUE v_port_info) { snd_seq_port_info_t *port_info; Data_Get_Struct(v_port_info, snd_seq_port_info_t, port_info); return INT2NUM(snd_seq_port_info_get_midi_voices(port_info)); }
/* * Class: org_tritonus_lowlevel_alsa_AlsaSeqPortInfo * Method: getMidiVoices * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_tritonus_lowlevel_alsa_AlsaSeqPortInfo_getMidiVoices (JNIEnv* env, jobject obj) { snd_seq_port_info_t* handle; int nReturn; if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaSeqPortInfo_getMidiVoices(): begin\n"); } handle = getHandle(env, obj); nReturn = snd_seq_port_info_get_midi_voices(handle); if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaSeqPortInfo_getMidiVoices(): end\n"); } return nReturn; }