1 /*
2 * Copyright 2021 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
17 /*
18 * Generated mock file from original source file
19 * Functions generated:60
20 */
21
22 #include <map>
23 #include <string>
24
25 #include "test/common/mock_functions.h"
26
27 #undef __INTRODUCED_IN
28 #define __INTRODUCED_IN(x)
29
30 #include <aaudio/AAudio.h>
31 #include <aaudio/AAudioTesting.h>
32
33 #ifndef UNUSED_ATTR
34 #define UNUSED_ATTR
35 #endif
36
AAudioStream_getAllowedCapturePolicy(AAudioStream * stream)37 aaudio_allowed_capture_policy_t AAudioStream_getAllowedCapturePolicy(
38 AAudioStream* stream) {
39 inc_func_call_count(__func__);
40 return 0;
41 }
AAudioStream_getContentType(AAudioStream * stream)42 aaudio_content_type_t AAudioStream_getContentType(AAudioStream* stream) {
43 inc_func_call_count(__func__);
44 return 0;
45 }
AAudioStream_getDirection(AAudioStream * stream)46 aaudio_direction_t AAudioStream_getDirection(AAudioStream* stream) {
47 inc_func_call_count(__func__);
48 return 0;
49 }
AAudioStream_getFormat(AAudioStream * stream)50 aaudio_format_t AAudioStream_getFormat(AAudioStream* stream) {
51 inc_func_call_count(__func__);
52 return 0;
53 }
AAudioStream_getInputPreset(AAudioStream * stream)54 aaudio_input_preset_t AAudioStream_getInputPreset(AAudioStream* stream) {
55 inc_func_call_count(__func__);
56 return 0;
57 }
AAudioStream_getPerformanceMode(AAudioStream * stream)58 aaudio_performance_mode_t AAudioStream_getPerformanceMode(
59 AAudioStream* stream) {
60 inc_func_call_count(__func__);
61 return 0;
62 }
AAudio_getMMapPolicy()63 aaudio_policy_t AAudio_getMMapPolicy() {
64 inc_func_call_count(__func__);
65 return 0;
66 }
AAudioStreamBuilder_delete(AAudioStreamBuilder * builder)67 aaudio_result_t AAudioStreamBuilder_delete(AAudioStreamBuilder* builder) {
68 inc_func_call_count(__func__);
69 return 0;
70 }
AAudioStreamBuilder_openStream(AAudioStreamBuilder * builder,AAudioStream ** streamPtr)71 aaudio_result_t AAudioStreamBuilder_openStream(AAudioStreamBuilder* builder,
72 AAudioStream** streamPtr) {
73 inc_func_call_count(__func__);
74 return 0;
75 }
AAudioStream_close(AAudioStream * stream)76 aaudio_result_t AAudioStream_close(AAudioStream* stream) {
77 inc_func_call_count(__func__);
78 return 0;
79 }
AAudioStream_getTimestamp(AAudioStream * stream,clockid_t clockid,int64_t * framePosition,int64_t * timeNanoseconds)80 aaudio_result_t AAudioStream_getTimestamp(AAudioStream* stream,
81 clockid_t clockid,
82 int64_t* framePosition,
83 int64_t* timeNanoseconds) {
84 inc_func_call_count(__func__);
85 return 0;
86 }
AAudioStream_read(AAudioStream * stream,void * buffer,int32_t numFrames,int64_t timeoutNanoseconds)87 aaudio_result_t AAudioStream_read(AAudioStream* stream, void* buffer,
88 int32_t numFrames,
89 int64_t timeoutNanoseconds) {
90 inc_func_call_count(__func__);
91 return 0;
92 }
AAudioStream_release(AAudioStream * stream)93 aaudio_result_t AAudioStream_release(AAudioStream* stream) {
94 inc_func_call_count(__func__);
95 return 0;
96 }
AAudioStream_requestFlush(AAudioStream * stream)97 aaudio_result_t AAudioStream_requestFlush(AAudioStream* stream) {
98 inc_func_call_count(__func__);
99 return 0;
100 }
AAudioStream_requestPause(AAudioStream * stream)101 aaudio_result_t AAudioStream_requestPause(AAudioStream* stream) {
102 inc_func_call_count(__func__);
103 return 0;
104 }
AAudioStream_requestStart(AAudioStream * stream)105 aaudio_result_t AAudioStream_requestStart(AAudioStream* stream) {
106 inc_func_call_count(__func__);
107 return 0;
108 }
AAudioStream_requestStop(AAudioStream * stream)109 aaudio_result_t AAudioStream_requestStop(AAudioStream* stream) {
110 inc_func_call_count(__func__);
111 return 0;
112 }
AAudioStream_setBufferSizeInFrames(AAudioStream * stream,int32_t requestedFrames)113 aaudio_result_t AAudioStream_setBufferSizeInFrames(AAudioStream* stream,
114 int32_t requestedFrames) {
115 inc_func_call_count(__func__);
116 return 0;
117 }
AAudioStream_waitForStateChange(AAudioStream * stream,aaudio_stream_state_t inputState,aaudio_stream_state_t * nextState,int64_t timeoutNanoseconds)118 aaudio_result_t AAudioStream_waitForStateChange(
119 AAudioStream* stream, aaudio_stream_state_t inputState,
120 aaudio_stream_state_t* nextState, int64_t timeoutNanoseconds) {
121 inc_func_call_count(__func__);
122 return 0;
123 }
AAudioStream_write(AAudioStream * stream,const void * buffer,int32_t numFrames,int64_t timeoutNanoseconds)124 aaudio_result_t AAudioStream_write(AAudioStream* stream, const void* buffer,
125 int32_t numFrames,
126 int64_t timeoutNanoseconds) {
127 inc_func_call_count(__func__);
128 return 0;
129 }
AAudio_createStreamBuilder(AAudioStreamBuilder ** builder)130 aaudio_result_t AAudio_createStreamBuilder(AAudioStreamBuilder** builder) {
131 inc_func_call_count(__func__);
132 return 0;
133 }
AAudio_setMMapPolicy(aaudio_policy_t policy)134 aaudio_result_t AAudio_setMMapPolicy(aaudio_policy_t policy) {
135 inc_func_call_count(__func__);
136 return 0;
137 }
AAudioStream_getSharingMode(AAudioStream * stream)138 aaudio_sharing_mode_t AAudioStream_getSharingMode(AAudioStream* stream) {
139 inc_func_call_count(__func__);
140 return 0;
141 }
AAudioStream_getState(AAudioStream * stream)142 aaudio_stream_state_t AAudioStream_getState(AAudioStream* stream) {
143 inc_func_call_count(__func__);
144 return 0;
145 }
AAudioStream_getUsage(AAudioStream * stream)146 aaudio_usage_t AAudioStream_getUsage(AAudioStream* stream) {
147 inc_func_call_count(__func__);
148 return 0;
149 }
AAudioStream_isMMapUsed(AAudioStream * stream)150 bool AAudioStream_isMMapUsed(AAudioStream* stream) {
151 inc_func_call_count(__func__);
152 return false;
153 }
AAudioStream_isPrivacySensitive(AAudioStream * stream)154 bool AAudioStream_isPrivacySensitive(AAudioStream* stream) {
155 inc_func_call_count(__func__);
156 return false;
157 }
AAudio_convertResultToText(aaudio_result_t returnCode)158 const char* AAudio_convertResultToText(aaudio_result_t returnCode) {
159 inc_func_call_count(__func__);
160 return nullptr;
161 }
AAudio_convertStreamStateToText(aaudio_stream_state_t state)162 const char* AAudio_convertStreamStateToText(aaudio_stream_state_t state) {
163 inc_func_call_count(__func__);
164 return nullptr;
165 }
AAudioStream_getBufferCapacityInFrames(AAudioStream * stream)166 int32_t AAudioStream_getBufferCapacityInFrames(AAudioStream* stream) {
167 inc_func_call_count(__func__);
168 return 0;
169 }
AAudioStream_getBufferSizeInFrames(AAudioStream * stream)170 int32_t AAudioStream_getBufferSizeInFrames(AAudioStream* stream) {
171 inc_func_call_count(__func__);
172 return 0;
173 }
AAudioStream_getChannelCount(AAudioStream * stream)174 int32_t AAudioStream_getChannelCount(AAudioStream* stream) {
175 inc_func_call_count(__func__);
176 return 0;
177 }
AAudioStream_getDeviceId(AAudioStream * stream)178 int32_t AAudioStream_getDeviceId(AAudioStream* stream) {
179 inc_func_call_count(__func__);
180 return 0;
181 }
AAudioStream_getFramesPerBurst(AAudioStream * stream)182 int32_t AAudioStream_getFramesPerBurst(AAudioStream* stream) {
183 inc_func_call_count(__func__);
184 return 0;
185 }
AAudioStream_getFramesPerDataCallback(AAudioStream * stream)186 int32_t AAudioStream_getFramesPerDataCallback(AAudioStream* stream) {
187 inc_func_call_count(__func__);
188 return 0;
189 }
AAudioStream_getSampleRate(AAudioStream * stream)190 int32_t AAudioStream_getSampleRate(AAudioStream* stream) {
191 inc_func_call_count(__func__);
192 return 0;
193 }
AAudioStream_getSamplesPerFrame(AAudioStream * stream)194 int32_t AAudioStream_getSamplesPerFrame(AAudioStream* stream) {
195 inc_func_call_count(__func__);
196 return 0;
197 }
AAudioStream_getSessionId(AAudioStream * stream)198 int32_t AAudioStream_getSessionId(AAudioStream* stream) {
199 inc_func_call_count(__func__);
200 return 0;
201 }
AAudioStream_getXRunCount(AAudioStream * stream)202 int32_t AAudioStream_getXRunCount(AAudioStream* stream) {
203 inc_func_call_count(__func__);
204 return 0;
205 }
AAudioStream_getFramesRead(AAudioStream * stream)206 int64_t AAudioStream_getFramesRead(AAudioStream* stream) {
207 inc_func_call_count(__func__);
208 return 0;
209 }
AAudioStream_getFramesWritten(AAudioStream * stream)210 int64_t AAudioStream_getFramesWritten(AAudioStream* stream) {
211 inc_func_call_count(__func__);
212 return 0;
213 }
AAudioStreamBuilder_setAllowedCapturePolicy(AAudioStreamBuilder * builder,aaudio_allowed_capture_policy_t policy)214 void AAudioStreamBuilder_setAllowedCapturePolicy(
215 AAudioStreamBuilder* builder, aaudio_allowed_capture_policy_t policy) {
216 inc_func_call_count(__func__);
217 return;
218 }
AAudioStreamBuilder_setBufferCapacityInFrames(AAudioStreamBuilder * builder,int32_t frames)219 void AAudioStreamBuilder_setBufferCapacityInFrames(AAudioStreamBuilder* builder,
220 int32_t frames) {
221 inc_func_call_count(__func__);
222 return;
223 }
AAudioStreamBuilder_setChannelCount(AAudioStreamBuilder * builder,int32_t channelCount)224 void AAudioStreamBuilder_setChannelCount(AAudioStreamBuilder* builder,
225 int32_t channelCount) {
226 inc_func_call_count(__func__);
227 return;
228 }
AAudioStreamBuilder_setContentType(AAudioStreamBuilder * builder,aaudio_content_type_t contentType)229 void AAudioStreamBuilder_setContentType(AAudioStreamBuilder* builder,
230 aaudio_content_type_t contentType) {
231 inc_func_call_count(__func__);
232 return;
233 }
AAudioStreamBuilder_setDataCallback(AAudioStreamBuilder * builder,AAudioStream_dataCallback callback,void * userData)234 void AAudioStreamBuilder_setDataCallback(AAudioStreamBuilder* builder,
235 AAudioStream_dataCallback callback,
236 void* userData) {
237 inc_func_call_count(__func__);
238 return;
239 }
AAudioStreamBuilder_setDeviceId(AAudioStreamBuilder * builder,int32_t deviceId)240 void AAudioStreamBuilder_setDeviceId(AAudioStreamBuilder* builder,
241 int32_t deviceId) {
242 inc_func_call_count(__func__);
243 return;
244 }
AAudioStreamBuilder_setDirection(AAudioStreamBuilder * builder,aaudio_direction_t direction)245 void AAudioStreamBuilder_setDirection(AAudioStreamBuilder* builder,
246 aaudio_direction_t direction) {
247 inc_func_call_count(__func__);
248 return;
249 }
AAudioStreamBuilder_setErrorCallback(AAudioStreamBuilder * builder,AAudioStream_errorCallback callback,void * userData)250 void AAudioStreamBuilder_setErrorCallback(AAudioStreamBuilder* builder,
251 AAudioStream_errorCallback callback,
252 void* userData) {
253 inc_func_call_count(__func__);
254 return;
255 }
AAudioStreamBuilder_setFormat(AAudioStreamBuilder * builder,aaudio_format_t format)256 void AAudioStreamBuilder_setFormat(AAudioStreamBuilder* builder,
257 aaudio_format_t format) {
258 inc_func_call_count(__func__);
259 return;
260 }
AAudioStreamBuilder_setFramesPerDataCallback(AAudioStreamBuilder * builder,int32_t frames)261 void AAudioStreamBuilder_setFramesPerDataCallback(AAudioStreamBuilder* builder,
262 int32_t frames) {
263 inc_func_call_count(__func__);
264 return;
265 }
AAudioStreamBuilder_setInputPreset(AAudioStreamBuilder * builder,aaudio_input_preset_t inputPreset)266 void AAudioStreamBuilder_setInputPreset(AAudioStreamBuilder* builder,
267 aaudio_input_preset_t inputPreset) {
268 inc_func_call_count(__func__);
269 return;
270 }
AAudioStreamBuilder_setPerformanceMode(AAudioStreamBuilder * builder,aaudio_performance_mode_t mode)271 void AAudioStreamBuilder_setPerformanceMode(AAudioStreamBuilder* builder,
272 aaudio_performance_mode_t mode) {
273 inc_func_call_count(__func__);
274 return;
275 }
AAudioStreamBuilder_setPrivacySensitive(AAudioStreamBuilder * builder,bool privacySensitive)276 void AAudioStreamBuilder_setPrivacySensitive(AAudioStreamBuilder* builder,
277 bool privacySensitive) {
278 inc_func_call_count(__func__);
279 return;
280 }
AAudioStreamBuilder_setSampleRate(AAudioStreamBuilder * builder,int32_t sampleRate)281 void AAudioStreamBuilder_setSampleRate(AAudioStreamBuilder* builder,
282 int32_t sampleRate) {
283 inc_func_call_count(__func__);
284 return;
285 }
AAudioStreamBuilder_setSamplesPerFrame(AAudioStreamBuilder * builder,int32_t samplesPerFrame)286 void AAudioStreamBuilder_setSamplesPerFrame(AAudioStreamBuilder* builder,
287 int32_t samplesPerFrame) {
288 inc_func_call_count(__func__);
289 return;
290 }
AAudioStreamBuilder_setSessionId(AAudioStreamBuilder * builder,aaudio_session_id_t sessionId)291 void AAudioStreamBuilder_setSessionId(AAudioStreamBuilder* builder,
292 aaudio_session_id_t sessionId) {
293 inc_func_call_count(__func__);
294 return;
295 }
AAudioStreamBuilder_setSharingMode(AAudioStreamBuilder * builder,aaudio_sharing_mode_t sharingMode)296 void AAudioStreamBuilder_setSharingMode(AAudioStreamBuilder* builder,
297 aaudio_sharing_mode_t sharingMode) {
298 inc_func_call_count(__func__);
299 return;
300 }
AAudioStreamBuilder_setUsage(AAudioStreamBuilder * builder,aaudio_usage_t usage)301 void AAudioStreamBuilder_setUsage(AAudioStreamBuilder* builder,
302 aaudio_usage_t usage) {
303 inc_func_call_count(__func__);
304 return;
305 }
306