Add simple Java test code

This commit is contained in:
Chris Cannam
2023-12-14 13:52:19 +00:00
parent adc31e77e9
commit e54fd1fd95
4 changed files with 137 additions and 2 deletions

View File

@@ -87,6 +87,22 @@ JNIEXPORT jdouble JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_
JNIEXPORT jdouble JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_getPitchScale
(JNIEnv *, jobject);
/*
* Class: com_breakfastquay_rubberband_RubberBandStretcher
* Method: getPreferredStartPad
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_getPreferredStartPad
(JNIEnv *, jobject);
/*
* Class: com_breakfastquay_rubberband_RubberBandStretcher
* Method: getStartDelay
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_getStartDelay
(JNIEnv *, jobject);
/*
* Class: com_breakfastquay_rubberband_RubberBandStretcher
* Method: getLatency
@@ -151,6 +167,14 @@ JNIEXPORT void JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_set
JNIEXPORT void JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_setMaxProcessSize
(JNIEnv *, jobject, jint);
/*
* Class: com_breakfastquay_rubberband_RubberBandStretcher
* Method: getProcessSizeLimit
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_com_breakfastquay_rubberband_RubberBandStretcher_getProcessSizeLimit
(JNIEnv *, jobject);
/*
* Class: com_breakfastquay_rubberband_RubberBandStretcher
* Method: getSamplesRequired
@@ -269,6 +293,18 @@ Java_com_breakfastquay_rubberband_RubberBandStretcher_getPitchScale(JNIEnv *env,
return getStretcher(env, obj)->getPitchScale();
}
JNIEXPORT jint JNICALL
Java_com_breakfastquay_rubberband_RubberBandStretcher_getPreferredStartPad(JNIEnv *env, jobject obj)
{
return getStretcher(env, obj)->getPreferredStartPad();
}
JNIEXPORT jint JNICALL
Java_com_breakfastquay_rubberband_RubberBandStretcher_getStartDelay(JNIEnv *env, jobject obj)
{
return getStretcher(env, obj)->getStartDelay();
}
JNIEXPORT jint JNICALL
Java_com_breakfastquay_rubberband_RubberBandStretcher_getLatency(JNIEnv *env, jobject obj)
{
@@ -317,6 +353,12 @@ Java_com_breakfastquay_rubberband_RubberBandStretcher_setMaxProcessSize(JNIEnv *
getStretcher(env, obj)->setMaxProcessSize(size);
}
JNIEXPORT jint JNICALL
Java_com_breakfastquay_rubberband_RubberBandStretcher_getProcessSizeLimit(JNIEnv *env, jobject obj)
{
return getStretcher(env, obj)->getProcessSizeLimit();
}
JNIEXPORT jint JNICALL
Java_com_breakfastquay_rubberband_RubberBandStretcher_getSamplesRequired(JNIEnv *env, jobject obj)
{