|
Audacity
3.0.3
|
Go to the documentation of this file.
19 #include "../Audacity.h"
24 #include "../WaveTrack.h"
33 for(
unsigned int i=0;i<
mTasks.size();i++)
35 mTasks[i]->TerminateAndBlock();
51 for(
unsigned int i=0;i<
mTasks.size();i++)
68 const std::shared_ptr< WaveTrack > &track)
72 for(
unsigned int i=0;i<
mTasks.size();i++)
74 mTasks[i]->AddWaveTrack(track);
75 mTasks[i]->SetNeedsODUpdate();
85 for(
unsigned int i=0;i<
mTracks.size();i++)
87 if (
mTracks[i].lock().get() == track )
98 const std::shared_ptr< WaveTrack > &track)
110 ODTask *task = mtask.get();
113 mTasks.push_back(std::move(mtask));
132 const std::shared_ptr< WaveTrack > &track)
146 for(
unsigned int i=0;i<
mTracks.size();i++)
148 if (
mTracks[i].lock() == track )
154 for(
unsigned int j=0;j<
mTasks.size();j++)
156 auto task =
mTasks[j]->Clone();
157 mTasks[j]->StopUsingWaveTrack( track.get() );
181 for(
unsigned int i=0;i<
mTasks.size();i++)
183 mTasks[i]->DemandTrackUpdate(track,seconds);
193 const std::shared_ptr<Track> &newTrack)
198 for(
unsigned int i=0;i<
mTasks.size();i++)
203 for(
unsigned int i=0;i<
mTracks.size();i++)
204 if (
mTracks[i].lock().get() == oldTrack )
205 mTracks[i] = std::static_pointer_cast<WaveTrack>( newTrack );
256 isEmpty = isEmpty ||
mTasks.size()<=0;
270 mTasks[0]->RecalculatePercentComplete();
272 ret =
mTasks[0]->IsComplete();
314 mTipMsg =
XO(
"%s %2.0f%% complete. Click to change task focal point.")
331 new_end = std::remove_if( begin, end,
332 [](
const std::weak_ptr<WaveTrack> &ptr ){
return ptr.expired(); } );
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
ODTask * GetTask(size_t x)
returns a ODTask at position x
std::vector< std::unique_ptr< ODTask > > mTasks
the list of tasks associated with the tracks. This class owns these tasks.
ODTask * GetFrontTask()
Schedules the front task for immediate execution.
int GetNumWaveTracks()
returns the number of wavetracks in this queue.
void FillTipForWaveTrack(const WaveTrack *t, TranslatableString &tip)
fills in the status bar message for a given track
void AddTask(std::unique_ptr< ODTask > &&mtask)
Add a task to the queue.
virtual ~ODWaveTrackTaskQueue()
void AddNewTask(std::unique_ptr< ODTask > &&mtask, bool lockMutex=true)
Adds a wavetrack, creates a queue member.
bool IsFrontTaskComplete()
std::vector< std::weak_ptr< WaveTrack > > mTracks
the list of tracks associated with this queue.
bool ContainsWaveTrack(const WaveTrack *track)
returns true if the argument is in the WaveTrack list.
void ReplaceWaveTrack(Track *oldTrack, const std::shared_ptr< Track > &newTrack)
replaces all instances of a WaveTrack within this task with another.
void RemoveTaskIfInQueue(ODTask *task)
removes a task from the active task queue
void MakeWaveTrackIndependent(const std::shared_ptr< WaveTrack > &track)
void RemoveFrontTask()
Removes and deletes the front task from the list.
bool CanMergeWith(ODWaveTrackTaskQueue *otherQueue)
returns whether or not this queue's task list and another's can merge together, as when we make two m...
A class representing a modular task to be used with the On-Demand structures.
A class representing a modular task to be used with the On-Demand structures.
void MergeWaveTrack(const std::shared_ptr< WaveTrack > &track)
ODWaveTrackTaskQueue()
Constructs an ODWaveTrackTaskQueue.
Abstract base class for an object holding data associated with points on a time axis.
virtual int GetNumWaveTracks()
int GetNumTasks()
returns the number of ODTasks in this queue
TranslatableString mTipMsg
virtual std::shared_ptr< WaveTrack > GetWaveTrack(int i)
static ODManager *(* Instance)()
void AddWaveTrack(const std::shared_ptr< WaveTrack > &track)
Adds a track to the associated list.
void DemandTrackUpdate(WaveTrack *track, double seconds)
changes the tasks associated with this Waveform to process the task from a different point in the tra...