midway snapshot of work done on managing Region & Source lifetimes correctly. may...
[ardour.git] / libs / appleutility / CAAudioFile.h
index 2cfb4f3031523145d932069c97dcce6e811fd7ee..594545a9d1f87b9066434b6df30d033547e082a7 100644 (file)
@@ -43,6 +43,7 @@
 #ifndef __CAAudioFile_h__
 #define __CAAudioFile_h__
 
+#include <iostream>
 #include <AvailabilityMacros.h>
 
 #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
@@ -98,6 +99,7 @@ public:
        // implementation-independent helpers
        void    Open(const char *filePath) {
                FSRef fsref;
+               std::cerr << "Opening " << filePath << std::endl;
                XThrowIfError(FSPathMakeRef((UInt8 *)filePath, &fsref, NULL), "locate audio file");
                Open(fsref);
        }
@@ -113,8 +115,8 @@ public:
 
 #if CAAF_USE_EXTAUDIOFILE
 public:
-       CAAudioFile() : mExtAF(NULL) { }
-       virtual ~CAAudioFile() { if (mExtAF) Close(); }
+       CAAudioFile() : mExtAF(NULL) { std::cerr << "Constructing CAAudioFile\n"; }
+       virtual ~CAAudioFile() { std::cerr << "Destroying CAAudiofile @ " << this << std::endl; if (mExtAF) Close(); }
 
        void    Open(const FSRef &fsref) {
                                // open an existing file
@@ -131,6 +133,7 @@ public:
        }
        
        void    Close() {
+               std::cerr << "\tdisposeo of ext audio file @ " << mExtAF << std::endl;
                XThrowIfError(ExtAudioFileDispose(mExtAF), "ExtAudioFileClose failed");
                mExtAF = NULL;
        }