1/*
2 * Copyright (C) 2011 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// Attributes
18
19// bit indices, used for fast lookup into handler table
20
21#define ATTR_INDEX_GAIN        0 // volume: volume, stereo position, mute
22                                 // mute solo: channel mute, channel solo
23                                 // effect send: set direct level
24#define ATTR_INDEX_TRANSPORT   1 // play: callback events mask,
25                                 //       marker position, position update period
26                                 //       (currently looping is done differently, not by attributes)
27                                 // recorder: duration limit, events mask,
28                                 //           marker position, position update period
29#define ATTR_INDEX_POSITION    2 // requested position (a.k.a. seek position)
30#define ATTR_INDEX_BQ_ENQUEUE  3 // (buffer queue non-empty and in playing state) became true
31#define ATTR_INDEX_ABQ_ENQUEUE 4 // Android buffer queue became non-empty and in playing state
32#define ATTR_INDEX_PLAY_STATE  5 // play: play state
33#define ATTR_INDEX_UNUSED6     6 // reserved for future use
34#define ATTR_INDEX_UNUSED7     7 // reserved for future use
35#define ATTR_INDEX_MAX         8 // total number of bits used so far
36
37// bit masks, used with unlock_exclusive_attributes
38
39#define ATTR_NONE        0
40#define ATTR_GAIN        (1 << ATTR_INDEX_GAIN)
41#define ATTR_TRANSPORT   (1 << ATTR_INDEX_TRANSPORT)
42#define ATTR_POSITION    (1 << ATTR_INDEX_POSITION)
43#define ATTR_BQ_ENQUEUE  (1 << ATTR_INDEX_BQ_ENQUEUE)
44#define ATTR_ABQ_ENQUEUE (1 << ATTR_INDEX_ABQ_ENQUEUE)
45#define ATTR_PLAY_STATE  (1 << ATTR_INDEX_PLAY_STATE)
46#define ATTR_UNUSED6     (1 << ATTR_INDEX_UNUSED6)
47#define ATTR_UNUSED7     (1 << ATTR_INDEX_UNUSED7)
48