musikr: fix broken iostream jni integration

This commit is contained in:
Alexander Capehart
2024-12-23 09:59:23 -05:00
parent 6f8a960ee1
commit 6fd0bd411b
9 changed files with 40 additions and 87 deletions
+1 -2
View File
@@ -40,7 +40,6 @@ JVMInputStream::JVMInputStream(JNIEnv *env, jobject inputStream) : env(env), inp
"seekFromCurrent", "(J)V");
inputStreamSeekFromEndMethod = env->GetMethodID(inputStreamClass,
"seekFromEnd", "(J)V");
inputStreamClearMethod = env->GetMethodID(inputStreamClass, "clear", "()V");
inputStreamTellMethod = env->GetMethodID(inputStreamClass, "tell", "()J");
inputStreamLengthMethod = env->GetMethodID(inputStreamClass, "length",
"()J");
@@ -107,7 +106,7 @@ void JVMInputStream::seek(TagLib::offset_t offset, Position p) {
}
void JVMInputStream::clear() {
env->CallVoidMethod(inputStream, inputStreamClearMethod);
// Nothing to do
}
TagLib::offset_t JVMInputStream::tell() const {
-2
View File
@@ -100,13 +100,11 @@ public:
private:
JNIEnv *env;
jobject inputStream;
jmethodID inputStreamNameMethod;
jmethodID inputStreamReadBlockMethod;
jmethodID inputStreamIsOpenMethod;
jmethodID inputStreamSeekFromBeginningMethod;
jmethodID inputStreamSeekFromCurrentMethod;
jmethodID inputStreamSeekFromEndMethod;
jmethodID inputStreamClearMethod;
jmethodID inputStreamTellMethod;
jmethodID inputStreamLengthMethod;