载入中...
搜索中...
未找到
ActionAudioBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9#include <cstdint>
10#include <string>
11#include <vector>
12
13namespace eve::action {
14
16enum class ActionAudioShape : std::uint8_t { Instant, State };
17
20 std::string uri;
21 std::vector<std::string> randomUris;
23 double volume = 1.0;
24 double pitch = 1.0;
25 double randomPitchOffset = 0.0;
26 double spatialBlend = 1.0;
27 double minDistance = 1.0;
28 double maxDistance = 35.0;
29 bool looping = false;
30 bool fadeOutOnExit = true;
31 double fadeOutDuration = 0.1;
32
34 auto operator<=>(const ActionAudioBinding&) const = default;
35
45 [[nodiscard]] static Result<ActionAudioBinding> fromPayload(const Value::Object& payload,
47};
48
49} // 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:155
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.