Loading core/jni/android_media_AudioRecord.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -91,12 +91,9 @@ static void recorderCallback(int event, void* user, void *info) { } callbackInfo->busy = true; } if (event == AudioRecord::EVENT_MORE_DATA) { // set size to 0 to signal we're not using the callback to read more data AudioRecord::Buffer* pBuff = (AudioRecord::Buffer*)info; pBuff->size = 0; } else if (event == AudioRecord::EVENT_MARKER) { switch (event) { case AudioRecord::EVENT_MARKER: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -108,8 +105,9 @@ static void recorderCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } else if (event == AudioRecord::EVENT_NEW_POS) { case AudioRecord::EVENT_NEW_POS: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -121,7 +119,9 @@ static void recorderCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } { Mutex::Autolock l(sLock); callbackInfo->busy = false; Loading core/jni/android_media_AudioTrack.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -131,12 +131,8 @@ static void audioCallback(int event, void* user, void *info) { callbackInfo->busy = true; } if (event == AudioTrack::EVENT_MORE_DATA) { // set size to 0 to signal we're not using the callback to write more data AudioTrack::Buffer* pBuff = (AudioTrack::Buffer*)info; pBuff->size = 0; } else if (event == AudioTrack::EVENT_MARKER) { switch (event) { case AudioTrack::EVENT_MARKER: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -148,8 +144,9 @@ static void audioCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } else if (event == AudioTrack::EVENT_NEW_POS) { case AudioTrack::EVENT_NEW_POS: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -161,7 +158,9 @@ static void audioCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } { Mutex::Autolock l(sLock); callbackInfo->busy = false; Loading Loading
core/jni/android_media_AudioRecord.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -91,12 +91,9 @@ static void recorderCallback(int event, void* user, void *info) { } callbackInfo->busy = true; } if (event == AudioRecord::EVENT_MORE_DATA) { // set size to 0 to signal we're not using the callback to read more data AudioRecord::Buffer* pBuff = (AudioRecord::Buffer*)info; pBuff->size = 0; } else if (event == AudioRecord::EVENT_MARKER) { switch (event) { case AudioRecord::EVENT_MARKER: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -108,8 +105,9 @@ static void recorderCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } else if (event == AudioRecord::EVENT_NEW_POS) { case AudioRecord::EVENT_NEW_POS: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -121,7 +119,9 @@ static void recorderCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } { Mutex::Autolock l(sLock); callbackInfo->busy = false; Loading
core/jni/android_media_AudioTrack.cpp +6 −7 Original line number Diff line number Diff line Loading @@ -131,12 +131,8 @@ static void audioCallback(int event, void* user, void *info) { callbackInfo->busy = true; } if (event == AudioTrack::EVENT_MORE_DATA) { // set size to 0 to signal we're not using the callback to write more data AudioTrack::Buffer* pBuff = (AudioTrack::Buffer*)info; pBuff->size = 0; } else if (event == AudioTrack::EVENT_MARKER) { switch (event) { case AudioTrack::EVENT_MARKER: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -148,8 +144,9 @@ static void audioCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } else if (event == AudioTrack::EVENT_NEW_POS) { case AudioTrack::EVENT_NEW_POS: { JNIEnv *env = AndroidRuntime::getJNIEnv(); if (user && env) { env->CallStaticVoidMethod( Loading @@ -161,7 +158,9 @@ static void audioCallback(int event, void* user, void *info) { env->ExceptionClear(); } } } break; } { Mutex::Autolock l(sLock); callbackInfo->busy = false; Loading