载入中...
搜索中...
未找到
AudioSourceEditor.cpp
浏览该文件的文档.
2
4#include "common/Exception.h"
5#include "common/Module.h"
7
8#if defined(EVE_AUDIO_EDITOR_LIVE)
9#include "audio/Audio.h"
10#include "audio/Source.h"
11#include "sound/SoundData.h"
12#endif
13
14#include <algorithm>
15#include <cmath>
16#include <cstdint>
17#include <utility>
18#include <vector>
19
20namespace eve::audio_editor {
21namespace {
22
23template <class T = void>
24audio_editing::Result<T> editorError(audio_editing::EditorStatus status, std::string rule,
25 std::string message) {
26 return eve::editing::failed<T>(status, audio_editing::RuleId(std::move(rule)), std::move(message));
27}
28
29double readNumber(const audio_editing::AudioSourceTarget& target, const editor::SelectionSnapshot& selection,
30 const char* path, double fallback) {
31 auto value = target.read(selection, audio_editing::PropertyPath(path));
32 if (const auto* real = value.value.getIf<double>()) return *real;
33 if (const auto* integer = value.value.getIf<std::int64_t>()) return static_cast<double>(*integer);
34 return fallback;
35}
36
37bool readFlag(const audio_editing::AudioSourceTarget& target, const editor::SelectionSnapshot& selection,
38 const char* path, bool fallback) {
39 auto value = target.read(selection, audio_editing::PropertyPath(path));
40 const auto* flag = value.value.getIf<bool>();
41 return flag ? *flag : fallback;
42}
43
44} // namespace
45
47#if defined(EVE_AUDIO_EDITOR_LIVE)
48 std::unique_ptr<audio_editing::AudioSourceTransportBackend> backend;
49 std::unique_ptr<eve::sound::SoundData> data;
50 eve::audio::Source* source = nullptr;
52 backend.reset();
53 delete source;
54 source = nullptr;
55 }
56#endif
57};
58
59void AudioClockTransportBackend::play() { playing_ = true; }
60void AudioClockTransportBackend::pause() { playing_ = false; }
62 playing_ = false;
63 position_ = 0.0;
64}
65
67 if (!std::isfinite(seconds) || seconds < 0.0 || seconds > duration_)
68 return editorError(audio_editing::EditorStatus::Rejected, "editor.audio.clock-seek",
69 "Clock seek is outside the clip");
70 position_ = seconds;
71 return eve::editing::applied<void>();
72}
73
75 duration_ = seconds > 0.0 && std::isfinite(seconds) ? seconds : 1.0;
76 position_ = std::clamp(position_, 0.0, duration_);
77}
78
79void AudioClockTransportBackend::advance(double deltaSeconds) {
80 if (!playing_ || !std::isfinite(deltaSeconds) || deltaSeconds <= 0.0) return;
81 position_ += deltaSeconds;
82 if (position_ >= duration_) {
83 position_ = duration_;
84 playing_ = false;
85 }
86}
87
89 : target_(std::move(targetId)), authority_(&target_), transactions_(&authority_) {
90 initializePreview();
91 seedPreviewDocument();
92 generateTonePcm();
93 clock_.setDuration(static_cast<double>(pcm_.samples.size()) / static_cast<double>(pcm_.sampleRate));
94 auto rebuilt = rebuildWaveform(viewportWidth_);
95 if (!rebuilt.ok()) rebuilt.ignore("preview waveform uses an empty envelope when generation is rejected");
96 auto bound = bindClockAudition();
97 if (!bound.ok()) bound.ignore("clock audition bind is retried after workspace setup");
98 auto looped = syncLoop();
99 if (!looped.ok()) looped.ignore("preview loop uses clip duration when the seeded range is rejected");
100 auto snap = transport_.snapshot(auditionRevision());
101 if (snap.ok()) lastTransport_ = snap.value();
102 else snap.ignore("transport snapshot waits until the first successful bind");
103}
104
106 closePreview();
107 previewSession_.reset();
108 transport_.unbind();
109 liveAudition_.reset();
110}
111
112void AudioSourceEditor::seedPreviewDocument() {
114 properties["clip.asset"] = std::string("asset://preview/tone.sine");
115 properties["clip.mode"] = std::string("static");
116 properties["play.autoplay"] = false;
117 properties["play.loop"] = true;
118 properties["play.volume"] = 0.8;
119 properties["play.pitch"] = 1.0;
120 properties["play.loop-start"] = 0.5;
121 properties["play.loop-end"] = 1.5;
122 properties["spatial.relative"] = true;
123 properties["spatial.reference-distance"] = 1.0;
124 properties["spatial.maximum-distance"] = 10000.0;
125 properties["spatial.position"] = audio_editing::EditorValue::Array{0.0, 0.0, 0.0};
126 properties["spatial.velocity"] = audio_editing::EditorValue::Array{0.0, 0.0, 0.0};
127 properties["spatial.direction"] = audio_editing::EditorValue::Array{0.0, 0.0, -1.0};
128 properties["mixer.bus"] = std::string("master");
130 root["schemaVersion"] = std::int64_t{1};
131 root["properties"] = audio_editing::EditorValue(std::move(properties));
132 auto loaded = target_.loadSnapshot(audio_editing::EditorValue(std::move(root)));
133 if (!loaded.ok())
134 loaded.ignore("audio source editor keeps defaults when the preview snapshot is rejected");
135}
136
137void AudioSourceEditor::generateTonePcm() {
138 constexpr int kRate = 22050;
139 constexpr double kSeconds = 2.0;
140 const int samples = static_cast<int>(kRate * kSeconds);
141 pcm_.sampleRate = kRate;
142 pcm_.channels = 1;
143 pcm_.samples.resize(static_cast<std::size_t>(samples));
144 for (int i = 0; i < samples; ++i) {
145 const double t = static_cast<double>(i) / static_cast<double>(kRate);
146 pcm_.samples[static_cast<std::size_t>(i)] =
147 static_cast<float>(0.32 * std::sin(6.283185307179586 * 440.0 * t) +
148 0.12 * std::sin(6.283185307179586 * 660.0 * t));
149 }
150}
151
152editor::SelectionSnapshot AudioSourceEditor::selection() const {
154 snapshot.channel = "audio";
156 item.domain = editor::SelectionDomain::Asset;
157 item.target = editor::TargetId(target_.targetId());
158 item.item = editor::StableId(target_.targetId().value());
159 item.type = "audio.source";
160 snapshot.items.push_back(item);
161 snapshot.primary = item;
162 return snapshot;
163}
164
165audio_editing::Revision AudioSourceEditor::auditionRevision() const {
166 return audio_editing::Revision(pcmRevision_);
167}
168
169audio_editing::Result<void> AudioSourceEditor::rebuildWaveform(float viewportWidth) {
170 requestedViewportWidth_ = viewportWidth;
171 const auto phase = previewState().phase;
173 return requestPreview();
174}
175
176audio_editing::Result<void> AudioSourceEditor::bindClockAudition() {
177 transport_.unbind();
178 liveAudition_.reset();
179 liveBound_ = false;
180 clock_.setDuration(duration());
181 return transport_.bind(audio_editing::StableId(target_.targetId().value()), auditionRevision(), &clock_);
182}
183
184audio_editing::Result<void> AudioSourceEditor::syncLoop() {
185 const bool loop = readFlag(target_, selection(), "play.loop", false);
186 const double start = readNumber(target_, selection(), "play.loop-start", 0.0);
187 double end = readNumber(target_, selection(), "play.loop-end", 0.0);
188 if (end <= 0.0) end = duration();
189 auto applied = transport_.setLoop(auditionRevision(), loop, start, end);
190 if (!applied.ok()) return applied;
191 return rebuildWaveform(requestedViewportWidth_);
192}
193
194audio_editing::Result<void> AudioSourceEditor::publishLive() {
195#if defined(EVE_AUDIO_EDITOR_LIVE)
196 if (!liveAudition_ || !liveAudition_->source) return eve::editing::applied<void>();
197 return audio_editing::AudioSourceRuntimeApplier().apply(target_, liveAudition_->source);
198#else
199 return eve::editing::applied<void>();
200#endif
201}
202
204 editor::EditorWorkspace candidate = workspace;
205 struct Panel {
206 const char* id;
207 const char* title;
208 const char* region;
209 const char* context;
210 int order;
211 };
212 constexpr Panel panels[] = {
213 {"audio.sources", "Sources", "left", "list", 100},
214 {"audio.waveform", "Waveform", "center", "preview", 100},
215 {"audio.inspector", "Source Inspector", "right", "inspector", 100},
216 {"audio.transport", "Transport", "bottom", "transport", 100},
217 };
218 for (const auto& panel : panels) {
219 if (!candidate.registerPanel(panel.id, panel.title, panel.region, panel.order) ||
220 !candidate.setPanelCapability(panel.id, "audio.source") ||
221 !candidate.setPanelContext(panel.id, panel.context))
222 return editorError(audio_editing::EditorStatus::Rejected, "editor.audio.workspace-conflict",
223 "Could not install the audio source workspace composition");
224 }
225 if (!candidate.activatePanel("audio.waveform"))
226 return editorError(audio_editing::EditorStatus::Rejected, "editor.audio.workspace-activate",
227 "Could not activate the waveform panel");
228 workspace = std::move(candidate);
229 return eve::editing::applied<void>();
230}
231
233 if (!std::isfinite(width) || width < 8.0f ||
235 return editorError(audio_editing::EditorStatus::Rejected, "editor.audio.viewport",
236 "Waveform viewport width must be within the service pixel limits");
237 return rebuildWaveform(width);
238}
239
241 if (!std::isfinite(x) || viewportWidth_ <= 0.0f)
242 return editorError(audio_editing::EditorStatus::Rejected, "editor.audio.seek-x",
243 "Waveform seek requires a finite x and viewport");
244 const double seconds = std::clamp(static_cast<double>(x / viewportWidth_), 0.0, 1.0) * duration();
245 return seekSeconds(seconds);
246}
247
249 auto sought = transport_.seek(auditionRevision(), seconds);
250 if (!sought.ok()) return sought;
251 auto snap = transport_.snapshot(auditionRevision());
252 if (snap.ok()) lastTransport_ = snap.value();
253 return eve::editing::applied<void>();
254}
255
258 auto operation = target_.makeSet(selection(), audio_editing::PropertyPath(path), value,
259 audio_editing::PropertySetMode::Absolute);
260 if (!operation.ok())
262 if (path == "play.loop" || path == "play.loop-start" || path == "play.loop-end") {
263 // Validate with the canonical transport contract before publishing a document/history entry.
264 AudioClockTransportBackend candidateClock;
265 candidateClock.setDuration(duration());
266 audio_editing::AudioAuditionTransport candidateTransport;
267 auto bound = candidateTransport.bind(audio_editing::StableId(target_.targetId().value()), auditionRevision(),
268 &candidateClock);
269 if (!bound.ok()) return bound;
270 auto number = [&](const std::string& field) {
271 if (path != field) return readNumber(target_, selection(), field.c_str(), 0.0);
272 if (const auto* real = value.getIf<double>()) return *real;
273 return static_cast<double>(*value.getIf<std::int64_t>());
274 };
275 const bool loop =
276 path == "play.loop" ? *value.getIf<bool>() : readFlag(target_, selection(), "play.loop", false);
277 auto checked =
278 candidateTransport.setLoop(auditionRevision(), loop, number("play.loop-start"), number("play.loop-end"));
279 if (!checked.ok()) return checked;
280 }
282 spec.id = editor::TransactionId("audio.source.tx." + std::to_string(++txSequence_));
283 spec.label = "Set " + path;
284 spec.target = editor::TargetId(target_.targetId());
285 spec.baseRevision = target_.revision();
286 spec.mergeKey = "audio.source:" + target_.targetId().value() + ":" + path;
287 auto begun = transactions_.begin(std::move(spec));
288 if (!begun.ok())
289 return editorError(begun.code(), "editor.audio.begin", "Could not begin the audio property transaction");
290 auto appended = transactions_.append(std::move(operation).takeValue());
291 if (!appended.ok()) {
292 (void)transactions_.rollback();
293 return audio_editing::Result<void>::failure(appended.status());
294 }
295 auto committed = transactions_.commit();
296 if (!committed.ok())
298 auto looped = syncLoop();
299 if (!looped.ok()) return looped;
300 return publishLive();
301}
302
304 auto result = transactions_.undo();
305 if (!result.ok()) return result;
306 auto looped = syncLoop();
307 if (!looped.ok())
309 auto published = publishLive();
310 if (!published.ok())
312 return result;
313}
314
316 auto result = transactions_.redo();
317 if (!result.ok()) return result;
318 auto looped = syncLoop();
319 if (!looped.ok())
321 auto published = publishLive();
322 if (!published.ok())
324 return result;
325}
326
328 auto played = transport_.play(auditionRevision());
329 if (!played.ok()) return played;
330 auto snap = transport_.snapshot(auditionRevision());
331 if (snap.ok()) lastTransport_ = snap.value();
332 return eve::editing::applied<void>();
333}
334
336 auto paused = transport_.pause(auditionRevision());
337 if (!paused.ok()) return paused;
338 auto snap = transport_.snapshot(auditionRevision());
339 if (snap.ok()) lastTransport_ = snap.value();
340 return eve::editing::applied<void>();
341}
342
344 auto stopped = transport_.stop(auditionRevision());
345 if (!stopped.ok()) return stopped;
346 auto snap = transport_.snapshot(auditionRevision());
347 if (snap.ok()) lastTransport_ = snap.value();
348 return eve::editing::applied<void>();
349}
350
352 auto previewed = pollPreview();
353 if (!previewed.ok())
355 if (!liveBound_) clock_.advance(deltaSeconds);
356 auto observed = transport_.update(auditionRevision());
357 if (observed.ok()) lastTransport_ = observed.value();
358 return observed;
359}
360
362#if !defined(EVE_AUDIO_EDITOR_LIVE)
363 return editorError(audio_editing::EditorStatus::Unsupported, "editor.audio.live-module",
364 "Audio module is not available for live audition");
365#else
366 auto* audioMod = eve::ModuleManager::getInstance<eve::audio::Audio>("Audio");
367 if (!audioMod)
368 return editorError(audio_editing::EditorStatus::Unsupported, "editor.audio.live-module",
369 "Audio module is not available for live audition");
370 std::vector<std::uint8_t> bytes(pcm_.samples.size() * 2);
371 for (std::size_t i = 0; i < pcm_.samples.size(); ++i) {
372 const float sample = std::clamp(pcm_.samples[i], -1.0f, 1.0f);
373 const auto quantized = static_cast<std::int16_t>(std::lround(sample * 32767.0f));
374 bytes[i * 2] = static_cast<std::uint8_t>(quantized & 0xff);
375 bytes[i * 2 + 1] = static_cast<std::uint8_t>((quantized >> 8) & 0xff);
376 }
377 const bool wasPlaying = isPlaying();
378 const double head = playhead();
379 auto live = std::make_unique<LiveAudition>();
380 try {
381 live->data = std::make_unique<eve::sound::SoundData>(std::move(bytes), pcm_.sampleRate, 16, 1);
382 transport_.unbind();
383 live->source = audioMod->newSource(live->data.get());
384 } catch (const eve::Exception& ex) {
385 auto restored = bindClockAudition();
386 if (!restored.ok()) restored.ignore("clock audition restored after live attach failure");
387 return editorError(audio_editing::EditorStatus::Failed, "editor.audio.live-source",
388 std::string("Live audition source could not be created: ") + ex.what());
389 }
390 live->backend = std::make_unique<audio_editing::AudioSourceTransportBackend>(live->source);
391 auto bound = transport_.bind(audio_editing::StableId(target_.targetId().value()), auditionRevision(),
392 live->backend.get());
393 if (!bound.ok()) {
394 auto restored = bindClockAudition();
395 if (!restored.ok()) restored.ignore("clock audition restored after live bind failure");
396 auto looped = syncLoop();
397 if (!looped.ok()) looped.ignore("loop restored after live bind failure");
398 return bound;
399 }
400 liveAudition_ = std::move(live);
401 liveBound_ = true;
402 auto looped = syncLoop();
403 if (!looped.ok()) return looped;
404 auto published = publishLive();
405 if (!published.ok()) return published;
406 auto sought = transport_.seek(auditionRevision(), head);
407 if (!sought.ok()) return sought;
408 if (wasPlaying) return play();
409 return eve::editing::applied<void>();
410#endif
411}
412
413bool AudioSourceEditor::isPlaying() const noexcept {
414 return lastTransport_.state == audio_editing::AudioTransportState::Playing;
415}
416
417double AudioSourceEditor::duration() const noexcept {
418 if (pcm_.sampleRate <= 0 || pcm_.samples.empty() || pcm_.channels <= 0) return 0.0;
419 return static_cast<double>(pcm_.samples.size() / static_cast<std::size_t>(pcm_.channels)) /
420 static_cast<double>(pcm_.sampleRate);
421}
422
423double AudioSourceEditor::playhead() const noexcept { return lastTransport_.position; }
424
425int AudioSourceEditor::bucketCount() const noexcept {
426 if (waveform_.envelopes.empty()) return 0;
427 return static_cast<int>(waveform_.envelopes.front().size());
428}
429
430float AudioSourceEditor::playheadX() const noexcept {
431 if (duration() <= 0.0) return 0.0f;
432 return static_cast<float>(playhead() / duration()) * viewportWidth_;
433}
434
435float AudioSourceEditor::loopStartX() const noexcept {
436 if (duration() <= 0.0) return 0.0f;
437 return static_cast<float>(lastTransport_.loopStart / duration()) * viewportWidth_;
438}
439
440float AudioSourceEditor::loopEndX() const noexcept {
441 if (duration() <= 0.0) return viewportWidth_;
442 const double end = lastTransport_.loopEnd > 0.0 ? lastTransport_.loopEnd : duration();
443 return static_cast<float>(end / duration()) * viewportWidth_;
444}
445
447 return target_.read(selection(), audio_editing::PropertyPath(path));
448}
449
451 if (waveform_.envelopes.empty()) return nullptr;
452 const auto& row = waveform_.envelopes.front();
453 if (index < 0 || static_cast<std::size_t>(index) >= row.size()) return nullptr;
454 return &row[static_cast<std::size_t>(index)];
455}
456
457} // namespace eve::audio_editor
double x
LogicalId target
ActionParameterOperation operation
Duration start
int root
Definition AnimSmr.cpp:119
UI-neutral audio source editor: workspace, waveform, audition, undo.
std::vector< std::unique_ptr< ScriptClimbingEventSink > > live
std::string title
bool committed
bool applied
ScriptFieldRegion region
std::string message
wgpu::PopErrorScopeStatus status
std::uint32_t width
std::map< std::string, PropertyRule > properties
std::string id
Poco::JSON::Object::Ptr result
std::uint64_t bytes
std::vector< std::int32_t > order
OceanRenderBackend backend
std::string path
Definition PlayHost.cpp:111
std::unordered_set< std::string > loaded
Definition Plugins.cpp:24
std::uint32_t targetId
Object::Ptr value
float t
double number
std::string_view source
size_t end
float phase
uint32_t index
const VegetationPresetContext & context
EVENGINE_API_FOUNDATION public API.
Definition Exception.h:13
virtual const char * what() const
Returns a string containing reason for the exception.
Definition Exception.h:24
void ignore(std::string_view reason={}) const noexcept
Explicitly discard this result after documenting the reason.
Definition Result.h:571
Move-only operation result carrying either a value or Status.
Definition Result.h:176
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
A playable audio source (static buffer or streaming decoder). Not thread-safe for playback control ex...
Definition Source.h:30
Revision-safe play/pause/seek/custom-loop state machine for asset audition.
Result< void > pause(Revision expectedRevision)
Pause.
Result< AudioTransportSnapshot > snapshot(Revision expectedRevision) const
Read the current playhead only for the bound source revision.
Result< void > setLoop(Revision expectedRevision, bool enabled, double startSeconds=0.0, double endSeconds=0.0)
Configure a bounded loop range; zero end uses the clip duration.
Result< void > bind(StableId asset, Revision sourceRevision, IAudioTransportBackend *backend)
Bind a borrowed backend and stop any previously bound audition.
Result< void > stop(Revision expectedRevision)
Stops .
void unbind()
Stop and forget the borrowed backend.
Result< void > seek(Revision expectedRevision, double seconds)
Seeks .
Result< AudioTransportSnapshot > update(Revision expectedRevision)
Poll backend state and wrap the custom loop without changing documents.
Result< void > play(Revision expectedRevision)
Play.
Result< void > loadSnapshot(const EditorValue &snapshot)
Atomically load a versioned source snapshot.
PropertyReadResult read(const SelectionSnapshot &selection, const PropertyPath &path) const override
Reads .
Result< DomainOperation > makeSet(const SelectionSnapshot &selection, const PropertyPath &path, const EditorValue &value, PropertySetMode mode) const override
Make set.
TargetId targetId() const override
Target id.
Definition AudioTarget.h:28
static constexpr int maximumPreviewPixels
Maximum pixel width accepted by the standard waveform preview.
Clock-backed audition used when no live OpenAL Source is attached.
audio_editing::Result< void > seek(double seconds) override
Seeks .
void setDuration(double seconds)
Install clip length before bind.
void advance(double deltaSeconds)
Advance playhead when playing.
audio_editing::Result< audio_editing::AudioTransportSnapshot > update(double deltaSeconds)
Poll audition and advance the clock backend.
audio_editing::Result< void > play()
Play.
float loopEndX() const noexcept
Loop end x.
audio_editing::Result< void > pollPreview()
Publish the current completed preview atomically; Pending while work runs, NoOp when idle....
audio_editing::Result< editor::TransactionReceipt > redo()
Redo.
audio_editing::Result< void > setViewportWidth(float width)
Rebuild waveform envelopes for the given pixel width.
double playhead() const noexcept
Playhead.
audio_editing::PropertyReadResult read(const std::string &path) const
Read a property using the source selection.
audio_editing::Result< void > attachLiveAudition()
Bind a live OpenAL Source generated from the preview PCM when Audio/Sound exist.
audio_editing::Result< void > configureWorkspace(editor::EditorWorkspace &workspace) const
Install Sources / Waveform / Inspector / Transport panels.
audio_editing::EditorValue snapshot() const
Canonical snapshot of the source document.
audio_editing::Result< editor::TransactionReceipt > undo()
Undo.
audio_editing::Result< void > setProperty(const std::string &path, const audio_editing::EditorValue &value)
Commit an absolute property assignment through the document transaction path.
bool isPlaying() const noexcept
True when playing.
void closePreview()
Permanently cancel and close preview publication; idempotent. Destruction joins cooperative work.
float loopStartX() const noexcept
Loop start x.
audio_editing::Result< void > seekX(float x)
Seek from a waveform x coordinate in the current viewport.
AudioSourceEditor(std::string targetId)
Construct a seeded preview source with a generated tone clip.
audio_editing::Result< void > pause()
Pause.
audio_editing::Result< void > stop()
Stops .
double duration() const noexcept
Duration.
int bucketCount() const noexcept
Bucket count.
const audio_editing::AudioWaveformBucket * bucket(int index) const
Envelope bucket for drawing; channel 0. @ownership Borrowed bucket owned by this editor....
audio_editing::Result< void > requestPreview()
Queue a preview of the current domain inputs; accepted work returns Pending. @cost Copies the PCM/cli...
editor::PreviewState previewState() const noexcept
Observe request sequence, provider generation and phase without copying preview payloads.
audio_editing::Result< void > seekSeconds(double seconds)
Seek preview to an exact time in seconds.
float playheadX() const noexcept
Playhead x.
std::uint64_t revision() const override
Return the current revision.
Dotted property path (layout.size) compared and persisted as text.
Definition EditingIds.h:78
Deterministic owning value tree shared by authoring hosts.
std::vector< Value > Array
std::map< std::string, Value > Object
Composition model shared by project-specific developer and runtime editors.
bool setPanelContext(const std::string &id, const std::string &context)
Attach a semantic input context such as scene, graph, or timeline.
Result< WorkspacePanelDescriptor > registerPanel(WorkspacePanelDescriptor descriptor)
Register a checked owning panel descriptor.
Result< WorkspacePanelDescriptor > activatePanel(const StableId &id)
Activate a visible panel with structured not-found/rejected results.
bool setPanelCapability(const std::string &id, const std::string &capability)
Attach a capability requirement used by the host when filtering panels.
Result< TransactionReceipt > commit() override
Preflight and commit all active operations through the authority.
Result< TransactionId > begin(TransactionSpec specification) override
Begin a transaction with a stable id and base revision.
Result< TransactionReceipt > undo() override
Compensate the most recent committed transaction.
Result< void > rollback()
Compatibility spelling for discard.
Result< TransactionReceipt > redo() override
Reapply the most recently compensated transaction.
Result< void > append(DomainOperation operation) override
Append an operation to the active transaction without applying it.
editing::Value EditorValue
editing::Status EditorStatus
Result< void > noOp(std::vector< Diagnostic > diagnostics={})
Construct a successful void result for an operation that made no change.
eve::editing::StableId StableId
Definition EditorIds.h:36
eve::editing::SelectionItem SelectionItem
Stable item stored in a selection snapshot.
eve::editing::TargetId TargetId
Definition EditorIds.h:29
eve::editing::SelectionSnapshot SelectionSnapshot
Immutable multi-selection captured for property and command work.
eve::editing::TransactionId TransactionId
Definition EditorIds.h:34
eve::Result< double > readNumber(const eve::Value::Object &object, std::string_view name)
Reads a required finite number.
One min/max/RMS envelope bucket for a single channel.
std::vector< std::vector< AudioWaveformBucket > > envelopes
PropertyReadResult public API.
TransactionSpec public API.