summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_source.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-08-11 03:24:57 +0000
committerDavid Robillard <d@drobilla.net>2006-08-11 03:24:57 +0000
commit30c08ba655330232767554c48bda1975bfb5628c (patch)
treec6bf6b62de69afdd6b2a42ef3a7d9f80e0f65f7c /libs/ardour/midi_source.cc
parentab6f1ed9bafa869648b6e94ee5186ff317b32c3e (diff)
- Changed IO's vector<Port*>'s to PortList
- Added new Port classes, code to drive them - Added PortList, which is a filthy mess ATM (nevermind that, it's the interface that's important at this stage) - Added ChanCount, though it isn't very thoroughly used yet. That's the next step.... - Fixed a few bugs relating to loading sessions saved with trunk - Fixed a few random other bugs Slowly working towards type agnosticism while keeping all the former code/logic intact is the name of the game here Warning: Removing ports is currently (intentionally) broken due solely to laziness. git-svn-id: svn://localhost/ardour2/branches/midi@786 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_source.cc')
-rw-r--r--libs/ardour/midi_source.cc32
1 files changed, 7 insertions, 25 deletions
diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc
index f9fc8dd8ec..4cda0f6ebd 100644
--- a/libs/ardour/midi_source.cc
+++ b/libs/ardour/midi_source.cc
@@ -90,44 +90,26 @@ MidiSource::set_state (const XMLNode& node)
}
jack_nframes_t
-MidiSource::read (unsigned char *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const
+MidiSource::read (RawMidi* dst, jack_nframes_t start, jack_nframes_t cnt) const
{
- //Glib::Mutex::Lock lm (_lock);
- //return read_unlocked (dst, start, cnt, workbuf);
- return 0;
+ Glib::Mutex::Lock lm (_lock);
+ return read_unlocked (dst, start, cnt);
}
jack_nframes_t
-MidiSource::write (unsigned char *dst, jack_nframes_t cnt, char * workbuf)
+MidiSource::write (RawMidi* dst, jack_nframes_t cnt)
{
- //Glib::Mutex::Lock lm (_lock);
- //return write_unlocked (dst, cnt, workbuf);
- return 0;
+ Glib::Mutex::Lock lm (_lock);
+ return write_unlocked (dst, cnt);
}
-
bool
MidiSource::file_changed (string path)
{
struct stat stat_file;
- //struct stat stat_peak;
int e1 = stat (path.c_str(), &stat_file);
- //int e2 = stat (peak_path(path).c_str(), &stat_peak);
- if (!e1){//&& !e2 && stat_file.st_mtime > stat_peak.st_mtime){
- return true;
- } else {
- return false;
- }
-}
-
-
-void
-MidiSource::update_length (jack_nframes_t pos, jack_nframes_t cnt)
-{
- if (pos + cnt > _length) {
- _length = pos+cnt;
- }
+ return ( !e1 );
}