AAX SDK  2.4.1
Avid Audio Extensions Development Kit
AAX_TransportTypes.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2020-2021 by Avid Technology, Inc.
5  * All rights reserved.
6  *
7  * CONFIDENTIAL: This document contains confidential information. Do not
8  * read or examine this document unless you are an Avid Technology employee
9  * or have signed a non-disclosure agreement with Avid Technology which protects
10  * the confidentiality of this document. DO NOT DISCLOSE ANY INFORMATION
11  * CONTAINED IN THIS DOCUMENT TO ANY THIRD-PARTY WITHOUT THE PRIOR WRITTEN CONSENT
12  * OF Avid Technology, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 #ifndef AAX_TransportTypes_h_
25 #define AAX_TransportTypes_h_
26 #pragma once
27 
28 // AAX Includes
29 #include "AAX.h"
30 
31 // Standard Library Includes
32 #include <string>
33 #include <sstream>
34 
35 #include AAX_ALIGN_FILE_BEGIN
36 #include AAX_ALIGN_FILE_HOST
37 #include AAX_ALIGN_FILE_END
38 
43 {
49 
53  mIsRecordEnabled(false),
54  mIsRecording(false),
55  mIsLoopEnabled(false)
56  {
57  static_assert(sizeof(AAX_TransportStateInfo_V1) == 12, "Invalid size of AAX_TransportStateInfo_V1 struct during compilation!");
58  }
59 
60  inline std::string ToString() const
61  {
62  std::stringstream ss;
63 
64  ss << "{" << std::endl;
65  ss << "\"transport_state\": " << mTransportState << "," << std::endl;
66  ss << "\"record_mode\": " << mRecordMode << "," << std::endl;
67  ss << "\"is_record_enabled\": " << mIsRecordEnabled << "," << std::endl;
68  ss << "\"is_recording\": " << mIsRecording << "," << std::endl;
69  ss << "\"is_loop_enabled\": " << mIsLoopEnabled << std::endl;
70  ss << "}";
71 
72  return ss.str();
73  }
74 };
75 
76 #include AAX_ALIGN_FILE_BEGIN
77 #include AAX_ALIGN_FILE_RESET
78 #include AAX_ALIGN_FILE_END
79 
80 inline bool operator==(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
81 {
82  return (state1.mTransportState == state2.mTransportState) && (state1.mRecordMode == state2.mRecordMode) &&
83  (state1.mIsRecordEnabled == state2.mIsRecordEnabled) && (state1.mIsRecording == state2.mIsRecording) &&
84  (state1.mIsLoopEnabled == state2.mIsLoopEnabled);
85 }
86 
87 inline bool operator!=(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
88 {
89  return !(state1 == state2);
90 }
91 
92 #endif // #ifndef AAX_TransportTypes_h_
Various utility definitions for AAX.
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:329
AAX_ERecordMode
Used to indicate the current record mode of the host. This is the global record mode; it does not ind...
Definition: AAX_Enums.h:1350
@ AAX_eRecordMode_Unknown
Definition: AAX_Enums.h:1351
AAX_ETransportState
Used to indicate the current transport state of the host. This is the global transport state; it does...
Definition: AAX_Enums.h:1331
@ AAX_eTransportState_Unknown
Definition: AAX_Enums.h:1332
bool operator==(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:80
bool operator!=(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:87
Definition: AAX_TransportTypes.h:43
std::string ToString() const
Definition: AAX_TransportTypes.h:60
AAX_CBoolean mIsRecordEnabled
Definition: AAX_TransportTypes.h:46
AAX_CBoolean mIsRecording
Definition: AAX_TransportTypes.h:47
AAX_TransportStateInfo_V1()
Definition: AAX_TransportTypes.h:50
AAX_ETransportState mTransportState
Definition: AAX_TransportTypes.h:44
AAX_ERecordMode mRecordMode
Definition: AAX_TransportTypes.h:45
AAX_CBoolean mIsLoopEnabled
Definition: AAX_TransportTypes.h:48