MCPcopy Create free account
hub / github.com/Recordscript/recordscript / Java_ffi_FFI_onAudioFrameUpdate

Function Java_ffi_FFI_onAudioFrameUpdate

libs/scrap/src/android/ffi.rs:115–126  ·  view source on GitHub ↗
(
    env: JNIEnv,
    _class: JClass,
    buffer: JObject,
)

Source from the content-addressed store, hash-verified

113
114#[no_mangle]
115pub extern "system" fn Java_ffi_FFI_onAudioFrameUpdate(
116 env: JNIEnv,
117 _class: JClass,
118 buffer: JObject,
119) {
120 let jb = JByteBuffer::from(buffer);
121 if let Ok(data) = env.get_direct_buffer_address(&jb) {
122 if let Ok(len) = env.get_direct_buffer_capacity(&jb) {
123 AUDIO_RAW.lock().unwrap().update(data, len);
124 }
125 }
126}
127
128#[no_mangle]
129pub extern "system" fn Java_ffi_FFI_setFrameRawEnable(

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected