LeviLamina
Loading...
Searching...
No Matches
SoundEngine Class Reference
Inheritance diagram for SoundEngine:

Public Types

enum class  MusicVolumeSource : uint64 {
  CurrentTrack = 0 , Option = 1 , MusicCommand = 2 , BiomeDuck = 3 ,
  JukeboxDuck = 4 , Count = 5
}
enum class  MusicVolumeSource : uint64 {
  CurrentTrack = 0 , Option = 1 , MusicCommand = 2 , BiomeDuck = 3 ,
  JukeboxDuck = 4 , Count = 5
}
using SoundEventQueue = ::std::vector<::std::pair<::std::string, ::std::shared_ptr<::SoundEvent>>>
using ListenerStatesSpan = ::gsl::span<::std::pair<int, ::ListenerState>>

Public Member Functions

virtual void pauseMusic (bool state)
virtual uint64 play (::std::string const &name, ::Vec3 const &pos, float volume, float pitch, ::std::optional<::ServerSoundHandle > serverSoundHandle)
virtual uint64 play (::PlaySoundOptions options)
virtual void stop (::std::string const &name)
virtual void stop (uint64 handle)
virtual void stop (::ServerSoundHandle serverSoundHandle)
virtual void setVolume (::ServerSoundHandle serverSoundHandle, float volume)
virtual void setPitch (::ServerSoundHandle serverSoundHandle, float pitch)
virtual void fade (::ServerSoundHandle serverSoundHandle, float duration, float targetVolume)
virtual void setPlaybackPosition (::ServerSoundHandle serverSoundHandle, float seconds)
virtual void pause (::ServerSoundHandle serverSoundHandle, ::SoundPauseSource source)
virtual void resume (::ServerSoundHandle serverSoundHandle, ::SoundPauseSource source)
virtual void stopAllSounds ()
virtual void pauseAllPlayingSounds (::SoundPauseSource source)
virtual void resumeAllPreviouslyPlayingSounds (::SoundPauseSource source)
virtual ::std::optional<::std::string > getSubtitle (::std::string const &name) const
virtual uint64 playUI (::std::string const &name, float volume, float pitch)
virtual void playMusic (::std::string const &eventName, float volume, uint &playlistIndex)
virtual void playMusic (::std::string const &eventName, float volume)
virtual bool isLoadingMusic () const
virtual bool isPlayingMusicEvent (::std::string const &eventName) const
virtual bool isPlayingMusic (::Core::PathView soundPath) const
virtual void fadeToStopMusic (float fadeSeconds)
virtual void setMusicCommandVolumeMultiplier (float volumeMultiplier)
virtual void fadeOut (uint64 handle, float duration)
virtual void stopMusic ()
virtual uint64 registerLoop (::std::string const &name, ::std::function< void(::LoopingSoundState &)> getSoundState, float fadeInDuration, float fadeOutDuration)
virtual void unregisterLoop (uint64 handle, bool hard)
virtual bool isPlayingSound (uint64 handle) const
virtual bool isPlayingSound (::Core::Path const &soundName) const
virtual bool isPlayingSound (::ServerSoundHandle serverSoundHandle) const
virtual uint64 playAttached (::std::string const &eventName, ::std::function< void(::SoundInstanceProperties &)> &&getSoundProperties)
virtual bool getItem (::std::string const &eventName, ::Core::PathView soundPath, ::SoundItem &soundItem) const
virtual ::Core::PathBuffer<::std::string > const & getCurrentlyPlayingMusicPath ()
virtual void displaySoundEngineStats (::std::string &debugOutputFormat) const
virtual ::std::optional<::PlayingSoundAttributestryGetPlayingSoundAttributes (uint64 handle) const
virtual ::std::optional<::LoopingSoundAttributestryGetLoopingSoundAttributes (uint64 handle) const
MCAPI void _loadSoundEvents (::std::vector<::std::pair<::std::string, ::std::shared_ptr<::SoundEvent > > > &soundEvents, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > validator)
MCAPI bool _tryPlayMusicFromStreamingExperiment (::std::string const &eventName, ::SoundItem const &soundItem, float volume)
MCAPI void load (bool, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > validator, ::std::shared_ptr<::std::vector<::Bedrock::Resources::PreloadedPathHandle > > preloadHandles)
MCAPI uint64 playFromMemory (::Core::Path const &soundName, char const *data, uint64 dataSize, bool is3D, float minDistance, float maxDistance, float volume, float pitch, bool useLegacyMaxDistance, bool isTTS)
MCAPI void registerPauseManagerCallback (::Bedrock::PubSub::Connector< void(bool)> &connector)
MCAPI void setOptions (::std::shared_ptr<::IReadWriteOptions > options)
MCAPI void setTTSClient (::std::shared_ptr<::TextToSpeechClient > ttsClient)
MCAPI void update (::gsl::span<::std::pair< int, ::ListenerState > > listenerStates, float elapsedTime)
MCAPI void $pauseMusic (bool state)
MCAPI uint64 $play (::std::string const &name, ::Vec3 const &pos, float volume, float pitch, ::std::optional<::ServerSoundHandle > serverSoundHandle)
MCAPI uint64 $play (::PlaySoundOptions options)
MCAPI void $stop (::std::string const &name)
MCAPI void $stop (uint64 handle)
MCAPI void $stop (::ServerSoundHandle serverSoundHandle)
MCAPI void $setVolume (::ServerSoundHandle serverSoundHandle, float volume)
MCAPI void $setPitch (::ServerSoundHandle serverSoundHandle, float pitch)
MCAPI void $fade (::ServerSoundHandle serverSoundHandle, float duration, float targetVolume)
MCAPI void $setPlaybackPosition (::ServerSoundHandle serverSoundHandle, float seconds)
MCAPI void $pause (::ServerSoundHandle serverSoundHandle, ::SoundPauseSource source)
MCAPI void $resume (::ServerSoundHandle serverSoundHandle, ::SoundPauseSource source)
MCAPI void $stopAllSounds ()
MCAPI void $pauseAllPlayingSounds (::SoundPauseSource source)
MCAPI void $resumeAllPreviouslyPlayingSounds (::SoundPauseSource source)
MCAPI ::std::optional<::std::string > $getSubtitle (::std::string const &name) const
MCAPI uint64 $playUI (::std::string const &name, float volume, float pitch)
MCAPI void $playMusic (::std::string const &eventName, float volume, uint &playlistIndex)
MCAPI void $playMusic (::std::string const &eventName, float volume)
MCAPI bool $isLoadingMusic () const
MCAPI bool $isPlayingMusicEvent (::std::string const &eventName) const
MCAPI bool $isPlayingMusic (::Core::PathView soundPath) const
MCAPI void $fadeToStopMusic (float fadeSeconds)
MCAPI void $setMusicCommandVolumeMultiplier (float volumeMultiplier)
MCAPI void $fadeOut (uint64 handle, float duration)
MCAPI void $stopMusic ()
MCAPI uint64 $registerLoop (::std::string const &name, ::std::function< void(::LoopingSoundState &)> getSoundState, float fadeInDuration, float fadeOutDuration)
MCAPI void $unregisterLoop (uint64 handle, bool hard)
MCAPI bool $isPlayingSound (uint64 handle) const
MCAPI bool $isPlayingSound (::Core::Path const &soundName) const
MCAPI bool $isPlayingSound (::ServerSoundHandle serverSoundHandle) const
MCAPI uint64 $playAttached (::std::string const &eventName, ::std::function< void(::SoundInstanceProperties &)> &&getSoundProperties)
MCAPI bool $getItem (::std::string const &eventName, ::Core::PathView soundPath, ::SoundItem &soundItem) const
MCAPI ::Core::PathBuffer<::std::string > const & $getCurrentlyPlayingMusicPath ()
MCAPI void $displaySoundEngineStats (::std::string &debugOutputFormat) const
MCAPI ::std::optional<::PlayingSoundAttributes$tryGetPlayingSoundAttributes (uint64 handle) const
MCAPI ::std::optional<::LoopingSoundAttributes$tryGetLoopingSoundAttributes (uint64 handle) const
MCFOLD void $dtor ()

