mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
AUP3: First round of updates
!!! THERE WILL NO DOUBT BE BUGS !!! This is a big one and there's still several things to complete. Just want to get this in the wild to start receiving feedback. One big thing right now is that it will NOT load pre-aup3 files. An importer is on the way for that.
This commit is contained in:
29
src/Track.h
29
src/Track.h
@@ -30,7 +30,6 @@
|
||||
|
||||
class wxTextFile;
|
||||
class CommonTrackCell;
|
||||
class DirManager;
|
||||
class Track;
|
||||
class AudioTrack;
|
||||
class PlayableTrack;
|
||||
@@ -310,11 +309,11 @@ private:
|
||||
ChannelType mChannel;
|
||||
double mOffset;
|
||||
|
||||
mutable std::shared_ptr<DirManager> mDirManager;
|
||||
mutable AudacityProject *mProject;
|
||||
|
||||
public:
|
||||
|
||||
Track(const std::shared_ptr<DirManager> &projDirManager);
|
||||
Track(AudacityProject *project);
|
||||
Track(const Track &orig);
|
||||
|
||||
virtual ~ Track();
|
||||
@@ -353,11 +352,11 @@ public:
|
||||
virtual void SetPan( float ){ ;}
|
||||
virtual void SetPanFromChannelType(){ ;};
|
||||
|
||||
// AS: Note that the dirManager is mutable. This is
|
||||
// AS: Note that the project is mutable. This is
|
||||
// mostly to support "Duplicate" of const objects,
|
||||
// but in general, mucking with the dir manager is
|
||||
// separate from the Track.
|
||||
const std::shared_ptr<DirManager> &GetDirManager() const { return mDirManager; }
|
||||
AudacityProject *GetProject() const { return mProject; }
|
||||
|
||||
// Create a NEW track and modify this track
|
||||
// Return non-NULL or else throw
|
||||
@@ -717,8 +716,8 @@ protected:
|
||||
class AUDACITY_DLL_API AudioTrack /* not final */ : public Track
|
||||
{
|
||||
public:
|
||||
AudioTrack(const std::shared_ptr<DirManager> &projDirManager)
|
||||
: Track{ projDirManager } {}
|
||||
AudioTrack(AudacityProject *project)
|
||||
: Track{ project } {}
|
||||
AudioTrack(const Track &orig) : Track{ orig } {}
|
||||
|
||||
// Serialize, not with tags of its own, but as attributes within a tag.
|
||||
@@ -732,8 +731,8 @@ public:
|
||||
class AUDACITY_DLL_API PlayableTrack /* not final */ : public AudioTrack
|
||||
{
|
||||
public:
|
||||
PlayableTrack(const std::shared_ptr<DirManager> &projDirManager)
|
||||
: AudioTrack{ projDirManager } {}
|
||||
PlayableTrack(AudacityProject *project)
|
||||
: AudioTrack{ project } {}
|
||||
PlayableTrack(const Track &orig) : AudioTrack{ orig } {}
|
||||
|
||||
bool GetMute () const { return mMute; }
|
||||
@@ -1410,12 +1409,6 @@ public:
|
||||
|
||||
double GetMinOffset() const;
|
||||
|
||||
#if LEGACY_PROJECT_FILE_SUPPORT
|
||||
// File I/O
|
||||
bool Load(wxTextFile * in, DirManager * dirManager) override;
|
||||
bool Save(wxTextFile * out, bool overwrite) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
// Visit all tracks satisfying a predicate, mutative access
|
||||
@@ -1584,9 +1577,9 @@ class AUDACITY_DLL_API TrackFactory final
|
||||
static void Destroy( AudacityProject &project );
|
||||
|
||||
TrackFactory( const ProjectSettings &settings,
|
||||
const std::shared_ptr<DirManager> &dirManager, const ZoomInfo *zoomInfo)
|
||||
AudacityProject &project, const ZoomInfo *zoomInfo)
|
||||
: mSettings{ settings }
|
||||
, mDirManager(dirManager)
|
||||
, mProject(project)
|
||||
, mZoomInfo(zoomInfo)
|
||||
{
|
||||
}
|
||||
@@ -1595,7 +1588,7 @@ class AUDACITY_DLL_API TrackFactory final
|
||||
|
||||
private:
|
||||
const ProjectSettings &mSettings;
|
||||
const std::shared_ptr<DirManager> mDirManager;
|
||||
AudacityProject &mProject;
|
||||
const ZoomInfo *const mZoomInfo;
|
||||
friend class AudacityProject;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user