1c5e268c6Sopenharmony_ci/* 2c5e268c6Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License. 5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at 6c5e268c6Sopenharmony_ci * 7c5e268c6Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8c5e268c6Sopenharmony_ci * 9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and 13c5e268c6Sopenharmony_ci * limitations under the License. 14c5e268c6Sopenharmony_ci */ 15c5e268c6Sopenharmony_ci 16c5e268c6Sopenharmony_cipackage ohos.hdi.distributed_audio.audioext.v1_0; 17c5e268c6Sopenharmony_ci 18c5e268c6Sopenharmony_ciimport ohos.hdi.distributed_audio.audioext.v1_0.Types; 19c5e268c6Sopenharmony_ci 20c5e268c6Sopenharmony_ci[callback] interface IDAudioCallback { 21c5e268c6Sopenharmony_ci OpenDevice([in] String adpName, [in] int devId); 22c5e268c6Sopenharmony_ci CloseDevice([in] String adpName, [in] int devId); 23c5e268c6Sopenharmony_ci SetParameters([in] String adpName, [in] int devId, [in] struct AudioParameter param); 24c5e268c6Sopenharmony_ci NotifyEvent([in] String adpName, [in] int devId, [in] struct DAudioEvent event); 25c5e268c6Sopenharmony_ci WriteStreamData([in] String adpName, [in] int devId, [in] struct AudioData data); 26c5e268c6Sopenharmony_ci ReadStreamData([in] String adpName, [in] int devId, [out] struct AudioData data); 27c5e268c6Sopenharmony_ci ReadMmapPosition([in] String adpName, [in] int devId, [out] unsigned long frames, [out] struct CurrentTime time); 28c5e268c6Sopenharmony_ci RefreshAshmemInfo([in] String adpName, [in] int devId, [in] FileDescriptor fd, [in] int ashmemLength, [in] int lengthPerTrans); 29c5e268c6Sopenharmony_ci}