Static Public Member Functions

static MCAPI void ** $vftable ()

Public Attributes

::ll::TypedStorage< 8, 8, ::gsl::not_null<::std::unique_ptr<::SoundSystemBase > > const > mSoundSystem
::ll::TypedStorage< 8, 64, ::std::unordered_set< uint64 > > mFrameUniqueSoundSet
::ll::TypedStorage< 8, 144, ::SoundEventRepositorymSoundEventRepository
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::IReadWriteOptions > > mOptions
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::TextToSpeechClient > > mTTSClient
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmMainVolumeOptionSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmSoundVolumeOptionSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmMusicVolumeOptionSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmTextToSpeechVolumeOptionSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmOnPauseStateChangeSubscription
::ll::TypedStorage< 8, 24, ::std::vector<::Bedrock::PubSub::Subscription > > mSoundCategoryVolumeOptionSubscriptions
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::ResourcePackManager > > mResourceManager
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > > mLinkedAssetValidator
::ll::TypedStorage< 4, 140, ::VolumeMultipliers< 5 > > mMusicVolumeMultipliers
::ll::TypedStorage< 4, 4, float > mMainVolume
::ll::TypedStorage< 4, 4, float > mTTSVolume
::ll::TypedStorage< 1, 1, bool > mMuted
::ll::TypedStorage< 1, 1, bool > mFadeToStopMusic
::ll::TypedStorage< 8, 392, ::SoundMappingmSounds
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Audio::OnlineAudioStreamManager > > mOnlineStreamManager
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::StreamingAudioExperiment > const > mStreamingExperiment
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::Core::FileSystem > > mFileSystem
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::IFileAccess > > mFileAccess
::ll::TypedStorage< 8, 32, ::Core::PathBuffer<::std::string > > mDataPath
::ll::TypedStorage< 8, 8, ::std::shared_mutex > mResourceLoadManagerMutex
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::ResourceLoadManager > > mResourceLoadManager
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlockmControlBlock

Member Function Documentation

◆ pauseMusic()

virtual void SoundEngine::pauseMusic ( bool state)
virtual

Implements SoundPlayerInterface.

◆ play() [1/2]

virtual uint64 SoundEngine::play ( ::std::string const & name,
::Vec3 const & pos,
float volume,
float pitch,
::std::optional<::ServerSoundHandle > serverSoundHandle )
virtual

Implements SoundPlayerInterface.

◆ play() [2/2]

virtual uint64 SoundEngine::play ( ::PlaySoundOptions options)
virtual

Implements SoundPlayerInterface.

◆ stop() [1/3]

virtual void SoundEngine::stop ( ::std::string const & name)
virtual

Implements SoundPlayerInterface.

◆ stop() [2/3]

virtual void SoundEngine::stop ( uint64 handle)
virtual

Implements SoundPlayerInterface.

◆ stop() [3/3]

virtual void SoundEngine::stop ( ::ServerSoundHandle serverSoundHandle)
virtual

Implements SoundPlayerInterface.

◆ setVolume()

virtual void SoundEngine::setVolume ( ::ServerSoundHandle serverSoundHandle,
float volume )
virtual

Implements SoundPlayerInterface.

◆ setPitch()

virtual void SoundEngine::setPitch ( ::ServerSoundHandle serverSoundHandle,
float pitch )
virtual

Implements SoundPlayerInterface.

◆ fade()

virtual void SoundEngine::fade ( ::ServerSoundHandle serverSoundHandle,
float duration,
float targetVolume )
virtual

Implements SoundPlayerInterface.

◆ setPlaybackPosition()

virtual void SoundEngine::setPlaybackPosition ( ::ServerSoundHandle serverSoundHandle,
float seconds )
virtual

Implements SoundPlayerInterface.

◆ pause()

virtual void SoundEngine::pause ( ::ServerSoundHandle serverSoundHandle,
::SoundPauseSource source )
virtual

Implements SoundPlayerInterface.

◆ resume()

virtual void SoundEngine::resume ( ::ServerSoundHandle serverSoundHandle,
::SoundPauseSource source )
virtual

Implements SoundPlayerInterface.

◆ stopAllSounds()

virtual void SoundEngine::stopAllSounds ( )
virtual

Implements SoundPlayerInterface.

◆ pauseAllPlayingSounds()

virtual void SoundEngine::pauseAllPlayingSounds ( ::SoundPauseSource source)
virtual

Implements SoundPlayerInterface.

◆ resumeAllPreviouslyPlayingSounds()

virtual void SoundEngine::resumeAllPreviouslyPlayingSounds ( ::SoundPauseSource source)
virtual

Implements SoundPlayerInterface.

◆ getSubtitle()

virtual ::std::optional<::std::string > SoundEngine::getSubtitle ( ::std::string const & name) const
virtual

Implements SoundPlayerInterface.

◆ playUI()

virtual uint64 SoundEngine::playUI ( ::std::string const & name,
float volume,
float pitch )
virtual

Implements SoundPlayerInterface.

◆ playMusic() [1/2]

virtual void SoundEngine::playMusic ( ::std::string const & eventName,
float volume,
uint & playlistIndex )
virtual

Implements SoundPlayerInterface.

◆ playMusic() [2/2]

virtual void SoundEngine::playMusic ( ::std::string const & eventName,
float volume )
virtual

Implements SoundPlayerInterface.

◆ isLoadingMusic()

virtual bool SoundEngine::isLoadingMusic ( ) const
virtual

Implements SoundPlayerInterface.

◆ isPlayingMusicEvent()

virtual bool SoundEngine::isPlayingMusicEvent ( ::std::string const & eventName) const
virtual

Implements SoundPlayerInterface.

◆ isPlayingMusic()

virtual bool SoundEngine::isPlayingMusic ( ::Core::PathView soundPath) const
virtual

Implements SoundPlayerInterface.

◆ fadeToStopMusic()

virtual void SoundEngine::fadeToStopMusic ( float fadeSeconds)
virtual

Implements SoundPlayerInterface.

◆ setMusicCommandVolumeMultiplier()

virtual void SoundEngine::setMusicCommandVolumeMultiplier ( float volumeMultiplier)
virtual

Implements SoundPlayerInterface.

◆ fadeOut()

virtual void SoundEngine::fadeOut ( uint64 handle,
float duration )
virtual

Implements SoundPlayerInterface.

◆ stopMusic()

virtual void SoundEngine::stopMusic ( )
virtual

Implements SoundPlayerInterface.

◆ registerLoop()

virtual uint64 SoundEngine::registerLoop ( ::std::string const & name,
::std::function< void(::LoopingSoundState &)> getSoundState,
float fadeInDuration,
float fadeOutDuration )
virtual

Implements SoundPlayerInterface.

◆ unregisterLoop()

virtual void SoundEngine::unregisterLoop ( uint64 handle,
bool hard )
virtual

Implements SoundPlayerInterface.

◆ isPlayingSound() [1/3]

virtual bool SoundEngine::isPlayingSound ( uint64 handle) const
virtual

Implements SoundPlayerInterface.

◆ isPlayingSound() [2/3]

virtual bool SoundEngine::isPlayingSound ( ::Core::Path const & soundName) const
virtual

Implements SoundPlayerInterface.

◆ isPlayingSound() [3/3]

virtual bool SoundEngine::isPlayingSound ( ::ServerSoundHandle serverSoundHandle) const
virtual

Implements SoundPlayerInterface.

◆ playAttached()

virtual uint64 SoundEngine::playAttached ( ::std::string const & eventName,
::std::function< void(::SoundInstanceProperties &)> && getSoundProperties )
virtual

Implements SoundPlayerInterface.

◆ getItem()

virtual bool SoundEngine::getItem ( ::std::string const & eventName,
::Core::PathView soundPath,
::SoundItem & soundItem ) const
virtual

Implements SoundPlayerInterface.

◆ getCurrentlyPlayingMusicPath()

virtual ::Core::PathBuffer<::std::string > const & SoundEngine::getCurrentlyPlayingMusicPath ( )
virtual

Implements SoundPlayerInterface.

◆ tryGetPlayingSoundAttributes()

virtual ::std::optional<::PlayingSoundAttributes > SoundEngine::tryGetPlayingSoundAttributes ( uint64 handle) const
virtual

Implements SoundPlayerInterface.

◆ tryGetLoopingSoundAttributes()

virtual ::std::optional<::LoopingSoundAttributes > SoundEngine::tryGetLoopingSoundAttributes ( uint64 handle) const
virtual

Implements SoundPlayerInterface.

◆ $vftable()

MCAPI void ** Bedrock::EnableNonOwnerReferences::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following files: