blob: c4da98ae1890cebadc8c9a3f0809823dca48d606 [file] [log] [blame]
Mikhail Naganovad3f8a12017-12-12 13:24:23 -08001/*
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
20namespace android {
21
22class AudioPolicyTestClient : public AudioPolicyClientInterface
23{
24public:
25 virtual ~AudioPolicyTestClient() {}
26
27 // AudioPolicyClientInterface Implementation
28 audio_module_handle_t loadHwModule(const char* /*name*/) override { return 0; }
29 status_t openOutput(audio_module_handle_t /*module*/,
30 audio_io_handle_t* /*output*/,
31 audio_config_t* /*config*/,
32 audio_devices_t* /*devices*/,
33 const String8& /*address*/,
34 uint32_t* /*latencyMs*/,
35 audio_output_flags_t /*flags*/) override { return 0; }
36 audio_io_handle_t openDuplicateOutput(audio_io_handle_t /*output1*/,
37 audio_io_handle_t /*output2*/) override { return 0; }
38 status_t closeOutput(audio_io_handle_t /*output*/) override { return 0; }
39 status_t suspendOutput(audio_io_handle_t /*output*/) override { return 0; }
40 status_t restoreOutput(audio_io_handle_t /*output*/) override { return 0; }
41 status_t openInput(audio_module_handle_t /*module*/,
42 audio_io_handle_t* /*input*/,
43 audio_config_t* /*config*/,
44 audio_devices_t* /*device*/,
45 const String8& /*address*/,
46 audio_source_t /*source*/,
47 audio_input_flags_t /*flags*/) override { return 0; }
48 status_t closeInput(audio_io_handle_t /*input*/) override { return 0; }
49 status_t setStreamVolume(audio_stream_type_t /*stream*/,
50 float /*volume*/,
51 audio_io_handle_t /*output*/,
52 int /*delayMs*/) override { return 0; }
53 status_t invalidateStream(audio_stream_type_t /*stream*/) override { return 0; }
54 void setParameters(audio_io_handle_t /*ioHandle*/,
55 const String8& /*keyValuePairs*/,
56 int /*delayMs*/) override { }
57 String8 getParameters(audio_io_handle_t /*ioHandle*/,
58 const String8& /*keys*/) override { return String8(); }
59 status_t startTone(audio_policy_tone_t /*tone*/,
60 audio_stream_type_t /*stream*/) override { return 0; }
61 status_t stopTone() override { return 0; }
62 status_t setVoiceVolume(float /*volume*/, int /*delayMs*/) override { return 0; }
63 status_t moveEffects(audio_session_t /*session*/,
64 audio_io_handle_t /*srcOutput*/,
65 audio_io_handle_t /*dstOutput*/) override { return 0; }
66 status_t createAudioPatch(const struct audio_patch* /*patch*/,
67 audio_patch_handle_t* /*handle*/,
68 int /*delayMs*/) override { return 0; }
69 status_t releaseAudioPatch(audio_patch_handle_t /*handle*/,
70 int /*delayMs*/) override { return 0; }
71 status_t setAudioPortConfig(const struct audio_port_config* /*config*/,
72 int /*delayMs*/) override { return 0; }
73 void onAudioPortListUpdate() override { }
74 void onAudioPatchListUpdate() override { }
75 audio_unique_id_t newAudioUniqueId(audio_unique_id_use_t /*use*/) override { return 0; }
76 void onDynamicPolicyMixStateUpdate(String8 /*regId*/, int32_t /*state*/) override { }
77 void onRecordingConfigurationUpdate(int /*event*/,
78 const record_client_info_t* /*clientInfo*/,
79 const struct audio_config_base* /*clientConfig*/,
80 const struct audio_config_base* /*deviceConfig*/,
81 audio_patch_handle_t /*patchHandle*/) override { }
82};
83
84} // namespace android