Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.

Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red.  I don't know the emacs equivalent...


git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-10-14 16:10:01 +00:00
parent 8c4ce1e2ce
commit bb9cc45cd2
730 changed files with 14946 additions and 14948 deletions

View file

@ -71,15 +71,15 @@ public:
struct GainControl : public AutomationControl {
GainControl (std::string name, Session& session, Amp* a, const Evoral::Parameter &param,
boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>() )
: AutomationControl (session, param, al, name )
boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>() )
: AutomationControl (session, param, al, name)
, _amp (a)
{}
void set_value (float val);
float get_value (void) const;
void set_value (float val);
float get_value (void) const;
Amp* _amp;
Amp* _amp;
};
boost::shared_ptr<GainControl> gain_control() {

View file

@ -72,9 +72,9 @@ namespace ARDOUR {
extern Change BoundsChanged;
struct LocaleGuard {
LocaleGuard (const char*);
~LocaleGuard ();
const char* old;
LocaleGuard (const char*);
~LocaleGuard ();
const char* old;
};
static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */

View file

@ -182,36 +182,36 @@ class AudioDiskstream : public Diskstream
struct ChannelInfo {
ChannelInfo (nframes_t buffer_size, nframes_t speed_buffer_size, nframes_t wrap_buffer_size);
~ChannelInfo ();
ChannelInfo (nframes_t buffer_size, nframes_t speed_buffer_size, nframes_t wrap_buffer_size);
~ChannelInfo ();
Sample *playback_wrap_buffer;
Sample *capture_wrap_buffer;
Sample *speed_buffer;
Sample *playback_wrap_buffer;
Sample *capture_wrap_buffer;
Sample *speed_buffer;
float peak_power;
float peak_power;
boost::shared_ptr<AudioFileSource> fades_source;
boost::shared_ptr<AudioFileSource> write_source;
boost::shared_ptr<AudioFileSource> fades_source;
boost::shared_ptr<AudioFileSource> write_source;
/// the Port that our audio data comes from
Port *source;
Sample *current_capture_buffer;
Sample *current_playback_buffer;
/// the Port that our audio data comes from
Port *source;
Sample *current_capture_buffer;
Sample *current_playback_buffer;
RingBufferNPT<Sample> *playback_buf;
RingBufferNPT<Sample> *capture_buf;
RingBufferNPT<Sample> *playback_buf;
RingBufferNPT<Sample> *capture_buf;
Sample* scrub_buffer;
Sample* scrub_forward_buffer;
Sample* scrub_reverse_buffer;
Sample* scrub_buffer;
Sample* scrub_forward_buffer;
Sample* scrub_reverse_buffer;
RingBufferNPT<Sample>::rw_vector playback_vector;
RingBufferNPT<Sample>::rw_vector capture_vector;
RingBufferNPT<Sample>::rw_vector playback_vector;
RingBufferNPT<Sample>::rw_vector capture_vector;
RingBufferNPT<CaptureTransition> * capture_transition_buf;
// the following are used in the butler thread only
nframes_t curr_capture_cnt;
RingBufferNPT<CaptureTransition> * capture_transition_buf;
// the following are used in the butler thread only
nframes_t curr_capture_cnt;
};
typedef std::vector<ChannelInfo*> ChannelList;
@ -225,9 +225,8 @@ class AudioDiskstream : public Diskstream
int do_refill_with_alloc ();
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
nframes_t& start, nframes_t cnt,
ChannelInfo* channel_info, int channel, bool reversed);
nframes_t& start, nframes_t cnt,
ChannelInfo* channel_info, int channel, bool reversed);
void finish_capture (bool rec_monitors_input, boost::shared_ptr<ChannelList>);
void transport_stopped (struct tm&, time_t, bool abort);

View file

@ -40,7 +40,7 @@ class AudioTrack : public Track
bool can_use_mode (TrackMode m, bool& bounce_required);
int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
int declick, bool can_record, bool rec_monitors_input);
int declick, bool can_record, bool rec_monitors_input);
boost::shared_ptr<AudioDiskstream> audio_diskstream() const;

View file

@ -110,16 +110,16 @@ class AUPlugin : public ARDOUR::Plugin
boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
boost::shared_ptr<CAComponent> get_comp () const { return comp; }
OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList* ioData);
OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList* ioData);
private:
boost::shared_ptr<CAComponent> comp;
boost::shared_ptr<CAAudioUnit> unit;
boost::shared_ptr<CAComponent> comp;
boost::shared_ptr<CAAudioUnit> unit;
bool initialized;
bool initialized;
int32_t input_channels;
int32_t output_channels;
std::vector<std::pair<int,int> > io_configs;
@ -142,10 +142,10 @@ class AUPlugin : public ARDOUR::Plugin
std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
uint32_t current_maxbuf;
nframes_t current_offset;
nframes_t cb_offset;
vector<Sample*>* current_buffers;
nframes_t frames_processed;
nframes_t current_offset;
nframes_t cb_offset;
vector<Sample*>* current_buffers;
nframes_t frames_processed;
std::vector<AUParameterDescriptor> descriptors;
void init ();
@ -159,7 +159,7 @@ struct AUPluginCachedInfo {
class AUPluginInfo : public PluginInfo {
public:
AUPluginInfo (boost::shared_ptr<CAComponentDescription>);
AUPluginInfo (boost::shared_ptr<CAComponentDescription>);
~AUPluginInfo ();
PluginPtr load (Session& session);

View file

@ -108,18 +108,18 @@ class AudioEngine : public sigc::trackable
void remove_session ();
class PortRegistrationFailure : public std::exception {
public:
public:
PortRegistrationFailure (const char* why = "") {
reason = why;
}
virtual const char *what() const throw() { return reason; }
private:
private:
const char* reason;
};
class NoBackendAvailable : public std::exception {
public:
public:
virtual const char *what() const throw() { return "could not connect to engine backend"; }
};

View file

@ -45,7 +45,7 @@ public:
Glib::ustring peak_path (Glib::ustring audio_path);
Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path,
Glib::ustring audio_path);
Glib::ustring audio_path);
static void set_peak_dir (Glib::ustring dir) { peak_dir = dir; }
@ -92,7 +92,7 @@ protected:
/** Constructor to be called for new in-session files */
AudioFileSource (Session&, const Glib::ustring& path, bool embedded, Source::Flag flags,
SampleFormat samp_format, HeaderFormat hdr_format);
SampleFormat samp_format, HeaderFormat hdr_format);
/** Constructor to be called for existing in-session files */
AudioFileSource (Session&, const XMLNode&, bool must_exist = true);

View file

@ -77,8 +77,8 @@ class AudioRegion : public Region
boost::shared_ptr<AutomationList> envelope() { return _envelope; }
virtual nframes_t read_peaks (PeakData *buf, nframes_t npeaks,
nframes_t offset, nframes_t cnt,
uint32_t chan_n=0, double samples_per_unit= 1.0) const;
nframes_t offset, nframes_t cnt,
uint32_t chan_n=0, double samples_per_unit= 1.0) const;
/* Readable interface */
@ -185,12 +185,12 @@ class AudioRegion : public Region
void recompute_gain_at_start ();
nframes_t _read_at (const SourceList&, nframes_t limit,
Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
sframes_t position, nframes_t cnt,
uint32_t chan_n = 0,
nframes_t read_frames = 0,
nframes_t skip_frames = 0,
ReadOps readops = ReadOps (~0)) const;
Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
sframes_t position, nframes_t cnt,
uint32_t chan_n = 0,
nframes_t read_frames = 0,
nframes_t skip_frames = 0,
ReadOps readops = ReadOps (~0)) const;
void recompute_at_start ();
void recompute_at_end ();

View file

@ -69,10 +69,10 @@ class AudioSource : virtual public Source,
uint32_t read_data_count() const { return _read_data_count; }
uint32_t write_data_count() const { return _write_data_count; }
int read_peaks (PeakData *peaks, nframes_t npeaks,
int read_peaks (PeakData *peaks, nframes_t npeaks,
sframes_t start, nframes_t cnt, double samples_per_visual_peak) const;
int build_peaks ();
int build_peaks ();
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
mutable sigc::signal<void> PeaksReady;
@ -117,7 +117,7 @@ class AudioSource : virtual public Source,
int initialize_peakfile (bool newfile, Glib::ustring path);
int build_peaks_from_scratch ();
int compute_and_write_peaks (Sample* buf, sframes_t first_frame, nframes_t cnt,
bool force, bool intermediate_peaks_ready_signal);
bool force, bool intermediate_peaks_ready_signal);
void truncate_peakfile();
mutable off_t _peak_byte_max; // modified in compute_and_write_peak()
@ -128,12 +128,12 @@ class AudioSource : virtual public Source,
virtual Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path,
Glib::ustring audio_path) = 0;
virtual int read_peaks_with_fpp (PeakData *peaks,
nframes_t npeaks, sframes_t start, nframes_t cnt,
double samples_per_visual_peak, nframes_t fpp) const;
virtual int read_peaks_with_fpp (PeakData *peaks,
nframes_t npeaks, sframes_t start, nframes_t cnt,
double samples_per_visual_peak, nframes_t fpp) const;
int compute_and_write_peaks (Sample* buf, sframes_t first_frame, nframes_t cnt,
bool force, bool intermediate_peaks_ready_signal, nframes_t frames_per_peak);
bool force, bool intermediate_peaks_ready_signal, nframes_t frames_per_peak);
private:
int peakfile;

View file

