FFSampledSP
Loading...
Searching...
No Matches
FFStreamInputStream.c File Reference

Go to the source code of this file.

Functions

JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_initIDs (JNIEnv *env, jclass streamClass)
 Init static method and field ids for Java methods/fields.
JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_fillNativeBuffer (JNIEnv *env, jobject stream, jlong aio_pointer)
 Fills the java-side buffer (allocated via Java code) with fresh audio data.
JNIEXPORT jlong JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_open (JNIEnv *env, jobject stream, jint streamIndex)
 Creates the FFAudioIO, custom AVIOContext etc for reading data from the stream.
JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_close (JNIEnv *env, jobject stream, jlong aio_pointer)
 Frees all resources associated with the given FFAudioIO.

Function Documentation

◆ Java_com_tagtraum_ffsampledsp_FFStreamInputStream_close()

JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_close ( JNIEnv * env,
jobject stream,
jlong aio_pointer )

Frees all resources associated with the given FFAudioIO.

Parameters
envJNIEnv
streamFFStreamInputStream instance
aio_pointerpointer to FFAudioIO

Definition at line 259 of file FFStreamInputStream.c.

◆ Java_com_tagtraum_ffsampledsp_FFStreamInputStream_fillNativeBuffer()

JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_fillNativeBuffer ( JNIEnv * env,
jobject stream,
jlong aio_pointer )

Fills the java-side buffer (allocated via Java code) with fresh audio data.

Parameters
envJNIEnv
streamFFStreamInputStream instance
aio_pointerpointer to the FFAudioIO created when opening the file

Definition at line 132 of file FFStreamInputStream.c.

◆ Java_com_tagtraum_ffsampledsp_FFStreamInputStream_initIDs()

JNIEXPORT void JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_initIDs ( JNIEnv * env,
jclass streamClass )

Init static method and field ids for Java methods/fields.

Called exactly once from the static initializer of FFStreamInputStream. Because the JVM serializes class initialization, the ids are guaranteed to be set before any thread can call into native code with a stream instance.

Parameters
envJNIEnv
streamClassFFStreamInputStream class

Definition at line 43 of file FFStreamInputStream.c.

◆ Java_com_tagtraum_ffsampledsp_FFStreamInputStream_open()

JNIEXPORT jlong JNICALL Java_com_tagtraum_ffsampledsp_FFStreamInputStream_open ( JNIEnv * env,
jobject stream,
jint streamIndex )

Creates the FFAudioIO, custom AVIOContext etc for reading data from the stream.

Parameters
envJNIEnv
streamcalling FFStreamInputStream instance
Returns
pointer to the created FFAudioIO

Definition at line 153 of file FFStreamInputStream.c.