Shrink exposed SMF API.
authorDavid Robillard <d@drobilla.net>
Mon, 9 Feb 2009 21:11:32 +0000 (21:11 +0000)
committerDavid Robillard <d@drobilla.net>
Mon, 9 Feb 2009 21:11:32 +0000 (21:11 +0000)
Fix warning.

git-svn-id: svn://localhost/ardour2/branches/3.0@4507 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/midi_diskstream.cc
libs/evoral/evoral/SMF.hpp

index 8d79906f0441371e46b3dcb4a3c37d7f72d05b85..3b3a8494f9ac0a04e3d714c419db6714143ece3f 100644 (file)
@@ -1489,13 +1489,13 @@ MidiDiskstream::get_playback(MidiBuffer& dst, nframes_t start, nframes_t end, nf
        MidiBuffer::iterator this_cycle_start = dst.end();
        
        // Translates stamps to be relative to start, but add offset.
-       const size_t events_read = _playback_buf->read(dst, start, end, offset);
-
-       gint32 frames_read = end - start;
-       /*cout << "frames read = " << frames_read << " events read = " << events_read
+       /*const size_t events_read = _playback_buf->read(dst, start, end, offset);
+       cout << "frames read = " << frames_read << " events read = " << events_read
                << " end = " << end << " start = " << start << " offset = " << offset
                << " readspace " << _playback_buf->read_space()
                << " writespace " << _playback_buf->write_space() << endl;*/
+       
+       gint32 frames_read = end - start;
        g_atomic_int_add(&_frames_read_from_ringbuffer, frames_read);
        
        // Feed the data through the MidiStateTracker
index 2587781d7af06a7fae6481f27a239e821dd681a1..2d6ec4e5d91c9669278de0162aa8ac2414d5f4f3 100644 (file)
@@ -56,6 +56,9 @@ protected:
        int  open(const std::string& path);
        void close();
        
+       int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;
+
+private:
        /** Used by flush_footer() to find the position to write the footer */
        void seek_to_footer_position();
        
@@ -66,9 +69,7 @@ protected:
        void     write_chunk(const char id[4], uint32_t length, void* data);
        size_t   write_var_len(uint32_t val);
        uint32_t read_var_len() const;
-       int      read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;
 
-private:
        static const uint16_t _ppqn = 19200;
 
        FILE*    _fd;