diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-10 18:28:55 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-10 18:28:55 -0500 |
commit | 294b99aabf3eb96323a3159b7a5e1b4bfc1ff04a (patch) | |
tree | dbb6bfba564d2979c8cebbfebe162a9659dff5aa /libs/evoral | |
parent | 17707b9674958391949e59a724a264cdcc2d65ff (diff) |
remove file manager LRU cache from code.
This was a very clever attempt to fix a non-problem. If the platform doesn't have enough file descriptors available
then the platform is broken and we're not going to hack around trying to fix it.
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/src/SMF.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp index 78800923ca..40c167c38e 100644 --- a/libs/evoral/src/SMF.cpp +++ b/libs/evoral/src/SMF.cpp @@ -25,7 +25,6 @@ #include "evoral/Event.hpp" #include "evoral/SMF.hpp" #include "evoral/midi_util.h" -#include "pbd/file_manager.h" #ifdef COMPILER_MSVC extern double round(double x); @@ -78,8 +77,7 @@ SMF::seek_to_track(int track) bool SMF::test(const std::string& path) { - PBD::StdioFileDescriptor d (path, "r"); - FILE* f = d.allocate (); + FILE* f = fopen (path.c_str(), "r"); if (f == 0) { return false; } @@ -110,8 +108,7 @@ SMF::open(const std::string& path, int track) THROW_FILE_ERROR _file_path = path; - PBD::StdioFileDescriptor d (_file_path, "r"); - FILE* f = d.allocate (); + FILE* f = fopen (_file_path.c_str(), "r"); if (f == 0) { return -1; } @@ -182,8 +179,7 @@ SMF::create(const std::string& path, int track, uint16_t ppqn) THROW_FILE_ERROR { /* put a stub file on disk */ - PBD::StdioFileDescriptor d (_file_path, "w+"); - FILE* f = d.allocate (); + FILE* f = fopen (_file_path.c_str(), "w+"); if (f == 0) { return -1; } @@ -396,8 +392,7 @@ void SMF::end_write() THROW_FILE_ERROR { Glib::Threads::Mutex::Lock lm (_smf_lock); - PBD::StdioFileDescriptor d (_file_path, "w+"); - FILE* f = d.allocate (); + FILE* f = fopen (_file_path.c_str(), "w+"); if (f == 0) { throw FileError (_file_path); } |