Coder Social home page Coder Social logo

webrtc-android-jni's Introduction

webrtc-android-jni

webrtc AEC module and its required dependencies module for android.

##How to build WebRTC

  • Go to jni folder and run ndk-build
  • Copy the resulting .so files from ../libs/[target_architecture] into your Android application project directory

##AEC

AudioProcessing* apm = AudioProcessing::Create(0);
apm->set_sample_rate_hz(32000);
Super-wideband processing.

// Mono capture and stereo render.
apm->set_num_channels(1, 1);
apm->set_num_reverse_channels(2);
apm->high_pass_filter()->Enable(true);
apm->echo_cancellation()->enable_drift_compensation(false);
apm->echo_cancellation()->Enable(true);
apm->noise_reduction()->set_level(kHighSuppression);
apm->noise_reduction()->Enable(true);
apm->gain_control()->set_analog_level_limits(0, 255);
apm->gain_control()->set_mode(kAdaptiveAnalog);
apm->gain_control()->Enable(true);
apm->voice_detection()->Enable(true);

// Start a voice call...
// ... Render frame arrives bound for the audio HAL ...
apm->AnalyzeReverseStream(render_frame);

// ... Capture frame arrives from the audio HAL ...
// Call required set_stream_ functions.
apm->set_stream_delay_ms(delay_ms);
apm->gain_control()->set_stream_analog_level(analog_level);
apm->ProcessStream(capture_frame);
// Call required stream_ functions.
analog_level = apm->gain_control()->stream_analog_level();
has_voice = apm->stream_has_voice();

// Repeate render and capture processing for the duration of the call...
// Start a new call...
apm->Initialize();

// Close the application...
AudioProcessing::Destroy(apm);
apm = NULL;

Link !

webrtc-android-jni's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

webrtc-android-jni's Issues

mips build fail

My device is Mac pro.


/Users/ymr/github/webrtc-android-jni/webrtc-android-jni/jni/src/webrtc/modules/audio_processing/aec/aec_core_mips.c:126:67: error: too few operands for instruction
      "mul.s    %[tmp7f],       %[tmp7f],         %[noise4]     \n\t"
                                                                  ^
<inline asm>:30:2: note: instantiated into assembly here
        neg.s    $f10
        ^
/Users/ymr/github/webrtc-android-jni/webrtc-android-jni/jni/src/webrtc/modules/audio_processing/aec/aec_core_mips.c:127:67: error: too few operands for instruction
      "neg.s    %[tmp2f]                                        \n\t"
                                                                  ^
<inline asm>:31:2: note: instantiated into assembly here
        neg.s    $f14
        ^
/Users/ymr/github/webrtc-android-jni/webrtc-android-jni/jni/src/webrtc/modules/audio_processing/aec/aec_core_mips.c:128:67: error: too few operands for instruction
      "neg.s    %[tmp4f]                                        \n\t"
                                                                  ^
<inline asm>:32:2: note: instantiated into assembly here
        neg.s    $f18
        ^
/Users/ymr/github/webrtc-android-jni/webrtc-android-jni/jni/src/webrtc/modules/audio_processing/aec/aec_core_mips.c:129:67: error: too few operands for instruction
      "neg.s    %[tmp6f]                                        \n\t"

This error at build the "aec_core_mips.c".
Thanks for your replay!

How to wrap this module in jni?

Hi there! Found your repo and thats what i exactly needed. Please help me a bit, how can i use this in jni? Your sources doesnt provide any AudioProcessing class (which webrtc does). Can u explain how to use this in my android voip application? Thanks

any plans to upgrade to latest webrtc source?

I have been using webrtc-android-jni in my baresip Android app. There has been quite a lot of changes in webrtc source recently. For example, aec has been replaced by aec3. Any plans to upgrade this project to latest webrtc source?

Android.mk

Should be

common_C_INCLUDES = $(LOCAL_PATH)/src

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.