载入中...
搜索中...
未找到
eve::audio_editor::AudioSourceEditor类 参考

Timeline-style controller for one authored audio source. 更多...

#include <AudioSourceEditor.h>

类

struct  LiveAudition
 
struct  PreviewSession
 

Public 成员函数

 AudioSourceEditor (std::string targetId)
 Construct a seeded preview source with a generated tone clip.
 
 AudioSourceEditor (const AudioSourceEditor &)=delete
 
AudioSourceEditor & operator= (const AudioSourceEditor &)=delete
 
 ~AudioSourceEditor ()
 Audio source editor.
 
audio_editing::Result< void > setPreviewProvider (std::shared_ptr< const IAudioSourcePreviewProvider > provider)
 Replace the owned immutable preview provider and invalidate all previous work, even for the same instance. @ownership Retains shared ownership; null explicitly disables previews, preserving the last successful payload. @thread Owner thread; providers run on a worker with owning immutable inputs and must cooperate with cancellation. @reentrancy Provider callbacks never run under editor locks or access this editor.
 
audio_editing::Result< void > requestPreview ()
 Queue a preview of the current domain inputs; accepted work returns Pending. @cost Copies the PCM/clip input once per request; computation runs on the editing task worker, amortized over polls.
 
audio_editing::Result< void > pollPreview ()
 Publish the current completed preview atomically; Pending while work runs, NoOp when idle. Owner thread only.
 
audio_editing::Result< void > cancelPreview ()
 Cancel pending publication while keeping the last valid preview; a new explicit request may resume.
 
void closePreview ()
 Permanently cancel and close preview publication; idempotent. Destruction joins cooperative work.
 
editor::PreviewState previewState () const noexcept
 Observe request sequence, provider generation and phase without copying preview payloads.
 
const audio_editing::AudioSourceTarget & target () const noexcept
 Borrow the authoritative source document.
 
audio_editing::Result< void > configureWorkspace (editor::EditorWorkspace &workspace) const
 Install Sources / Waveform / Inspector / Transport panels.
 
audio_editing::Result< void > setViewportWidth (float width)
 Rebuild waveform envelopes for the given pixel width.
 
audio_editing::Result< void > seekX (float x)
 Seek from a waveform x coordinate in the current viewport.
 
audio_editing::Result< void > seekSeconds (double seconds)
 Seek preview to an exact time in seconds.
 
audio_editing::Result< void > setProperty (const std::string &path, const audio_editing::EditorValue &value)
 Commit an absolute property assignment through the document transaction path.
 
audio_editing::Result< editor::TransactionReceipt > undo ()
 Undo.
 
audio_editing::Result< editor::TransactionReceipt > redo ()
 Redo.
 
audio_editing::Result< void > play ()
 Play.
 
audio_editing::Result< void > pause ()
 Pause.
 
audio_editing::Result< void > stop ()
 Stops .
 
audio_editing::Result< audio_editing::AudioTransportSnapshot > update (double deltaSeconds)
 Poll audition and advance the clock backend.
 
audio_editing::Result< void > attachLiveAudition ()
 Bind a live OpenAL Source generated from the preview PCM when Audio/Sound exist.
 
bool canUndo () const noexcept
 
bool canRedo () const noexcept
 Can redo.
 
bool isPlaying () const noexcept
 True when playing.
 
std::uint64_t revision () const noexcept
 Revision.
 
std::uint64_t pcmRevision () const noexcept
 Pcm revision.
 
double duration () const noexcept
 Duration.
 
double playhead () const noexcept
 Playhead.
 
float layoutWidth () const noexcept
 Layout width.
 
int bucketCount () const noexcept
 Bucket count.
 
float playheadX () const noexcept
 Playhead x.
 
float loopStartX () const noexcept
 Loop start x.
 
float loopEndX () const noexcept
 Loop end x.
 
audio_editing::PropertyReadResult read (const std::string &path) const
 Read a property using the source selection.
 
const audio_editing::AudioWaveformBucket * bucket (int index) const
 Envelope bucket for drawing; channel 0. @ownership Borrowed bucket owned by this editor. @lifetime Valid until the next setViewportWidth/rebuild or destruction; null when index is out of range.
 
const audio_editing::AudioTransportSnapshot & transport () const noexcept
 Latest transport observation after a successful update/play.
 
audio_editing::EditorValue snapshot () const
 Canonical snapshot of the source document.
 

详细描述

Timeline-style controller for one authored audio source.

Owns the document, local undo, waveform cache and audition transport. PCM identity is separate from document revision so volume/pitch edits do not stale-unbind playback. Clip PCM changes increment pcmRevision.

@ownership Editor owns the document and clock backend. Live Source is borrowed from the Audio module when attachLiveAudition succeeds. @threadaffinity Owner thread only. @reentrancy No unknown callbacks.

在文件 AudioSourceEditor.h 第 76 行定义.

构造及析构函数说明

◆ AudioSourceEditor() [1/2]

eve::audio_editor::AudioSourceEditor::AudioSourceEditor ( std::string  targetId)
explicit

