tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tracktion::engine::EditSnapshot Class Reference

Holds a snapshot of an Edit file of the last time it was saved. More...

#include "tracktion_EditSnapshot.h"

Inheritance diagram for tracktion::engine::EditSnapshot:
juce::ReferenceCountedObject

Classes

struct  Listener
 
struct  ListHolder
 
struct  Marker
 

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< EditSnapshot >
 

Public Member Functions

ProjectItemID getID () const noexcept
 Returns the ProjectItemID.
 
juce::File getFile () const
 Returns the File if this was created from one.
 
juce::ValueTree getState () noexcept
 Returns the source Xml.
 
void setState (juce::ValueTree, TimeDuration editLength)
 Sets the Edit XML that the XmlEdit should refer to.
 
bool isValid () const
 Returns true if the current source is a valid Edit.
 
void refreshFromProjectManager ()
 Looks in the ProjectManager for the relevant ProjectItem and updates it's state to reflect this.
 
void refreshCacheAndNotifyListeners ()
 Refreshes the cached properties and calls any listeners.
 
juce::ReferenceCountedArray< EditSnapshotgetNestedEditObjects ()
 deals only with snapshots so it's relatively fast.
 
juce::String getName () const
 
int getNumTracks () const
 
int getNumAudioTracks () const
 
int getIndexOfTrackID (EditItemID trackID) const
 
juce::String getTrackName (int index) const
 
juce::String getTrackNameFromID (EditItemID trackID) const
 
bool isAudioTrack (int trackIndex) const
 
bool isTrackMuted (int trackIndex) const
 
bool isTrackSoloed (int trackIndex) const
 
bool isTrackSoloIsolated (int trackIndex) const
 
int audioToGlobalTrackIndex (int audioIndex) const
 
TimeDuration getLength () const
 
TimePosition getMarkIn () const
 
TimePosition getMarkOut () const
 
bool areMarksActive () const
 
double getTempo () const
 
int getTimeSigNumerator () const
 
int getTimeSigDenominator () const
 
int getPitch () const
 
const juce::Array< Marker > & getMarkers () const
 
const juce::Array< EditItemID > & getTracks () const
 
const juce::Array< ProjectItemID > & getEditClips () const
 
const juce::Array< ProjectItemID > & getClipsSourceIDs () const
 
HashCode getHash () const
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 

Static Public Member Functions

static Ptr getEditSnapshot (Engine &, ProjectItemID)
 

Public Attributes

Engineengine
 

Additional Inherited Members

- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 

Detailed Description

Holds a snapshot of an Edit file of the last time it was saved.

Definition at line 18 of file tracktion_EditSnapshot.h.


Class Documentation

◆ tracktion::engine::EditSnapshot::ListHolder

struct tracktion::engine::EditSnapshot::ListHolder

Definition at line 51 of file tracktion_EditSnapshot.cpp.

Class Members
SharedResourcePointer< EditSnapshotList > list

◆ tracktion::engine::EditSnapshot::Marker

struct tracktion::engine::EditSnapshot::Marker

Definition at line 27 of file tracktion_EditSnapshot.h.

Class Members
Colour colour
String name
TimeRange time

Member Typedef Documentation

◆ Ptr

Definition at line 22 of file tracktion_EditSnapshot.h.

Constructor & Destructor Documentation

◆ ~EditSnapshot()

tracktion::engine::EditSnapshot::~EditSnapshot ( )

Definition at line 81 of file tracktion_EditSnapshot.cpp.

Member Function Documentation

◆ addListener()

void tracktion::engine::EditSnapshot::addListener ( Listener l)

Definition at line 107 of file tracktion_EditSnapshot.h.

◆ areMarksActive()

bool tracktion::engine::EditSnapshot::areMarksActive ( ) const

Definition at line 87 of file tracktion_EditSnapshot.h.

◆ audioToGlobalTrackIndex()

int tracktion::engine::EditSnapshot::audioToGlobalTrackIndex ( int  audioIndex) const

Definition at line 197 of file tracktion_EditSnapshot.cpp.

◆ getClipsSourceIDs()

const juce::Array< ProjectItemID > & tracktion::engine::EditSnapshot::getClipsSourceIDs ( ) const

Definition at line 97 of file tracktion_EditSnapshot.h.

◆ getEditClips()

const juce::Array< ProjectItemID > & tracktion::engine::EditSnapshot::getEditClips ( ) const

Definition at line 96 of file tracktion_EditSnapshot.h.

◆ getEditSnapshot()

EditSnapshot::Ptr tracktion::engine::EditSnapshot::getEditSnapshot ( Engine engine,
ProjectItemID  itemID 
)
static

Definition at line 57 of file tracktion_EditSnapshot.cpp.

◆ getFile()

juce::File tracktion::engine::EditSnapshot::getFile ( ) const

Returns the File if this was created from one.

Definition at line 41 of file tracktion_EditSnapshot.h.

◆ getHash()

HashCode tracktion::engine::EditSnapshot::getHash ( ) const

Definition at line 98 of file tracktion_EditSnapshot.h.

◆ getID()

ProjectItemID tracktion::engine::EditSnapshot::getID ( ) const
noexcept

Returns the ProjectItemID.

Definition at line 38 of file tracktion_EditSnapshot.h.

◆ getIndexOfTrackID()

int tracktion::engine::EditSnapshot::getIndexOfTrackID ( EditItemID  trackID) const

Definition at line 75 of file tracktion_EditSnapshot.h.

◆ getLength()

