38 , _fade_length (fade_length)
53 AudioIntervalMap::const_iterator sm;
67 if (silence.size () == 1 && silence.front().first == 0 && silence.front().second == region->
length() - 1) {
72 if (silence.empty()) {
82 AudioIntervalResult::const_iterator first_silence = silence.begin ();
83 if (first_silence->first != region->
start()) {
84 audible.push_back (std::make_pair (r->
start(), first_silence->first));
88 for (AudioIntervalResult::const_iterator i = silence.begin (); i != silence.end(); ++i) {
89 AudioIntervalResult::const_iterator j = i;
92 if (j != silence.end ()) {
93 audible.push_back (std::make_pair (i->second, j->first));
98 AudioIntervalResult::const_iterator last_silence = silence.end ();
103 if (last_silence->second != end_of_region - 1) {
104 audible.push_back (std::make_pair (last_silence->second, end_of_region - 1));
108 int const N = audible.size ();
110 for (AudioIntervalResult::const_iterator i = audible.begin(); i != audible.end(); ++i) {
131 if (progress && (n <= N)) {
void set_fade_out(FadeShape, framecnt_t)
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
std::list< std::pair< frameoffset_t, frameoffset_t > > AudioIntervalResult
bool set_name(const std::string &str)
std::map< boost::shared_ptr< ARDOUR::Region >, AudioIntervalResult > AudioIntervalMap
static std::string new_region_name(std::string)
const AudioIntervalMap & _smap
int run(boost::shared_ptr< ARDOUR::Region >, Progress *progress=0)
void set_fade_in(FadeShape, framecnt_t)
StripSilence(Session &, const AudioIntervalMap &, framecnt_t fade_length)
void set_fade_in_active(bool yn)
framepos_t position() const
std::vector< boost::shared_ptr< ARDOUR::Region > > results
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > position
framecnt_t length() const
framecnt_t _fade_length
fade in/out to use on trimmed regions, in samples
static boost::shared_ptr< Region > create(boost::shared_ptr< const Region > other, bool announce=false)
bool add(PropertyBase *prop)
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length