版本

menu_open
Wwise SDK 2024.1.0
Notifications.h
浏览该文件的文档.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /**
28  * \brief Wwise Authoring Plug-ins - APIs for different host notifications.
29  * \file AK/Wwise/Plugin/Notifications.h
30  *
31  * These are notifications not fitting in the other host services. For every host service, there is usually
32  * a notification to tell your plug-in something changed and to update data.
33  *
34  * These are independent notifications, not linked on other services.
35  */
36 
37 #pragma once
38 
39 #include "PluginInfoGenerator.h"
40 
41 /**
42  * \brief API for Sound Engine's Monitor Data notification.
43  */
45 #ifdef __cplusplus
47 #endif
48 {
49 #ifndef __cplusplus
50  ak_wwise_plugin_base_interface m_baseInterface;
51 #endif
52 
53 #ifdef __cplusplus
54  /// Base instance type for receiving Sound Engine's monitoring data.
56 
59  {}
60 #endif
61 
62  /**
63  * \brief Received a new Monitor Data blob.
64  *
65  * Called when an instance of the run-time component of the plug-in sends data using
66  * \c AK::IAkEffectPluginContext::PostMonitorData(), and this plug-in's settings are being displayed
67  * in a window. Because multiple run-time instances may exist for a single authoring tool plug-in,
68  * the data is batched together and passed at the end of the frame.
69  *
70  * \param[in] in_this Current instance of this interface.
71  * \param[in] in_iTimeStamp Timestamp of the data (in milliseconds).
72  * \param[in] in_pMonitorDataArray Array of blobs of data.
73  * \param[in] in_uMonitorDataArraySize Number of elements in array 'in_pMonitorDataArray'.
74  * \param[in] in_bIsRealtime true if monitoring in real time, false if scrubbing through profiler history.
75  */
78  AkTimeMs in_iTimeStamp,
79  const AK::Wwise::Plugin::MonitorData * in_pMonitorDataArray,
80  unsigned int in_uMonitorDataArraySize,
81  bool in_bIsRealtime
82  );
83 };
84 
85 #define AK_WWISE_PLUGIN_NOTIFICATIONS_MONITOR_V1_ID() \
86  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_MONITOR, 1)
87 #define AK_WWISE_PLUGIN_NOTIFICATIONS_MONITOR_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
88 { \
89  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_NOTIFICATIONS_MONITOR_V1_ID(), in_pluginInfo, in_data) \
90 }
91 
92 
93 #ifdef __cplusplus
94 namespace AK::Wwise::Plugin
95 {
96  namespace V1
97  {
98  /// Notifications namespace
99  namespace Notifications
100  {
102 
103  /// \copydoc ak_wwise_plugin_notifications_monitor_v1
105  {
106  public:
107  /**
108  * \copydoc CMonitor::Instance
109  */
111 
112  /**
113  * \brief The interface type, as provided by this plug-in.
114  */
115  enum : InterfaceTypeValue
116  {
117  /**
118  * \brief The interface type, as provided by this plug-in.
119  */
121  };
122  /**
123  * \brief The interface version, as provided by this plug-in.
124  */
125  enum : InterfaceVersion
126  {
127  /**
128  * \brief The interface version, as provided by this plug-in.
129  */
131  };
132 
133  /**
134  * \brief The C interface, fulfilled by your plug-in.
135  */
136  struct Interface : public CMonitor
137  {
138  using Instance = Monitor;
140  {
143  AkTimeMs in_iTimeStamp,
144  const MonitorData * in_pMonitorDataArray,
145  unsigned int in_uMonitorDataArraySize,
146  bool in_bIsRealtime)
147  {
148  static_cast<Instance*>(in_this)->NotifyMonitorData(
149  in_iTimeStamp,
150  in_pMonitorDataArray,
151  in_uMonitorDataArraySize,
152  in_bIsRealtime);
153  };
154  }
155  };
156 
158  static Interface g_interface;
159  return &g_interface;
160  }
162  return this;
163  }
165  return this;
166  }
167 
169  CMonitor::Instance()
170  {
171  }
172 
173  virtual ~Monitor() {}
174 
175  /**
176  * \brief Received a new Monitor Data blob.
177  *
178  * Called when an instance of the run-time component of the plug-in sends data using
179  * \c AK::IAkEffectPluginContext::PostMonitorData(), and this plug-in's settings are being displayed
180  * in a window. Because multiple run-time instances may exist for a single authoring tool plug-in,
181  * the data is batched together and passed at the end of the frame.
182  *
183  * \param[in] in_iTimeStamp Timestamp of the data (in milliseconds).
184  * \param[in] in_pMonitorDataArray Array of blobs of data.
185  * \param[in] in_uMonitorDataArraySize Number of elements in array 'in_pMonitorDataArray'.
186  * \param[in] in_bIsRealtime true if monitoring in real time, false if scrubbing through profiler history.
187  */
188  virtual void NotifyMonitorData(
189  AkTimeMs in_iTimeStamp,
190  const MonitorData* in_pMonitorDataArray,
191  unsigned int in_uMonitorDataArraySize,
192  bool in_bIsRealtime
193  ) = 0;
194  };
195  } // of namespace Notifications
196  } // of namespace V1
197 
198  namespace Notifications
199  {
200  /// Latest version of the C Monitor notification interface.
202  /// Latest version of the C++ Monitor notification interface.
204  }
205 
208 } // of namespace AK::Wwise::Plugin
209 
210 #endif
AkInt32 AkTimeMs
Time in ms
Definition: AkTypes.h:56
V1::Notifications::Monitor Monitor
Latest version of the C++ Monitor notification interface.
void(* NotifyMonitorData)(struct ak_wwise_plugin_notifications_monitor_instance_v1 *in_this, AkTimeMs in_iTimeStamp, const AK::Wwise::Plugin::MonitorData *in_pMonitorDataArray, unsigned int in_uMonitorDataArraySize, bool in_bIsRealtime)
Received a new Monitor Data blob.
Definition: Notifications.h:76
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_MONITOR
2021.1 Monitor data notification. ak_wwise_plugin_notifications_monitor_v1
const CMonitor::Instance * GetInstancePointer() const
ak_wwise_plugin_notifications_monitor_v1 CMonitor
The C interface, fulfilled by your plug-in.
@ k_interfaceType
The interface type, as provided by this plug-in.
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
API for Sound Engine's Monitor Data notification.
Definition: Notifications.h:48
CInterfacePtr InterfacePtr
Definition: PluginDef.h:1057
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface
Base instance type for receiving Sound Engine's monitoring data.
Definition: PluginDef.h:847
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
API for Sound Engine's Monitor Data notification.
Interface description and base class for every Wwise Authoring plug-in interface.
virtual void NotifyMonitorData(AkTimeMs in_iTimeStamp, const MonitorData *in_pMonitorDataArray, unsigned int in_uMonitorDataArraySize, bool in_bIsRealtime)=0
Received a new Monitor Data blob.
@ k_interfaceVersion
The interface version, as provided by this plug-in.
ak_wwise_plugin_notifications_monitor_instance_v1 Instance
Base instance type for receiving Sound Engine's monitoring data.
Definition: Notifications.h:55
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