CASampledSP
Loading...
Searching...
No Matches
Functions
CACodecInputStream.cpp File Reference
#include "com_tagtraum_casampledsp_CACodecInputStream.h"
#include "CAUtils.h"

Go to the source code of this file.

Functions

JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_fillNativeBuffer (JNIEnv *env, jobject stream, jlong converterPtr)
 Fill this streams native buffer by transcoding the content of the source stream's native buffer to the desired format.
 
JNIEXPORT jlong JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_open (JNIEnv *env, jobject stream, jobject targetFormat, jobject sourceStream, jlong pointer)
 Sets up an AudioConverter to convert data to the desired format.
 
JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_close (JNIEnv *env, jobject stream, jlong converterPtr)
 Closes the AudioConverter and cleans up other resources.
 
JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_reset (JNIEnv *env, jobject stream, jlong converterPtr)
 Resets the converter - necessary after seek() to flush codec buffers.
 

Function Documentation

◆ Java_com_tagtraum_casampledsp_CACodecInputStream_close()

JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_close ( JNIEnv *  env,
jobject  stream,
jlong  converterPtr 
)

Closes the AudioConverter and cleans up other resources.

Parameters
envJNI env
streamcalling stream object
converterPtrpointer to CAAudioConverterIO struct

Definition at line 362 of file CACodecInputStream.cpp.

◆ Java_com_tagtraum_casampledsp_CACodecInputStream_fillNativeBuffer()

JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_fillNativeBuffer ( JNIEnv *  env,
jobject  stream,
jlong  converterPtr 
)

Fill this streams native buffer by transcoding the content of the source stream's native buffer to the desired format.

Parameters
envJNI env
streamcalling stream object
converterPtrpointer to the used CAAudioConverterIO struct

Definition at line 97 of file CACodecInputStream.cpp.

◆ Java_com_tagtraum_casampledsp_CACodecInputStream_open()

JNIEXPORT jlong JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_open ( JNIEnv *  env,
jobject  stream,
jobject  targetFormat,
jobject  sourceStream,
jlong  pointer 
)

Sets up an AudioConverter to convert data to the desired format.

Parameters
envJNI env
streamcalling stream object
targetFormattarget format
sourceStreamsource data stream
pointerpointer to the source data stream's CAAudioIO struct
Returns
new CAAudioConverterIO pointer

Definition at line 182 of file CACodecInputStream.cpp.

◆ Java_com_tagtraum_casampledsp_CACodecInputStream_reset()

JNIEXPORT void JNICALL Java_com_tagtraum_casampledsp_CACodecInputStream_reset ( JNIEnv *  env,
jobject  stream,
jlong  converterPtr 
)

Resets the converter - necessary after seek() to flush codec buffers.

Parameters
envJNI env
streamcalling stream object
converterPtrpointer to CAAudioConverterIO struct

Definition at line 389 of file CACodecInputStream.cpp.