@ -38,9 +38,9 @@ class AutomationControl : public PBD::Controllable, public Evoral::Control
{
public:
AutomationControl(ARDOUR::Session&,
const Evoral::Parameter& parameter,
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
const std::string& name="");
const Evoral::Parameter& parameter,
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
const std::string& name="");
boost::shared_ptr<AutomationList> alist() const {
return boost::dynamic_pointer_cast<AutomationList>(_list);

View file

@ -44,16 +44,16 @@ class Crossfade : public ARDOUR::AudioRegion
public:
class NoCrossfadeHere: std::exception {
public:
public:
virtual const char *what() const throw() { return "no crossfade should be constructed here"; }
};
/* constructor for "fixed" xfades at each end of an internal overlap */
Crossfade (boost::shared_ptr<ARDOUR::AudioRegion> in, boost::shared_ptr<ARDOUR::AudioRegion> out,
nframes_t position,
nframes_t initial_length,
AnchorPoint);
nframes_t position,
nframes_t initial_length,
AnchorPoint);
/* constructor for xfade between two regions that are overlapped in any way
except the "internal" case.
@ -81,10 +81,10 @@ class Crossfade : public ARDOUR::AudioRegion
boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
nframes_t read_at (Sample *buf, Sample *mixdown_buffer,
float *gain_buffer, sframes_t position, nframes_t cnt,
uint32_t chan_n,
nframes_t read_frames = 0,
nframes_t skip_frames = 0) const;
float *gain_buffer, sframes_t position, nframes_t cnt,
uint32_t chan_n,
nframes_t read_frames = 0,
nframes_t skip_frames = 0) const;
bool refresh ();

View file

@ -221,8 +221,8 @@ class Diskstream : public SessionObject, public boost::noncopyable
virtual void transport_looped (nframes_t transport_frame) = 0;
struct CaptureInfo {
uint32_t start;
uint32_t frames;
uint32_t start;
uint32_t frames;
};
virtual void init (Flag);

View file

@ -48,8 +48,8 @@ class ElementImportHandler
* @param source XML tree to be parsed
* @see elements
*/
ElementImportHandler (XMLTree const & source, ARDOUR::Session & session) :
source (source), session (session) { }
ElementImportHandler (XMLTree const & source, ARDOUR::Session & session)
: source (source), session (session) { }
virtual ~ElementImportHandler ();

View file

@ -41,59 +41,59 @@ namespace ARDOUR
struct ExportSpecification : public SF_INFO, public sigc::trackable {
ExportSpecification();
~ExportSpecification ();
ExportSpecification();
~ExportSpecification ();
void init ();
void clear ();
void init ();
void clear ();
int prepare (nframes_t blocksize, nframes_t frame_rate);
int prepare (nframes_t blocksize, nframes_t frame_rate);
int process (nframes_t nframes);
int process (nframes_t nframes);
/* set by the user */
/* set by the user */
std::string path;
nframes_t sample_rate;
std::string path;
nframes_t sample_rate;
int src_quality;
SNDFILE* out;
uint32_t channels;
ExportPortMap port_map;
nframes_t start_frame;
nframes_t end_frame;
GDitherType dither_type;
bool do_freewheel;
int src_quality;
SNDFILE* out;
uint32_t channels;
ExportPortMap port_map;
nframes_t start_frame;
nframes_t end_frame;
GDitherType dither_type;
bool do_freewheel;
/* used exclusively during export */
/* used exclusively during export */
nframes_t frame_rate;
GDither dither;
float* dataF;
float* dataF2;
float* leftoverF;
nframes_t leftover_frames;
nframes_t max_leftover_frames;
void* output_data;
nframes_t out_samples_max;
uint32_t sample_bytes;
uint32_t data_width;
nframes_t frame_rate;
GDither dither;
float* dataF;
float* dataF2;
float* leftoverF;
nframes_t leftover_frames;
nframes_t max_leftover_frames;
void* output_data;
nframes_t out_samples_max;
uint32_t sample_bytes;
uint32_t data_width;
nframes_t total_frames;
SF_INFO sfinfo;
SRC_DATA src_data;
SRC_STATE* src_state;
nframes_t pos;
nframes_t total_frames;
SF_INFO sfinfo;
SRC_DATA src_data;
SRC_STATE* src_state;
nframes_t pos;
sigc::connection freewheel_connection;
sigc::connection freewheel_connection;
/* shared between UI thread and audio thread */
/* shared between UI thread and audio thread */
volatile float progress; /* audio thread sets this */
volatile bool stop; /* UI sets this */
volatile bool running; /* audio thread sets to false when export is done */
volatile float progress; /* audio thread sets this */
volatile bool stop; /* UI sets this */
volatile bool running; /* audio thread sets to false when export is done */
int status;
int status;
};
} // namespace ARDOUR

View file

@ -139,9 +139,9 @@ class RegionExportChannel : public ExportChannel
private:
RegionExportChannel (RegionExportChannelFactory & factory, uint32_t channel) :
factory (factory),
channel (channel)
RegionExportChannel (RegionExportChannelFactory & factory, uint32_t channel)
: factory (factory)
, channel (channel)
{}
RegionExportChannelFactory & factory;

View file

@ -58,7 +58,7 @@ class ExportChannelConfiguration
/// Struct for threading, acts like a pointer to a ExportChannelConfiguration
struct WriterThread {
WriterThread (ExportChannelConfiguration & channel_config) :
channel_config (channel_config), running (false) {}
channel_config (channel_config), running (false) {}
ExportChannelConfiguration * operator-> () { return &channel_config; }
ExportChannelConfiguration & operator* () { return channel_config; }
@ -107,7 +107,7 @@ class ExportChannelConfiguration
typedef boost::shared_ptr<ExportStatus> ExportStatusPtr;
Session & session;
Session & session;
// processor has to be prepared before doing this.
void write_file ();

View file

@ -33,8 +33,8 @@ namespace ARDOUR
class ExportFailed : public std::exception
{
public:
ExportFailed (std::string const & reason) :
reason (reason.c_str())
ExportFailed (std::string const & reason)
: reason (reason.c_str())
{
PBD::error << string_compose (_("Export failed: %1"), reason) << endmsg;
}

View file

@ -111,8 +111,8 @@ class ExportFormatBase {
/// Class for managing selection and compatibility states
class SelectableCompatible {
public:
SelectableCompatible () :
_selected (false), _compatible (true) { }
SelectableCompatible ()
: _selected (false), _compatible (true) { }
~SelectableCompatible () {}
sigc::signal<void, bool> SelectChanged;

View file

@ -42,8 +42,8 @@ class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBa
~ExportFormatCompatibility () {};
ExportFormatCompatibility (ExportFormatBase const & other) :
ExportFormatBase (other) {}
ExportFormatCompatibility (ExportFormatBase const & other)
: ExportFormatBase (other) {}
void add_endianness (Endianness endianness) { endiannesses.insert (endianness); }
void add_sample_format (SampleFormat format) { sample_formats.insert (format); }

View file

@ -64,9 +64,9 @@ class ExportFormatManager : public sigc::trackable
/* Quality states */
class QualityState : public ExportFormatBase::SelectableCompatible {
public:
public:
QualityState (ExportFormatBase::Quality quality, Glib::ustring name) :
quality (quality) { set_name (name); }
quality (quality) { set_name (name); }
ExportFormatBase::Quality quality;
};
typedef boost::shared_ptr<QualityState> QualityPtr;
@ -77,8 +77,8 @@ class ExportFormatManager : public sigc::trackable
class SampleRateState : public ExportFormatBase::SelectableCompatible {
public:
SampleRateState (ExportFormatBase::SampleRate rate, Glib::ustring name) :
rate (rate) { set_name (name); }
SampleRateState (ExportFormatBase::SampleRate rate, Glib::ustring name)
: rate (rate) { set_name (name); }
ExportFormatBase::SampleRate rate;
};
typedef boost::shared_ptr<SampleRateState> SampleRatePtr;

View file

@ -53,8 +53,8 @@ public:
static void set_search_path (DataType type, const Glib::ustring& path);
static bool find (DataType type, const Glib::ustring& path,
bool must_exist, bool& is_new, uint16_t& chan,
Glib::ustring& found_path);
bool must_exist, bool& is_new, uint16_t& chan,
Glib::ustring& found_path);
protected:
FileSource (Session& session, DataType type,

View file

@ -45,10 +45,10 @@ class IOProcessor : public Processor
{
public:
IOProcessor (Session&, bool with_input, bool with_output,
const std::string& proc_name, const std::string io_name="",
ARDOUR::DataType default_type = DataType::AUDIO);
const std::string& proc_name, const std::string io_name="",
ARDOUR::DataType default_type = DataType::AUDIO);
IOProcessor (Session&, boost::shared_ptr<IO> input, boost::shared_ptr<IO> output,
const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO);
const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO);
virtual ~IOProcessor ();
bool set_name (const std::string& str);

View file

@ -51,8 +51,8 @@ class JackPort : public virtual Port, public PortConnectableByName {
int reconnect ();
int connect (Port& other) {
if( _flags & IsOutput ) {
return 0;
if (_flags & IsOutput) {
return 0;
}
return connect (other.name());
}
@ -104,7 +104,7 @@ class JackPort : public virtual Port, public PortConnectableByName {
JackPort (const std::string&, DataType type, Flags flags);
jack_port_t* _port;
int disconnect ();
int disconnect ();
void recompute_total_latency() const;
std::set<std::string> _named_connections;

View file

@ -53,9 +53,9 @@ class Location : public PBD::StatefulDestructible
};
Location (nframes64_t sample_start,
nframes64_t sample_end,
const std::string &name,
Flags bits = Flags(0))
nframes64_t sample_end,
const std::string &name,
Flags bits = Flags(0))
: _name (name),
_start (sample_start),

View file

@ -55,7 +55,7 @@ public:
template<typename BufferType, typename EventType>
struct iterator_base {
iterator_base<BufferType, EventType>(BufferType& b, nframes_t o) : buffer(b), offset(o) {}
iterator_base<BufferType, EventType>(BufferType& b, nframes_t o) : buffer(b), offset(o) {}
inline EventType operator*() const {
uint8_t* ev_start = buffer._data + offset + sizeof(TimeType);
int event_size = Evoral::midi_event_size(ev_start);

View file

@ -118,25 +118,25 @@ public:
XMLNode& get_state ();
void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
Property prop, uint8_t new_value);
Property prop, uint8_t new_value);
void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
Property prop, TimeType new_time);
Property prop, TimeType new_time);
private:
boost::shared_ptr<MidiModel> _model;
const std::string _name;
struct NotePropertyChange {
DiffCommand::Property property;
boost::shared_ptr<Evoral::Note<TimeType> > note;
union {
uint8_t old_value;
TimeType old_time;
};
union {
uint8_t new_value;
TimeType new_time;
};
DiffCommand::Property property;
boost::shared_ptr<Evoral::Note<TimeType> > note;
union {
uint8_t old_value;
TimeType old_time;
};
union {
uint8_t new_value;
TimeType new_time;
};
};
typedef std::list<NotePropertyChange> ChangeList;

View file

@ -70,8 +70,7 @@ public:
boost::shared_ptr<MIDI::Name::MasterDeviceNames> master_device = master_device_by_model(model);
if (master_device != 0 && custom_device_mode != "") {
return master_device->
channel_name_set_by_device_mode_and_channel(custom_device_mode, channel);
return master_device->channel_name_set_by_device_mode_and_channel(custom_device_mode, channel);
} else {
return boost::shared_ptr<ChannelNameSet>();
}

View file

@ -104,10 +104,10 @@ class MidiRegion : public Region
private:
nframes_t _read_at (const SourceList&, MidiRingBuffer<nframes_t>& dst,
nframes_t position,
nframes_t dur,
uint32_t chan_n = 0,
NoteMode mode = Sustained) const;
nframes_t position,
nframes_t dur,
uint32_t chan_n = 0,
NoteMode mode = Sustained) const;
void recompute_at_start ();
void recompute_at_end ();

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 Paul Davis
Written by Dave Robillard
Written by Dave Robillard
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -40,7 +40,7 @@ public:
~MidiTrack ();
int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
int declick, bool can_record, bool rec_monitors_input);
int declick, bool can_record, bool rec_monitors_input);
void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors);
@ -57,8 +57,8 @@ public:
void unfreeze ();
boost::shared_ptr<Region> bounce (InterThreadInfo&);
boost::shared_ptr<Region> bounce_range (nframes_t start, nframes_t end, InterThreadInfo&,
bool enable_processing);
boost::shared_ptr<Region> bounce_range (
nframes_t start, nframes_t end, InterThreadInfo&, bool enable_processing);
int set_state(const XMLNode& node);
@ -67,13 +67,13 @@ public:
/** A control that will send "immediate" events to a MIDI track when twiddled */
struct MidiControl : public AutomationControl {
MidiControl(MidiTrack* route, const Evoral::Parameter& param,
MidiControl(MidiTrack* route, const Evoral::Parameter& param,
boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>())
: AutomationControl (route->session(), param, al)
, _route (route)
{}
void set_value (float val);
void set_value (float val);
MidiTrack* _route;
};
@ -97,8 +97,8 @@ protected:
int _set_state (const XMLNode&, bool call_base);
private:
void write_out_of_band_data (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
nframes_t nframes);
void write_out_of_band_data (
BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
int set_diskstream (boost::shared_ptr<MidiDiskstream> ds);
void use_new_diskstream ();
@ -116,7 +116,7 @@ private:
int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
bool state_changing, bool can_record, bool rec_monitors_input);
void push_midi_input_to_step_edit_ringbuffer (nframes_t nframes);
};

