载入中...
搜索中...
未找到
ActionAudioBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
12
13#include <cstdint>
14#include <string>
15#include <vector>
16
17namespace eve::action {
18
20enum class ActionAudioShape : std::uint8_t { Instant, State };
21
24 std::string uri;
25 std::vector<std::string> randomUris;
27 double volume = 1.0;
28 double pitch = 1.0;
29 double randomPitchOffset = 0.0;
30 double spatialBlend = 1.0;
31 double minDistance = 1.0;
32 double maxDistance = 35.0;
33 bool looping = false;
34 bool fadeOutOnExit = true;
35 double fadeOutDuration = 0.1;
36
38 auto operator<=>(const ActionAudioBinding&) const = default;
39
49 [[nodiscard]] static Result<ActionAudioBinding> fromPayload(const Value::Object& payload,
51};
52
53} // namespace eve::action
Typed spatial payload shared by presentation action blocks.
Value::Object payload
double fadeOutDuration
double volume
bool fadeOutOnExit
#define EVENGINE_API_PLATFORM
Definition Export.h:107
ShaderImageInput shape
Move-only operation result carrying either a value or Status.
Definition Result.h:176
std::map< std::string, Value > Object
Definition Value.h:34
ActionAudioShape
Authored audio block shape used to validate looping semantics.
Owning validated settings shared by Audio runtime and editor preview.
std::vector< std::string > randomUris
auto operator<=>(const ActionAudioBinding &) const =default
Operator <=>.
Validated spatial settings decoded from a notify payload.