1 /* 2 * Copyright (c) 2023 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 #ifndef MICROPHONE_DESCRIPTOR_H 16 #define MICROPHONE_DESCRIPTOR_H 17 18 #include <parcel.h> 19 #include "audio_device_info.h" 20 #include "audio_info.h" 21 22 namespace OHOS { 23 namespace AudioStandard { 24 class MicrophoneDescriptor; 25 class MicrophoneDescriptor : public Parcelable { 26 friend class AudioSystemManager; 27 public: 28 int32_t micId_; 29 DeviceType deviceType_; 30 int32_t groupId_; 31 int32_t sensitivity_; 32 Vector3D position_ = {}; 33 Vector3D orientation_ = {}; 34 35 MicrophoneDescriptor(); 36 MicrophoneDescriptor(int32_t id, DeviceType type); 37 MicrophoneDescriptor(const MicrophoneDescriptor &micDescriptor); 38 MicrophoneDescriptor(const sptr<MicrophoneDescriptor> &micDescriptor); 39 MicrophoneDescriptor(int32_t id, DeviceType type, int32_t groupId, int32_t sensitivity); 40 virtual ~MicrophoneDescriptor(); 41 42 bool Marshalling(Parcel &parcel) const override; 43 static sptr<MicrophoneDescriptor> Unmarshalling(Parcel &in); 44 45 void SetMicPositionInfo(const Vector3D &pos); 46 void SetMicOrientationInfo(const Vector3D &orientation); 47 }; 48 } // namespace AudioStandard 49 } // namespace OHOS 50 #endif // MICROPHONE_DESCRIPTOR_H