54 ::ll::TypedStorage<8, 176, ::LevelSoundEventPacket> mPacket;
55 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkIdentifierWithSubId>> mNetworkIds;
63 ::ll::TypedStorage<8, 176, ::LevelSoundEventPacket> mPacket;
71 ::ll::TypedStorage<8, 176, ::LevelSoundEventPacket> mPacket;
72 ::ll::TypedStorage<8, 184, ::NetworkIdentifierWithSubId> mNetworkId;
80 ::ll::TypedStorage<8, 176, ::LevelSoundEventPacket> mPacket;
84 using QueuedSoundPacket = ::std::variant<
93 ::ll::TypedStorage<8, 64, ::ServerSoundDefinitionRegistry> mServerSoundDefinitionRegistry;
94 ::ll::TypedStorage<8, 200, ::ServerSoundInstanceManager> mServerSoundInstanceManager;
95 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SoundPlayerInterface>> mSoundPlayer;
96 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::PacketSender>> mLevelPacketSender;
97 ::ll::TypedStorage<1, 1, bool> mIsClientSide;
98 ::ll::TypedStorage<1, 1, bool> mServerAuthSoundEnabled;
99 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator>
const> mLevelEventCoordinator;
103 ::std::vector<::std::variant<
121 mOnLevelSoundEventWithVolumeAndPitch;
126 mOnStopLevelSoundEvent;
128 mOnStopAllLevelSoundsEvent;
136 mOnRecordStartedEvent;
141 mOnRecordStoppedEvent;
142 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnPlayerDisconnectedSubscription;
143 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnPlayerConnectedSubscription;
144 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnPlayerLeftDimensionSubscription;
154 virtual ::Bedrock::PubSub::Connector<
156 getOnLevelSoundEventConnector() ;
159 getOnLevelSoundEventWithVolumeAndPitchConnector() ;
161 virtual ::Bedrock::PubSub::Connector<void(::std::string
const&)>& getOnStopLevelSoundEventConnector() ;
163 virtual ::Bedrock::PubSub::Connector<void()>& getOnStopAllLevelSoundsEventConnector() ;
165 virtual ::Bedrock::PubSub::Connector<void()>& getOnStopMusicEventConnector() ;
171 MCAPI LevelSoundManager(
172 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface> soundPlayer,
174 ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator> levelEventCoordinator,
175 ::Bedrock::NotNullNonOwnerPtr<::PacketSender> packetSender,
176 bool isServerAuthSoundEnabled
179 MCAPI
void _queueSoundPacket(
190 MCAPI
void broadcastSoundEvent(
198 ::std::optional<::Vec3>
const& fireAtPosition
201 MCAPI
void broadcastSoundEvent(
203 ::SharedTypes::Legacy::LevelSoundEvent type,
209 ::std::optional<::Vec3>
const& fireAtPosition
212 MCAPI ::std::optional<::ServerSoundInstance> createServerSoundInstance(
213 ::std::string
const& soundEventName,
215 ::std::optional<::NetworkIdentifierWithSubId> recipient,
216 ::std::optional<::BroadcastOptions> broadcast
223 MCAPI
void onViewRegionMoved(
230 MCAPI
void playPredictiveSynchronizedSound(
238 ::std::optional<::Vec3>
const& fireAtPosition
241 MCAPI
void playPredictiveSynchronizedSound(
243 ::SharedTypes::Legacy::LevelSoundEvent type,
249 ::std::optional<::Vec3>
const& fireAtPosition
252 MCAPI
void playSound(::SharedTypes::Legacy::LevelSoundEvent type,
::Vec3 const& pos,
float volume,
float pitch);
254 MCAPI
void playSound(
255 ::SharedTypes::Legacy::LevelSoundEvent type,
262 MCAPI
void playSoundForPlayerInDimension(
264 ::SharedTypes::Legacy::LevelSoundEvent type,
272 MCAPI
void playSynchronizedSound_DEPRECATED(
274 ::SharedTypes::Legacy::LevelSoundEvent type,
280 ::std::optional<::Vec3>
const& fireAtPosition
283 MCAPI
void processQueuedSoundPackets();
285 MCAPI
void sendRecordStarted(
286 ::std::vector<::NetworkIdentifierWithSubId>
const& recipients,
300 ::Bedrock::NotNullNonOwnerPtr<::SoundPlayerInterface> soundPlayer,
302 ::Bedrock::NotNullNonOwnerPtr<::LevelEventCoordinator> levelEventCoordinator,
303 ::Bedrock::NotNullNonOwnerPtr<::PacketSender> packetSender,
304 bool isServerAuthSoundEnabled
311 MCAPI ::Bedrock::PubSub::Connector<
313 $getOnLevelSoundEventConnector();
316 $getOnLevelSoundEventWithVolumeAndPitchConnector();
318 MCAPI ::Bedrock::PubSub::Connector<void(::std::string
const&)>& $getOnStopLevelSoundEventConnector();
320 MCFOLD ::Bedrock::PubSub::Connector<void()>& $getOnStopAllLevelSoundsEventConnector();
322 MCAPI ::Bedrock::PubSub::Connector<void()>& $getOnStopMusicEventConnector();