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 16 #include "audio_renderer_proxy_obj.h" 17 18 using namespace std; 19 20 namespace OHOS { 21 namespace AudioStandard { SaveRendererObj(const AudioRenderer * rendererObj)22void AudioRendererProxyObj::SaveRendererObj(const AudioRenderer *rendererObj) 23 { 24 renderer = rendererObj; 25 } 26 PausedStreamImpl(const StreamSetStateEventInternal & streamSetStateEventInternal)27void AudioRendererProxyObj::PausedStreamImpl(const StreamSetStateEventInternal &streamSetStateEventInternal) 28 { 29 renderer->Pause(CMD_FROM_SYSTEM); 30 } 31 ResumeStreamImpl(const StreamSetStateEventInternal & streamSetStateEventInternal)32void AudioRendererProxyObj::ResumeStreamImpl(const StreamSetStateEventInternal &streamSetStateEventInternal) 33 { 34 renderer->Start(CMD_FROM_SYSTEM); 35 } 36 SetLowPowerVolumeImpl(float volume)37void AudioRendererProxyObj::SetLowPowerVolumeImpl(float volume) 38 { 39 renderer->SetLowPowerVolume(volume); 40 } 41 GetLowPowerVolumeImpl(float & volume)42void AudioRendererProxyObj::GetLowPowerVolumeImpl(float &volume) 43 { 44 volume = renderer->GetLowPowerVolume(); 45 } 46 GetSingleStreamVolumeImpl(float & volume)47void AudioRendererProxyObj::GetSingleStreamVolumeImpl(float &volume) 48 { 49 volume = renderer->GetSingleStreamVolume(); 50 } 51 } // namespace AudioStandard 52 } // namespace OHOS 53