Construct a seeded preview source with a generated tone clip.

参数
targetIdStable editor target identity.

在文件 AudioSourceEditor.cpp 第 88 行定义.

引用了 eve::audio_editing::EditorAudioPcm::sampleRate, eve::audio_editing::EditorAudioPcm::samples, eve::audio_editor::AudioClockTransportBackend::setDuration() , 以及 eve::audio_editing::AudioAuditionTransport::snapshot().

◆ AudioSourceEditor() [2/2]

eve::audio_editor::AudioSourceEditor::AudioSourceEditor ( const AudioSourceEditor &  )
delete

◆ ~AudioSourceEditor()

eve::audio_editor::AudioSourceEditor::~AudioSourceEditor ( )

Audio source editor.

在文件 AudioSourceEditor.cpp 第 105 行定义.

引用了 closePreview() , 以及 eve::audio_editing::AudioAuditionTransport::unbind().

成员函数说明

◆ attachLiveAudition()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::attachLiveAudition ( )

◆ bucket()

const audio_editing::AudioWaveformBucket * eve::audio_editor::AudioSourceEditor::bucket ( int  index) const

Envelope bucket for drawing; channel 0. @ownership Borrowed bucket owned by this editor. @lifetime Valid until the next setViewportWidth/rebuild or destruction; null when index is out of range.

在文件 AudioSourceEditor.cpp 第 450 行定义.

引用了 eve::audio_editing::AudioWaveformResult::envelopes , 以及 index.

◆ bucketCount()

int eve::audio_editor::AudioSourceEditor::bucketCount ( ) const
noexcept

Bucket count.

在文件 AudioSourceEditor.cpp 第 425 行定义.

引用了 eve::audio_editing::AudioWaveformResult::envelopes.

◆ cancelPreview()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::cancelPreview ( )

Cancel pending publication while keeping the last valid preview; a new explicit request may resume.

在文件 AudioSourcePreview.cpp 第 48 行定义.

◆ canRedo()

bool eve::audio_editor::AudioSourceEditor::canRedo ( ) const
inlinenoexcept

Can redo.

在文件 AudioSourceEditor.h 第 169 行定义.

被这些函数引用 eve::audio_editor::AudioSourcePresentation::state().

◆ canUndo()

bool eve::audio_editor::AudioSourceEditor::canUndo ( ) const
inlinenoexcept

在文件 AudioSourceEditor.h 第 167 行定义.

被这些函数引用 eve::audio_editor::AudioSourcePresentation::state().

◆ closePreview()

void eve::audio_editor::AudioSourceEditor::closePreview ( )

Permanently cancel and close preview publication; idempotent. Destruction joins cooperative work.

在文件 AudioSourcePreview.cpp 第 49 行定义.

被这些函数引用 ~AudioSourceEditor().

◆ configureWorkspace()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

◆ duration()

◆ isPlaying()

bool eve::audio_editor::AudioSourceEditor::isPlaying ( ) const
noexcept

◆ layoutWidth()

float eve::audio_editor::AudioSourceEditor::layoutWidth ( ) const
inlinenoexcept

Layout width.

在文件 AudioSourceEditor.h 第 181 行定义.

◆ loopEndX()

float eve::audio_editor::AudioSourceEditor::loopEndX ( ) const
noexcept

Loop end x.

在文件 AudioSourceEditor.cpp 第 440 行定义.

引用了 duration(), end , 以及 eve::audio_editing::AudioTransportSnapshot::loopEnd.

◆ loopStartX()

float eve::audio_editor::AudioSourceEditor::loopStartX ( ) const
noexcept

Loop start x.

在文件 AudioSourceEditor.cpp 第 435 行定义.

引用了 duration() , 以及 eve::audio_editing::AudioTransportSnapshot::loopStart.

◆ operator=()

AudioSourceEditor & eve::audio_editor::AudioSourceEditor::operator= ( const AudioSourceEditor &  )
delete

◆ pause()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::pause ( )

◆ pcmRevision()

std::uint64_t eve::audio_editor::AudioSourceEditor::pcmRevision ( ) const
inlinenoexcept

Pcm revision.

在文件 AudioSourceEditor.h 第 175 行定义.

◆ play()

◆ playhead()

double eve::audio_editor::AudioSourceEditor::playhead ( ) const
noexcept

Playhead.

在文件 AudioSourceEditor.cpp 第 423 行定义.

引用了 eve::audio_editing::AudioTransportSnapshot::position.

被这些函数引用 attachLiveAudition() , 以及 playheadX().

◆ playheadX()

float eve::audio_editor::AudioSourceEditor::playheadX ( ) const
noexcept

Playhead x.

在文件 AudioSourceEditor.cpp 第 430 行定义.

引用了 duration() , 以及 playhead().

◆ pollPreview()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::pollPreview ( )

Publish the current completed preview atomically; Pending while work runs, NoOp when idle. Owner thread only.

在文件 AudioSourcePreview.cpp 第 87 行定义.

