blob: 659234bdf30716fb440bf9732308ba9ae5d02db7 [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001{#
Richard Burtonf32a86a2022-11-15 11:46:11 +00002 SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com>
alexander3c798932021-03-26 21:42:19 +00003 SPDX-License-Identifier: Apache-2.0
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16#}
17{{common_template_header}}
18
19#include "InputFiles.hpp"
20
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000021static const char* audioClipFilenames[] = {
alexander3c798932021-03-26 21:42:19 +000022{% for name in clip_names %}
23 "{{name}}",
24{% endfor %}
25};
26
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000027static const int16_t* audioClipArrays[] = {
28 {{ var_names|join(',\n ') }}
alexander3c798932021-03-26 21:42:19 +000029};
30
31
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000032static const size_t audioClipSizes[NUMBER_OF_FILES] = {
33 {{ clip_sizes|join(',\n ') }}
alexander3c798932021-03-26 21:42:19 +000034};
35
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000036const char* GetFilename(const uint32_t idx)
alexander3c798932021-03-26 21:42:19 +000037{
38 if (idx < NUMBER_OF_FILES) {
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000039 return audioClipFilenames[idx];
alexander3c798932021-03-26 21:42:19 +000040 }
41 return nullptr;
42}
43
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000044const int16_t* GetAudioArray(const uint32_t idx)
alexander3c798932021-03-26 21:42:19 +000045{
46 if (idx < NUMBER_OF_FILES) {
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000047 return audioClipArrays[idx];
alexander3c798932021-03-26 21:42:19 +000048 }
49 return nullptr;
50}
51
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000052uint32_t GetAudioArraySize(const uint32_t idx)
alexander3c798932021-03-26 21:42:19 +000053{
54 if (idx < NUMBER_OF_FILES) {
Kshitij Sisodia2ea46232022-12-19 16:37:33 +000055 return audioClipSizes[idx];
alexander3c798932021-03-26 21:42:19 +000056 }
57 return 0;
58}