17#ifndef OBOE_DEFINITIONS_H
18#define OBOE_DEFINITIONS_H
31 constexpr int32_t kUnspecified = 0;
37 constexpr int64_t kNanosPerMicrosecond = 1000;
42 constexpr int64_t kNanosPerMillisecond = kNanosPerMicrosecond * 1000;
47 constexpr int64_t kMillisPerSecond = 1000;
52 constexpr int64_t kNanosPerSecond = kNanosPerMillisecond * kMillisPerSecond;
57 enum class StreamState : int32_t {
77 enum class Direction : int32_t {
93 enum class AudioFormat : int32_t {
195 enum class DataCallbackResult : int32_t {
207 enum class Result : int32_t {
210 ErrorDisconnected = -899,
211 ErrorIllegalArgument = -898,
212 ErrorInternal = -896,
213 ErrorInvalidState = -895,
214 ErrorInvalidHandle = -892,
215 ErrorUnimplemented = -890,
216 ErrorUnavailable = -889,
217 ErrorNoFreeHandles = -888,
218 ErrorNoMemory = -887,
221 ErrorWouldBlock = -884,
222 ErrorInvalidFormat = -883,
223 ErrorOutOfRange = -882,
224 ErrorNoService = -881,
225 ErrorInvalidRate = -880,
243 enum class SharingMode : int32_t {
268 enum class PerformanceMode : int32_t {
293 PowerSavingOffloaded = 13,
299 enum class AudioApi : int32_t {
303 Unspecified = kUnspecified,
324 enum class SampleRateConversionQuality : int32_t {
361 enum class Usage : int32_t {
370 VoiceCommunication = 2,
375 VoiceCommunicationSignalling = 3,
391 NotificationRingtone = 6,
396 NotificationEvent = 10,
401 AssistanceAccessibility = 11,
406 AssistanceNavigationGuidance = 12,
411 AssistanceSonification = 13,
437 enum ContentType : int32_t {
470 enum InputPreset : int32_t {
484 VoiceRecognition = 6,
489 VoiceCommunication = 7,
503 VoicePerformance = 10,
542 enum ChannelCount : int32_t {
546 Unspecified = kUnspecified,
573 enum class ChannelMask : uint32_t {
574 Unspecified = kUnspecified,
577 FrontCenter = 1 << 2,
578 LowFrequency = 1 << 3,
581 FrontLeftOfCenter = 1 << 6,
582 FrontRightOfCenter = 1 << 7,
587 TopFrontLeft = 1 << 12,
588 TopFrontCenter = 1 << 13,
589 TopFrontRight = 1 << 14,
590 TopBackLeft = 1 << 15,
591 TopBackCenter = 1 << 16,
592 TopBackRight = 1 << 17,
593 TopSideLeft = 1 << 18,
594 TopSideRight = 1 << 19,
595 BottomFrontLeft = 1 << 20,
596 BottomFrontCenter = 1 << 21,
597 BottomFrontRight = 1 << 22,
598 LowFrequency2 = 1 << 23,
599 FrontWideLeft = 1 << 24,
600 FrontWideRight = 1 << 25,
616 CM2Point1 = FrontLeft |
630 TriBack = FrontLeft |
637 CM3Point1 = FrontLeft |
645 CM2Point0Point2 = FrontLeft |
653 CM2Point1Point2 = CM2Point0Point2 |
659 CM3Point0Point2 = FrontLeft |
668 CM3Point1Point2 = CM3Point0Point2 |
682 QuadSide = FrontLeft |
690 Surround = FrontLeft |
704 CM5Point1 = FrontLeft |
714 CM5Point1Side = FrontLeft |
724 CM6Point1 = FrontLeft |
735 CM7Point1 = CM5Point1 |
742 CM5Point1Point2 = CM5Point1 |
749 CM5Point1Point4 = CM5Point1 |
758 CM7Point1Point2 = CM7Point1 |
765 CM7Point1Point4 = CM7Point1 |
774 CM9Point1Point4 = CM7Point1Point4 |
781 CM9Point1Point6 = CM9Point1Point4 |
788 FrontBack = FrontCenter |
808 enum class ChannelAcnMask : uint32_t {
809 Unspecified = kUnspecified,
882 CountMask = (1 << 8) - 1,
887 Order0Hrz = Horizontal | 1,
891 Order1Hrz = Horizontal | 3,
895 Order2Hrz = Horizontal | 5,
899 Order3Hrz = Horizontal | 7,
903 Order4Hrz = Horizontal | 9,
907 Order5Hrz = Horizontal | 11,
911 Order6Hrz = Horizontal | 13,
915 Order7Hrz = Horizontal | 15,
919 Order8Hrz = Horizontal | 17,
923 Order9Hrz = Horizontal | 19,
927 Order10Hrz = Horizontal | 21,
931 Order11Hrz = Horizontal | 23,
935 Order12Hrz = Horizontal | 25,
939 Order13Hrz = Horizontal | 27,
943 Order14Hrz = Horizontal | 29,
949 enum class SpatializationBehavior : int32_t {
954 Unspecified = kUnspecified,
976 enum class PrivacySensitiveMode : int32_t {
982 Unspecified = kUnspecified,
1003 enum class AllowedCapturePolicy : int32_t {
1008 Unspecified = kUnspecified,
1046 enum class DeviceType : int32_t {
1050 BuiltinEarpiece = 1,
1067 WiredHeadphones = 4,
1171 BuiltinSpeakerSafe = 24,
1212 enum class MMapPolicy : int32_t {
1216 Unspecified = kUnspecified,
1240 enum class FlushFromAccuracy : int32_t {
1257 enum class FallbackMode : int32_t {
1277 enum class StretchMode : int32_t {
1355 static bool areWorkaroundsEnabled() {
1356 return mWorkaroundsEnabled;
1365 mWorkaroundsEnabled = enabled;
1369 static bool mWorkaroundsEnabled;
Definition Definitions.h:1331
static int32_t SampleRate
Definition Definitions.h:1336
static int32_t FramesPerBurst
Definition Definitions.h:1338
static int32_t ChannelCount
Definition Definitions.h:1340
Definition Definitions.h:1352
static void setWorkaroundsEnabled(bool enabled)
Definition Definitions.h:1364
Definition Definitions.h:1347
Definition Definitions.h:1291
float pitch
Definition Definitions.h:1305
float speed
Definition Definitions.h:1310
FallbackMode fallbackMode
Definition Definitions.h:1295
StretchMode stretchMode
Definition Definitions.h:1299