blob: 4aa2f60d45c73255a835edcf2785c3473b6ad3d3 [file] [log] [blame]
Jean-Michel Trivi0008a482016-12-26 15:58:24 -08001/*
2 * Copyright (C) 2016 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#ifndef ANDROID_AUDIOMANAGER_H
18#define ANDROID_AUDIOMANAGER_H
19
20namespace android {
21
22// must be kept in sync with definitions in AudioPlaybackConfiguration.java
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080023#define PLAYER_PIID_INVALID -1
24
Jean-Michel Trivi63189322017-01-05 18:05:28 -080025typedef enum {
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080026 PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE = 11,
27 PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD = 12,
Jean-Michel Trivi10fed362017-05-25 15:17:39 -070028 PLAYER_TYPE_AAUDIO = 13,
29 PLAYER_TYPE_HW_SOURCE = 14,
30 PLAYER_TYPE_EXTERNAL_PROXY = 15,
Jean-Michel Trivi63189322017-01-05 18:05:28 -080031} player_type_t;
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080032
Jean-Michel Trivi63189322017-01-05 18:05:28 -080033typedef enum {
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080034 PLAYER_STATE_UNKNOWN = -1,
35 PLAYER_STATE_RELEASED = 0,
36 PLAYER_STATE_IDLE = 1,
37 PLAYER_STATE_STARTED = 2,
38 PLAYER_STATE_PAUSED = 3,
39 PLAYER_STATE_STOPPED = 4,
Oscar Azucenafae808f2020-12-22 20:40:07 +000040 PLAYER_UPDATE_DEVICE_ID = 5,
Jean-Michel Trivi63189322017-01-05 18:05:28 -080041} player_state_t;
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080042
Mikhail Naganovdecb6292019-04-10 16:49:02 -070043// must be kept in sync with definitions in AudioManager.java
44#define RECORD_RIID_INVALID -1
45
46typedef enum {
47 RECORDER_STATE_UNKNOWN = -1,
48 RECORDER_STATE_STARTED = 0,
49 RECORDER_STATE_STOPPED = 1,
50} recorder_state_t;
51
Jean-Michel Trivi0008a482016-12-26 15:58:24 -080052}; // namespace android
53
54#endif // ANDROID_AUDIOMANAGER_H