@@ -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 );
0 commit comments