11namespace tracktion {
inline namespace engine
73 bool isMidi()
const override {
return false; }
85 HashCode
getHash()
const override;
111 void reassignReferencedItem (
const ReferencedItem&,
ProjectItemID newID,
double newStartTime)
override;
118 static constexpr int takeIndexNeedsUpdating = -2;
119 mutable int currentTakeIndex = takeIndexNeedsUpdating;
122 void invalidateCurrentTake() noexcept;
123 void invalidateCurrentTake (const
juce::ValueTree&) noexcept;
125 void valueTreePropertyChanged (
juce::ValueTree&, const
juce::Identifier&) override;
126 void valueTreeChildAdded (
juce::ValueTree&,
juce::ValueTree&) override;
127 void valueTreeChildRemoved (
juce::ValueTree&,
juce::ValueTree&,
int) override;
128 void valueTreeChildOrderChanged (
juce::ValueTree&,
int,
int) override;
int getNumChildren() const noexcept
ValueTree getChildWithName(const Identifier &type) const
Base class for Clips that produce some kind of audio e.g.
Base class for items that can contain clips.
juce::ValueTree state
The ValueTree of the Clip state.
An ID representing one of the items in a Project.
An audio clip that uses an audio file as its source.
juce::File getOriginalFile() const override
Must return the file that the source ProjectItemID refers to.
int getCurrentTake() const override
Returns the current take index.
void renderComplete() override
Callback to indicate that the render has completed.
juce::Array< ProjectItemID > getTakes() const override
Returns the ProjectItemID of the clip's takes.
int getNumTakes(bool includeComps) override
Returns the total number of takes.
juce::String getRenderMessage() override
Override this to return a custom message to be displayed over waveforms during rendering.
bool hasAnyTakes() const override
Returns true if this clip has any takes.
void deleteAllUnusedTakesConfirmingWithUser(bool deleteSourceFiles)
Deletes all but the current takes but shows a confirmation dialog first.
bool usesSourceFile() const override
True if it references a source file - i.e.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
bool needsRender() const override
Subclasses should override this to return true if they need the rest of the render callbacks.
RenderManager::Job::Ptr getRenderJob(const AudioFile &destFile) override
Subclasses should override this to return a RenderJob suitable for rendering its source file.
HashCode getHash() const override
Must return a unique hash for this clip's source.
~WaveAudioClip() override
Destructor.
bool isCurrentTakeComp() override
Returns true if the current take is a comp.
TimeDuration getSourceLength() const override
Must return the length in seconds of the source material e.g.
void deleteAllUnusedTakes(bool deleteSourceFiles)
Deletes all but the current takes.
void sourceMediaChanged() override
Called when the source media file reference (attribute "source") has changed - i.e.
void setCurrentTake(int takeIndex) override
Sets a given take index to be the current take.
void cloneFrom(Clip *) override
Clones the given clip to this clip.
bool isUsingFile(const AudioFile &) override
Should return true if the clip is referencing the file in any way.
void setLoopDefaults() override
Override this to fill in the LoopInfo structure as best fits the source.
WaveCompManager & getCompManager()
Returns the WaveCompManager for this clip.
juce::StringArray getTakeDescriptions() const override
Returns the descriptions of any takes.
void clearTakes() override
Clears any takes this clip has.
void initialise() override
Initialises the Clip.
void addTake(ProjectItemID)
Adds a new take with the ProjectItemID as the source.
Clip::Array unpackTakes(bool toNewTracks) override
Attempts to unpack the takes to new clips.
bool isMidi() const override
Returns true if this is a MidiClip.
Represents a duration in real-life time.
ID for objects of type EditElement - e.g.