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