1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16package ohos.hdi.audio.v1_0; 17 18import ohos.hdi.audio.v1_0.AudioTypes; 19 20interface IAudioCapture { 21 CaptureFrame([out] byte[] frame, [in] unsigned long requestBytes); 22 GetCapturePosition([out] unsigned long frames, [out] struct AudioTimeStamp time); 23 CheckSceneCapability([in] struct AudioSceneDescriptor scene, [out] boolean supported); 24 SelectScene([in] struct AudioSceneDescriptor scene); 25 SetMute([in] boolean mute); 26 GetMute([out] boolean mute); 27 SetVolume([in] float volume); 28 GetVolume([out] float volume); 29 GetGainThreshold([out] float min, [out] float max); 30 GetGain([out] float gain); 31 SetGain([in] float gain); 32 GetFrameSize([out] unsigned long size); 33 GetFrameCount([out] unsigned long count); 34 SetSampleAttributes([in] struct AudioSampleAttributes attrs); 35 GetSampleAttributes([out] struct AudioSampleAttributes attrs); 36 GetCurrentChannelId([out] unsigned int channelId); 37 SetExtraParams([in] String keyValueList); 38 GetExtraParams([out] String keyValueList); 39 ReqMmapBuffer([in] int reqSize, [in] struct AudioMmapBufferDescripter desc); 40 GetMmapPosition([out] unsigned long frames, [out] struct AudioTimeStamp time); 41 AddAudioEffect([in] unsigned long effectid); 42 RemoveAudioEffect([in] unsigned long effectid); 43 GetFrameBufferSize([out] unsigned long bufferSize); 44 Start(); 45 Stop(); 46 Pause(); 47 Resume(); 48 Flush(); 49 TurnStandbyMode(); 50 AudioDevDump([in] int range, [in] int fd); 51 IsSupportsPauseAndResume([out] boolean supportPause, [out] boolean supportResume); 52} 53