1/* 2 * Copyright 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.media; 18 19import android.media.MicrophoneInfo; 20 21/* Native code must specify namespace media (media::IAudioRecord) when referring to this class */ 22interface IAudioRecord { 23 24 /* After it's created the track is not active. Call start() to 25 * make it active. 26 */ 27 void start(int /*AudioSystem::sync_event_t*/ event, 28 int /*audio_session_t*/ triggerSession); 29 30 /* Stop a track. If set, the callback will cease being called and 31 * obtainBuffer will return an error. Buffers that are already released 32 * will be processed, unless flush() is called. 33 */ 34 void stop(); 35 36 /* Get a list of current active microphones. 37 */ 38 void getActiveMicrophones(out MicrophoneInfo[] activeMicrophones); 39} 40