attr.h revision 0145858a05d704e194ef3f7ac96d7804f08a362f
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: looping, callback events mask, 25 // marker position, position update period 26 // recorder: duration limit, events mask, 27 // marker position, position update period 28#define ATTR_INDEX_POSITION 2 // requested position (a.k.a. seek position) 29#define ATTR_INDEX_BQ_ENQUEUE 3 // (buffer queue non-empty and in playing state) became true 30#define ATTR_INDEX_ABQ_ENQUEUE 4 // Android buffer queue became non-empty and in playing state 31#define ATTR_INDEX_PLAY_STATE 5 // play: play state 32#define ATTR_INDEX_UNUSED6 6 // reserved for future use 33#define ATTR_INDEX_UNUSED7 7 // reserved for future use 34#define ATTR_INDEX_MAX 8 // total number of bits used so far 35 36// bit masks, used with unlock_exclusive_attributes 37 38#define ATTR_NONE 0 39#define ATTR_GAIN (1 << ATTR_INDEX_GAIN) 40#define ATTR_TRANSPORT (1 << ATTR_INDEX_TRANSPORT) 41#define ATTR_POSITION (1 << ATTR_INDEX_POSITION) 42#define ATTR_BQ_ENQUEUE (1 << ATTR_INDEX_BQ_ENQUEUE) 43#define ATTR_ABQ_ENQUEUE (1 << ATTR_INDEX_ABQ_ENQUEUE) 44#define ATTR_PLAY_STATE (1 << ATTR_INDEX_PLAY_STATE) 45#define ATTR_UNUSED6 (1 << ATTR_INDEX_UNUSED6) 46#define ATTR_UNUSED7 (1 << ATTR_INDEX_UNUSED7) 47