Skip to content

Commit ad5a075

Browse files
committed
fix typo.
1 parent 9a93dec commit ad5a075

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

sdk/android/api/org/webrtc/ExternalAudioProcessingFactory.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ public class ExternalAudioProcessingFactory implements AudioProcessingFactory {
2626

2727
public static interface AudioProcessing {
2828
@CalledByNative("AudioProcessing")
29-
void Initialize(int sampleRateHz, int numChannels);
29+
void initialize(int sampleRateHz, int numChannels);
30+
/** Called when the processor should be reset with a new sample rate. */
3031
@CalledByNative("AudioProcessing")
3132
void Reset(int newRate);
33+
/**
34+
* Processes the given capture or render signal. NOTE: `buffer.data` will be
35+
* freed once this function returns so callers who want to use the data
36+
* asynchronously must make sure to copy it first.
37+
*/
3238
@CalledByNative("AudioProcessing")
33-
void Process(int numBans, int numFrames, ByteBuffer buffer);
39+
void process(int numBans, int numFrames, ByteBuffer buffer);
3440
}
3541

3642
private long apmPtr;
@@ -51,7 +57,7 @@ public long createNative() {
5157
return apmPtr;
5258
}
5359

54-
public void SetCapturePostProcessing(@Nullable AudioProcessing processing) {
60+
public void setCapturePostProcessing(@Nullable AudioProcessing processing) {
5561
checkExternalAudioProcessorExists();
5662
long newPtr = nativeSetCapturePostProcessing(processing);
5763
if (capturePostProcessingPtr != 0) {
@@ -61,7 +67,7 @@ public void SetCapturePostProcessing(@Nullable AudioProcessing processing) {
6167
capturePostProcessingPtr = newPtr;
6268
}
6369

64-
public void SetRenderPreProcessing(@Nullable AudioProcessing processing) {
70+
public void setRenderPreProcessing(@Nullable AudioProcessing processing) {
6571
checkExternalAudioProcessorExists();
6672
long newPtr = nativeSetRenderPreProcessing(processing);
6773
if (renderPreProcessingPtr != 0) {
@@ -71,17 +77,17 @@ public void SetRenderPreProcessing(@Nullable AudioProcessing processing) {
7177
renderPreProcessingPtr = newPtr;
7278
}
7379

74-
public void SetBypassFlagForCapturePost( boolean bypass) {
80+
public void setBypassFlagForCapturePost( boolean bypass) {
7581
checkExternalAudioProcessorExists();
7682
nativeSetBypassFlagForCapturePost(bypass);
7783
}
7884

79-
public void SetBypassFlagForRenderPre( boolean bypass) {
85+
public void setBypassFlagForRenderPre( boolean bypass) {
8086
checkExternalAudioProcessorExists();
8187
nativeSetBypassFlagForRenderPre(bypass);
8288
}
8389

84-
public void Destroy() {
90+
public void destroy() {
8591
checkExternalAudioProcessorExists();
8692
if (renderPreProcessingPtr != 0) {
8793
JniCommon.nativeReleaseRef(renderPreProcessingPtr);

sdk/android/src/jni/pc/external_audio_processing_factory.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ namespace jni {
3333
ExternalAudioProcessingJni::ExternalAudioProcessingJni(
3434
JNIEnv* jni,
3535
const JavaRef<jobject>& j_prosessing)
36-
: j_prosessing_global_(jni, j_prosessing) {}
36+
: j_processing_global_(jni, j_processing) {}
3737
ExternalAudioProcessingJni::~ExternalAudioProcessingJni() {}
3838
void ExternalAudioProcessingJni::Initialize(int sample_rate_hz,
3939
int num_channels) {
4040
JNIEnv* env = AttachCurrentThreadIfNeeded();
41-
Java_AudioProcessing_Initialize(env, j_prosessing_global_, sample_rate_hz,
41+
Java_AudioProcessing_initialize(env, j_processing_global_, sample_rate_hz,
4242
num_channels);
4343
}
4444

4545
void ExternalAudioProcessingJni::Reset(int new_rate) {
4646
JNIEnv* env = AttachCurrentThreadIfNeeded();
47-
Java_AudioProcessing_Reset(env, j_prosessing_global_, new_rate);
47+
Java_AudioProcessing_reset(env, j_processing_global_, new_rate);
4848
}
4949

5050
void ExternalAudioProcessingJni::Process(int num_bans, int num_frames, int buffer_size, float* buffer) {
5151
JNIEnv* env = AttachCurrentThreadIfNeeded();
5252
ScopedJavaLocalRef<jobject> audio_buffer =
5353
NewDirectByteBuffer(env, (void*)buffer, buffer_size * sizeof(float));
54-
Java_AudioProcessing_Process(env, j_prosessing_global_, num_bans, num_frames, audio_buffer);
54+
Java_AudioProcessing_process(env, j_processing_global_, num_bans, num_frames, audio_buffer);
5555
}
5656

5757
ExternalAudioProcessingFactory::ExternalAudioProcessingFactory() {

sdk/android/src/jni/pc/external_audio_processing_factory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ExternalAudioProcessingJni
3030
: public webrtc::ExternalAudioProcessingInterface,
3131
public rtc::RefCountInterface {
3232
public:
33-
ExternalAudioProcessingJni(JNIEnv* jni, const JavaRef<jobject>& j_prosessing);
33+
ExternalAudioProcessingJni(JNIEnv* jni, const JavaRef<jobject>& j_processing);
3434
~ExternalAudioProcessingJni();
3535

3636
protected:
@@ -39,8 +39,8 @@ class ExternalAudioProcessingJni
3939
virtual void Process(int num_bans, int num_frames, int buffer_size, float* buffer) override;
4040

4141
private:
42-
const ScopedJavaGlobalRef<jobject> j_prosessing_global_;
43-
const ScopedJavaGlobalRef<jobject> j_prosessing_;
42+
const ScopedJavaGlobalRef<jobject> j_processing_global_;
43+
const ScopedJavaGlobalRef<jobject> j_processing_;
4444
};
4545

4646
class ExternalAudioProcessingFactory : public rtc::RefCountInterface {

sdk/android/src/jni/pc/external_audio_processing_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ExternalAudioProcessingInterface {
2222
public:
2323
virtual void Initialize(int sample_rate_hz, int num_channels) = 0;
2424
virtual void Reset(int new_rate) = 0;
25-
virtual void Process(int num_bans, int num_frames, int buffer_size, float* buffer) = 0;
25+
virtual void Process(int num_bands, int num_frames, int buffer_size, float* buffer) = 0;
2626

2727
protected:
2828
virtual ~ExternalAudioProcessingInterface() = default;

0 commit comments

Comments
 (0)