引用了 eve::Result< T >::failure(), eve::editing::noOp(), eve::editing::pending(), eve::editor::Pending, eve::editor::PreviewState::phase, previewState(), result , 以及 revision().

被这些函数引用 update().

◆ previewState()

editor::PreviewState eve::audio_editor::AudioSourceEditor::previewState ( ) const
noexcept

Observe request sequence, provider generation and phase without copying preview payloads.

在文件 AudioSourcePreview.cpp 第 40 行定义.

被这些函数引用 pollPreview().

◆ read()

audio_editing::PropertyReadResult eve::audio_editor::AudioSourceEditor::read ( const std::string &  path) const

Read a property using the source selection.

在文件 AudioSourceEditor.cpp 第 446 行定义.

引用了 path , 以及 eve::audio_editing::AudioSourceTarget::read().

被这些函数引用 eve::audio_editor::AudioSourcePresentation::read().

◆ redo()

audio_editing::Result< editor::TransactionReceipt > eve::audio_editor::AudioSourceEditor::redo ( )

◆ requestPreview()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::requestPreview ( )

Queue a preview of the current domain inputs; accepted work returns Pending. @cost Copies the PCM/clip input once per request; computation runs on the editing task worker, amortized over polls.

在文件 AudioSourcePreview.cpp 第 54 行定义.

引用了 eve::editing::applied(), eve::audio_editing::AudioWaveformRequest::asset, context, end, eve::Result< T >::failure(), path, provider, read, request, result, revision(), eve::editing::EditableTargetState::revision(), start, value , 以及 width.

◆ revision()

std::uint64_t eve::audio_editor::AudioSourceEditor::revision ( ) const
inlinenoexcept

Revision.

在文件 AudioSourceEditor.h 第 173 行定义.

被这些函数引用 pollPreview(), requestPreview() , 以及 eve::audio_editor::AudioSourcePresentation::state().

◆ seekSeconds()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::seekSeconds ( double  seconds)

Seek preview to an exact time in seconds.

在文件 AudioSourceEditor.cpp 第 248 行定义.

引用了 eve::audio_editing::AudioAuditionTransport::seek() , 以及 eve::audio_editing::AudioAuditionTransport::snapshot().

被这些函数引用 seekX().

◆ seekX()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::seekX ( float  x)

Seek from a waveform x coordinate in the current viewport.

参数
xPixel x in the waveform view.

在文件 AudioSourceEditor.cpp 第 240 行定义.

引用了 duration(), seekSeconds() , 以及 x.

◆ setPreviewProvider()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::setPreviewProvider ( std::shared_ptr< const IAudioSourcePreviewProvider >  provider)

Replace the owned immutable preview provider and invalidate all previous work, even for the same instance. @ownership Retains shared ownership; null explicitly disables previews, preserving the last successful payload. @thread Owner thread; providers run on a worker with owning immutable inputs and must cooperate with cancellation. @reentrancy Provider callbacks never run under editor locks or access this editor.

在文件 AudioSourcePreview.cpp 第 41 行定义.

引用了 changed , 以及 provider.

◆ setProperty()

◆ setViewportWidth()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::setViewportWidth ( float  width)

Rebuild waveform envelopes for the given pixel width.

参数
widthViewport width in pixels; finite, at least 8, and within waveform service limits.
返回
Rejected on invalid input; failed rebuilds preserve the last valid waveform and layout.

在文件 AudioSourceEditor.cpp 第 232 行定义.

引用了 eve::audio_editing::AudioWaveformService::maximumPreviewPixels , 以及 width.

◆ snapshot()

audio_editing::EditorValue eve::audio_editor::AudioSourceEditor::snapshot ( ) const
inline

Canonical snapshot of the source document.

在文件 AudioSourceEditor.h 第 205 行定义.

◆ stop()

audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::stop ( )

◆ target()

const audio_editing::AudioSourceTarget & eve::audio_editor::AudioSourceEditor::target ( ) const
inlinenoexcept

Borrow the authoritative source document.

在文件 AudioSourceEditor.h 第 115 行定义.

被这些函数引用 eve::audio_editor::AudioSourcePresentation::schema() , 以及 eve::audio_editor::AudioSourcePresentation::state().

◆ transport()

const audio_editing::AudioTransportSnapshot & eve::audio_editor::AudioSourceEditor::transport ( ) const
inlinenoexcept

Latest transport observation after a successful update/play.

在文件 AudioSourceEditor.h 第 202 行定义.

◆ undo()

audio_editing::Result< editor::TransactionReceipt > eve::audio_editor::AudioSourceEditor::undo ( )

◆ update()

audio_editing::Result< audio_editing::AudioTransportSnapshot > eve::audio_editor::AudioSourceEditor::update ( double  deltaSeconds)

Poll audition and advance the clock backend.

参数
deltaSecondsInjected frame time.

在文件 AudioSourceEditor.cpp 第 351 行定义.

引用了 eve::audio_editor::AudioClockTransportBackend::advance(), eve::Result< T >::failure(), pollPreview() , 以及 eve::audio_editing::AudioAuditionTransport::update().


该类的文档由以下文件生成: