• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 #pragma once
19 
20 #include <system/audio.h>
21 #include <system/audio_policy.h>
22 #include <binder/Parcelable.h>
23 
24 namespace android {
25 
26 enum product_strategy_t : uint32_t;
27 const product_strategy_t PRODUCT_STRATEGY_NONE = static_cast<product_strategy_t>(-1);
28 
29 using AttributesVector = std::vector<audio_attributes_t>;
30 using StreamTypeVector = std::vector<audio_stream_type_t>;
31 
32 using TrackSecondaryOutputsMap = std::map<audio_port_handle_t, std::vector<audio_io_handle_t>>;
33 
34 constexpr bool operator==(const audio_attributes_t &lhs, const audio_attributes_t &rhs)
35 {
36     return lhs.usage == rhs.usage && lhs.content_type == rhs.content_type &&
37             lhs.flags == rhs.flags && (std::strcmp(lhs.tags, rhs.tags) == 0);
38 }
39 constexpr bool operator!=(const audio_attributes_t &lhs, const audio_attributes_t &rhs)
40 {
41     return !(lhs==rhs);
42 }
43 
44 enum volume_group_t : uint32_t;
45 static const volume_group_t VOLUME_GROUP_NONE = static_cast<volume_group_t>(-1);
46 
47 } // namespace android
48 
49