View file

@ -25,34 +25,34 @@
#include <unistd.h>
class MTDM {
public:
public:
MTDM ();
MTDM ();
int process (size_t len, float *inp, float *out);
int resolve (void);
void invert (void) { _inv ^= 1; }
int inv (void) { return _inv; }
double del (void) { return _del; }
double err (void) { return _err; }
int process (size_t len, float *inp, float *out);
int resolve (void);
void invert (void) { _inv ^= 1; }
int inv (void) { return _inv; }
double del (void) { return _del; }
double err (void) { return _err; }
private:
class Freq {
public:
int p;
int f;
float a;
float xa;
float ya;
float xf;
float yf;
};
private:
class Freq {
public:
int p;
int f;
float a;
float xa;
float ya;
float xf;
float yf;
};
double _del;
double _err;
int _cnt;
int _inv;
Freq _freq [5];
double _del;
double _err;
int _cnt;
int _inv;
Freq _freq [5];
};
#endif /* __libardour_mtdm_h__ */

View file

@ -67,7 +67,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful
virtual void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) = 0;
virtual void distribute_automated (AudioBuffer& src, BufferSet& obufs,
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers) = 0;
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers) = 0;
boost::shared_ptr<AutomationControl> pan_control() { return _control; }
@ -141,7 +141,7 @@ class EqualPowerStereoPanner : public BaseStereoPanner
~EqualPowerStereoPanner ();
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
void get_current_coefficients (pan_t*) const;
void get_desired_coefficients (pan_t*) const;
@ -165,7 +165,7 @@ class Multi2dPanner : public StreamPanner
void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
static StreamPanner* factory (Panner&, Evoral::Parameter);
static std::string name;
@ -185,15 +185,15 @@ class Multi2dPanner : public StreamPanner
class Panner : public SessionObject, public AutomatableControls
{
public:
public:
struct Output {
float x;
float y;
pan_t current_pan;
pan_t desired_pan;
float x;
float y;
pan_t current_pan;
pan_t desired_pan;
Output (float xp, float yp)
: x (xp), y (yp), current_pan (0.0f), desired_pan (0.f) {}
Output (float xp, float yp)
: x (xp), y (yp), current_pan (0.0f), desired_pan (0.f) {}
};
@ -270,25 +270,25 @@ class Panner : public SessionObject, public AutomatableControls
int load ();
struct PanControllable : public AutomationControl {
PanControllable (Session& s, std::string name, Panner& p, Evoral::Parameter param)
PanControllable (Session& s, std::string name, Panner& p, Evoral::Parameter param)
: AutomationControl (s, param,
boost::shared_ptr<AutomationList>(new AutomationList(param)), name)
, panner (p)
{ assert(param.type() != NullAutomation); }
AutomationList* alist() { return (AutomationList*)_list.get(); }
Panner& panner;
Panner& panner;
void set_value (float);
float get_value (void) const;
void set_value (float);
float get_value (void) const;
};
boost::shared_ptr<AutomationControl> pan_control (int id, int chan=0) {
return automation_control(Evoral::Parameter (PanAutomation, chan, id));
return automation_control(Evoral::Parameter (PanAutomation, chan, id));
}
boost::shared_ptr<const AutomationControl> pan_control (int id, int chan=0) const {
return automation_control(Evoral::Parameter (PanAutomation, chan, id));
return automation_control(Evoral::Parameter (PanAutomation, chan, id));
}
private:

View file

@ -171,20 +171,20 @@ class Playlist : public SessionObject,
protected:
struct RegionLock {
RegionLock (Playlist *pl, bool do_block_notify = true) : playlist (pl), block_notify (do_block_notify) {
playlist->region_lock.lock();
if (block_notify) {
playlist->delay_notifications();
}
}
~RegionLock() {
playlist->region_lock.unlock();
if (block_notify) {
playlist->release_notifications ();
}
}
Playlist *playlist;
bool block_notify;
RegionLock (Playlist *pl, bool do_block_notify = true) : playlist (pl), block_notify (do_block_notify) {
playlist->region_lock.lock();
if (block_notify) {
playlist->delay_notifications();
}
}
~RegionLock() {
playlist->region_lock.unlock();
if (block_notify) {
playlist->release_notifications ();
}
}
Playlist *playlist;
bool block_notify;
};
friend class RegionLock;
@ -219,8 +219,8 @@ class Playlist : public SessionObject,
uint32_t _read_data_count;
PBD::ID _orig_diskstream_id;
uint64_t layer_op_counter;
nframes_t freeze_length;
bool auto_partition;
nframes_t freeze_length;
bool auto_partition;
/** true if relayering should be done using region's current layers and their `pending explicit relayer'
* flags; otherwise false if relayering should be done using the layer-model (most recently moved etc.)
@ -284,7 +284,7 @@ class Playlist : public SessionObject,
nframes_t _get_maximum_extent() const;
boost::shared_ptr<Playlist> cut_copy (boost::shared_ptr<Playlist> (Playlist::*pmf)(nframes_t, nframes_t, bool),
std::list<AudioRange>& ranges, bool result_is_hidden);
std::list<AudioRange>& ranges, bool result_is_hidden);
boost::shared_ptr<Playlist> cut (nframes_t start, nframes_t cnt, bool result_is_hidden);
boost::shared_ptr<Playlist> copy (nframes_t start, nframes_t cnt, bool result_is_hidden);

View file

@ -92,20 +92,20 @@ class Plugin : public PBD::StatefulDestructible, public Latent
struct ParameterDescriptor {
/* essentially a union of LADSPA and VST info */
/* essentially a union of LADSPA and VST info */
bool integer_step;
bool toggled;
bool logarithmic;
bool sr_dependent;
std::string label;
float lower;
float upper;
float step;
float smallstep;
float largestep;
bool min_unbound;
bool max_unbound;
bool integer_step;
bool toggled;
bool logarithmic;
bool sr_dependent;
std::string label;
float lower;
float upper;
float step;
float smallstep;
float largestep;
bool min_unbound;
bool max_unbound;
};
virtual std::string unique_id() const = 0;

View file

@ -77,14 +77,14 @@ class PluginInsert : public Processor
struct PluginControl : public AutomationControl
{
PluginControl (PluginInsert* p, const Evoral::Parameter &param,
boost::shared_ptr<AutomationList> list = boost::shared_ptr<AutomationList>());
PluginControl (PluginInsert* p, const Evoral::Parameter &param,
boost::shared_ptr<AutomationList> list = boost::shared_ptr<AutomationList>());
void set_value (float val);
float get_value (void) const;
float get_value (void) const;
private:
PluginInsert* _plugin;
private:
PluginInsert* _plugin;
bool _logarithmic;
bool _toggled;
};

View file

