13
0

Merge branch 'master' into cairocanvas

This commit is contained in:
Paul Davis 2013-12-28 14:00:20 -05:00
commit b880a38152
13 changed files with 36 additions and 39 deletions

View File

@ -4891,8 +4891,10 @@ Editor::add_routes (RouteList& routes)
rtv->view()->RegionViewRemoved.connect (sigc::mem_fun (*this, &Editor::region_view_removed));
}
_routes->routes_added (new_views);
_summary->routes_added (new_views);
if (new_views.size() > 0) {
_routes->routes_added (new_views);
_summary->routes_added (new_views);
}
if (show_editor_mixer_when_tracks_arrive) {
show_editor_mixer (true);

View File

@ -897,8 +897,6 @@ ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr<ARDOUR::Export
encoding_options_table.resize (1, 1);
encoding_options_table.attach (tag_checkbox, 0, 1, 0, 1);
update_tagging_selection ();
show_all_children ();
}

View File

@ -33,17 +33,7 @@ public:
AudioBuffer(size_t capacity);
~AudioBuffer();
void silence (framecnt_t len, framecnt_t offset = 0) {
if (!_silent) {
assert(_capacity > 0);
assert(offset + len <= _capacity);
memset(_data + offset, 0, sizeof (Sample) * len);
if (len == _capacity) {
_silent = true;
}
}
_written = true;
}
void silence (framecnt_t len, framecnt_t offset = 0);
/** Read @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
void read_from (const Sample* src, framecnt_t len, framecnt_t dst_offset = 0, framecnt_t src_offset = 0) {
@ -204,10 +194,11 @@ public:
Sample* data (framecnt_t offset = 0) {
assert(offset <= _capacity);
_silent = false;
return _data + offset;
}
bool check_silence (pframes_t, pframes_t&) const;
bool check_silence (pframes_t, bool, pframes_t&) const;
void prepare () { _written = false; _silent = false; }
bool written() const { return _written; }

View File

@ -62,7 +62,6 @@ public:
DataType type() const { return _type; }
bool silent() const { return _silent; }
void set_is_silent(bool yn) { _silent = yn; }
/** Reallocate the buffer used internally to handle at least @a size_t units of data.
*

View File

@ -87,7 +87,6 @@ public:
const ChanCount& count() const { return _count; }
ChanCount& count() { return _count; }
void set_is_silent(bool yn);
void silence (framecnt_t nframes, framecnt_t offset);
bool is_mirror() const { return _is_mirror; }

View File

@ -76,12 +76,26 @@ AudioBuffer::resize (size_t size)
}
bool
AudioBuffer::check_silence (pframes_t nframes, pframes_t& n) const
AudioBuffer::check_silence (pframes_t nframes, bool wholebuffer, pframes_t& n) const
{
for (n = 0; n < _size && n < nframes; ++n) {
for (n = 0; (wholebuffer || n < _size) && n < nframes; ++n) {
if (_data[n] != Sample (0)) {
return false;
}
}
return true;
}
void
AudioBuffer::silence (framecnt_t len, framecnt_t offset) {
pframes_t n = 0;
if (!_silent) {
assert(_capacity > 0);
assert(offset + len <= _capacity);
memset(_data + offset, 0, sizeof (Sample) * len);
if (len == _capacity) {
_silent = true;
}
}
_written = true;
}

View File

@ -468,16 +468,5 @@ BufferSet::silence (framecnt_t nframes, framecnt_t offset)
}
}
void
BufferSet::set_is_silent (bool yn)
{
for (std::vector<BufferVec>::iterator i = _buffers.begin(); i != _buffers.end(); ++i) {
for (BufferVec::iterator b = i->begin(); b != i->end(); ++b) {
(*b)->set_is_silent (yn);
}
}
}
} // namespace ARDOUR

View File

@ -25,12 +25,14 @@
#include "pbd/convert.h"
#include "ardour/audiofile_tagger.h"
#include "ardour/export_graph_builder.h"
#include "ardour/export_timespan.h"
#include "ardour/export_channel_configuration.h"
#include "ardour/export_status.h"
#include "ardour/export_format_specification.h"
#include "ardour/export_filename.h"
#include "ardour/session_metadata.h"
#include "i18n.h"
@ -280,13 +282,18 @@ ExportHandler::finish_timespan ()
while (config_map.begin() != timespan_bounds.second) {
ExportFormatSpecPtr fmt = config_map.begin()->second.format;
std::string filename = config_map.begin()->second.filename->get_path(fmt);
if (fmt->with_cue()) {
export_cd_marker_file (current_timespan, fmt, config_map.begin()->second.filename->get_path(fmt), CDMarkerCUE);
}
export_cd_marker_file (current_timespan, fmt, filename, CDMarkerCUE);
}
if (fmt->with_toc()) {
export_cd_marker_file (current_timespan, fmt, config_map.begin()->second.filename->get_path(fmt), CDMarkerTOC);
export_cd_marker_file (current_timespan, fmt, filename, CDMarkerTOC);
}
if (fmt->tag()) {
AudiofileTagger::tag_file(filename, *SessionMetadata::Metadata());
}
config_map.erase (config_map.begin());

View File

@ -505,7 +505,6 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
* all buffers appropriately.
*/
bufs.set_is_silent (false);
}
void

View File

@ -116,7 +116,6 @@ PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
_mtdm->process (nframes, in, out);
outbuf.set_is_silent (false);
outbuf.set_written (true);
}

View File

@ -96,6 +96,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type)
, _have_internal_generator (false)
, _solo_safe (false)
, _default_type (default_type)
, _order_key (0)
, _has_order_key (false)
, _remote_control_id (0)
, _in_configure_processors (false)
@ -418,8 +419,6 @@ Route::process_output_buffers (BufferSet& bufs,
framepos_t start_frame, framepos_t end_frame, pframes_t nframes,
int declick, bool gain_automation_ok)
{
bufs.set_is_silent (false);
/* figure out if we're going to use gain automation */
if (gain_automation_ok) {
_amp->set_gain_automation_buffer (_session.gain_automation_buffer ());

View File

@ -38,7 +38,7 @@ class MidiClockTicker::Position : public Timecode::BBT_Time
{
public:
Position() : speed(0.0f), frame(0) { }
Position() : speed(0.0f), frame(0), midi_beats(0) { }
~Position() { }
/** Sync timing information taken from the given Session

View File

@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#ifndef BUFFER_SIZE_SAMPLES