AAX SDK 2.6.1
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_TransportTypes.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2020-2021, 2023 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * CONFIDENTIAL: this document contains confidential information of Avid. Do
8 * not disclose to any third party. Use of the information contained in this
9 * document is subject to an Avid SDK license.
10 *
11 */
12
19/*================================================================================================*/
20
21#ifndef AAX_TransportTypes_h_
22#define AAX_TransportTypes_h_
23#pragma once
24
25// AAX Includes
26#include "AAX.h"
27
28// Standard Library Includes
29#include <string>
30#include <sstream>
31
32#include AAX_ALIGN_FILE_BEGIN
33#include AAX_ALIGN_FILE_HOST
34#include AAX_ALIGN_FILE_END
35
40{
46
50 mIsRecordEnabled(false),
51 mIsRecording(false),
52 mIsLoopEnabled(false)
53 {
54 static_assert(sizeof(AAX_TransportStateInfo_V1) == 12, "Invalid size of AAX_TransportStateInfo_V1 struct during compilation!");
55 }
56
57 inline std::string ToString() const
58 {
59 std::stringstream ss;
60
61 ss << "{" << std::endl;
62 ss << "\"transport_state\": " << mTransportState << "," << std::endl;
63 ss << "\"record_mode\": " << mRecordMode << "," << std::endl;
64 ss << "\"is_record_enabled\": " << mIsRecordEnabled << "," << std::endl;
65 ss << "\"is_recording\": " << mIsRecording << "," << std::endl;
66 ss << "\"is_loop_enabled\": " << mIsLoopEnabled << std::endl;
67 ss << "}";
68
69 return ss.str();
70 }
71};
72
73#include AAX_ALIGN_FILE_BEGIN
74#include AAX_ALIGN_FILE_RESET
75#include AAX_ALIGN_FILE_END
76
77inline bool operator==(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
78{
79 return (state1.mTransportState == state2.mTransportState) && (state1.mRecordMode == state2.mRecordMode) &&
80 (state1.mIsRecordEnabled == state2.mIsRecordEnabled) && (state1.mIsRecording == state2.mIsRecording) &&
81 (state1.mIsLoopEnabled == state2.mIsLoopEnabled);
82}
83
84inline bool operator!=(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
85{
86 return !(state1 == state2);
87}
88
89#endif // #ifndef AAX_TransportTypes_h_
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:1371
@ AAX_eRecordMode_Unknown
Definition: AAX_Enums.h:1372
AAX_ETransportState
Used to indicate the current transport state of the host. This is the global transport state; it does...
Definition: AAX_Enums.h:1352
@ AAX_eTransportState_Unknown
Definition: AAX_Enums.h:1353
Various utility definitions for AAX.
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:326
bool operator==(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:77
bool operator!=(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:84
Definition: AAX_TransportTypes.h:40
std::string ToString() const
Definition: AAX_TransportTypes.h:57
AAX_CBoolean mIsRecordEnabled
Definition: AAX_TransportTypes.h:43
AAX_CBoolean mIsRecording
Definition: AAX_TransportTypes.h:44
AAX_TransportStateInfo_V1()
Definition: AAX_TransportTypes.h:47
AAX_ETransportState mTransportState
Definition: AAX_TransportTypes.h:41
AAX_ERecordMode mRecordMode
Definition: AAX_TransportTypes.h:42
AAX_CBoolean mIsLoopEnabled
Definition: AAX_TransportTypes.h:45