1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Use arrays of smart pointers to WaveClip

This commit is contained in:
Paul Licameli
2016-02-20 18:43:08 -05:00
committed by Paul Licameli
parent a400a7408c
commit cb48ca2b91
9 changed files with 108 additions and 156 deletions

View File

@@ -384,17 +384,12 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
// existing clips).
bool CanInsertClip(WaveClip* clip);
// Move a clip into a NEW track. This will remove the clip
// in this cliplist and add it to the cliplist of the
// other track (if that is not NULL). No fancy additional stuff is done.
// unused void MoveClipToTrack(int clipIndex, WaveTrack* dest);
void MoveClipToTrack(WaveClip *clip, WaveTrack* dest);
// Remove the clip from the track and return a pointer to it.
WaveClip* RemoveAndReturnClip(WaveClip* clip);
// Remove the clip from the track and return a SMART pointer to it.
// You assume responsibility for its memory!
movable_ptr<WaveClip> RemoveAndReturnClip(WaveClip* clip);
// Append a clip to the track
void AddClip(WaveClip* clip);
void AddClip(movable_ptr<WaveClip> &&clip); // Call using std::move
// Merge two clips, that is append data from clip2 to clip1,
// then remove clip2 from track.