1/* 2 * Copyright (c) 2025 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.AudioStandard; 17 18sequenceable OHOS.IRemoteObject; 19sequenceable oh_audio_buffer..OHOS.AudioStandard.OHAudioBufferBase; 20 21interface IAudioProcess { 22 [ipccode 0] void ResolveBufferBaseAndGetServerSpanSize([out] sharedptr<OHAudioBufferBase> buffer, [out] unsigned int spanSizeInFrame); 23 void GetSessionId([out] unsigned int sessionId); 24 void Start(); 25 void Pause([in] boolean isFlush); 26 void Resume(); 27 void Stop([in] int stage); // AudioProcessStage stage = AUDIO_PROC_STAGE_STOP 28 void RequestHandleInfo(); 29 [oneway] void RequestHandleInfoAsync(); // default 30 void Release([in] boolean isSwitchStream); // isSwitchStream = false 31 void RegisterProcessCb([in] IRemoteObject object); 32 void RegisterThreadPriority([in] int tid, [in] String bundleName, [in] unsigned int method); // BoostTriggerMethod method 33 void SetDefaultOutputDevice([in] int defaultOutputDevice, [in] boolean skipForce); // DeviceType defaultOutputDevice 34 void SetSilentModeAndMixWithOthers([in] boolean on); 35 void SetSourceDuration([in] long duration); 36 void SetUnderrunCount([in] unsigned int underrunCnt); 37 void SaveAdjustStreamVolumeInfo([in] float volume, [in] unsigned int sessionId, [in] String adjustTime, 38 [in] unsigned int code); 39 void SetAudioHapticsSyncId([in] int audioHapticsSyncId); 40}