TimeDuration tracktion::engine::EditSnapshot::getLength ( ) const

Definition at line 84 of file tracktion_EditSnapshot.h.

◆ getMarkers()

const juce::Array< Marker > & tracktion::engine::EditSnapshot::getMarkers ( ) const

Definition at line 94 of file tracktion_EditSnapshot.h.

◆ getMarkIn()

TimePosition tracktion::engine::EditSnapshot::getMarkIn ( ) const

Definition at line 85 of file tracktion_EditSnapshot.h.

◆ getMarkOut()

TimePosition tracktion::engine::EditSnapshot::getMarkOut ( ) const

Definition at line 86 of file tracktion_EditSnapshot.h.

◆ getName()

juce::String tracktion::engine::EditSnapshot::getName ( ) const

Definition at line 72 of file tracktion_EditSnapshot.h.

◆ getNestedEditObjects()

juce::ReferenceCountedArray< EditSnapshot > tracktion::engine::EditSnapshot::getNestedEditObjects ( )

deals only with snapshots so it's relatively fast.

Definition at line 310 of file tracktion_EditSnapshot.cpp.

◆ getNumAudioTracks()

int tracktion::engine::EditSnapshot::getNumAudioTracks ( ) const

Definition at line 74 of file tracktion_EditSnapshot.h.

◆ getNumTracks()

int tracktion::engine::EditSnapshot::getNumTracks ( ) const

Definition at line 73 of file tracktion_EditSnapshot.h.

◆ getPitch()

int tracktion::engine::EditSnapshot::getPitch ( ) const

Definition at line 92 of file tracktion_EditSnapshot.h.

◆ getState()

juce::ValueTree tracktion::engine::EditSnapshot::getState ( )
noexcept

Returns the source Xml.

Definition at line 44 of file tracktion_EditSnapshot.h.

◆ getTempo()

double tracktion::engine::EditSnapshot::getTempo ( ) const

Definition at line 89 of file tracktion_EditSnapshot.h.

◆ getTimeSigDenominator()

int tracktion::engine::EditSnapshot::getTimeSigDenominator ( ) const

Definition at line 91 of file tracktion_EditSnapshot.h.

◆ getTimeSigNumerator()

int tracktion::engine::EditSnapshot::getTimeSigNumerator ( ) const

Definition at line 90 of file tracktion_EditSnapshot.h.

◆ getTrackName()

juce::String tracktion::engine::EditSnapshot::getTrackName ( int  index) const

Definition at line 76 of file tracktion_EditSnapshot.h.

◆ getTrackNameFromID()

juce::String tracktion::engine::EditSnapshot::getTrackNameFromID ( EditItemID  trackID) const

Definition at line 77 of file tracktion_EditSnapshot.h.

◆ getTracks()

const juce::Array< EditItemID > & tracktion::engine::EditSnapshot::getTracks ( ) const

Definition at line 95 of file tracktion_EditSnapshot.h.

◆ isAudioTrack()

bool tracktion::engine::EditSnapshot::isAudioTrack ( int  trackIndex) const

Definition at line 78 of file tracktion_EditSnapshot.h.

◆ isTrackMuted()

bool tracktion::engine::EditSnapshot::isTrackMuted ( int  trackIndex) const

Definition at line 79 of file tracktion_EditSnapshot.h.

◆ isTrackSoloed()

bool tracktion::engine::EditSnapshot::isTrackSoloed ( int  trackIndex) const

Definition at line 80 of file tracktion_EditSnapshot.h.

◆ isTrackSoloIsolated()

bool tracktion::engine::EditSnapshot::isTrackSoloIsolated ( int  trackIndex) const

Definition at line 81 of file tracktion_EditSnapshot.h.

◆ isValid()

bool tracktion::engine::EditSnapshot::isValid ( ) const

Returns true if the current source is a valid Edit.

Definition at line 97 of file tracktion_EditSnapshot.cpp.

◆ refreshCacheAndNotifyListeners()

void tracktion::engine::EditSnapshot::refreshCacheAndNotifyListeners ( )

Refreshes the cached properties and calls any listeners.

Definition at line 102 of file tracktion_EditSnapshot.cpp.

◆ refreshFromProjectManager()

void tracktion::engine::EditSnapshot::refreshFromProjectManager ( )

Looks in the ProjectManager for the relevant ProjectItem and updates it's state to reflect this.

Definition at line 210 of file tracktion_EditSnapshot.cpp.

◆ removeListener()

void tracktion::engine::EditSnapshot::removeListener ( Listener l)

Definition at line 108 of file tracktion_EditSnapshot.h.

◆ setState()

void tracktion::engine::EditSnapshot::setState ( juce::ValueTree  newState,
TimeDuration  editLength 
)

Sets the Edit XML that the XmlEdit should refer to.

This will take ownership of the XmlElement so don't hang on to it. Once this is set you can retrieve the Xml for saving etc. using getXml(). As the length isn't stored in the Xml we need to provide it.

Note that this DOES NOT update the cached properties, once the Xml has been set call refreshCacheAndSave to update these. Although this seems a bit convoluted it's how the temp Edit files work so we need to follow this. It means that this will hold up-to-date Xml but only cached properties of the last save which can be used in things like EditClips.

Definition at line 87 of file tracktion_EditSnapshot.cpp.

Member Data Documentation

◆ engine

Engine& tracktion::engine::EditSnapshot::engine

Definition at line 110 of file tracktion_EditSnapshot.h.


The documentation for this class was generated from the following files: