const correctness.
[ardour.git] / libs / ardour / audiofilesource.cc
index 1500b139acdff2edf26c3b34e5428b2fa040d1e2..c783b47b9bf751a0921c3c87327c73922a9d080a 100644 (file)
@@ -70,7 +70,7 @@ using namespace Glib;
 
 ustring AudioFileSource::peak_dir = "";
 
-boost::signals2::signal<void()> AudioFileSource::HeaderPositionOffsetChanged;
+PBD::Signal0<void> AudioFileSource::HeaderPositionOffsetChanged;
 uint64_t           AudioFileSource::header_position_offset = 0;
 
 /* XXX maybe this too */
@@ -222,7 +222,7 @@ AudioFileSource::old_peak_path (ustring audio_path)
 #ifdef __APPLE__
        snprintf (buf, sizeof (buf), "%u-%u-%d.peak", stat_mount.st_ino, stat_file.st_ino, _channel);
 #else
-       snprintf (buf, sizeof (buf), "%ld-%ld-%d.peak", stat_mount.st_ino, stat_file.st_ino, _channel);
+       snprintf (buf, sizeof (buf), "%" PRId64 "-%" PRId64 "-%d.peak", (int64_t) stat_mount.st_ino, (int64_t) stat_file.st_ino, _channel);
 #endif
 
        ustring res = peak_dir;
@@ -235,16 +235,20 @@ AudioFileSource::old_peak_path (ustring audio_path)
 bool
 AudioFileSource::get_soundfile_info (ustring path, SoundFileInfo& _info, string& error_msg)
 {
+        /* try sndfile first because it gets timecode info from .wav (BWF) if it exists,
+           which at present, ExtAudioFile from Apple seems unable to do.
+        */
+
+       if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) {
+               return true;
+       }
+        
 #ifdef HAVE_COREAUDIO
        if (CoreAudioSource::get_soundfile_info (path, _info, error_msg) == 0) {
                return true;
        }
 #endif // HAVE_COREAUDIO
 
-       if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) {
-               return true;
-       }
-
        return false;
 }