@ -68,19 +68,19 @@ class PluginManager : public boost::noncopyable {
private:
struct FavoritePlugin {
ARDOUR::PluginType type;
std::string unique_id;
ARDOUR::PluginType type;
std::string unique_id;
FavoritePlugin (ARDOUR::PluginType t, std::string id)
: type (t), unique_id (id) {}
FavoritePlugin (ARDOUR::PluginType t, std::string id)
: type (t), unique_id (id) {}
bool operator==(const FavoritePlugin& other) const {
return other.type == type && other.unique_id == unique_id;
}
bool operator==(const FavoritePlugin& other) const {
return other.type == type && other.unique_id == unique_id;
}
bool operator<(const FavoritePlugin& other) const {
return other.type < type || other.unique_id < unique_id;
}
bool operator<(const FavoritePlugin& other) const {
return other.type < type || other.unique_id < unique_id;
}
};
typedef std::set<FavoritePlugin> FavoritePluginList;
FavoritePluginList favorites;

View file

@ -26,13 +26,13 @@
namespace ARDOUR {
class RuntimeProfile {
public:
enum Element {
SmallScreen,
SAE,
SinglePackage,
LastElement
};
public:
enum Element {
SmallScreen,
SAE,
SinglePackage,
LastElement
};
RuntimeProfile() { bits.resize (LastElement); }
~RuntimeProfile() {}
@ -46,7 +46,7 @@ class RuntimeProfile {
void set_single_package () { bits[SinglePackage] = true; }
bool get_single_package () const { return bits[SinglePackage]; }
private:
private:
boost::dynamic_bitset<uint64_t> bits;
};

View file

@ -30,24 +30,24 @@ class Session;
class Quantize : public MidiOperator {
public:
Quantize (ARDOUR::Session&, QuantizeType type,
bool snap_start, bool snap_end,
double start_grid, double end_grid,
float strength, float swing, float threshold);
~Quantize ();
Quantize (ARDOUR::Session&, QuantizeType type,
bool snap_start, bool snap_end,
double start_grid, double end_grid,
float strength, float swing, float threshold);
~Quantize ();
Command* operator() (boost::shared_ptr<ARDOUR::MidiModel>, std::vector<Evoral::Sequence<Evoral::MusicalTime>::Notes>&);
std::string name() const { return std::string ("quantize"); }
Command* operator() (boost::shared_ptr<ARDOUR::MidiModel>, std::vector<Evoral::Sequence<Evoral::MusicalTime>::Notes>&);
std::string name() const { return std::string ("quantize"); }
private:
ARDOUR::Session& session;
bool _snap_start;
bool _snap_end;
double _start_grid;
double _end_grid;
float _strength;
float _swing;
float _threshold;
ARDOUR::Session& session;
bool _snap_start;
bool _snap_end;
double _start_grid;
double _end_grid;
float _strength;
float _swing;
float _threshold;
};
} /* namespace */

View file

@ -85,7 +85,7 @@ class Region
MusicTime
};
static const Flag DefaultFlags = Flag (Opaque|DefaultFadeIn|DefaultFadeOut|FadeIn|FadeOut);
static const Flag DefaultFlags = Flag (Opaque|DefaultFadeIn|DefaultFadeOut|FadeIn|FadeOut);
static Change FadeChanged;
static Change SyncOffsetChanged;

View file

@ -49,11 +49,11 @@ class RegionFactory {
*/
static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, nframes_t start,
nframes_t length, const std::string& name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
nframes_t length, const std::string& name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (boost::shared_ptr<AudioRegion>, nframes_t start,
nframes_t length, const std::string& name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
nframes_t length, const std::string& name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, const SourceList&, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (const SourceList &, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);

View file

@ -98,13 +98,13 @@ class Route : public SessionObject, public AutomatableControls
/* these are the core of the API of a Route. see the protected sections as well */
virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
int declick, bool can_record, bool rec_monitors_input);
int declick, bool can_record, bool rec_monitors_input);
virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
bool state_changing, bool can_record, bool rec_monitors_input);
virtual int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
bool can_record, bool rec_monitors_input);
bool can_record, bool rec_monitors_input);
virtual void toggle_monitor_input ();
virtual bool can_record() { return false; }
@ -324,14 +324,14 @@ class Route : public SessionObject, public AutomatableControls
nframes_t check_initial_delay (nframes_t, nframes_t&);
void passthru (sframes_t start_frame, sframes_t end_frame,
nframes_t nframes, int declick);
nframes_t nframes, int declick);
virtual void write_out_of_band_data (BufferSet& /* bufs */, sframes_t /* start_frame */, sframes_t /* end_frame */,
nframes_t /* nframes */) {}
nframes_t /* nframes */) {}
virtual void process_output_buffers (BufferSet& bufs,
sframes_t start_frame, sframes_t end_frame,
nframes_t nframes, bool with_processors, int declick);
sframes_t start_frame, sframes_t end_frame,
nframes_t nframes, bool with_processors, int declick);
boost::shared_ptr<IO> _input;
boost::shared_ptr<IO> _output;

View file

@ -223,15 +223,15 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
/* creating from an XML file */
Session (AudioEngine&,
const std::string& fullpath,
const std::string& snapshot_name,
std::string mix_template = "");
const std::string& fullpath,
const std::string& snapshot_name,
std::string mix_template = "");
/* creating a new Session */
Session (AudioEngine&,
std::string fullpath,
std::string snapshot_name,
std::string fullpath,
std::string snapshot_name,
AutoConnectOption input_auto_connect,
AutoConnectOption output_auto_connect,
uint32_t control_out_channels,
@ -319,7 +319,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
}
struct RoutePublicOrderSorter {
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
};
void sync_order_keys (std::string const &);
@ -717,8 +717,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
/* flattening stuff */
boost::shared_ptr<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end,
bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot,
bool enable_processing = true);
bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot,
bool enable_processing = true);
int freeze (InterThreadInfo&);
/* session-wide solo/mute/rec-enable */
@ -846,22 +846,21 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
class GlobalRouteStateCommand : public Command
{
public:
public:
GlobalRouteStateCommand (Session&, void*);
GlobalRouteStateCommand (Session&, const XMLNode& node);
int set_state (const XMLNode&);
XMLNode& get_state ();
protected:
protected:
GlobalRouteBooleanState before, after;
Session& sess;
void* src;
};
class GlobalSoloStateCommand : public GlobalRouteStateCommand
{
public:
public:
GlobalSoloStateCommand (Session &, void *src);
GlobalSoloStateCommand (Session&, const XMLNode&);
void operator()(); //redo
@ -872,7 +871,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
class GlobalMuteStateCommand : public GlobalRouteStateCommand
{
public:
public:
GlobalMuteStateCommand(Session &, void *src);
GlobalMuteStateCommand (Session&, const XMLNode&);
void operator()(); // redo
@ -883,7 +882,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
class GlobalRecordEnableStateCommand : public GlobalRouteStateCommand
{
public:
public:
GlobalRecordEnableStateCommand(Session &, void *src);
GlobalRecordEnableStateCommand (Session&, const XMLNode&);
void operator()(); // redo
@ -894,7 +893,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
class GlobalMeteringStateCommand : public Command
{
public:
public:
GlobalMeteringStateCommand(Session &, void *src);
GlobalMeteringStateCommand (Session&, const XMLNode&);
void operator()();
@ -903,7 +902,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
int set_state (const XMLNode&);
void mark();
protected:
protected:
Session& sess;
void* src;
GlobalRouteMeterState before;
@ -1086,7 +1085,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
bool follow_slave (nframes_t);
void calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta);
void track_slave_state(float slave_speed, nframes_t slave_transport_frame,
nframes_t this_delta, bool starting);
nframes_t this_delta, bool starting);
void follow_slave_silently(nframes_t nframes, float slave_speed);
void set_slave_source (SlaveSource);
@ -1135,8 +1134,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
}
bool maybe_stop (nframes_t limit) {
if ( (_transport_speed > 0.0f && _transport_frame >= limit)
|| (_transport_speed < 0.0f && _transport_frame == 0) ) {
if ( (_transport_speed > 0.0f && _transport_frame >= limit)
|| (_transport_speed < 0.0f && _transport_frame == 0) ) {
stop_transport ();
return true;
}
@ -1644,7 +1643,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
pool.release (ptr);
}
private:
private:
static Pool pool;
};

View file

@ -44,7 +44,7 @@ bool create_backup_file (const PBD::sys::path & file_path);
* @param result vector to contain resulting state files.
*/
void get_state_files_in_directory (const PBD::sys::path & directory_path,
std::vector<PBD::sys::path>& result);
std::vector<PBD::sys::path>& result);
/**
* Given a vector of paths to files, return a vector containing

View file

@ -56,8 +56,8 @@ protected:
void set_header_timeline_position () {}
int read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t /*start*/, nframes_t /*cnt*/,
double /*samples_per_unit*/, nframes_t /*fpp*/) const {
int read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t /*start*/, nframes_t /*cnt*/,
double /*samples_per_unit*/, nframes_t /*fpp*/) const {
memset (peaks, 0, sizeof (PeakData) * npeaks);
return 0;
}

View file

@ -71,7 +71,7 @@ class Slave {
*
* The method has the following precondition:
* <ul>
* <li>
* <li>
* Slave::ok() should return true, otherwise playback will stop
* immediately and the method will not be called
* </li>
@ -83,12 +83,12 @@ class Slave {
*
* After the method call the following postconditions should be met:
* <ul>
* <li>
* <li>
* The first position value on transport start should be 0,
* otherwise ARDOUR will try to locate to the new position
* rather than move to it
* </li>
* <li>
* <li>
* the references speed and position should be assigned
* to the Slaves current requested transport speed
* and transport position.
@ -97,8 +97,8 @@ class Slave {
* Slave::resolution() should be greater than the maximum distance of
* ARDOURs transport position to the slaves requested transport position.
* </li>
* <li>Slave::locked() should return true, otherwise Session::no_roll will be called</li>
* <li>Slave::starting() should be false, otherwise the transport will not move until it becomes true</li> *
* <li>Slave::locked() should return true, otherwise Session::no_roll will be called</li>
* <li>Slave::starting() should be false, otherwise the transport will not move until it becomes true</li> *
* </ul>
*
* @param speed - The transport speed requested
@ -195,11 +195,11 @@ struct SafeTime {
nframes_t timestamp;
int guard2;
SafeTime() {
guard1 = 0;
guard2 = 0;
timestamp = 0;
}
SafeTime() {
guard1 = 0;
guard2 = 0;
timestamp = 0;
}
};
class MTC_Slave : public Slave, public sigc::trackable {

View file

@ -47,36 +47,36 @@ float spline_get_min_x (Spline *);
struct _spline
{
float *deriv2;
float *x;
float *y;
float max_x;
float min_x;
SplinePoint *points;
uint32_t npoints;
uint32_t space;
float *deriv2;
float *x;
float *y;
float max_x;
float min_x;
SplinePoint *points;
uint32_t npoints;
uint32_t space;
#ifdef __cplusplus
void set (uint32_t n, SplinePoint *points) {
spline_set (this, n, points);
}
void set (uint32_t n, SplinePoint *points) {
spline_set (this, n, points);
}
void add (uint32_t n, SplinePoint *points) {
spline_add (this, n, points);
}
void add (uint32_t n, SplinePoint *points) {
spline_add (this, n, points);
}
void solve () {
spline_solve (this);
}
void solve () {
spline_solve (this);
}
float eval (float val) {
return spline_eval (this, val);
}
float eval (float val) {
return spline_eval (this, val);
}
void fill (float x0, float x1, float *vec, uint32_t veclen) {
spline_fill (this, x0, x1, vec, veclen);
}
void fill (float x0, float x1, float *vec, uint32_t veclen) {
spline_fill (this, x0, x1, vec, veclen);
}
#endif /* __cplusplus */

View file

@ -15,8 +15,8 @@ namespace ARDOUR {
PBD::sys::path user_route_template_directory ();
struct TemplateInfo {
std::string name;
std::string path;
std::string name;
std::string path;
};
void find_route_templates (std::vector<TemplateInfo>& template_names);

View file

@ -154,22 +154,22 @@ class TempoMap : public PBD::StatefulDestructible
};
struct BBTPoint {
BBTPointType type;
nframes_t frame;
const Meter* meter;
const Tempo* tempo;
uint32_t bar;
uint32_t beat;
BBTPointType type;
nframes_t frame;
const Meter* meter;
const Tempo* tempo;
uint32_t bar;
uint32_t beat;
BBTPoint (const Meter& m, const Tempo& t, nframes_t f,
BBTPoint (const Meter& m, const Tempo& t, nframes_t f,
BBTPointType ty, uint32_t b, uint32_t e)
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
};
typedef std::vector<BBTPoint> BBTPointList;
template<class T> void apply_with_metrics (T& obj, void (T::*method)(const Metrics&)) {
Glib::RWLock::ReaderLock lm (lock);
Glib::RWLock::ReaderLock lm (lock);
(obj.*method)(*metrics);
}

View file

@ -46,13 +46,13 @@ class Track : public Route
sigc::signal<void> TrackModeChanged;
virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
bool state_changing, bool can_record, bool rec_monitors_input);
bool state_changing, bool can_record, bool rec_monitors_input);
int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
bool can_record, bool rec_monitors_input);
virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
int declick, bool can_record, bool rec_monitors_input) = 0;
int declick, bool can_record, bool rec_monitors_input) = 0;
void toggle_monitor_input ();
@ -106,37 +106,37 @@ class Track : public Route
//private: (FIXME)
struct FreezeRecordProcessorInfo {
FreezeRecordProcessorInfo(XMLNode& st, boost::shared_ptr<Processor> proc)
: state (st), processor (proc) {}
FreezeRecordProcessorInfo(XMLNode& st, boost::shared_ptr<Processor> proc)
: state (st), processor (proc) {}
XMLNode state;
boost::shared_ptr<Processor> processor;
PBD::ID id;
XMLNode state;
boost::shared_ptr<Processor> processor;
PBD::ID id;
};
struct FreezeRecord {
FreezeRecord()
: have_mementos(false)
{}
FreezeRecord()
: have_mementos(false)
{}
~FreezeRecord();
~FreezeRecord();
boost::shared_ptr<Playlist> playlist;
std::vector<FreezeRecordProcessorInfo*> processor_info;
bool have_mementos;
FreezeState state;
gain_t gain;
AutoState gain_automation_state;
AutoState pan_automation_state;
boost::shared_ptr<Playlist> playlist;
std::vector<FreezeRecordProcessorInfo*> processor_info;
bool have_mementos;
FreezeState state;
gain_t gain;
AutoState gain_automation_state;
AutoState pan_automation_state;
};
struct RecEnableControllable : public PBD::Controllable {
RecEnableControllable (Track&);
RecEnableControllable (Track&);
void set_value (float);
float get_value (void) const;
void set_value (float);
float get_value (void) const;
Track& track;
Track& track;
};
virtual void set_state_part_two () = 0;

View file

@ -157,30 +157,30 @@ namespace ARDOUR {
};
struct BBT_Time {
uint32_t bars;
uint32_t beats;
uint32_t ticks;
uint32_t bars;
uint32_t beats;
uint32_t ticks;
BBT_Time() {
bars = 1;
beats = 1;
ticks = 0;
}
BBT_Time() {
bars = 1;
beats = 1;
ticks = 0;
}
/* we can't define arithmetic operators for BBT_Time, because
the results depend on a TempoMap, but we can define
a useful check on the less-than condition.
*/
/* we can't define arithmetic operators for BBT_Time, because
the results depend on a TempoMap, but we can define
a useful check on the less-than condition.
*/
bool operator< (const BBT_Time& other) const {
return bars < other.bars ||
(bars == other.bars && beats < other.beats) ||
(bars == other.bars && beats == other.beats && ticks < other.ticks);
}
bool operator< (const BBT_Time& other) const {
return bars < other.bars ||
(bars == other.bars && beats < other.beats) ||
(bars == other.bars && beats == other.beats && ticks < other.ticks);
}
bool operator== (const BBT_Time& other) const {
return bars == other.bars && beats == other.beats && ticks == other.ticks;
}
bool operator== (const BBT_Time& other) const {
return bars == other.bars && beats == other.beats && ticks == other.ticks;
}
};
enum SmpteFormat {
@ -197,63 +197,63 @@ namespace ARDOUR {
};
struct AnyTime {
enum Type {
SMPTE,
BBT,
Frames,
Seconds
};
enum Type {
SMPTE,
BBT,
Frames,
Seconds
};
Type type;
Type type;
SMPTE::Time smpte;
BBT_Time bbt;
SMPTE::Time smpte;
BBT_Time bbt;
union {
nframes_t frames;
double seconds;
};
union {
nframes_t frames;
double seconds;
};
AnyTime() { type = Frames; frames = 0; }
AnyTime() { type = Frames; frames = 0; }
};
struct AudioRange {
nframes_t start;
nframes_t end;
uint32_t id;
nframes_t start;
nframes_t end;
uint32_t id;
AudioRange (nframes_t s, nframes_t e, uint32_t i) : start (s), end (e) , id (i) {}
AudioRange (nframes_t s, nframes_t e, uint32_t i) : start (s), end (e) , id (i) {}
nframes_t length() { return end - start + 1; }
nframes_t length() { return end - start + 1; }
bool operator== (const AudioRange& other) const {
return start == other.start && end == other.end && id == other.id;
}
bool operator== (const AudioRange& other) const {
return start == other.start && end == other.end && id == other.id;
}
bool equal (const AudioRange& other) const {
return start == other.start && end == other.end;
}
bool equal (const AudioRange& other) const {
return start == other.start && end == other.end;
}
OverlapType coverage (nframes_t s, nframes_t e) const {
return ARDOUR::coverage (start, end, s, e);
}
OverlapType coverage (nframes_t s, nframes_t e) const {
return ARDOUR::coverage (start, end, s, e);
}
};
struct MusicRange {
BBT_Time start;
BBT_Time end;
uint32_t id;
BBT_Time start;
BBT_Time end;
uint32_t id;
MusicRange (BBT_Time& s, BBT_Time& e, uint32_t i)
: start (s), end (e), id (i) {}
MusicRange (BBT_Time& s, BBT_Time& e, uint32_t i)
: start (s), end (e), id (i) {}
bool operator== (const MusicRange& other) const {
return start == other.start && end == other.end && id == other.id;
}
bool operator== (const MusicRange& other) const {
return start == other.start && end == other.end && id == other.id;
}
bool equal (const MusicRange& other) const {
return start == other.start && end == other.end;
}
bool equal (const MusicRange& other) const {
return start == other.start && end == other.end;
}
};
/*
@ -285,9 +285,9 @@ namespace ARDOUR {
};
enum RegionPoint {
Start,
End,
SyncPoint
Start,
End,
SyncPoint
};
enum Change {
@ -342,10 +342,10 @@ namespace ARDOUR {
};
struct InterThreadInfo {
volatile bool done;
volatile bool cancel;
volatile float progress;
pthread_t thread;
volatile bool done;
volatile bool cancel;
volatile float progress;
pthread_t thread;
};
enum SampleFormat {
@ -371,10 +371,10 @@ namespace ARDOUR {
};
struct PeakData {
typedef Sample PeakDatum;
typedef Sample PeakDatum;
PeakDatum min;
PeakDatum max;
PeakDatum min;
PeakDatum max;
};
enum PluginType {
@ -403,7 +403,7 @@ namespace ARDOUR {
};
enum ShuttleUnits {
Percentage,
Percentage,
Semitones
};
@ -418,15 +418,16 @@ namespace ARDOUR {
};
struct TimeFXRequest : public InterThreadInfo {
TimeFXRequest() : time_fraction(0), pitch_fraction(0),
TimeFXRequest()
: time_fraction(0), pitch_fraction(0),
quick_seek(false), antialias(false), opts(0) {}
float time_fraction;
float pitch_fraction;
/* SoundTouch */
bool quick_seek;
bool antialias;
/* RubberBand */
int opts; // really RubberBandStretcher::Options
float time_fraction;
float pitch_fraction;
/* SoundTouch */
bool quick_seek;
bool antialias;
/* RubberBand */
int opts; // really RubberBandStretcher::Options
};
typedef std::list<nframes64_t> AnalysisFeatureList;

View file

@ -430,7 +430,7 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t /*nfr
first_recordable_frame += _session.worst_output_latency();
} else {
first_recordable_frame += _roll_delay;
}
}
} else {
@ -493,7 +493,7 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t /*nfr
fatal << X_("programming error: capture_transition_buf is full on rec start! inconceivable!")
<< endmsg;
}
}
}
}
} else if (!record_enabled() || !can_record) {
@ -900,9 +900,9 @@ int
AudioDiskstream::overwrite_existing_buffers ()
{
boost::shared_ptr<ChannelList> c = channels.reader();
Sample* mixdown_buffer;
float* gain_buffer;
int ret = -1;
Sample* mixdown_buffer;
float* gain_buffer;
int ret = -1;
bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f;
overwrite_queued = false;
@ -910,8 +910,8 @@ AudioDiskstream::overwrite_existing_buffers ()
/* assume all are the same size */
nframes_t size = c->front()->playback_buf->bufsize();
mixdown_buffer = new Sample[size];
gain_buffer = new float[size];
mixdown_buffer = new Sample[size];
gain_buffer = new float[size];
/* reduce size so that we can fill the buffer correctly. */
size--;
@ -960,9 +960,9 @@ AudioDiskstream::overwrite_existing_buffers ()
out:
pending_overwrite = false;
delete [] gain_buffer;
delete [] mixdown_buffer;
return ret;
delete [] gain_buffer;
delete [] mixdown_buffer;
return ret;
}
int
@ -1717,7 +1717,7 @@ AudioDiskstream::transport_looped (nframes_t transport_frame)
fatal << X_("programming error: capture_transition_buf is full on rec loop! inconceivable!")
<< endmsg;
}
}
}
}
}
@ -1920,15 +1920,15 @@ AudioDiskstream::set_state (const XMLNode& node)
in_set_state = true;
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == IO::state_node_name) {
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == IO::state_node_name) {
deprecated_io_node = new XMLNode (**niter);
}
}
if ((*niter)->name() == X_("CapturingSources")) {
capture_pending_node = *niter;
}
}
}
/* prevent write sources from being created */

View file

@ -104,7 +104,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, nfra
AudioPlaylist::~AudioPlaylist ()
{
GoingAway (); /* EMIT SIGNAL */
GoingAway (); /* EMIT SIGNAL */
/* drop connections to signals */

View file

@ -148,14 +148,14 @@ AudioTrack::deprecated_use_diskstream_connections ()
boost::shared_ptr<Bundle> c = _session.bundle_by_name (prop->value());
if (c == 0) {
error << string_compose(_("Unknown bundle \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
error << string_compose(_("Unknown bundle \"%1\" listed for input of %2"), prop->value(), _name) << endmsg;
if ((c = _session.bundle_by_name (_("in 1"))) == 0) {
error << _("No input bundles available as a replacement")
error << _("No input bundles available as a replacement")
<< endmsg;
return -1;
} else {
info << string_compose (_("Bundle %1 was not available - \"in 1\" used instead"), prop->value())
info << string_compose (_("Bundle %1 was not available - \"in 1\" used instead"), prop->value())
<< endmsg;
}
}
@ -164,7 +164,7 @@ AudioTrack::deprecated_use_diskstream_connections ()
} else if ((prop = node.property ("inputs")) != 0) {
if (_input->set_ports (prop->value())) {
error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg;
return -1;
}
}
@ -219,7 +219,7 @@ AudioTrack::use_diskstream (const PBD::ID& id)
boost::shared_ptr<AudioDiskstream> dstream;
if ((dstream = boost::dynamic_pointer_cast<AudioDiskstream> (_session.diskstream_by_id (id))) == 0) {
error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), id) << endmsg;
error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), id) << endmsg;
return -1;
}
@ -728,7 +728,7 @@ AudioTrack::freeze (InterThreadInfo& itt)
if (n == (UINT_MAX-1)) {
error << string_compose (X_("There are too many frozen versions of playlist \"%1\""
" to create another one"), _freeze_record.playlist->name())
" to create another one"), _freeze_record.playlist->name())
<< endmsg;
return;
}

View file

@ -1656,7 +1656,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
of values. in ::can_do() we use the whole system, but here
we need a single pair of values. XXX probably means we should
remove any use of these values.
*/
*/
info->n_inputs = info->cache.io_configs.front().first;
info->n_outputs = info->cache.io_configs.front().second;

View file

@ -1087,65 +1087,65 @@ int
AudioRegion::exportme (Session& /*session*/, ARDOUR::ExportSpecification& /*spec*/)
{
// TODO EXPORT
// const nframes_t blocksize = 4096;
// nframes_t to_read;
// int status = -1;
// const nframes_t blocksize = 4096;
// nframes_t to_read;
// int status = -1;
//
// spec.channels = _sources.size();
// spec.channels = _sources.size();
//
// if (spec.prepare (blocksize, session.frame_rate())) {
// goto out;
// }
// if (spec.prepare (blocksize, session.frame_rate())) {
// goto out;
// }
//
// spec.pos = 0;
// spec.total_frames = _length;
// spec.pos = 0;
// spec.total_frames = _length;
//
// while (spec.pos < _length && !spec.stop) {
// while (spec.pos < _length && !spec.stop) {
//
//
// /* step 1: interleave */
// /* step 1: interleave */
//
// to_read = min (_length - spec.pos, blocksize);
// to_read = min (_length - spec.pos, blocksize);
//
// if (spec.channels == 1) {
// if (spec.channels == 1) {
//
// if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) {
// goto out;
// }
// if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) {
// goto out;
// }
//
// } else {
// } else {
//
// Sample buf[blocksize];
// Sample buf[blocksize];
//
// for (uint32_t chan = 0; chan < spec.channels; ++chan) {
// for (uint32_t chan = 0; chan < spec.channels; ++chan) {
//
// if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) {
// goto out;
// }
// if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) {
// goto out;
// }
//
// for (nframes_t x = 0; x < to_read; ++x) {
// spec.dataF[chan+(x*spec.channels)] = buf[x];
// }
// }
// }
// for (nframes_t x = 0; x < to_read; ++x) {
// spec.dataF[chan+(x*spec.channels)] = buf[x];
// }
// }
// }
//
// if (spec.process (to_read)) {
// goto out;
// }
// if (spec.process (to_read)) {
// goto out;
// }
//
// spec.pos += to_read;
// spec.progress = (double) spec.pos /_length;
// spec.pos += to_read;
// spec.progress = (double) spec.pos /_length;
//
// }
// }
//
// status = 0;
// status = 0;
//
// out:
// spec.running = false;
// spec.status = status;
// spec.clear();
// out:
// spec.running = false;
// spec.status = status;
// spec.clear();
//
// return status;
// return status;
return 0;
}

View file

@ -505,8 +505,8 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t s
}
if (zero_fill) {
memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill);
}
memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill);
}
ret = 0;

View file

@ -73,7 +73,7 @@ CAImportableSource::read (Sample* buffer, nframes_t nframes)
if (!at_end && nread < per_channel) {
return 0;
} else {
return nread * abl.mBuffers[0].mNumberChannels;
return nread * abl.mBuffers[0].mNumberChannels;
}
}

View file

@ -38,8 +38,8 @@ using namespace ARDOUR;
using namespace PBD;
CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node)
: Source (s, node),
AudioFileSource (s, node)
: Source (s, node)
, AudioFileSource (s, node)
{
init ();
}

View file

