- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good news for those who use speech synthesis to RealSense in Java.
Interface (JNI pxcmaudio.cpp) there is a bug that send a crash the JVM during the function call PXCMAudio.AquireAccess
The reason is simple.
The signatures of the two functions (C ++, Java) do not coincide, creating an offset on the object pointer java
C++ (pxcmaudio.cpp)
extern "C" JNIEXPORT jobject JNICALL Java_intel_rssdk_PXCMAudio_PXCMAudio_1AcquireAccess (JNIEnv *jni, jclass, jlong instance, jobject access, jobject accelerator, jint format, jint options, jobject data)
Java (PXCMAudio.java)
public pxcmStatus AcquireAccess(Access access, AudioFormat format, Option options, AudioData data) { return PXCMAudio_AcquireAccess(instance, access, format.value, options.value, data); }
The problem is in the parameter called "accelerator" absent in Java signature
It will be sufficient comment and regenerate the DLL
extern "C" JNIEXPORT jobject JNICALL Java_intel_rssdk_PXCMAudio_PXCMAudio_1AcquireAccess (JNIEnv *jni, jclass, jlong instance, jobject access, /* jobject accelerator,*/ jint format, jint options, jobject data)
Another problem relates to the field AudioData.DataSize
To retrieve the byte array of audio is not correct to execute the command
byte buffer[] = data.ToByteArray(data.dataSize);
Because it is not returned all the audio buffer. This is because the frame rate used is equal to 2.
So to have the entire audio buffer must execute the command:
byte buffer[] = data.ToByteArray(data.dataSize * 2);
I hope will be helpful.
Ennj
Alessio
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We will fix this bug in the future release. Thanks for supporting RealSense SDK.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page