pulling trunk
[ardour.git] / libs / ardour / sndfilesource.cc
index 5db5f95c35f07ebc0fa55c7b990df77b4575385b..87f7faf423dff8330f8c83f4a8976233044e2276 100644 (file)
@@ -87,7 +87,7 @@ SndFileSource::init (const string& idstr, bool build_peak)
        _path = file;
 
        if (build_peak) {
-               if (initialize_peakfile (false, file)) {
+               if (initialize_peakfile (false, _path)) {
                        sf_close (sf);
                        sf = 0;
                        throw failed_constructor ();
@@ -109,6 +109,12 @@ SndFileSource::~SndFileSource ()
        }
 }
 
+float
+SndFileSource::sample_rate () const 
+{
+       return _info.samplerate;
+}
+
 jack_nframes_t
 SndFileSource::read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const
 {
@@ -132,7 +138,7 @@ SndFileSource::read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char
        real_cnt = cnt * _info.channels;
 
        {
-               LockMonitor lm (_tmpbuf_lock, __LINE__, __FILE__);
+               Glib::Mutex::Lock lm (_tmpbuf_lock);
                
                if (tmpbufsize < real_cnt) {