mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 14:45:43 +01:00
Detect libsmf error and throw exceptions.
git-svn-id: svn://localhost/ardour2/branches/3.0@4532 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
13bcd43423
commit
33bbc5cd84
6 changed files with 30 additions and 19 deletions
|
|
@ -57,7 +57,8 @@ SMF<Time>::~SMF()
|
|||
*/
|
||||
template<typename Time>
|
||||
int
|
||||
SMF<Time>::open(const std::string& path)
|
||||
SMF<Time>::open(const std::string& path) THROW_FILE_ERROR
|
||||
|
||||
{
|
||||
//cerr << "Opening SMF file " << path() << " writeable: " << writable() << endl;
|
||||
_fd = fopen(path.c_str(), "r+");
|
||||
|
|
@ -92,7 +93,7 @@ SMF<Time>::open(const std::string& path)
|
|||
|
||||
template<typename Time>
|
||||
void
|
||||
SMF<Time>::close()
|
||||
SMF<Time>::close() THROW_FILE_ERROR
|
||||
{
|
||||
if (_fd) {
|
||||
flush_header();
|
||||
|
|
@ -311,7 +312,7 @@ SMF<Time>::begin_write(FrameTime start_frame)
|
|||
|
||||
template<typename Time>
|
||||
void
|
||||
SMF<Time>::end_write()
|
||||
SMF<Time>::end_write() throw(typename StandardMIDIFile<Time>::FileError)
|
||||
{
|
||||
flush_header();
|
||||
flush_footer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue