• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 package org.webrtc.audio;
12 
13 /**
14  * This interface is a thin wrapper on top of a native C++ webrtc::AudioDeviceModule (ADM). The
15  * reason for basing it on a native ADM instead of a pure Java interface is that we have two native
16  * Android implementations (OpenSLES and AAudio) that does not make sense to wrap through JNI.
17  *
18  * <p>Note: This class is still under development and may change without notice.
19  */
20 public interface AudioDeviceModule {
21   /**
22    * Returns a C++ pointer to a webrtc::AudioDeviceModule. Caller does _not_ take ownership and
23    * lifetime is handled through the release() call.
24    */
getNativeAudioDeviceModulePointer()25   long getNativeAudioDeviceModulePointer();
26 
27   /**
28    * Release resources for this AudioDeviceModule, including native resources. The object should not
29    * be used after this call.
30    */
release()31   void release();
32 
33   /** Control muting/unmuting the speaker. */
setSpeakerMute(boolean mute)34   void setSpeakerMute(boolean mute);
35 
36   /** Control muting/unmuting the microphone. */
setMicrophoneMute(boolean mute)37   void setMicrophoneMute(boolean mute);
38 }
39