| 1 |
/* |
| 2 |
* Copyright (C) 2017 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 |
syntax = "proto2"; |
| 18 |
option java_multiple_files = true; |
| 19 |
|
| 20 |
package android.media; |
| 21 |
|
| 22 |
import "frameworks/base/core/proto/android/privacy.proto"; |
| 23 |
|
| 24 |
/** |
| 25 |
* An android.media.AudioAttributes object. |
| 26 |
*/ |
| 27 |
message AudioAttributesProto { |
| 28 |
option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 29 |
|
| 30 |
optional Usage usage = 1; |
| 31 |
optional ContentType content_type = 2; |
| 32 |
// Bit representation of set flags. |
| 33 |
optional int32 flags = 3; |
| 34 |
repeated string tags = 4 [ (android.privacy).dest = DEST_EXPLICIT ]; |
| 35 |
} |
| 36 |
|
| 37 |
enum ContentType { |
| 38 |
// Content type value to use when the content type is unknown, or other than |
| 39 |
// the ones defined. |
| 40 |
CONTENT_TYPE_UNKNOWN = 0; |
| 41 |
// Content type value to use when the content type is speech. |
| 42 |
SPEECH = 1; |
| 43 |
// Content type value to use when the content type is music. |
| 44 |
MUSIC = 2; |
| 45 |
// Content type value to use when the content type is a soundtrack, |
| 46 |
// typically accompanying a movie or TV program. |
| 47 |
MOVIE = 3; |
| 48 |
// Content type value to use when the content type is a sound used to |
| 49 |
// accompany a user action, such as a beep or sound effect expressing a key |
| 50 |
// click, or event, such as the type of a sound for a bonus being received |
| 51 |
// in a game. These sounds are mostly synthesized or short Foley sounds. |
| 52 |
SONIFICATION = 4; |
| 53 |
} |
| 54 |
|
| 55 |
enum Usage { |
| 56 |
// Usage value to use when the usage is unknown. |
| 57 |
USAGE_UNKNOWN = 0; |
| 58 |
// Usage value to use when the usage is media, such as music, or movie |
| 59 |
// soundtracks. |
| 60 |
MEDIA = 1; |
| 61 |
// Usage value to use when the usage is voice communications, such as |
| 62 |
// telephony or VoIP. |
| 63 |
VOICE_COMMUNICATION = 2; |
| 64 |
// Usage value to use when the usage is in-call signalling, such as with a |
| 65 |
// "busy" beep, or DTMF tones. |
| 66 |
VOICE_COMMUNICATION_SIGNALLING = 3; |
| 67 |
// Usage value to use when the usage is an alarm (e.g. wake-up alarm). |
| 68 |
ALARM = 4; |
| 69 |
// Usage value to use when the usage is notification. Other notification |
| 70 |
// usages are for more specialized uses. |
| 71 |
NOTIFICATION = 5; |
| 72 |
// Usage value to use when the usage is telephony ringtone. |
| 73 |
NOTIFICATION_RINGTONE = 6; |
| 74 |
// Usage value to use when the usage is a request to enter/end a |
| 75 |
// communication, such as a VoIP communication or video-conference. |
| 76 |
NOTIFICATION_COMMUNICATION_REQUEST = 7; |
| 77 |
// Usage value to use when the usage is notification for an "instant" |
| 78 |
// communication such as a chat, or SMS. |
| 79 |
NOTIFICATION_COMMUNICATION_INSTANT = 8; |
| 80 |
// Usage value to use when the usage is notification for a non-immediate |
| 81 |
// type of communication such as e-mail. |
| 82 |
NOTIFICATION_COMMUNICATION_DELAYED = 9; |
| 83 |
// Usage value to use when the usage is to attract the user's attention, |
| 84 |
// such as a reminder or low battery warning. |
| 85 |
NOTIFICATION_EVENT = 10; |
| 86 |
// Usage value to use when the usage is for accessibility, such as with a |
| 87 |
// screen reader. |
| 88 |
ASSISTANCE_ACCESSIBILITY = 11; |
| 89 |
// Usage value to use when the usage is driving or navigation directions. |
| 90 |
ASSISTANCE_NAVIGATION_GUIDANCE = 12; |
| 91 |
// Usage value to use when the usage is sonification, such as with user |
| 92 |
// interface sounds. |
| 93 |
ASSISTANCE_SONIFICATION = 13; |
| 94 |
// Usage value to use when the usage is for game audio. |
| 95 |
GAME = 14; |
| 96 |
// Usage value to use when feeding audio to the platform and replacing |
| 97 |
// "traditional" audio source, such as audio capture devices. |
| 98 |
VIRTUAL_SOURCE = 15; |
| 99 |
// Usage value to use for audio responses to user queries, audio |
| 100 |
// instructions or help utterances. |
| 101 |
ASSISTANT = 16; |
| 102 |
} |