diff options
Diffstat (limited to 'src/engine/SMFReader.hpp')
-rw-r--r-- | src/engine/SMFReader.hpp | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/engine/SMFReader.hpp b/src/engine/SMFReader.hpp index 053a62c..a3f38ed 100644 --- a/src/engine/SMFReader.hpp +++ b/src/engine/SMFReader.hpp @@ -1,5 +1,5 @@ /* - This file is part of Raul. + This file is part of Machina. Copyright 2007-2012 David Robillard <http://drobilla.net> Raul is free software: you can redistribute it and/or modify it under the @@ -14,8 +14,8 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RAUL_SMF_READER_HPP -#define RAUL_SMF_READER_HPP +#ifndef MACHINA_SMF_READER_HPP +#define MACHINA_SMF_READER_HPP #include <stdexcept> #include <string> @@ -29,22 +29,31 @@ namespace Machina { * Currently this only reads SMF files with tempo-based timing. * \ingroup raul */ -class SMFReader { +class SMFReader +{ public: - class PrematureEOF : public std::exception { + class PrematureEOF + : public std::exception + { const char* what() const throw() { return "Unexpected end of file"; } }; - class CorruptFile : public std::exception { + class CorruptFile + : public std::exception + { const char* what() const throw() { return "Corrupted file"; } }; - class UnsupportedTime : public std::exception { - const char* what() const throw() { return "Unsupported time stamp type (SMPTE)"; } + class UnsupportedTime + : public std::exception + { + const char* what() const throw() { return + "Unsupported time stamp type (SMPTE)"; } }; - explicit SMFReader(const std::string filename=""); + explicit SMFReader(const std::string filename = ""); ~SMFReader(); - bool open(const std::string& filename) throw (std::logic_error, UnsupportedTime); + bool open(const std::string& filename) throw (std::logic_error, + UnsupportedTime); bool seek_to_track(unsigned track) throw (std::logic_error); @@ -56,7 +65,7 @@ public: uint8_t* buf, uint32_t* ev_size, uint32_t* ev_delta_time) - throw (std::logic_error, PrematureEOF, CorruptFile); + throw (std::logic_error, PrematureEOF, CorruptFile); void close(); @@ -77,5 +86,4 @@ protected: } // namespace Machina -#endif // RAUL_SMF_READER_HPP - +#endif // MACHINA_SMF_READER_HPP |