INNER CODE UNIT · C++
jposition
OxygenCobalt/Auxio · musikr/src/main/cpp/JInputStream.cpp:136
jlong jposition = env->CallLongMethod(jInputStream, jInputStreamTellMethod);
if (jposition == INT64_MIN) {
throw std::runtime_error("Failed to get position, see logs");
}
return static_cast<TagLib::offset_t>(jposition);
}
TagLib::offset_t JInputStream::length() {
jlong jlength = env->CallLongMethod(jInputStream, jInputStreamLengthMethod);
if (jlength == INT64_MIN) {
throw std::runtime_error("Failed to get length, see logs");
}
return static_cast<TagLib::offset_t>(jlength);
}
void JInputStream::truncate(TagLib::offset_t length) {
throw std::runtime_error("Not implemented");
}