forward propagate solo-isolated status to everything fed by a route by something...
[ardour.git] / libs / ardour / ardour / coreaudiosource.h
index ad21188531de6c350c6cd64466ca74ed745f8c3e..f25f1b0154a026a752b153bf8184ae1e1ddb5d3f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2000 Paul Davis 
+    Copyright (C) 2000 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
-#ifndef __coreaudio_source_h__ 
+#ifndef __coreaudio_source_h__
 #define __coreaudio_source_h__
 
 #include <appleutility/CAAudioFile.h>
+#include "ardour/audiofilesource.h"
+#include <string>
 
-#include <ardour/audiofilesource.h>
+using namespace std;
 
 namespace ARDOUR {
 
@@ -33,7 +35,7 @@ class CoreAudioSource : public AudioFileSource {
        ~CoreAudioSource ();
 
        float sample_rate() const;
-       int update_header (nframes_t when, struct tm&, time_t);
+       int update_header (sframes_t when, struct tm&, time_t);
 
        int flush_header () {return 0;};
        void set_header_timeline_position () {};
@@ -41,18 +43,15 @@ class CoreAudioSource : public AudioFileSource {
        static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
 
   protected:
-       nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const;
+       nframes_t read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const;
        nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
 
   private:
        mutable CAAudioFile af;
        uint16_t n_channels;
 
-       mutable float *tmpbuf;
-       mutable nframes_t tmpbufsize;
-       mutable Glib::Mutex _tmpbuf_lock;
-
-       void init ();
+       void init_cafile ();
+       int safe_read (Sample*, nframes_t start, nframes_t cnt, AudioBufferList&) const;
 };
 
 }; /* namespace ARDOUR */