@ -9,48 +9,48 @@ ExportProfileManager::register_all_configs ()
{
list<TimespanNodePtr>::iterator tsl_it; // timespan list node iterator
for (tsl_it = graph.timespans.begin(); tsl_it != graph.timespans.end(); ++tsl_it) {
list<GraphNode *>::const_iterator cc_it; // channel config node iterator
for (cc_it = (*tsl_it)->get_children().begin(); cc_it != (*tsl_it)->get_children().end(); ++cc_it) {
list<GraphNode *>::const_iterator f_it; // format node iterator
for (f_it = (*cc_it)->get_children().begin(); f_it != (*cc_it)->get_children().end(); ++f_it) {
list<GraphNode *>::const_iterator fn_it; // filename node iterator
for (fn_it = (*f_it)->get_children().begin(); fn_it != (*f_it)->get_children().end(); ++fn_it) {
/* Finally loop through each timespan in the timespan list */
list<GraphNode *>::const_iterator cc_it; // channel config node iterator
for (cc_it = (*tsl_it)->get_children().begin(); cc_it != (*tsl_it)->get_children().end(); ++cc_it) {
list<GraphNode *>::const_iterator f_it; // format node iterator
for (f_it = (*cc_it)->get_children().begin(); f_it != (*cc_it)->get_children().end(); ++f_it) {
list<GraphNode *>::const_iterator fn_it; // filename node iterator
for (fn_it = (*f_it)->get_children().begin(); fn_it != (*f_it)->get_children().end(); ++fn_it) {
/* Finally loop through each timespan in the timespan list */
TimespanNodePtr ts_node;
if (!(ts_node = boost::dynamic_pointer_cast<TimespanNode> (*tsl_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
TimespanNodePtr ts_node;
if (!(ts_node = boost::dynamic_pointer_cast<TimespanNode> (*tsl_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
TimespanListPtr ts_list = ts_node->data()->timespans;
TimespanList::iterator ts_it;
for (ts_it = ts_list->begin(); ts_it != ts_list->end(); ++ts_it) {
TimespanListPtr ts_list = ts_node->data()->timespans;
TimespanList::iterator ts_it;
for (ts_it = ts_list->begin(); ts_it != ts_list->end(); ++ts_it) {
TimespanPtr timespan = *ts_it;
TimespanPtr timespan = *ts_it;
ChannelConfigNode * cc_node;
if (!(cc_node = dynamic_cast<ChannelConfigNode *> (*cc_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
ChannelConfigNode * cc_node;
if (!(cc_node = dynamic_cast<ChannelConfigNode *> (*cc_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
ChannelConfigPtr channel_config = cc_node->data()->config;
FormatNode * f_node;
if (!(f_node = dynamic_cast<FormatNode *> (*f_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
FormatPtr format = f_node->data()->format;
FilenameNode * fn_node;
if (!(fn_node = dynamic_cast<FilenameNode *> (*fn_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
FilenamePtr filename = fn_node->data()->filename;
handler->add_export_config (timespan, channel_config, format, filename);
}
}
}
ChannelConfigPtr channel_config = cc_node->data()->config;
FormatNode * f_node;
if (!(f_node = dynamic_cast<FormatNode *> (*f_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
FormatPtr format = f_node->data()->format;
FilenameNode * fn_node;
if (!(fn_node = dynamic_cast<FilenameNode *> (*fn_it))) {
throw ExportFailed (X_("Programming error, Invalid pointer cast in ExportProfileManager"));
}
FilenamePtr filename = fn_node->data()->filename;
handler->add_export_config (timespan, channel_config, format, filename);
}
}
}
}
}
}

View file

@ -569,7 +569,7 @@ ARDOUR::coverage (nframes_t sa, nframes_t ea,
/*
|---------------------| A
|----------------- B
|----------------------- B
|----------------------- B
|- B
"B overlaps the end of A"

View file

@ -137,7 +137,7 @@ LocationImporter::_prepare_move ()
location = new Location (original); // Updates id
} catch (failed_constructor& err) {
throw std::runtime_error (X_("Error in session file!"));
return false;
return false;
}
std::pair<bool, string> rename_pair;

View file

@ -659,7 +659,7 @@ LV2World::LV2World()
srate = slv2_value_new_uri(world, SLV2_NAMESPACE_LV2 "sampleRate");
gtk_gui = slv2_value_new_uri(world, "http://lv2plug.in/ns/extensions/ui#GtkUI");
external_gui = slv2_value_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external");
logarithmic = slv2_value_new_uri(world, "http://lv2plug.in/ns/dev/extportinfo#logarithmic");
logarithmic = slv2_value_new_uri(world, "http://lv2plug.in/ns/dev/extportinfo#logarithmic");
}
LV2World::~LV2World()

View file

@ -191,7 +191,7 @@ PeakMeter::meter ()
/* grab peak since last read */
float new_peak = _peak_power[n]; /* XXX we should use atomic exchange from here ... */
float new_peak = _peak_power[n]; /* XXX we should use atomic exchange from here ... */
_peak_power[n] = 0; /* ... to here */
/* compute new visible value using falloff */

View file

@ -358,7 +358,7 @@ MidiDiskstream::check_record_status (nframes_t transport_frame, nframes_t /*nfra
first_recordable_frame += _session.worst_output_latency();
} else {
first_recordable_frame += _roll_delay;
}
}
} else {
@ -1392,16 +1392,16 @@ MidiDiskstream::set_state (const XMLNode& node)
in_set_state = true;
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
/*if ((*niter)->name() == IO::state_node_name) {
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
/*if ((*niter)->name() == IO::state_node_name) {
deprecated_io_node = new XMLNode (**niter);
}*/
assert ((*niter)->name() != IO::state_node_name);
}*/
assert ((*niter)->name() != IO::state_node_name);
if ((*niter)->name() == X_("CapturingSources")) {
capture_pending_node = *niter;
}
}
}
/* prevent write sources from being created */

View file

@ -76,7 +76,7 @@ MidiPatchManager::refresh()
boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(i->to_string()));
for (MIDINameDocument::MasterDeviceNamesList::const_iterator device =
document->master_device_names_by_model().begin();
device != document->master_device_names_by_model().end();
device != document->master_device_names_by_model().end();
++device) {
//cerr << "got model " << device->first << endl;
// have access to the documents by model name

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 Paul Davis
Written by Dave Robillard, 2006
Written by Dave Robillard, 2006
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -109,7 +109,7 @@ MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, nframes
MidiPlaylist::~MidiPlaylist ()
{
GoingAway (); /* EMIT SIGNAL */
GoingAway (); /* EMIT SIGNAL */
/* drop connections to signals */

View file

@ -141,7 +141,7 @@ MidiTrack::use_diskstream (const PBD::ID& id)
boost::shared_ptr<MidiDiskstream> dstream;
if ((dstream = boost::dynamic_pointer_cast<MidiDiskstream> (_session.diskstream_by_id (id))) == 0) {
error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), id) << endmsg;
error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), id) << endmsg;
return -1;
}

View file

@ -147,7 +147,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full)
session.request_transport_speed (0);
update_mtc_status (MIDI::Parser::MTC_Stopped);
reset ();
reset ();
} else {

View file

@ -38,7 +38,7 @@ pcm_let2f_array (tribyte *src, int count, float *dest)
static const float normfact = 1.0 / ((float) 0x80000000);
unsigned char *ucptr ;
int value ;
int value ;
ucptr = ((unsigned char*) src) + 3 * count ;
while (--count >= 0)

View file

@ -1867,7 +1867,7 @@ Playlist::set_state (const XMLNode& node)
thaw ();
/* update dependents, which was not done during add_region_internal
/* update dependents, which was not done during add_region_internal
due to in_set_state being true
*/

View file

@ -461,32 +461,32 @@ PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes)
if (!data().find_next_event (now, end, next_event)) {
/* no events have a time within the relevant range */
/* no events have a time within the relevant range */
connect_and_run (bufs, nframes, offset, true, now);
return;
}
connect_and_run (bufs, nframes, offset, true, now);
return;
}
while (nframes) {
while (nframes) {
nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
connect_and_run (bufs, cnt, offset, true, now);
connect_and_run (bufs, cnt, offset, true, now);
nframes -= cnt;
offset += cnt;
nframes -= cnt;
offset += cnt;
now += cnt;
if (!data().find_next_event (now, end, next_event)) {
break;
}
}
}
/* cleanup anything that is left to do */
/* cleanup anything that is left to do */
if (nframes) {
connect_and_run (bufs, nframes, offset, true, now);
}
if (nframes) {
connect_and_run (bufs, nframes, offset, true, now);
}
}
float

View file

@ -159,44 +159,44 @@ PluginManager::refresh ()
void
PluginManager::ladspa_refresh ()
{
_ladspa_plugin_info.clear ();
_ladspa_plugin_info.clear ();
static const char *standard_paths[] = {
"/usr/local/lib64/ladspa",
"/usr/local/lib/ladspa",
"/usr/lib64/ladspa",
"/usr/lib/ladspa",
"/Library/Audio/Plug-Ins/LADSPA",
""
};
static const char *standard_paths[] = {
"/usr/local/lib64/ladspa",
"/usr/local/lib/ladspa",
"/usr/lib64/ladspa",
"/usr/lib/ladspa",
"/Library/Audio/Plug-Ins/LADSPA",
""
};
/* allow LADSPA_PATH to augment, not override standard locations */
/* allow LADSPA_PATH to augment, not override standard locations */
/* Only add standard locations to ladspa_path if it doesn't
* already contain them. Check for trailing '/'s too.
*/
/* Only add standard locations to ladspa_path if it doesn't
* already contain them. Check for trailing '/'s too.
*/
int i;
for (i = 0; standard_paths[i][0]; i++) {
size_t found = ladspa_path.find(standard_paths[i]);
if (found != ladspa_path.npos) {
switch (ladspa_path[found + strlen(standard_paths[i])]) {
case ':' :
case '\0':
continue;
case '/' :
if (ladspa_path[found + strlen(standard_paths[i]) + 1] == ':' ||
ladspa_path[found + strlen(standard_paths[i]) + 1] == '\0') {
continue;
}
}
}
if (!ladspa_path.empty())
ladspa_path += ":";
int i;
for (i = 0; standard_paths[i][0]; i++) {
size_t found = ladspa_path.find(standard_paths[i]);
if (found != ladspa_path.npos) {
switch (ladspa_path[found + strlen(standard_paths[i])]) {
case ':' :
case '\0':
continue;
case '/' :
if (ladspa_path[found + strlen(standard_paths[i]) + 1] == ':' ||
ladspa_path[found + strlen(standard_paths[i]) + 1] == '\0') {
continue;
}
}
}
if (!ladspa_path.empty())
ladspa_path += ":";
ladspa_path += standard_paths[i];
ladspa_path += standard_paths[i];
}
}
ladspa_discover_from_path (ladspa_path);
}

View file

@ -37,7 +37,7 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab
/* Initialize the sample rate converter. */
int src_type = SRC_SINC_BEST_QUALITY;
int src_type = SRC_SINC_BEST_QUALITY;
switch (srcq) {
case SrcBest:

View file

@ -2008,7 +2008,7 @@ Route::listen_via (boost::shared_ptr<Route> route, Placement placement, bool /*a
add_processor (listener, placement);
return 0;
return 0;
}
void

View file

@ -200,7 +200,7 @@ RouteGroup::set_hidden (bool yn, void *src)
_flags = Flag (_flags & ~Active);
}
} else {
_flags = Flag (_flags & ~Hidden);
_flags = Flag (_flags & ~Hidden);
if (Config->get_hiding_groups_deactivates_groups()) {
_flags = Flag (_flags | Active);
}

View file

@ -605,11 +605,11 @@ Session::when_engine_running ()
char buf[32];
snprintf (buf, sizeof (buf), _("out %" PRIu32), np+1);
shared_ptr<Bundle> c (new Bundle (buf, true));
shared_ptr<Bundle> c (new Bundle (buf, true));
c->add_channel (_("mono"));
c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np));
c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np));
add_bundle (c);
add_bundle (c);
}
/* stereo output bundles */
@ -634,11 +634,11 @@ Session::when_engine_running ()
char buf[32];
snprintf (buf, sizeof (buf), _("in %" PRIu32), np+1);
shared_ptr<Bundle> c (new Bundle (buf, false));
shared_ptr<Bundle> c (new Bundle (buf, false));
c->add_channel (_("mono"));
c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np));
c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np));
add_bundle (c);
add_bundle (c);
}
/* stereo input bundles */
@ -878,9 +878,9 @@ bool
Session::record_enabling_legal () const
{
/* this used to be in here, but survey says.... we don't need to restrict it */
// if (record_status() == Recording) {
// return false;
// }
// if (record_status() == Recording) {
// return false;
// }
if (Config->get_all_safe()) {
return false;

View file

@ -2033,21 +2033,21 @@ Session::analysis_dir () const
int
Session::load_bundles (XMLNode const & node)
{
XMLNodeList nlist = node.children();
XMLNodeConstIterator niter;
XMLNodeList nlist = node.children();
XMLNodeConstIterator niter;
set_dirty();
set_dirty();
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "InputBundle") {
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "InputBundle") {
add_bundle (boost::shared_ptr<UserBundle> (new UserBundle (**niter, true)));
} else if ((*niter)->name() == "OutputBundle") {
add_bundle (boost::shared_ptr<UserBundle> (new UserBundle (**niter, false)));
} else {
error << string_compose(_("Unknown node \"%1\" found in Bundles list from state file"), (*niter)->name()) << endmsg;
return -1;
}
}
} else if ((*niter)->name() == "OutputBundle") {
add_bundle (boost::shared_ptr<UserBundle> (new UserBundle (**niter, false)));
} else {
error << string_compose(_("Unknown node \"%1\" found in Bundles list from state file"), (*niter)->name()) << endmsg;
return -1;
}
}
return 0;
}
@ -2466,7 +2466,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
capture files.
*/
if (!i->second->used() && i->second->length(i->second->timeline_position()) > 0) {
if (!i->second->used() && i->second->length(i->second->timeline_position()) > 0) {
dead_sources.push_back (i->second);
i->second->GoingAway();
}
@ -2836,13 +2836,13 @@ Session::save_history (string snapshot_name)
return 0;
}
if (snapshot_name.empty()) {
if (snapshot_name.empty()) {
snapshot_name = _current_snapshot_name;
}
const string history_filename = legalize_for_path (snapshot_name) + history_suffix;
const string history_filename = legalize_for_path (snapshot_name) + history_suffix;
const string backup_filename = history_filename + backup_suffix;
const sys::path xml_path = _session_dir->root_path() / history_filename;
const sys::path xml_path = _session_dir->root_path() / history_filename;
const sys::path backup_path = _session_dir->root_path() / backup_filename;
if (sys::exists (xml_path)) {
@ -2855,13 +2855,13 @@ Session::save_history (string snapshot_name)
error << _("could not backup old history file, current history not saved") << endmsg;
return -1;
}
}
}
if (!Config->get_save_history() || Config->get_saved_history_depth() < 0) {
return 0;
}
tree.set_root (&_history.get_state (Config->get_saved_history_depth()));
tree.set_root (&_history.get_state (Config->get_saved_history_depth()));
if (!tree.write (xml_path.to_string()))
{
@ -2913,67 +2913,67 @@ Session::restore_history (string snapshot_name)
// replace history
_history.clear();
for (XMLNodeConstIterator it = tree.root()->children().begin(); it != tree.root()->children().end(); it++) {
for (XMLNodeConstIterator it = tree.root()->children().begin(); it != tree.root()->children().end(); it++) {
XMLNode *t = *it;
UndoTransaction* ut = new UndoTransaction ();
struct timeval tv;
XMLNode *t = *it;
UndoTransaction* ut = new UndoTransaction ();
struct timeval tv;
ut->set_name(t->property("name")->value());
stringstream ss(t->property("tv-sec")->value());
ss >> tv.tv_sec;
ss.str(t->property("tv-usec")->value());
ss >> tv.tv_usec;
ut->set_timestamp(tv);
ut->set_name(t->property("name")->value());
stringstream ss(t->property("tv-sec")->value());
ss >> tv.tv_sec;
ss.str(t->property("tv-usec")->value());
ss >> tv.tv_usec;
ut->set_timestamp(tv);
for (XMLNodeConstIterator child_it = t->children().begin();
for (XMLNodeConstIterator child_it = t->children().begin();
child_it != t->children().end(); child_it++)
{
XMLNode *n = *child_it;
Command *c;
{
XMLNode *n = *child_it;
Command *c;
if (n->name() == "MementoCommand" ||
if (n->name() == "MementoCommand" ||
n->name() == "MementoUndoCommand" ||
n->name() == "MementoRedoCommand") {
if ((c = memento_command_factory(n))) {
ut->add_command(c);
}
if ((c = memento_command_factory(n))) {
ut->add_command(c);
}
} else if (n->name() == X_("GlobalRouteStateCommand")) {
} else if (n->name() == X_("GlobalRouteStateCommand")) {
if ((c = global_state_command_factory (*n))) {
ut->add_command (c);
}
if ((c = global_state_command_factory (*n))) {
ut->add_command (c);
}
} else if (n->name() == "DeltaCommand") {
PBD::ID id(n->property("midi-source")->value());
boost::shared_ptr<MidiSource> midi_source =
boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
if(midi_source) {
ut->add_command(new MidiModel::DeltaCommand(midi_source->model(), *n));
} else {
error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
}
} else if (n->name() == "DiffCommand") {
PBD::ID id(n->property("midi-source")->value());
boost::shared_ptr<MidiSource> midi_source =
boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
if(midi_source) {
ut->add_command(new MidiModel::DiffCommand(midi_source->model(), *n));
} else {
error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
}
} else if (n->name() == "DeltaCommand") {
PBD::ID id(n->property("midi-source")->value());
boost::shared_ptr<MidiSource> midi_source =
boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
if(midi_source) {
ut->add_command(new MidiModel::DeltaCommand(midi_source->model(), *n));
} else {
error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
}
} else if (n->name() == "DiffCommand") {
PBD::ID id(n->property("midi-source")->value());
boost::shared_ptr<MidiSource> midi_source =
boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
if(midi_source) {
ut->add_command(new MidiModel::DiffCommand(midi_source->model(), *n));
} else {
error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
}
} else {
error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg;
}
}
} else {
error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg;
}
}
_history.add (ut);
}
_history.add (ut);
}
return 0;
return 0;
}
void

View file

@ -453,7 +453,7 @@ Session::jack_sync_callback (jack_transport_state_t state,
switch (state) {
case JackTransportStopped:
if (slave && _transport_frame != pos->frame && post_transport_work == 0) {
request_locate (pos->frame, false);
request_locate (pos->frame, false);
// cerr << "SYNC: stopped, locate to " << pos->frame << " from " << _transport_frame << endl;
return false;
} else {

View file

@ -1060,9 +1060,9 @@ Session::set_slave_source (SlaveSource src)
return;
}
// if (src == JACK && Config->get_jack_time_master()) {
// return;
// }
// if (src == JACK && Config->get_jack_time_master()) {
// return;
// }
delete _slave;
_slave = 0;
@ -1251,7 +1251,7 @@ Session::setup_auto_play ()
void
Session::request_roll_at_and_return (nframes_t start, nframes_t return_to)
{
Event *ev = new Event (Event::LocateRollLocate, Event::Add, Event::Immediate, return_to, 1.0);
Event *ev = new Event (Event::LocateRollLocate, Event::Add, Event::Immediate, return_to, 1.0);
ev->target2_frame = start;
queue_event (ev);
}
@ -1260,7 +1260,7 @@ void
Session::request_bounded_roll (nframes_t start, nframes_t end)
{
request_stop ();
Event *ev = new Event (Event::StopOnce, Event::Replace, end, Event::Immediate, 0.0);
Event *ev = new Event (Event::StopOnce, Event::Replace, end, Event::Immediate, 0.0);
queue_event (ev);
request_locate (start, true);
}
@ -1338,7 +1338,7 @@ Session::update_latency_compensation (bool with_stop, bool abort)
update_jack = true;
}
if (!(*i)->is_hidden() && ((*i)->active())) {
if (!(*i)->is_hidden() && ((*i)->active())) {
_worst_track_latency = max (_worst_track_latency, track_latency);
}
}

View file

@ -255,7 +255,7 @@ SourceFactory::createWritable (DataType type, Session& s, const std::string& pat
s.config.get_native_file_header_format(),
rate,
(destructive
? Source::Flag (SndFileSource::default_writable_flags | Source::Destructive)
? Source::Flag (SndFileSource::default_writable_flags | Source::Destructive)
: SndFileSource::default_writable_flags)));
if (setup_peakfile (ret, defer_peaks)) {

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2007 Paul sDavis
Written by Sampo Savolainen
Written by Sampo Savolainen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -863,7 +863,7 @@ TempoMap::count_frames_between ( const BBT_Time& start, const BBT_Time& end) con
start_frame = m.frame() + (nframes_t) rint( beat_offset * m.tempo().frames_per_beat(_frame_rate, m.meter()));
m = metric_at(end);
m = metric_at(end);
bar_offset = end.bars - m.start().bars;
@ -1336,7 +1336,7 @@ TempoMap::get_points (nframes_t lower, nframes_t upper) const
limit = upper;
// cerr << "== limit set to end of request @ " << limit << endl;
} else {
// cerr << "== limit set to next metric @ " << (*i)->frame() << endl;
// cerr << "== limit set to next metric @ " << (*i)->frame() << endl;
limit = (*i)->frame();
}

View file

@ -210,7 +210,7 @@ path_is_paired (ustring path, ustring& pair_base)
path = path.substr(pos+1);
}
/* remove filename suffixes etc. */
/* remove filename suffixes etc. */
if ((pos = path.find_last_of ('.')) != string::npos) {
path = path.substr (0, pos);
@ -425,7 +425,7 @@ meter_falloff_from_float (float val)
}
else if (val <= METER_FALLOFF_FASTER) {
return MeterFalloffFaster;
}
}
else {
return MeterFalloffFastest;
}