LeviLamina
Loading...
Searching...
No Matches
LevelSoundManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Connector.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
10#include "mc/network/NetworkIdentifierWithSubId.h"
11#include "mc/network/packet/LevelSoundEventPacket.h"
12#include "mc/world/level/ILevelSoundManagerConnector.h"
13#include "mc/world/level/ServerSoundInstanceManager.h"
14
15// auto generated forward declare list
16// clang-format off
18class IDimension;
20class PacketSender;
21class Player;
24class Vec3;
25namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
26// clang-format on
27
28class LevelSoundManager : public ::ILevelSoundManagerConnector {
29public:
30 // LevelSoundManager inner types declare
31 // clang-format off
36 // clang-format on
37
38 // LevelSoundManager inner types define
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<8, 136, ::LevelSoundEventPacket> mPacket;
44 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkIdentifierWithSubId>> mNetworkIds;
45 // NOLINTEND
46
47 public:
48 // member functions
49 // NOLINTBEGIN
51 // NOLINTEND
52
53 public:
54 // destructor thunk
55 // NOLINTBEGIN
56 MCAPI void $dtor();
57 // NOLINTEND
58 };
59
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<8, 136, ::LevelSoundEventPacket> mPacket;
65 // NOLINTEND
66
67 public:
68 // member functions
69 // NOLINTBEGIN
71 // NOLINTEND
72
73 public:
74 // destructor thunk
75 // NOLINTBEGIN
76 MCFOLD void $dtor();
77 // NOLINTEND
78 };
79
81 public:
82 // member variables
83 // NOLINTBEGIN
84 ::ll::TypedStorage<8, 136, ::LevelSoundEventPacket> mPacket;
85 ::ll::TypedStorage<8, 184, ::NetworkIdentifierWithSubId> mNetworkId;
86 // NOLINTEND
87
88 public:
89 // member functions
90 // NOLINTBEGIN
92 // NOLINTEND
93
94 public:
95 // destructor thunk
96 // NOLINTBEGIN
97 MCFOLD void $dtor();
98 // NOLINTEND
99 };
100
102 public:
103 // member variables
104 // NOLINTBEGIN
105 ::ll::TypedStorage<8, 136, ::LevelSoundEventPacket> mPacket;
106 // NOLINTEND
107
108 public:
109 // member functions
110 // NOLINTBEGIN
112 // NOLINTEND
113
114 public:
115 // destructor thunk
116 // NOLINTBEGIN
117 MCFOLD void $dtor();
118 // NOLINTEND
119 };
120
121 using QueuedSoundPacket = ::std::variant<
126
127public:
128 // member variables
129 // NOLINTBEGIN
130 ::ll::TypedStorage<8, 32, ::ServerSoundInstanceManager> mServerSoundInstanceManager;
131 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SoundPlayerInterface>> mSoundPlayer;
132 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::PacketSender>> mLevelPacketSender;
133 ::ll::TypedStorage<1, 1, bool> mIsClientSide;
134 ::ll::TypedStorage<1, 1, bool> mServerAuthSoundEnabled;
135 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator> const> mLevelEventCoordinator;
136 ::ll::TypedStorage<
137 8,
138 24,
139 ::std::vector<::std::variant<
144 mSoundPacketQueue;
145 ::ll::TypedStorage<
146 8,
147 128,
149 void(::SharedTypes::Legacy::LevelSoundEvent, ::Vec3 const&, int, ::ActorSoundIdentifier const&, bool),
151 0>>
152 mOnLevelSoundEvent;
153 ::ll::TypedStorage<
154 8,
155 128,
157 void(::std::string const&, ::Vec3 const&, float, float, ::std::optional<::ServerSoundHandle>),
159 0>>
160 mOnLevelSoundEventWithVolumeAndPitch;
161 ::ll::TypedStorage<
162 8,
163 128,
165 mOnStopLevelSoundEvent;
167 mOnStopAllLevelSoundsEvent;
169 mOnStopMusicEvent;
170 // NOLINTEND
171
172public:
173 // prevent constructor by default
174 LevelSoundManager();
175
176public:
177 // virtual functions
178 // NOLINTBEGIN
179 virtual ::Bedrock::PubSub::Connector<
180 void(::SharedTypes::Legacy::LevelSoundEvent, ::Vec3 const&, int, ::ActorSoundIdentifier const&, bool)>&
181 getOnLevelSoundEventConnector() /*override*/;
182
183 virtual ::Bedrock::PubSub::Connector<
184 void(::std::string const&, ::Vec3 const&, float, float, ::std::optional<::ServerSoundHandle>)>&
185 getOnLevelSoundEventWithVolumeAndPitchConnector() /*override*/;
186
187 virtual ::Bedrock::PubSub::Connector<void(::std::string const&)>& getOnStopLevelSoundEventConnector() /*override*/;
188
189 virtual ::Bedrock::PubSub::Connector<void()>& getOnStopAllLevelSoundsEventConnector() /*override*/;
190
191 virtual ::Bedrock::PubSub::Connector<void()>& getOnStopMusicEventConnector() /*override*/;
192 // NOLINTEND
193
194public:
195 // member functions
196 // NOLINTBEGIN
197 MCAPI LevelSoundManager(
198 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface> soundPlayer,
199 bool isClientSide,
200 ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator> levelEventCoordinator,
201 ::Bedrock::NotNullNonOwnerPtr<::PacketSender> packetSender,
202 bool isServerAuthSoundEnabled
203 );
204
205 MCAPI void broadcastSoundEvent(
206 ::IDimension& dimension,
207 ::SharedTypes::Legacy::LevelSoundEvent type,
208 ::Vec3 const& pos,
209 int data,
210 ::ActorSoundIdentifier const& actorSoundIdentifier,
211 bool isGlobal,
212 ::Player* primaryLocalPlayer,
213 ::std::optional<::Vec3> const& fireAtPosition
214 );
215
216 MCAPI void playPredictiveSynchronizedSound(
217 ::IDimension& dimension,
218 ::SharedTypes::Legacy::LevelSoundEvent type,
219 ::Vec3 const& pos,
220 ::Player* targetPlayer,
221 int data,
222 ::ActorSoundIdentifier const& actorSoundIdentifier,
223 bool isGlobal,
224 ::std::optional<::Vec3> const& fireAtPosition
225 );
226
227 MCAPI void playSynchronizedSound_DEPRECATED(
228 ::IDimension& dimension,
229 ::SharedTypes::Legacy::LevelSoundEvent type,
230 ::Vec3 const& pos,
231 ::Player* primaryLocalPlayer,
232 int data,
233 ::ActorSoundIdentifier const& actorSoundIdentifier,
234 bool isGlobal,
235 ::std::optional<::Vec3> const& fireAtPosition
236 );
237
238 MCAPI void processQueuedSoundPackets();
239 // NOLINTEND
240
241public:
242 // constructor thunks
243 // NOLINTBEGIN
244 MCAPI void* $ctor(
245 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface> soundPlayer,
246 bool isClientSide,
247 ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator> levelEventCoordinator,
248 ::Bedrock::NotNullNonOwnerPtr<::PacketSender> packetSender,
249 bool isServerAuthSoundEnabled
250 );
251 // NOLINTEND
252
253public:
254 // virtual function thunks
255 // NOLINTBEGIN
256 MCFOLD ::Bedrock::PubSub::Connector<
257 void(::SharedTypes::Legacy::LevelSoundEvent, ::Vec3 const&, int, ::ActorSoundIdentifier const&, bool)>&
258 $getOnLevelSoundEventConnector();
259
260 MCFOLD ::Bedrock::PubSub::Connector<
261 void(::std::string const&, ::Vec3 const&, float, float, ::std::optional<::ServerSoundHandle>)>&
262 $getOnLevelSoundEventWithVolumeAndPitchConnector();
263
264 MCFOLD ::Bedrock::PubSub::Connector<void(::std::string const&)>& $getOnStopLevelSoundEventConnector();
265
266 MCFOLD ::Bedrock::PubSub::Connector<void()>& $getOnStopAllLevelSoundsEventConnector();
267
268 MCAPI ::Bedrock::PubSub::Connector<void()>& $getOnStopMusicEventConnector();
269
270
271 // NOLINTEND
272
273public:
274 // vftables
275 // NOLINTBEGIN
276 MCNAPI static void** $vftable();
277 // NOLINTEND
278};
Definition ActorSoundIdentifier.h:17
Definition Publisher.h:8
Definition IDimension.h:24
Definition ILevelSoundManagerConnector.h:19
Definition LevelEventCoordinator.h:27
static MCAPI void ** $vftable()
Definition PacketSender.h:17
Definition Player.h:137
Definition ServerSoundHandle.h:5
Definition SoundPlayerInterface.h:22
Definition Vec3.h:10
Definition LevelSoundManager.h:60
Definition LevelSoundManager.h:101