Remove unused API, reduce sndfile/coreaudio specialization
authorRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2019 10:32:07 +0000 (11:32 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2019 10:32:07 +0000 (11:32 +0100)
libs/ardour/ardour/audioregion.h
libs/ardour/audioregion.cc

index c981a65df11c3ef8d274edfdedf1cc00a20c7fa6..6eaa37f1f4df214b622a9c1b36b6e196dc64d467 100644 (file)
@@ -77,10 +77,6 @@ class LIBARDOUR_API AudioRegion : public Region
 
        boost::shared_ptr<AudioSource> audio_source (uint32_t n=0) const;
 
-    // if several audio files associated with a region,
-    // information about file with MAX channel count will be provided
-    uint32_t get_related_audio_file_channel_count () const;
-
        void   set_scale_amplitude (gain_t);
        gain_t scale_amplitude() const { return _scale_amplitude; }
 
index b6e6f5a5728c92d555f91b46474e96f7810268bc..bf9b9816815548d00c820ac48ef95a731c39eebd 100644 (file)
@@ -56,9 +56,6 @@
 #include "ardour/progress.h"
 
 #include "ardour/sndfilesource.h"
-#ifdef HAVE_COREAUDIO
-#include "ardour/coreaudiosource.h"
-#endif // HAVE_COREAUDIO
 
 #include "pbd/i18n.h"
 #include <locale.h>
@@ -1604,34 +1601,6 @@ AudioRegion::audio_source (uint32_t n) const
        return boost::dynamic_pointer_cast<AudioSource>(source(n));
 }
 
-uint32_t
-AudioRegion::get_related_audio_file_channel_count () const
-{
-    uint32_t chan_count = 0;
-    for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) {
-
-        boost::shared_ptr<SndFileSource> sndf = boost::dynamic_pointer_cast<SndFileSource>(*i);
-        if (sndf ) {
-
-            if (sndf->channel_count() > chan_count) {
-                chan_count = sndf->channel_count();
-            }
-        }
-#ifdef HAVE_COREAUDIO
-        else {
-            boost::shared_ptr<CoreAudioSource> cauf = boost::dynamic_pointer_cast<CoreAudioSource>(*i);
-            if (cauf) {
-                if (cauf->channel_count() > chan_count) {
-                    chan_count = cauf->channel_count();
-                }
-            }
-        }
-#endif // HAVE_COREAUDIO
-    }
-
-    return chan_count;
-}
-
 void
 AudioRegion::clear_transients () // yet unused
 {