1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #pragma once 17 18 #include "AudioPolicyInterface.h" 19 20 namespace android { 21 22 class AudioPolicyTestClient : public AudioPolicyClientInterface 23 { 24 public: 25 virtual ~AudioPolicyTestClient() = default; 26 27 // AudioPolicyClientInterface Implementation loadHwModule(const char *)28 audio_module_handle_t loadHwModule(const char* /*name*/) override { 29 return AUDIO_MODULE_HANDLE_NONE; 30 } openOutput(audio_module_handle_t,audio_io_handle_t *,audio_config_t *,audio_devices_t *,const String8 &,uint32_t *,audio_output_flags_t)31 status_t openOutput(audio_module_handle_t /*module*/, 32 audio_io_handle_t* /*output*/, 33 audio_config_t* /*config*/, 34 audio_devices_t* /*devices*/, 35 const String8& /*address*/, 36 uint32_t* /*latencyMs*/, 37 audio_output_flags_t /*flags*/) override { return NO_INIT; } openDuplicateOutput(audio_io_handle_t,audio_io_handle_t)38 audio_io_handle_t openDuplicateOutput(audio_io_handle_t /*output1*/, 39 audio_io_handle_t /*output2*/) override { 40 return AUDIO_IO_HANDLE_NONE; 41 } closeOutput(audio_io_handle_t)42 status_t closeOutput(audio_io_handle_t /*output*/) override { return NO_INIT; } suspendOutput(audio_io_handle_t)43 status_t suspendOutput(audio_io_handle_t /*output*/) override { return NO_INIT; } restoreOutput(audio_io_handle_t)44 status_t restoreOutput(audio_io_handle_t /*output*/) override { return NO_INIT; } openInput(audio_module_handle_t,audio_io_handle_t *,audio_config_t *,audio_devices_t *,const String8 &,audio_source_t,audio_input_flags_t)45 status_t openInput(audio_module_handle_t /*module*/, 46 audio_io_handle_t* /*input*/, 47 audio_config_t* /*config*/, 48 audio_devices_t* /*device*/, 49 const String8& /*address*/, 50 audio_source_t /*source*/, 51 audio_input_flags_t /*flags*/) override { return NO_INIT; } closeInput(audio_io_handle_t)52 status_t closeInput(audio_io_handle_t /*input*/) override { return NO_INIT; } setStreamVolume(audio_stream_type_t,float,audio_io_handle_t,int)53 status_t setStreamVolume(audio_stream_type_t /*stream*/, 54 float /*volume*/, 55 audio_io_handle_t /*output*/, 56 int /*delayMs*/) override { return NO_INIT; } invalidateStream(audio_stream_type_t)57 status_t invalidateStream(audio_stream_type_t /*stream*/) override { return NO_INIT; } setParameters(audio_io_handle_t,const String8 &,int)58 void setParameters(audio_io_handle_t /*ioHandle*/, 59 const String8& /*keyValuePairs*/, 60 int /*delayMs*/) override { } getParameters(audio_io_handle_t,const String8 &)61 String8 getParameters(audio_io_handle_t /*ioHandle*/, 62 const String8& /*keys*/) override { return String8(); } startTone(audio_policy_tone_t,audio_stream_type_t)63 status_t startTone(audio_policy_tone_t /*tone*/, 64 audio_stream_type_t /*stream*/) override { return NO_INIT; } stopTone()65 status_t stopTone() override { return NO_INIT; } setVoiceVolume(float,int)66 status_t setVoiceVolume(float /*volume*/, int /*delayMs*/) override { return NO_INIT; } moveEffects(audio_session_t,audio_io_handle_t,audio_io_handle_t)67 status_t moveEffects(audio_session_t /*session*/, 68 audio_io_handle_t /*srcOutput*/, 69 audio_io_handle_t /*dstOutput*/) override { return NO_INIT; } createAudioPatch(const struct audio_patch *,audio_patch_handle_t *,int)70 status_t createAudioPatch(const struct audio_patch* /*patch*/, 71 audio_patch_handle_t* /*handle*/, 72 int /*delayMs*/) override { return NO_INIT; } releaseAudioPatch(audio_patch_handle_t,int)73 status_t releaseAudioPatch(audio_patch_handle_t /*handle*/, 74 int /*delayMs*/) override { return NO_INIT; } setAudioPortConfig(const struct audio_port_config *,int)75 status_t setAudioPortConfig(const struct audio_port_config* /*config*/, 76 int /*delayMs*/) override { return NO_INIT; } onAudioPortListUpdate()77 void onAudioPortListUpdate() override { } onAudioPatchListUpdate()78 void onAudioPatchListUpdate() override { } newAudioUniqueId(audio_unique_id_use_t)79 audio_unique_id_t newAudioUniqueId(audio_unique_id_use_t /*use*/) override { return 0; } onDynamicPolicyMixStateUpdate(String8,int32_t)80 void onDynamicPolicyMixStateUpdate(String8 /*regId*/, int32_t /*state*/) override { } onRecordingConfigurationUpdate(int,const record_client_info_t *,const struct audio_config_base *,const struct audio_config_base *,audio_patch_handle_t)81 void onRecordingConfigurationUpdate(int /*event*/, 82 const record_client_info_t* /*clientInfo*/, 83 const struct audio_config_base* /*clientConfig*/, 84 const struct audio_config_base* /*deviceConfig*/, 85 audio_patch_handle_t /*patchHandle*/) override { } 86 }; 87 88 } // namespace android 89