diff options
author | David Robillard <d@drobilla.net> | 2009-02-17 02:11:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-17 02:11:49 +0000 |
commit | 022818b4a796f52c0a91eea42e65aec0bc7bed43 (patch) | |
tree | f82bde33d44c7b3e16af7e837536665e17fe0189 /libs/evoral | |
parent | 4565b73a3993b0cb5ccb9170e276180f2b5c1372 (diff) |
Fix the horrible mess that was anything related to sources and paths.
Most significant changes:
- Factor out FileSource from AudioFileSource, use for SMFSource too
- Explicitly pass embedded rather than mysterious name mangling or whatever
- Destroy a ton of duplicated or very-nearly-duplicated code
- Clean up and document all that weird source stuff in session.cc
git-svn-id: svn://localhost/ardour2/branches/3.0@4609 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/evoral/SMF.hpp | 4 | ||||
-rw-r--r-- | libs/evoral/src/SMF.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libs/evoral/evoral/SMF.hpp b/libs/evoral/evoral/SMF.hpp index 0be2a4b8a7..4a6b21870b 100644 --- a/libs/evoral/evoral/SMF.hpp +++ b/libs/evoral/evoral/SMF.hpp @@ -47,7 +47,7 @@ public: int create(const std::string& path, int track=1, uint16_t ppqn=19200) THROW_FILE_ERROR; void close() THROW_FILE_ERROR; - const std::string& path() const { return _path; }; + const std::string& file_path() const { return _file_path; }; void seek_to_start() const; int seek_to_track(int track); @@ -65,7 +65,7 @@ public: void flush() {}; private: - std::string _path; + std::string _file_path; smf_t* _smf; smf_track_t* _smf_track; bool _empty; ///< true iff file contains(non-empty) events diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp index d7d052e3f0..372c37c0bb 100644 --- a/libs/evoral/src/SMF.cpp +++ b/libs/evoral/src/SMF.cpp @@ -80,8 +80,8 @@ SMF::open(const std::string& path, int track) THROW_FILE_ERROR smf_delete(_smf); } - _path = path; - _smf = smf_load(_path.c_str()); + _file_path = path; + _smf = smf_load(_file_path.c_str()); if (_smf == NULL) { return -1; } @@ -117,7 +117,7 @@ SMF::create(const std::string& path, int track, uint16_t ppqn) THROW_FILE_ERROR smf_delete(_smf); } - _path = path; + _file_path = path; _smf = smf_new(); if (smf_set_ppqn(_smf, ppqn) != 0) { @@ -148,7 +148,7 @@ void SMF::close() THROW_FILE_ERROR { if (_smf) { - if (smf_save(_smf, _path.c_str()) != 0) { + if (smf_save(_smf, _file_path.c_str()) != 0) { throw FileError(); } smf_delete(_smf); @@ -258,7 +258,7 @@ SMF::begin_write() void SMF::end_write() THROW_FILE_ERROR { - if (smf_save(_smf, _path.c_str()) != 0) + if (smf_save(_smf, _file_path.c_str()) != 0) throw FileError(); } |