Timeline-style controller for one authored audio source. 更多...
#include <AudioSourceEditor.h>
类 | |
| struct | LiveAudition |
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. | |
| 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 第 71 行定义.
构造及析构函数说明
◆ AudioSourceEditor() [1/2]
|
explicit |
Construct a seeded preview source with a generated tone clip.
- 参数
-
targetId Stable editor target identity.
在文件 AudioSourceEditor.cpp 第 87 行定义.
引用了 eve::audio_editing::EditorAudioPcm::sampleRate, eve::audio_editing::EditorAudioPcm::samples, eve::audio_editor::AudioClockTransportBackend::setDuration() , 以及 eve::audio_editing::AudioAuditionTransport::snapshot().
◆ AudioSourceEditor() [2/2]
|
delete |
◆ ~AudioSourceEditor()
| eve::audio_editor::AudioSourceEditor::~AudioSourceEditor | ( | ) |
Audio source editor.
在文件 AudioSourceEditor.cpp 第 103 行定义.
成员函数说明
◆ attachLiveAudition()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::attachLiveAudition | ( | ) |
Bind a live OpenAL Source generated from the preview PCM when Audio/Sound exist.
- 返回
- Applied when live audition is bound; Unsupported when modules are absent.
在文件 AudioSourceEditor.cpp 第 342 行定义.
引用了 eve::audio_editing::AudioAuditionTransport::bind(), bytes, isPlaying(), play(), playhead(), eve::audio_editing::EditorAudioPcm::sampleRate, eve::audio_editing::EditorAudioPcm::samples, eve::audio_editing::AudioAuditionTransport::seek(), eve::audio_editing::AudioSourceTarget::targetId(), eve::audio_editing::AudioAuditionTransport::unbind() , 以及 eve::Exception::what().
◆ 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 第 431 行定义.
引用了 eve::audio_editing::AudioWaveformResult::envelopes , 以及 index.
◆ bucketCount()
|
noexcept |
Bucket count.
在文件 AudioSourceEditor.cpp 第 406 行定义.
◆ canRedo()
|
inlinenoexcept |
Can redo.
在文件 AudioSourceEditor.h 第 138 行定义.
◆ canUndo()
|
inlinenoexcept |
在文件 AudioSourceEditor.h 第 136 行定义.
◆ configureWorkspace()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::configureWorkspace | ( | editor::EditorWorkspace & | workspace | ) | const |
Install Sources / Waveform / Inspector / Transport panels.
- 注解
- Does not retain
workspace.
在文件 AudioSourceEditor.cpp 第 206 行定义.
引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.
◆ duration()
|
noexcept |
◆ isPlaying()
|
noexcept |
True when playing.
在文件 AudioSourceEditor.cpp 第 394 行定义.
引用了 eve::audio_editing::Playing , 以及 eve::audio_editing::AudioTransportSnapshot::state.
被这些函数引用 attachLiveAudition().
◆ layoutWidth()
|
inlinenoexcept |
Layout width.
在文件 AudioSourceEditor.h 第 150 行定义.
◆ loopEndX()
|
noexcept |
Loop end x.
在文件 AudioSourceEditor.cpp 第 421 行定义.
引用了 duration(), end , 以及 eve::audio_editing::AudioTransportSnapshot::loopEnd.
◆ loopStartX()
|
noexcept |
Loop start x.
在文件 AudioSourceEditor.cpp 第 416 行定义.
引用了 duration() , 以及 eve::audio_editing::AudioTransportSnapshot::loopStart.
◆ operator=()
|
delete |
◆ pause()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::pause | ( | ) |
◆ pcmRevision()
|
inlinenoexcept |
Pcm revision.
在文件 AudioSourceEditor.h 第 144 行定义.
◆ play()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::play | ( | ) |
Play.
在文件 AudioSourceEditor.cpp 第 311 行定义.
引用了 eve::audio_editing::AudioAuditionTransport::play() , 以及 eve::audio_editing::AudioAuditionTransport::snapshot().
被这些函数引用 attachLiveAudition().
◆ playhead()
|
noexcept |
Playhead.
在文件 AudioSourceEditor.cpp 第 404 行定义.
引用了 eve::audio_editing::AudioTransportSnapshot::position.
被这些函数引用 attachLiveAudition() , 以及 playheadX().
◆ playheadX()
|
noexcept |
◆ read()
| audio_editing::PropertyReadResult eve::audio_editor::AudioSourceEditor::read | ( | const std::string & | path | ) | const |
Read a property using the source selection.
在文件 AudioSourceEditor.cpp 第 427 行定义.
引用了 path , 以及 eve::audio_editing::AudioSourceTarget::read().
◆ redo()
| audio_editing::Result< editor::TransactionReceipt > eve::audio_editor::AudioSourceEditor::redo | ( | ) |
Redo.
在文件 AudioSourceEditor.cpp 第 299 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::editor::LocalTransactionBackend::redo().
◆ revision()
|
inlinenoexcept |
Revision.
在文件 AudioSourceEditor.h 第 142 行定义.
◆ seekSeconds()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::seekSeconds | ( | double | seconds | ) |
Seek preview to an exact time in seconds.
在文件 AudioSourceEditor.cpp 第 251 行定义.
引用了 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.
- 参数
-
x Pixel x in the waveform view.
在文件 AudioSourceEditor.cpp 第 243 行定义.
引用了 duration(), seekSeconds() , 以及 x.
◆ setProperty()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::setProperty | ( | const std::string & | path, |
| const audio_editing::EditorValue & | value | ||
| ) |
Commit an absolute property assignment through the document transaction path.
在文件 AudioSourceEditor.cpp 第 259 行定义.
引用了 eve::editor::LocalTransactionBackend::append(), eve::editing::TransactionSpec::baseRevision, eve::editor::LocalTransactionBackend::begin(), eve::editor::LocalTransactionBackend::commit(), eve::Result< T >::failure(), eve::editing::TransactionSpec::id, eve::editing::TransactionSpec::label, eve::audio_editing::AudioSourceTarget::makeSet(), eve::editing::TransactionSpec::mergeKey, operation, path, eve::editing::EditableTargetState::revision(), eve::editor::LocalTransactionBackend::rollback(), eve::editing::TransactionSpec::target, eve::audio_editing::AudioSourceTarget::targetId() , 以及 value.
◆ setViewportWidth()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::setViewportWidth | ( | float | width | ) |
Rebuild waveform envelopes for the given pixel width.
- 参数
-
width Viewport width in pixels; must be positive and finite.
在文件 AudioSourceEditor.cpp 第 235 行定义.
引用了 width.
◆ snapshot()
|
inline |
Canonical snapshot of the source document.
在文件 AudioSourceEditor.h 第 174 行定义.
◆ stop()
| audio_editing::Result< void > eve::audio_editor::AudioSourceEditor::stop | ( | ) |
Stops .
在文件 AudioSourceEditor.cpp 第 327 行定义.
引用了 eve::audio_editing::AudioAuditionTransport::snapshot() , 以及 eve::audio_editing::AudioAuditionTransport::stop().
◆ target()
|
inlinenoexcept |
Borrow the authoritative source document.
在文件 AudioSourceEditor.h 第 85 行定义.
◆ transport()
|
inlinenoexcept |
Latest transport observation after a successful update/play.
在文件 AudioSourceEditor.h 第 171 行定义.
◆ undo()
| audio_editing::Result< editor::TransactionReceipt > eve::audio_editor::AudioSourceEditor::undo | ( | ) |
Undo.
在文件 AudioSourceEditor.cpp 第 287 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::editor::LocalTransactionBackend::undo().
◆ update()
| audio_editing::Result< audio_editing::AudioTransportSnapshot > eve::audio_editor::AudioSourceEditor::update | ( | double | deltaSeconds | ) |
Poll audition and advance the clock backend.
- 参数
-
deltaSeconds Injected frame time.
在文件 AudioSourceEditor.cpp 第 335 行定义.
引用了 eve::audio_editor::AudioClockTransportBackend::advance() , 以及 eve::audio_editing::AudioAuditionTransport::update().
该类的文档由以下文件生成:
- src/modules/audio/editor/AudioSourceEditor.h
- src/modules/audio/editor/AudioSourceEditor.cpp