LeviLamina
Loading...
Searching...
No Matches
SoundPlayerInterface.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8
9// auto generated forward declare list
10// clang-format off
12class Vec3;
17namespace Core { class Path; }
18namespace Core { class PathView; }
19class SoundItem;
20// clang-format on
21
23public:
24 // virtual functions
25 // NOLINTBEGIN
26 virtual ~SoundPlayerInterface() /*override*/ = default;
27
28 virtual uint64 play(
29 ::std::string const& name,
30 ::Vec3 const& pos,
31 float volume,
32 float pitch,
33 ::std::optional<::ServerSoundHandle> serverSoundHandle
34 ) = 0;
35
36 virtual uint64 playUI(::std::string const& name, float volume, float pitch) = 0;
37
38 virtual void playMusic(::std::string const& eventName, float volume, uint& playlistIndex) = 0;
39
40 virtual void playMusic(::std::string const& eventName, float volume) = 0;
41
42 virtual bool isLoadingMusic() const = 0;
43
44 virtual bool isPlayingMusicEvent(::std::string const& eventName) const = 0;
45
46 virtual bool isPlayingMusic(::Core::PathView soundName) const = 0;
47
48 virtual void fadeToStopMusic(float fadeSeconds) = 0;
49
50 virtual void setMusicCommandVolumeMultiplier(float volumeMultiplier) = 0;
51
52 virtual void fadeOut(uint64 handle, float duration) = 0;
53
54 virtual void stopMusic() = 0;
55
56 virtual void stop(::std::string const& name) = 0;
57
58 virtual void stop(uint64 handle) = 0;
59
60 virtual void stopAllSounds() = 0;
61
62 virtual void pauseAllPlayingSounds() = 0;
63
64 virtual void resumeAllPreviouslyPlayingSounds() = 0;
65
66 virtual void pauseMusic(bool state) = 0;
67
68 virtual ::Core::PathBuffer<::std::string> const getCurrentlyPlayingMusicName() = 0;
69
70 virtual bool getItem(::std::string const& eventName, ::Core::PathView soundName, ::SoundItem& soundItem) const = 0;
71
72 virtual uint64 registerLoop(
73 ::std::string const& name,
74 ::std::function<void(::LoopingSoundState&)> getSoundState,
75 float fadeInDuration,
76 float fadeOutDuration
77 ) = 0;
78
79 virtual void unregisterLoop(uint64 handle, bool hard) = 0;
80
81 virtual ::std::optional<::std::string> getSubtitle(::std::string const& name) const = 0;
82
83 virtual bool isPlayingSound(uint64 handle) const = 0;
84
85 virtual bool isPlayingSound(::Core::Path const& soundName) const = 0;
86
87 virtual bool isPlayingSound(::ServerSoundHandle serverSoundHandle) const = 0;
88
89 virtual uint64 playAttached(
90 ::std::string const& eventName,
91 ::std::function<void(::SoundInstanceProperties&)>&& getSoundProperties
92 ) = 0;
93
94 virtual void stopAllDelayedSoundActions() = 0;
95
96 virtual ::std::optional<::PlayingSoundAttributes> tryGetPlayingSoundAttributes(uint64 handle) const = 0;
97
98 virtual ::std::optional<::LoopingSoundAttributes> tryGetLoopingSoundAttributes(uint64 handle) const = 0;
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104
105 // NOLINTEND
106};
Definition EnableNonOwnerReferences.h:7
Definition PathView.h:19
Definition Path.h:12
Definition ServerSoundHandle.h:5
Definition SoundItem.h:5
Definition SoundPlayerInterface.h:22
Definition Vec3.h:10
Definition LoopingSoundAttributes.h:8
Definition LoopingSoundState.h:5
Definition PlayingSoundAttributes.h:5
Definition SoundInstanceProperties.h:5