AAX SDK 2.8.0
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-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
32/*================================================================================================*/
33
34#ifndef AAX_TransportTypes_h_
35#define AAX_TransportTypes_h_
36#pragma once
37
38// AAX Includes
39#include "AAX.h"
40
41// Standard Library Includes
42#include <string>
43#include <sstream>
44
45#include AAX_ALIGN_FILE_BEGIN
46#include AAX_ALIGN_FILE_HOST
47#include AAX_ALIGN_FILE_END
48
53{
59
63 mIsRecordEnabled(false),
64 mIsRecording(false),
65 mIsLoopEnabled(false)
66 {
67 static_assert(sizeof(AAX_TransportStateInfo_V1) == 12, "Invalid size of AAX_TransportStateInfo_V1 struct during compilation!");
68 }
69
70 inline std::string ToString() const
71 {
72 std::stringstream ss;
73
74 ss << "{" << std::endl;
75 ss << "\"transport_state\": " << mTransportState << "," << std::endl;
76 ss << "\"record_mode\": " << mRecordMode << "," << std::endl;
77 ss << "\"is_record_enabled\": " << mIsRecordEnabled << "," << std::endl;
78 ss << "\"is_recording\": " << mIsRecording << "," << std::endl;
79 ss << "\"is_loop_enabled\": " << mIsLoopEnabled << std::endl;
80 ss << "}";
81
82 return ss.str();
83 }
84};
85
86#include AAX_ALIGN_FILE_BEGIN
87#include AAX_ALIGN_FILE_RESET
88#include AAX_ALIGN_FILE_END
89
90inline bool operator==(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
91{
92 return (state1.mTransportState == state2.mTransportState) && (state1.mRecordMode == state2.mRecordMode) &&
93 (state1.mIsRecordEnabled == state2.mIsRecordEnabled) && (state1.mIsRecording == state2.mIsRecording) &&
94 (state1.mIsLoopEnabled == state2.mIsLoopEnabled);
95}
96
97inline bool operator!=(const AAX_TransportStateInfo_V1& state1, const AAX_TransportStateInfo_V1& state2)
98{
99 return !(state1 == state2);
100}
101
102#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:1417
@ AAX_eRecordMode_Unknown
Definition: AAX_Enums.h:1418
AAX_ETransportState
Used to indicate the current transport state of the host. This is the global transport state; it does...
Definition: AAX_Enums.h:1398
@ AAX_eTransportState_Unknown
Definition: AAX_Enums.h:1399
Various utility definitions for AAX.
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:339
bool operator==(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:90
bool operator!=(const AAX_TransportStateInfo_V1 &state1, const AAX_TransportStateInfo_V1 &state2)
Definition: AAX_TransportTypes.h:97
Definition: AAX_TransportTypes.h:53
std::string ToString() const
Definition: AAX_TransportTypes.h:70
AAX_CBoolean mIsRecordEnabled
Definition: AAX_TransportTypes.h:56
AAX_CBoolean mIsRecording
Definition: AAX_TransportTypes.h:57
AAX_TransportStateInfo_V1()
Definition: AAX_TransportTypes.h:60
AAX_ETransportState mTransportState
Definition: AAX_TransportTypes.h:54
AAX_ERecordMode mRecordMode
Definition: AAX_TransportTypes.h:55
AAX_CBoolean mIsLoopEnabled
Definition: AAX_TransportTypes.h:58