StandardMIDIFile -> MIDIFile.
git-svn-id: svn://localhost/ardour2/branches/3.0@4533 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#define EVORAL_LIB_SMF_HPP
|
||||
|
||||
#include <cassert>
|
||||
#include "evoral/StandardMIDIFile.hpp"
|
||||
#include "evoral/MIDIFile.hpp"
|
||||
|
||||
struct smf_struct;
|
||||
struct smf_track_struct;
|
||||
@@ -36,7 +36,7 @@ template<typename Time> class EventRingBuffer;
|
||||
/** Standard Midi File (Type 0)
|
||||
*/
|
||||
template<typename Time>
|
||||
class LibSMF : public StandardMIDIFile<Time> {
|
||||
class LibSMF : public MIDIFile<Time> {
|
||||
public:
|
||||
LibSMF() : _last_ev_time(0), _smf(0), _smf_track(0), _empty(true) {};
|
||||
virtual ~LibSMF();
|
||||
|
||||
@@ -28,12 +28,12 @@ namespace Evoral {
|
||||
template<typename Time> class Event;
|
||||
template<typename Time> class EventRingBuffer;
|
||||
|
||||
#define THROW_FILE_ERROR throw(typename StandardMIDIFile<Time>::FileError)
|
||||
#define THROW_FILE_ERROR throw(typename MIDIFile<Time>::FileError)
|
||||
|
||||
/** Standard MIDI File interface
|
||||
*/
|
||||
template<typename Time>
|
||||
class StandardMIDIFile {
|
||||
class MIDIFile {
|
||||
public:
|
||||
class FileError : public std::exception {
|
||||
const char* what() const throw() { return "libsmf error"; }
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef EVORAL_SMF_HPP
|
||||
#define EVORAL_SMF_HPP
|
||||
|
||||
#include "evoral/StandardMIDIFile.hpp"
|
||||
#include "evoral/MIDIFile.hpp"
|
||||
|
||||
namespace Evoral {
|
||||
|
||||
@@ -30,7 +30,7 @@ template<typename Time> class EventRingBuffer;
|
||||
/** Standard Midi File (Type 0)
|
||||
*/
|
||||
template<typename Time>
|
||||
class SMF : public StandardMIDIFile<Time> {
|
||||
class SMF : public MIDIFile<Time> {
|
||||
public:
|
||||
SMF();
|
||||
virtual ~SMF();
|
||||
|
||||
@@ -56,7 +56,7 @@ LibSMF<Time>::open(const std::string& path) THROW_FILE_ERROR
|
||||
if (!_smf) {
|
||||
_smf = smf_new();
|
||||
if (smf_set_ppqn(_smf, _ppqn) != 0) {
|
||||
throw typename StandardMIDIFile<Time>::FileError();
|
||||
throw typename MIDIFile<Time>::FileError();
|
||||
}
|
||||
|
||||
if(_smf == NULL) {
|
||||
@@ -81,7 +81,7 @@ LibSMF<Time>::close() THROW_FILE_ERROR
|
||||
assert(false);
|
||||
if (_smf) {
|
||||
if (smf_save(_smf, _path.c_str()) != 0) {
|
||||
throw typename StandardMIDIFile<Time>::FileError();
|
||||
throw typename MIDIFile<Time>::FileError();
|
||||
}
|
||||
smf_delete(_smf);
|
||||
_smf = 0;
|
||||
@@ -185,7 +185,7 @@ void
|
||||
LibSMF<Time>::end_write() THROW_FILE_ERROR
|
||||
{
|
||||
if (smf_save(_smf, _path.c_str()) != 0)
|
||||
throw typename StandardMIDIFile<Time>::FileError();
|
||||
throw typename MIDIFile<Time>::FileError();
|
||||
}
|
||||
|
||||
template class LibSMF<double>;
|
||||
|
||||
@@ -312,7 +312,7 @@ SMF<Time>::begin_write(FrameTime start_frame)
|
||||
|
||||
template<typename Time>
|
||||
void
|
||||
SMF<Time>::end_write() throw(typename StandardMIDIFile<Time>::FileError)
|
||||
SMF<Time>::end_write() throw(typename MIDIFile<Time>::FileError)
|
||||
{
|
||||
flush_header();
|
||||
flush_footer();
|
||||
|
||||
Reference in New Issue
Block a user