Fix broken whitespace. I'd apologize for the compile times if it was my fault :D

git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2011-06-01 16:50:12 +00:00
parent a46cea06e2
commit a473d630eb
235 changed files with 3814 additions and 3818 deletions

File diff suppressed because it is too large Load Diff

View File

@ -89,7 +89,7 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
sp[nx] *= gab[nx];
}
}
_current_gain = gab[nframes-1];
} else { /* manual (scalar) gain */
@ -282,18 +282,18 @@ Amp::apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t ta
Sample* const buffer = buf.data();
fractional_pos = 1.0;
for (pframes_t nx = 0; nx < declick; ++nx) {
buffer[nx] *= (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos))));
fractional_pos += fractional_shift;
}
/* now ensure the rest of the buffer has the target value applied, if necessary. */
if (declick != nframes) {
if (target == 0.0) {
memset (&buffer[declick], 0, sizeof (Sample) * (nframes - declick));
} else if (target != 1.0) {
@ -404,7 +404,7 @@ Amp::set_state (const XMLNode& node, int version)
if ((gain_node = node.child (Controllable::xml_node_name.c_str())) != 0) {
_gain_control->set_state (*gain_node, version);
}
return 0;
}

View File

@ -58,8 +58,8 @@ public:
static void apply_gain (BufferSet& bufs, framecnt_t nframes, gain_t initial, gain_t target);
static void apply_simple_gain(BufferSet& bufs, framecnt_t nframes, gain_t target);
static void apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target);
static void apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target);
static void apply_simple_gain(AudioBuffer& buf, framecnt_t nframes, gain_t target);
static void declick (BufferSet& bufs, framecnt_t nframes, int dir);

View File

@ -35,7 +35,7 @@
#include "ardour/types.h"
#include <jack/jack.h>
#include <jack/jack.h>
namespace MIDI {
class MachineControl;
@ -53,15 +53,15 @@ namespace ARDOUR {
int cleanup ();
bool no_auto_connect ();
void make_property_quarks ();
extern PBD::PropertyChange bounds_change;
extern const char* const ardour_config_info;
void find_bindings_files (std::map<std::string,std::string>&);
std::string translation_kill_path ();
bool translations_are_disabled ();
std::string translation_kill_path ();
bool translations_are_disabled ();
const layer_t max_layer = UCHAR_MAX;

View File

@ -122,12 +122,12 @@ public:
assert(len <= _capacity);
Sample* dst = _data + dst_offset;
gain_t gain_delta = (target - initial)/len;
gain_t gain_delta = (target - initial)/len;
for (framecnt_t n = 0; n < len; ++n) {
*dst++ += (*src++ * initial);
initial += gain_delta;
}
for (framecnt_t n = 0; n < len; ++n) {
*dst++ += (*src++ * initial);
initial += gain_delta;
}
_silent = (_silent && initial == 0 && target == 0);
_written = true;

View File

@ -159,7 +159,7 @@ class AudioDiskstream : public Diskstream
void set_block_size (pframes_t);
int internal_playback_seek (framecnt_t distance);
int can_internal_playback_seek (framecnt_t distance);
std::list<boost::shared_ptr<Source> > steal_write_sources();
std::list<boost::shared_ptr<Source> > steal_write_sources();
void reset_write_sources (bool, bool force = false);
void non_realtime_input_change ();
void non_realtime_locate (framepos_t location);
@ -175,19 +175,19 @@ class AudioDiskstream : public Diskstream
bool commit (framecnt_t nframes);
private:
struct ChannelSource {
std::string name;
struct ChannelSource {
std::string name;
bool is_physical () const;
void ensure_monitor_input (bool) const;
};
bool is_physical () const;
void ensure_monitor_input (bool) const;
};
struct ChannelInfo : public boost::noncopyable {
ChannelInfo (framecnt_t playback_buffer_size,
framecnt_t capture_buffer_size,
framecnt_t speed_buffer_size,
framecnt_t wrap_buffer_size);
ChannelInfo (framecnt_t playback_buffer_size,
framecnt_t capture_buffer_size,
framecnt_t speed_buffer_size,
framecnt_t wrap_buffer_size);
~ChannelInfo ();
Sample *playback_wrap_buffer;
@ -199,8 +199,8 @@ class AudioDiskstream : public Diskstream
boost::shared_ptr<AudioFileSource> write_source;
/// information the Port that our audio data comes from
ChannelSource source;
ChannelSource source;
Sample *current_capture_buffer;
Sample *current_playback_buffer;
@ -219,8 +219,8 @@ class AudioDiskstream : public Diskstream
// the following are used in the butler thread only
framecnt_t curr_capture_cnt;
void resize_playback (framecnt_t);
void resize_capture (framecnt_t);
void resize_playback (framecnt_t);
void resize_capture (framecnt_t);
};
typedef std::vector<ChannelInfo*> ChannelList;
@ -234,8 +234,8 @@ class AudioDiskstream : public Diskstream
int do_refill_with_alloc ();
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
framepos_t& start, framecnt_t cnt,
ChannelInfo* channel_info, int channel, bool reversed);
framepos_t& start, framecnt_t cnt,
ChannelInfo* channel_info, int channel, bool reversed);
void finish_capture (bool rec_monitors_input, boost::shared_ptr<ChannelList>);
void transport_stopped_wallclock (struct tm&, time_t, bool abort);
@ -260,8 +260,8 @@ class AudioDiskstream : public Diskstream
void setup_destructive_playlist ();
void use_destructive_playlist ();
void adjust_playback_buffering ();
void adjust_capture_buffering ();
void adjust_playback_buffering ();
void adjust_capture_buffering ();
void engage_record_enable ();
void disengage_record_enable ();

View File

@ -33,42 +33,41 @@ namespace ARDOUR {
class AudioPlaylist;
class AudioPlaylistSource : public PlaylistSource, public AudioSource {
public:
virtual ~AudioPlaylistSource ();
public:
virtual ~AudioPlaylistSource ();
bool empty() const;
std::string peak_path (std::string audio_path);
uint32_t n_channels() const;
bool clamped_at_unity () const { return false; }
bool empty() const;
std::string peak_path (std::string audio_path);
uint32_t n_channels() const;
bool clamped_at_unity () const { return false; }
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
float sample_rate () const;
int setup_peakfile ();
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
bool can_truncate_peaks() const { return false; }
bool can_be_analysed() const { return _length > 0; }
protected:
friend class SourceFactory;
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
AudioPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist>, uint32_t chn,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
AudioPlaylistSource (Session&, const XMLNode&);
float sample_rate () const;
int setup_peakfile ();
private:
uint32_t _playlist_channel;
std::string _peak_path;
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
int set_state (const XMLNode&, int version, bool with_descendants);
bool can_truncate_peaks() const { return false; }
bool can_be_analysed() const { return _length > 0; }
protected:
friend class SourceFactory;
AudioPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist>, uint32_t chn,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
AudioPlaylistSource (Session&, const XMLNode&);
private:
uint32_t _playlist_channel;
std::string _peak_path;
int set_state (const XMLNode&, int version, bool with_descendants);
};
} /* namespace */
#endif /* __ardour_audio_playlist_source_h__ */

View File

@ -28,7 +28,7 @@ class Session;
class AudioDiskstream;
class AudioPlaylist;
class RouteGroup;
class AudioFileSource;
class AudioFileSource;
class AudioTrack : public Track
{
@ -40,10 +40,10 @@ class AudioTrack : public Track
bool can_use_mode (TrackMode m, bool& bounce_required);
int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
void use_new_diskstream ();
void set_diskstream (boost::shared_ptr<Diskstream>);
void set_diskstream (boost::shared_ptr<Diskstream>);
DataType data_type () const {
return DataType::AUDIO;
@ -62,11 +62,11 @@ class AudioTrack : public Track
boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
bool bounceable () const;
protected:
boost::shared_ptr<AudioDiskstream> audio_diskstream () const;
XMLNode& state (bool full);
int _set_state (const XMLNode&, int, bool call_base);
private:

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2006 Paul Davis
Copyright (C) 2006 Paul Davis
Written by Taybin Rutkin
This program is free software; you can redistribute it and/or modify
@ -64,8 +64,8 @@ class AUPlugin : public ARDOUR::Plugin
AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr<CAComponent> comp);
AUPlugin (const AUPlugin& other);
virtual ~AUPlugin ();
std::string unique_id () const;
std::string unique_id () const;
const char * label () const;
const char * name () const { return _info->name.c_str(); }
const char * maker () const { return _info->creator.c_str(); }
@ -74,14 +74,14 @@ class AUPlugin : public ARDOUR::Plugin
framecnt_t signal_latency() const;
void set_parameter (uint32_t which, float val);
float get_parameter (uint32_t which) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
uint32_t nth_parameter (uint32_t which, bool& ok) const;
void activate ();
void deactivate ();
void flush ();
int set_block_size (pframes_t nframes);
int connect_and_run (BufferSet& bufs,
ChanMapping in, ChanMapping out,
pframes_t nframes, framecnt_t offset);
@ -89,41 +89,41 @@ class AUPlugin : public ARDOUR::Plugin
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name () const { return "audiounit"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
bool parameter_is_audio (uint32_t) const;
bool parameter_is_control (uint32_t) const;
bool parameter_is_input (uint32_t) const;
bool parameter_is_output (uint32_t) const;
int set_state(const XMLNode& node, int);
PresetRecord save_preset (std::string name);
bool load_preset (PresetRecord);
std::string current_preset() const;
bool has_editor () const;
bool reconfigurable_io() const { return true; }
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
bool requires_fixed_size_buffers() const;
void set_fixed_size_buffers (bool yn) {
void set_fixed_size_buffers (bool yn) {
_requires_fixed_size_buffers = yn;
}
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);
/* "host" callbacks */
OSStatus get_beat_and_tempo_callback (Float64* outCurrentBeat,
OSStatus get_beat_and_tempo_callback (Float64* outCurrentBeat,
Float64* outCurrentTempo);
OSStatus get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNextBeat,
@ -142,11 +142,11 @@ class AUPlugin : public ARDOUR::Plugin
private:
void find_presets ();
boost::shared_ptr<CAComponent> comp;
boost::shared_ptr<CAAudioUnit> unit;
bool initialized;
boost::shared_ptr<CAComponent> comp;
boost::shared_ptr<CAAudioUnit> unit;
bool initialized;
int32_t input_channels;
int32_t output_channels;
std::vector<std::pair<int,int> > io_configs;
@ -173,7 +173,7 @@ class AUPlugin : public ARDOUR::Plugin
UInt32 global_elements;
UInt32 output_elements;
UInt32 input_elements;
int set_output_format (AudioStreamBasicDescription&);
int set_input_format (AudioStreamBasicDescription&);
int set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescription&);
@ -182,11 +182,11 @@ class AUPlugin : public ARDOUR::Plugin
std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
uint32_t current_maxbuf;
framecnt_t current_offset;
framecnt_t cb_offset;
BufferSet* current_buffers;
framecnt_t frames_processed;
framecnt_t current_offset;
framecnt_t cb_offset;
BufferSet* current_buffers;
framecnt_t frames_processed;
std::vector<AUParameterDescriptor> descriptors;
void init ();
@ -195,15 +195,15 @@ class AUPlugin : public ARDOUR::Plugin
bool last_transport_rolling;
float last_transport_speed;
};
typedef boost::shared_ptr<AUPlugin> AUPluginPtr;
struct AUPluginCachedInfo {
struct AUPluginCachedInfo {
std::vector<std::pair<int,int> > io_configs;
};
class AUPluginInfo : public PluginInfo {
public:
public:
AUPluginInfo (boost::shared_ptr<CAComponentDescription>);
~AUPluginInfo ();
@ -219,14 +219,14 @@ class AUPluginInfo : public PluginInfo {
static PluginInfoList* discover ();
static void get_names (CAComponentDescription&, std::string& name, std::string& maker);
static std::string stringify_descriptor (const CAComponentDescription&);
static std::string stringify_descriptor (const CAComponentDescription&);
static int load_cached_info ();
private:
boost::shared_ptr<CAComponentDescription> descriptor;
UInt32 version;
static void discover_music (PluginInfoList&);
static void discover_fx (PluginInfoList&);
static void discover_generators (PluginInfoList&);
@ -236,10 +236,10 @@ class AUPluginInfo : public PluginInfo {
typedef std::map<std::string,AUPluginCachedInfo> CachedInfoMap;
static CachedInfoMap cached_info;
static bool cached_io_configuration (const std::string&, UInt32, CAComponent&, AUPluginCachedInfo&, const std::string& name);
static void add_cached_info (const std::string&, AUPluginCachedInfo&);
static void save_cached_info ();
static void save_cached_info ();
};
typedef boost::shared_ptr<AUPluginInfo> AUPluginInfoPtr;

View File

@ -59,13 +59,13 @@ class ProcessThread;
class AudioEngine : public SessionHandlePtr
{
public:
public:
typedef std::set<Port*> Ports;
class disconnected_exception : public std::exception {
public:
virtual const char *what() const throw() { return "AudioEngine is disconnected"; }
};
class disconnected_exception : public std::exception {
public:
virtual const char *what() const throw() { return "AudioEngine is disconnected"; }
};
AudioEngine (std::string client_name, std::string session_uuid);
virtual ~AudioEngine ();
@ -75,7 +75,7 @@ class AudioEngine : public SessionHandlePtr
bool is_realtime () const;
ProcessThread* main_thread() const { return _main_thread; }
ProcessThread* main_thread() const { return _main_thread; }
std::string client_name() const { return jack_client_name; }
@ -107,7 +107,7 @@ class AudioEngine : public SessionHandlePtr
}
return jack_frames_since_cycle_start (_priv_jack);
}
pframes_t frame_time () {
jack_client_t* _priv_jack = _jack;
if (!_running || !_priv_jack) {
@ -170,8 +170,8 @@ class AudioEngine : public SessionHandlePtr
Port *register_output_port (DataType, const std::string& portname);
int unregister_port (Port &);
bool port_is_physical (const std::string&) const;
void ensure_monitor_input (const std::string&, bool) const;
bool port_is_physical (const std::string&) const;
void ensure_monitor_input (const std::string&, bool) const;
void split_cycle (pframes_t offset);
@ -255,14 +255,14 @@ _ the regular process() call to session->process() is not made.
std::string make_port_name_relative (std::string) const;
std::string make_port_name_non_relative (std::string) const;
bool port_is_mine (const std::string&) const;
bool port_is_mine (const std::string&) const;
static AudioEngine* instance() { return _instance; }
void died ();
int create_process_thread (boost::function<void()>, pthread_t*, size_t stacksize);
int create_process_thread (boost::function<void()>, pthread_t*, size_t stacksize);
private:
private:
static AudioEngine* _instance;
jack_client_t* volatile _jack; /* could be reset to null by SIGPIPE or another thread */
@ -321,10 +321,10 @@ _ the regular process() call to session->process() is not made.
int jack_bufsize_callback (pframes_t);
int jack_sample_rate_callback (pframes_t);
void set_jack_callbacks ();
void set_jack_callbacks ();
static void _latency_callback (jack_latency_callback_mode_t, void*);
void jack_latency_callback (jack_latency_callback_mode_t);
static void _latency_callback (jack_latency_callback_mode_t, void*);
void jack_latency_callback (jack_latency_callback_mode_t);
int connect_to_jack (std::string client_name, std::string session_uuid);
@ -337,19 +337,19 @@ _ the regular process() call to session->process() is not made.
Glib::Thread* m_meter_thread;
static gint m_meter_exit;
ProcessThread* _main_thread;
struct ThreadData {
AudioEngine* engine;
boost::function<void()> f;
size_t stacksize;
ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz)
: engine (ae) , f (fp) , stacksize (stacksz) {}
};
static void* _start_process_thread (void*);
ProcessThread* _main_thread;
struct ThreadData {
AudioEngine* engine;
boost::function<void()> f;
size_t stacksize;
ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz)
: engine (ae) , f (fp) , stacksize (stacksz) {}
};
static void* _start_process_thread (void*);
};
} // namespace ARDOUR

View File

@ -43,9 +43,9 @@ public:
return (set_source_name(newname, destructive()) == 0);
}
std::string peak_path (std::string audio_path);
std::string find_broken_peakfile (std::string missing_peak_path,
std::string audio_path);
std::string peak_path (std::string audio_path);
std::string find_broken_peakfile (std::string missing_peak_path,
std::string audio_path);
static void set_peak_dir (std::string dir) { peak_dir = dir; }

View File

@ -34,13 +34,13 @@ class AudioRegion;
class Source;
namespace Properties {
/* fake the type, since crossfades are handled by SequenceProperty which doesn't
care about such things.
*/
extern PBD::PropertyDescriptor<bool> crossfades;
/* fake the type, since crossfades are handled by SequenceProperty which doesn't
care about such things.
*/
extern PBD::PropertyDescriptor<bool> crossfades;
}
class AudioPlaylist;
class AudioPlaylist;
class CrossfadeListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Crossfade> > >
{
@ -57,12 +57,12 @@ private:
/* copy construction only by ourselves */
CrossfadeListProperty (CrossfadeListProperty const & p);
friend class AudioPlaylist;
/* we live and die with our playlist, no lifetime management needed */
AudioPlaylist& _playlist;
friend class AudioPlaylist;
/* we live and die with our playlist, no lifetime management needed */
AudioPlaylist& _playlist;
};
class AudioPlaylist : public ARDOUR::Playlist
{
public:
@ -78,12 +78,12 @@ public:
void clear (bool with_signals=true);
framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
int set_state (const XMLNode&, int version);
PBD::Signal1<void,boost::shared_ptr<Crossfade> > NewCrossfade;
void foreach_crossfade (boost::function<void (boost::shared_ptr<Crossfade>)>);
void crossfades_at (framepos_t frame, Crossfades&);
@ -92,8 +92,8 @@ public:
void update (const CrossfadeListProperty::ChangeRecord &);
boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &) const;
protected:
protected:
/* playlist "callbacks" */
void notify_crossfade_added (boost::shared_ptr<Crossfade>);
@ -101,28 +101,28 @@ public:
void finalize_split_region (boost::shared_ptr<Region> orig, boost::shared_ptr<Region> left, boost::shared_ptr<Region> right);
void refresh_dependents (boost::shared_ptr<Region> region);
void check_dependents (boost::shared_ptr<Region> region, bool norefresh);
void remove_dependents (boost::shared_ptr<Region> region);
void refresh_dependents (boost::shared_ptr<Region> region);
void check_dependents (boost::shared_ptr<Region> region, bool norefresh);
void remove_dependents (boost::shared_ptr<Region> region);
void copy_dependents (const std::vector<TwoRegions>&, Playlist*) const;
void pre_combine (std::vector<boost::shared_ptr<Region> >&);
void post_combine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
private:
CrossfadeListProperty _crossfades;
Crossfades _pending_xfade_adds;
private:
CrossfadeListProperty _crossfades;
Crossfades _pending_xfade_adds;
void crossfade_invalidated (boost::shared_ptr<Region>);
XMLNode& state (bool full_state);
void dump () const;
void crossfade_invalidated (boost::shared_ptr<Region>);
XMLNode& state (bool full_state);
void dump () const;
bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
void crossfade_changed (const PBD::PropertyChange&);
void add_crossfade (boost::shared_ptr<Crossfade>);
bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
void crossfade_changed (const PBD::PropertyChange&);
void add_crossfade (boost::shared_ptr<Crossfade>);
void source_offset_changed (boost::shared_ptr<AudioRegion> region);
void source_offset_changed (boost::shared_ptr<AudioRegion> region);
};
} /* namespace ARDOUR */

View File

@ -115,10 +115,10 @@ class AudioRegion : public Region
uint32_t chan_n = 0,
framecnt_t read_frames = 0,
framecnt_t skip_frames = 0) const;
virtual framecnt_t master_read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
framepos_t position, framecnt_t cnt, uint32_t chan_n=0) const;
virtual framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int channel) const;
XMLNode& state ();
@ -196,7 +196,7 @@ class AudioRegion : public Region
PBD::Property<bool> _fade_out_active;
/** linear gain to apply to the whole region */
PBD::Property<gain_t> _scale_amplitude;
void register_properties ();
void post_set (const PBD::PropertyChange&);

View File

@ -49,7 +49,7 @@ class AudioSource : virtual public Source,
framecnt_t readable_length() const { return _length; }
virtual uint32_t n_channels() const { return 1; }
virtual bool empty() const;
virtual bool empty() const;
framecnt_t length (framepos_t pos) const;
void update_length (framepos_t pos, framecnt_t cnt);
@ -107,17 +107,17 @@ class AudioSource : virtual public Source,
virtual bool clamped_at_unity () const = 0;
static void allocate_working_buffers (framecnt_t framerate);
protected:
static bool _build_missing_peakfiles;
static bool _build_peakfiles;
static size_t _working_buffers_size;
/* these collections of working buffers for supporting
playlist's reading from potentially nested/recursive
sources assume SINGLE THREADED reads by the butler
thread, or a lock around calls that use them.
thread, or a lock around calls that use them.
*/
static std::vector<boost::shared_ptr<Sample> > _mixdown_buffers;
@ -146,14 +146,14 @@ class AudioSource : virtual public Source,
virtual framecnt_t write_unlocked (Sample *dst, framecnt_t cnt) = 0;
virtual std::string peak_path(std::string audio_path) = 0;
virtual std::string find_broken_peakfile (std::string missing_peak_path,
std::string audio_path) { return peak_path (audio_path); }
std::string audio_path) { return peak_path (audio_path); }
virtual int read_peaks_with_fpp (PeakData *peaks,
framecnt_t npeaks, framepos_t start, framecnt_t cnt,
double samples_per_visual_peak, framecnt_t fpp) const;
int compute_and_write_peaks (Sample* buf, framecnt_t first_frame, framecnt_t cnt,
bool force, bool intermediate_peaks_ready_signal,
bool force, bool intermediate_peaks_ready_signal,
framecnt_t frames_per_peak);
private:
@ -165,7 +165,7 @@ class AudioSource : virtual public Source,
* during the handling of the signal.
*/
mutable Glib::Mutex _peaks_ready_lock;
PBD::FdFileDescriptor* _peakfile_descriptor;
int _peakfile_fd;
framecnt_t peak_leftover_cnt;

View File

@ -39,7 +39,7 @@ class Auditioner : public AudioTrack
Auditioner (Session&);
~Auditioner ();
int init ();
int init ();
void audition_region (boost::shared_ptr<Region>);
@ -53,9 +53,9 @@ class Auditioner : public AudioTrack
}
bool auditioning() const { return g_atomic_int_get (&_auditioning); }
bool needs_monitor() const { return via_monitor; }
bool needs_monitor() const { return via_monitor; }
virtual ChanCount input_streams () const;
virtual ChanCount input_streams () const;
private:
boost::shared_ptr<AudioRegion> the_region;
@ -63,7 +63,7 @@ class Auditioner : public AudioTrack
mutable gint _auditioning;
Glib::Mutex lock;
framecnt_t length;
bool via_monitor;
bool via_monitor;
void drop_ports ();
static void *_drop_ports (void *);

View File

@ -43,7 +43,7 @@ class Automatable : virtual public Evoral::ControlSet
{
public:
Automatable(Session&);
Automatable (const Automatable& other);
Automatable (const Automatable& other);
virtual ~Automatable() {}
@ -63,7 +63,7 @@ public:
virtual void transport_stopped (framepos_t now);
virtual std::string describe_parameter(Evoral::Parameter param);
virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
AutoState get_parameter_automation_state (Evoral::Parameter param);
virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState);
@ -93,11 +93,11 @@ public:
typedef Evoral::ControlSet::Controls Controls;
static const std::string xml_node_name;
static const std::string xml_node_name;
int set_automation_xml_state (const XMLNode&, Evoral::Parameter default_param);
XMLNode& get_automation_xml_state();
protected:
Session& _a_session;

View File

@ -77,10 +77,10 @@ public:
void set_value (double);
double get_value () const;
double lower() const { return parameter().min(); }
double upper() const { return parameter().max(); }
double lower() const { return parameter().min(); }
double upper() const { return parameter().max(); }
const ARDOUR::Session& session() const { return _session; }
const ARDOUR::Session& session() const { return _session; }
/** Convert user values to UI values. See pbd/controllable.h */
virtual double user_to_ui (double val) const {
@ -91,9 +91,9 @@ public:
virtual double ui_to_user (double val) const {
return val;
}
protected:
ARDOUR::Session& _session;
};

View File

@ -64,8 +64,8 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
return (_state & Play) || ((_state & Touch) && !touching());
}
bool automation_write () const {
return ((_state & Write) || ((_state & Touch) && touching()));
}
return ((_state & Write) || ((_state & Touch) && touching()));
}
PBD::Signal0<void> StateChanged;
@ -75,9 +75,9 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
void stop_touch (bool mark, double when);
bool touching() const { return g_atomic_int_get (&_touching); }
bool writing() const { return _state == Write; }
bool touch_enabled() const { return _state == Touch; }
bool touch_enabled() const { return _state == Touch; }
XMLNode& get_state ();
XMLNode& get_state ();
int set_state (const XMLNode &, int version);
XMLNode& state (bool full);
XMLNode& serialize_events ();

View File

@ -1,4 +1,4 @@
#ifndef __libardour_buffer_manager__
#ifndef __libardour_buffer_manager__
#define __libardour_buffer_manager__
#include <stdint.h>
@ -15,21 +15,21 @@ class ThreadBuffers;
class BufferManager
{
public:
static void init (uint32_t);
static ThreadBuffers* get_thread_buffers ();
static void put_thread_buffers (ThreadBuffers*);
public:
static void init (uint32_t);
static void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
static ThreadBuffers* get_thread_buffers ();
static void put_thread_buffers (ThreadBuffers*);
private:
static void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
private:
static Glib::StaticMutex rb_mutex;
typedef PBD::RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
typedef PBD::RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
typedef std::list<ThreadBuffers*> ThreadBufferList;
static ThreadBufferFIFO* thread_buffers;
static ThreadBufferFIFO* thread_buffers;
static ThreadBufferList* thread_buffers_list;
};

View File

@ -33,7 +33,7 @@
#include "evoral/MIDIEvent.hpp"
struct VstEvents;
struct VstMidiEvent;
#endif
#endif
namespace ARDOUR {
@ -120,7 +120,7 @@ public:
#ifdef VST_SUPPORT
VstEvents* get_vst_midi (size_t);
#endif
#endif
void read_from(const BufferSet& in, framecnt_t nframes);
void merge_from(const BufferSet& in, framecnt_t nframes);
@ -191,15 +191,15 @@ private:
private:
/* prevent copy construction */
VSTBuffer (VSTBuffer const &);
VstEvents* _events; /// the parent VSTEvents struct
VstMidiEvent* _midi_events; ///< storage area for VSTMidiEvents
size_t _capacity;
};
typedef std::vector<VSTBuffer*> VSTBuffers;
VSTBuffers _vst_buffers;
#endif
#endif
/// Use counts (there may be more actual buffers than this)
ChanCount _count;

View File

@ -41,7 +41,7 @@ class Butler : public SessionHandleRef
public:
Butler (Session& session);
~Butler();
int start_thread();
void terminate_thread();
void schedule_transport_work();
@ -83,7 +83,7 @@ class Butler : public SessionHandleRef
private:
void empty_pool_trash ();
void config_changed (std::string);
void config_changed (std::string);
};
} // namespace ARDOUR

View File

@ -33,17 +33,17 @@ struct Click {
framecnt_t duration;
framecnt_t offset;
const Sample *data;
Click (framepos_t s, framecnt_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
void *operator new (size_t) {
return pool.alloc ();
};
void operator delete(void *ptr, size_t /*size*/) {
pool.release (ptr);
}
private:
static Pool pool;
};
@ -55,7 +55,7 @@ class ClickIO : public IO
public:
ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {}
~ClickIO() {}
protected:
uint32_t pans_required () const { return 1; }
};

View File

@ -117,7 +117,7 @@ class ConfigVariable<bool> : public ConfigVariableBase
}
void set_from_string (std::string const & s) {
value = string_is_affirmative (s);
value = string_is_affirmative (s);
}
protected:
@ -141,11 +141,11 @@ class ConfigVariableWithMutation : public ConfigVariable<T>
}
void set_from_string (std::string const & s) {
T v;
std::stringstream ss;
ss << s;
T v;
std::stringstream ss;
ss << s;
ss >> v;
set (v);
set (v);
}
protected:

View File

@ -34,7 +34,7 @@ class CoreAudioSource : public AudioFileSource {
CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag);
~CoreAudioSource ();
void set_path (const std::string& p);
void set_path (const std::string& p);
float sample_rate() const;
int update_header (framepos_t when, struct tm&, time_t);
@ -48,7 +48,7 @@ class CoreAudioSource : public AudioFileSource {
protected:
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
framecnt_t write_unlocked (Sample *, framecnt_t) { return 0; }
private:
mutable CAAudioFile af;
uint16_t n_channels;

View File

@ -44,7 +44,7 @@ enum AnchorPoint {
EndOfIn,
EndOfOut
};
class Playlist;
class Crossfade : public ARDOUR::AudioRegion
@ -175,7 +175,7 @@ class Crossfade : public ARDOUR::AudioRegion
bool update ();
bool operator== (const ARDOUR::Crossfade&);
protected:
framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int) const;
};

View File

@ -122,27 +122,27 @@ static inline cycles_t get_cycles (void)
typedef uint32_t long cycles_t;
static inline cycles_t get_cycles(void)
{
cycles_t cycles;
__asm__("stck 0(%0)" : : "a" (&(cycles)) : "memory", "cc");
return cycles >> 2;
cycles_t cycles;
__asm__("stck 0(%0)" : : "a" (&(cycles)) : "memory", "cc");
return cycles >> 2;
}
#elif defined(__hppa__)
/* hppa/parisc */
#define mfctl(reg) ({ \
uint32_t cr; \
__asm__ __volatile__( \
"mfctl " #reg ",%0" : \
"=r" (cr) \
); \
cr; \
uint32_t cr; \
__asm__ __volatile__( \
"mfctl " #reg ",%0" : \
"=r" (cr) \
); \
cr; \
})
typedef uint32_t cycles_t;
static inline cycles_t get_cycles (void)
{
return mfctl(16);
return mfctl(16);
}
#elif defined(__mips__)
@ -159,19 +159,19 @@ static inline cycles_t get_cycles (void)
* We know that all SMP capable CPUs have cycle counters.
*/
#define __read_32bit_c0_register(source, sel) \
({ int __res; \
if (sel == 0) \
__asm__ __volatile__( \
"mfc0\t%0, " #source "\n\t" \
: "=r" (__res)); \
else \
__asm__ __volatile__( \
".set\tmips32\n\t" \
"mfc0\t%0, " #source ", " #sel "\n\t" \
".set\tmips0\n\t" \
: "=r" (__res)); \
__res; \
#define __read_32bit_c0_register(source, sel) \
({ int __res; \
if (sel == 0) \
__asm__ __volatile__( \
"mfc0\t%0, " #source "\n\t" \
: "=r" (__res)); \
else \
__asm__ __volatile__( \
".set\tmips32\n\t" \
"mfc0\t%0, " #source ", " #sel "\n\t" \
".set\tmips0\n\t" \
: "=r" (__res)); \
__res; \
})
/* #define CP0_COUNT $9 */
@ -180,7 +180,7 @@ static inline cycles_t get_cycles (void)
typedef uint32_t cycles_t;
static inline cycles_t get_cycles (void)
{
return read_c0_count();
return read_c0_count();
}
/* begin mach */
@ -191,8 +191,8 @@ static inline cycles_t get_cycles (void)
typedef UInt64 cycles_t;
static inline cycles_t get_cycles (void)
{
UInt64 time = AudioGetCurrentHostTime();
return AudioConvertHostTimeToNanos(time);
UInt64 time = AudioGetCurrentHostTime();
return AudioConvertHostTimeToNanos(time);
}
/* end mach */
@ -210,10 +210,10 @@ extern cycles_t cacheflush_time;
static inline cycles_t get_cycles(void)
{
struct timeval tv;
gettimeofday (&tv, NULL);
struct timeval tv;
gettimeofday (&tv, NULL);
return tv.tv_usec;
return tv.tv_usec;
}
#endif

View File

@ -28,29 +28,29 @@
namespace PBD {
namespace DEBUG {
extern uint64_t MidiSourceIO;
extern uint64_t MidiPlaylistIO;
extern uint64_t MidiDiskstreamIO;
extern uint64_t SnapBBT;
extern uint64_t Configuration;
extern uint64_t Latency;
extern uint64_t Processors;
extern uint64_t ProcessThreads;
extern uint64_t Graph;
extern uint64_t Destruction;
extern uint64_t MTC;
extern uint64_t Transport;
extern uint64_t Slave;
extern uint64_t SessionEvents;
extern uint64_t MidiIO;
extern uint64_t MackieControl;
extern uint64_t MidiClock;
extern uint64_t Monitor;
extern uint64_t Solo;
extern uint64_t AudioPlayback;
extern uint64_t Panning;
extern uint64_t LV2;
extern uint64_t CaptureAlignment;
extern uint64_t MidiSourceIO;
extern uint64_t MidiPlaylistIO;
extern uint64_t MidiDiskstreamIO;
extern uint64_t SnapBBT;
extern uint64_t Configuration;
extern uint64_t Latency;
extern uint64_t Processors;
extern uint64_t ProcessThreads;
extern uint64_t Graph;
extern uint64_t Destruction;
extern uint64_t MTC;
extern uint64_t Transport;
extern uint64_t Slave;
extern uint64_t SessionEvents;
extern uint64_t MidiIO;
extern uint64_t MackieControl;
extern uint64_t MidiClock;
extern uint64_t Monitor;
extern uint64_t Solo;
extern uint64_t AudioPlayback;
extern uint64_t Panning;
extern uint64_t LV2;
extern uint64_t CaptureAlignment;
}
}

View File

@ -109,7 +109,7 @@ public:
boost::shared_ptr<MuteMaster> _mute_master;
bool no_panner_reset;
boost::shared_ptr<PannerShell> _panshell;
framecnt_t scnt;
framecnt_t scnt;
static bool panners_legal;
static PBD::Signal0<int> PannersLegal;

View File

@ -48,7 +48,7 @@ class Processor;
class Source;
class Session;
class Track;
class Location;
class Location;
class Diskstream : public SessionObject, public PublicDiskstream
{
@ -214,8 +214,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
virtual void transport_looped (framepos_t transport_frame) = 0;
struct CaptureInfo {
framepos_t start;
framecnt_t frames;
framepos_t start;
framecnt_t frames;
};
virtual int use_new_write_source (uint32_t n=0) = 0;
@ -235,7 +235,7 @@ class Diskstream : public SessionObject, public PublicDiskstream
virtual void set_align_style_from_io() {}
virtual void setup_destructive_playlist () {}
virtual void use_destructive_playlist () {}
virtual void prepare_to_stop (framepos_t pos);
virtual void prepare_to_stop (framepos_t pos);
void calculate_record_range(OverlapType ot, framepos_t transport_frame, framecnt_t nframes,
framecnt_t& rec_nframes, framecnt_t& rec_offset);

View File

@ -100,7 +100,7 @@ class PortExportChannel : public ExportChannel
};
/// Handles RegionExportChannels and does actual reading from region
class RegionExportChannelFactory
class RegionExportChannelFactory
{
public:
enum Type {

View File

@ -55,7 +55,7 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC
public:
bool operator== (ExportChannelConfiguration const & other) const { return channels == other.channels; }
bool operator!= (ExportChannelConfiguration const & other) const { return channels != other.channels; }
XMLNode & get_state ();
int set_state (const XMLNode &);
@ -76,7 +76,7 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC
std::copy (new_channels.begin(), new_channels.end(), std::back_inserter(channels));
}
void clear_channels () { channels.clear (); }
/** Returns a list of channel configurations that match the files created.
* I.e. many configurations if splitting is enabled, one if not. */
void configurations_for_files (std::list<boost::shared_ptr<ExportChannelConfiguration> > & configs);

View File

@ -163,7 +163,7 @@ class ExportFormatBase {
void set_extension (std::string const & extension) { _extension = extension; }
std::string const & extension () const { return _extension; }
static SampleRate nearest_sample_rate (framecnt_t sample_rate);
protected:

View File

@ -32,7 +32,7 @@ class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBa
private:
public:
ExportFormatCompatibility (std::string name)
ExportFormatCompatibility (std::string name)
{
set_name (name);
sample_formats.insert (SF_None);

View File

@ -91,8 +91,11 @@ class HasSampleFormat : public PBD::ScopedConnectionList {
class SampleFormatState : public ExportFormatBase::SelectableCompatible {
public:
SampleFormatState (ExportFormatBase::SampleFormat format, std::string name) :
format (format) { set_name (name); }
SampleFormatState (ExportFormatBase::SampleFormat format, std::string name)
: format (format)
{
set_name (name);
}
ExportFormatBase::SampleFormat format;
};

View File

@ -58,47 +58,47 @@ class ExportGraphBuilder
typedef std::map<ExportChannelPtr, IdentityVertexPtr> ChannelMap;
public:
ExportGraphBuilder (Session const & session);
~ExportGraphBuilder ();
int process (framecnt_t frames, bool last_cycle);
bool process_normalize (); // returns true when finished
void reset ();
void set_current_timespan (boost::shared_ptr<ExportTimespan> span);
void add_config (FileSpec const & config);
private:
void add_split_config (FileSpec const & config);
class Encoder {
public:
template <typename T> boost::shared_ptr<AudioGrapher::Sink<T> > init (FileSpec const & new_config);
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
static int get_real_format (FileSpec const & config);
private:
typedef boost::shared_ptr<AudioGrapher::SndfileWriter<Sample> > FloatWriterPtr;
typedef boost::shared_ptr<AudioGrapher::SndfileWriter<int> > IntWriterPtr;
typedef boost::shared_ptr<AudioGrapher::SndfileWriter<short> > ShortWriterPtr;
template<typename T> void init_writer (boost::shared_ptr<AudioGrapher::SndfileWriter<T> > & writer);
void copy_files (std::string orig_path);
FileSpec config;
std::list<FilenamePtr> filenames;
PBD::ScopedConnection copy_files_connection;
// Only one of these should be available at a time
FloatWriterPtr float_writer;
IntWriterPtr int_writer;
ShortWriterPtr short_writer;
};
// sample format converter
class SFC {
public:
@ -107,56 +107,56 @@ class ExportGraphBuilder
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
private:
typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<Sample> > FloatConverterPtr;
typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<int> > IntConverterPtr;
typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<short> > ShortConverterPtr;
FileSpec config;
boost::ptr_list<Encoder> children;
int data_width;
// Only one of these should be available at a time
FloatConverterPtr float_converter;
IntConverterPtr int_converter;
ShortConverterPtr short_converter;
};
class Normalizer {
public:
Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames);
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
/// Returns true when finished
bool process ();
private:
typedef boost::shared_ptr<AudioGrapher::PeakReader> PeakReaderPtr;
typedef boost::shared_ptr<AudioGrapher::Normalizer> NormalizerPtr;
typedef boost::shared_ptr<AudioGrapher::TmpFile<Sample> > TmpFilePtr;
typedef boost::shared_ptr<AudioGrapher::Threader<Sample> > ThreaderPtr;
typedef boost::shared_ptr<AudioGrapher::AllocatingProcessContext<Sample> > BufferPtr;
void start_post_processing();
ExportGraphBuilder & parent;
FileSpec config;
framecnt_t max_frames_out;
BufferPtr buffer;
PeakReaderPtr peak_reader;
TmpFilePtr tmp_file;
NormalizerPtr normalizer;
ThreaderPtr threader;
boost::ptr_list<SFC> children;
PBD::ScopedConnection post_processing_connection;
};
// sample rate converter
class SRC {
public:
@ -164,13 +164,13 @@ class ExportGraphBuilder
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
private:
typedef boost::shared_ptr<AudioGrapher::SampleRateConverter> SRConverterPtr;
template<typename T>
void add_child_to_list (FileSpec const & new_config, boost::ptr_list<T> & list);
ExportGraphBuilder & parent;
FileSpec config;
boost::ptr_list<SFC> children;
@ -178,7 +178,7 @@ class ExportGraphBuilder
SRConverterPtr converter;
framecnt_t max_frames_out;
};
// Silence trimmer + adder
class SilenceHandler {
public:
@ -186,27 +186,27 @@ class ExportGraphBuilder
FloatSinkPtr sink ();
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
private:
typedef boost::shared_ptr<AudioGrapher::SilenceTrimmer<Sample> > SilenceTrimmerPtr;
ExportGraphBuilder & parent;
FileSpec config;
boost::ptr_list<SRC> children;
SilenceTrimmerPtr silence_trimmer;
framecnt_t max_frames_in;
};
// channel configuration
class ChannelConfig {
public:
ChannelConfig (ExportGraphBuilder & parent, FileSpec const & new_config, ChannelMap & channel_map);
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
private:
typedef boost::shared_ptr<AudioGrapher::Interleaver<Sample> > InterleaverPtr;
ExportGraphBuilder & parent;
FileSpec config;
boost::ptr_list<SilenceHandler> children;
@ -216,18 +216,18 @@ class ExportGraphBuilder
Session const & session;
boost::shared_ptr<ExportTimespan> timespan;
// Roots for export processor trees
typedef boost::ptr_list<ChannelConfig> ChannelConfigList;
ChannelConfigList channel_configs;
// The sources of all data, each channel is read only once
ChannelMap channels;
framecnt_t process_buffer_frames;
std::list<Normalizer *> normalizers;
Glib::ThreadPool thread_pool;
};

View File

@ -90,7 +90,7 @@ class ExportHandler : public ExportElementFactory
FilenamePtr filename;
boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info;
};
private:
/* Stuff for export configs
@ -120,7 +120,7 @@ class ExportHandler : public ExportElementFactory
private:
int process (framecnt_t frames);
Session & session;
GraphBuilderPtr graph_builder;
StatusPtr export_status;
@ -139,7 +139,7 @@ class ExportHandler : public ExportElementFactory
typedef std::pair<ConfigMap::iterator, ConfigMap::iterator> TimespanBounds;
TimespanPtr current_timespan;
TimespanBounds timespan_bounds;
PBD::ScopedConnection process_connection;
framepos_t process_position;

View File

@ -268,7 +268,7 @@ class ExportProfileManager
ChannelConfigStatePtr channel_config_state,
FormatStatePtr format_state,
FilenameStatePtr filename_state);
bool check_format (FormatPtr format, uint32_t channels);
bool check_sndfile_format (FormatPtr format, unsigned int channels);

View File

@ -28,24 +28,24 @@
namespace ARDOUR {
class MissingSource : public std::exception
class MissingSource : public std::exception
{
public:
MissingSource (const std::string& p, DataType t) throw ()
: path (p), type (t) {}
~MissingSource() throw() {}
MissingSource (const std::string& p, DataType t) throw ()
: path (p), type (t) {}
~MissingSource() throw() {}
virtual const char *what() const throw() { return "source file does not exist"; }
std::string path;
DataType type;
std::string path;
DataType type;
};
/** A source associated with a file on disk somewhere */
class FileSource : virtual public Source {
public:
virtual ~FileSource () {}
virtual const std::string& path() const { return _path; }
virtual bool safe_file_extension (const std::string& path) const = 0;
@ -64,31 +64,31 @@ public:
int set_source_name (const std::string& newname, bool destructive);
static bool find (Session&, DataType type, const std::string& path,
bool must_exist, bool& is_new, uint16_t& chan,
std::string& found_path);
bool must_exist, bool& is_new, uint16_t& chan,
std::string& found_path);
static bool find_2X (Session&, DataType type, const std::string& path,
bool must_exist, bool& is_new, uint16_t& chan,
std::string& found_path);
bool must_exist, bool& is_new, uint16_t& chan,
std::string& found_path);
void inc_use_count ();
void inc_use_count ();
bool removable () const;
const std::string& origin() const { return _origin; }
const std::string& origin() const { return _origin; }
static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName;
protected:
FileSource (Session& session, DataType type,
const std::string& path,
const std::string& origin,
Source::Flag flags = Source::Flag(0));
const std::string& path,
const std::string& origin,
Source::Flag flags = Source::Flag(0));
FileSource (Session& session, const XMLNode& node, bool must_exist);
virtual int init (const std::string& idstr, bool must_exist);
virtual void set_path (const std::string&);
virtual void set_path (const std::string&);
virtual int move_dependents_to_trash() { return 0; }
void set_within_session_from_path (const std::string&);
@ -97,10 +97,10 @@ protected:
bool _file_is_new;
uint16_t _channel;
bool _within_session;
std::string _origin;
bool _open;
void prevent_deletion ();
std::string _origin;
bool _open;
void prevent_deletion ();
};
} // namespace ARDOUR

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2010 Paul Davis
Author: Torben Hohn
Author: Torben Hohn
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
@ -55,10 +55,10 @@ typedef std::set< node_ptr_t > node_set_t;
class Graph : public SessionHandleRef
{
public:
public:
Graph (Session & session);
uint32_t threads_in_use () const { return _thread_list.size(); }
uint32_t threads_in_use () const { return _thread_list.size(); }
void prep();
void trigger (GraphNode * n);
@ -74,38 +74,38 @@ class Graph : public SessionHandleRef
void main_thread();
int silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler);
bool can_record, bool rec_monitors_input, bool& need_butler);
int process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
bool can_record, bool rec_monitors_input, bool& need_butler);
bool can_record, bool rec_monitors_input, bool& need_butler);
int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool non_rt_pending, bool can_record, int declick);
int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool non_rt_pending, bool can_record, int declick);
void process_one_route (Route * route);
void clear_other_chain ();
void clear_other_chain ();
bool in_process_thread () const;
protected:
virtual void session_going_away ();
protected:
virtual void session_going_away ();
private:
std::list<pthread_t> _thread_list;
volatile bool _quit_threads;
PBD::ScopedConnection processor_usage_connection;
private:
std::list<pthread_t> _thread_list;
volatile bool _quit_threads;
PBD::ScopedConnection processor_usage_connection;
void parameter_changed (std::string);
void reset_thread_list ();
void drop_threads ();
void parameter_changed (std::string);
void reset_thread_list ();
void drop_threads ();
node_list_t _nodes_rt[2];
node_list_t _init_trigger_list[2];
std::vector<GraphNode *> _trigger_queue;
pthread_mutex_t _trigger_mutex;
pthread_mutex_t _trigger_mutex;
PBD::ProcessSemaphore _execution_sem;
@ -117,30 +117,30 @@ class Graph : public SessionHandleRef
volatile gint _finished_refcount;
volatile gint _init_finished_refcount[2];
bool _graph_empty;
bool _graph_empty;
// chain swapping
Glib::Mutex _swap_mutex;
Glib::Cond _cleanup_cond;
Glib::Mutex _swap_mutex;
Glib::Cond _cleanup_cond;
volatile int _current_chain;
volatile int _pending_chain;
volatile int _setup_chain;
// parameter caches.
pframes_t _process_nframes;
framepos_t _process_start_frame;
framepos_t _process_end_frame;
bool _process_can_record;
bool _process_rec_monitors_input;
bool _process_non_rt_pending;
int _process_declick;
pframes_t _process_nframes;
framepos_t _process_start_frame;
framepos_t _process_end_frame;
bool _process_can_record;
bool _process_rec_monitors_input;
bool _process_non_rt_pending;
int _process_declick;
bool _process_silent;
bool _process_noroll;
int _process_retval;
bool _process_need_butler;
bool _process_silent;
bool _process_noroll;
int _process_retval;
bool _process_need_butler;
};
} // namespace
} // namespace
#endif /* __ardour_graph_h__ */

View File

@ -54,7 +54,7 @@ class GraphNode
node_set_t _activation_set[2];
boost::shared_ptr<Graph> _graph;
boost::shared_ptr<Graph> _graph;
gint _refcount;
gint _init_refcount[2];

View File

@ -27,7 +27,7 @@
namespace ARDOUR {
class InternalSend;
class InternalSend;
class InternalReturn : public Return
{
@ -45,14 +45,14 @@ class InternalReturn : public Return
void add_send (InternalSend *);
void remove_send (InternalSend *);
static PBD::Signal1<void, pframes_t> CycleStart;
private:
BufferSet buffers;
/** sends that we are receiving data from */
std::list<InternalSend*> _sends;
void allocate_buffers (pframes_t);
void cycle_start (pframes_t);
};

View File

@ -38,7 +38,7 @@ class InternalSend : public Send
XMLNode& state(bool full);
XMLNode& get_state(void);
int set_state(const XMLNode& node, int version);
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
bool feeds (boost::shared_ptr<Route> other) const;
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
@ -57,13 +57,13 @@ class InternalSend : public Send
boost::shared_ptr<Route> _send_to;
PBD::ID _send_to_id;
PBD::ScopedConnection connect_c;
PBD::ScopedConnectionList target_connections;
PBD::ScopedConnectionList target_connections;
void send_to_going_away ();
void send_to_property_changed (const PBD::PropertyChange&);
int connect_when_legal ();
int set_our_state (XMLNode const &, int);
int use_target (boost::shared_ptr<Route>);
int use_target (boost::shared_ptr<Route>);
};
} // namespace ARDOUR

View File

@ -43,13 +43,13 @@ public:
void set_speed (double new_speed) { _speed = new_speed; _target_speed = new_speed; }
void set_target_speed (double new_speed) { _target_speed = new_speed; }
double target_speed() const { return _target_speed; }
double speed() const { return _speed; }
void add_channel_to (int /*input_buffer_size*/, int /*output_buffer_size*/) { phase.push_back (0.0); }
void remove_channel_from () { phase.pop_back (); }
void reset () {
for (size_t i = 0; i < phase.size(); i++) {
phase[i] = 0.0;

View File

@ -90,7 +90,7 @@ class IO : public SessionObject, public Latent
bool set_name (const std::string& str);
virtual void silence (framecnt_t);
void increment_port_buffer_offset (pframes_t offset);
void increment_port_buffer_offset (pframes_t offset);
int ensure_io (ChanCount cnt, bool clear, void *src);
@ -107,9 +107,9 @@ class IO : public SessionObject, public Latent
int disconnect (Port *our_port, std::string other_port, void *src);
int disconnect (void *src);
bool connected_to (boost::shared_ptr<const IO>) const;
bool connected () const;
bool physically_connected () const;
bool connected () const;
bool physically_connected () const;
framecnt_t signal_latency () const { return _own_latency; }
framecnt_t latency () const;
@ -168,7 +168,7 @@ class IO : public SessionObject, public Latent
* the change from happening.
*/
PBD::Signal1<bool, ChanCount, BoolCombiner> PortCountChanging;
static int disable_connecting (void);
static int enable_connecting (void);
static int disable_ports (void);
@ -219,7 +219,7 @@ class IO : public SessionObject, public Latent
boost::shared_ptr<UserBundle> bundle;
PBD::ScopedConnection changed;
};
std::vector<UserBundleInfo*> _bundles_connected; ///< user bundles connected to our ports
static int parse_io_string (const std::string&, std::vector<std::string>& chns);

View File

@ -65,7 +65,7 @@ class IOProcessor : public Processor
void silence (framecnt_t nframes);
void disconnect ();
void increment_port_buffer_offset (pframes_t);
void increment_port_buffer_offset (pframes_t);
virtual bool feeds (boost::shared_ptr<Route> other) const;
@ -74,7 +74,7 @@ class IOProcessor : public Processor
XMLNode& state (bool full_state);
int set_state (const XMLNode&, int version);
protected:
boost::shared_ptr<IO> _input;
boost::shared_ptr<IO> _output;
@ -84,7 +84,7 @@ class IOProcessor : public Processor
IOProcessor (const IOProcessor&);
virtual int set_state_2X (const XMLNode &, int);
bool _own_input;
bool _own_output;

View File

@ -133,7 +133,7 @@ class LadspaPlugin : public ARDOUR::Plugin
bool _was_activated;
void find_presets ();
void init (void *mod, uint32_t index, framecnt_t rate);
void run_in_place (pframes_t nsamples);
void latency_compute_run ();

View File

@ -147,7 +147,7 @@ class Locations : public SessionHandleRef, public PBD::StatefulDestructible
XMLNode& get_state (void);
int set_state (const XMLNode&, int version);
Location *get_location_by_id(PBD::ID);
Location *get_location_by_id(PBD::ID);
Location* auto_loop_location () const;
Location* auto_punch_location () const;

View File

@ -105,7 +105,7 @@ class LV2Plugin : public ARDOUR::Plugin
boost::shared_ptr<Plugin::ScalePoints>
get_scale_points(uint32_t port_index) const;
static uint32_t midi_event_type () { return _midi_event_type; }
void set_insert_info(const PluginInsert* insert);

View File

@ -53,7 +53,7 @@ public:
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
bool configure_io (ChanCount in, ChanCount out);
/* special method for meter, to ensure that it can always handle the maximum
number of streams in the route, no matter where we put it.
*/
@ -90,7 +90,7 @@ public:
}
XMLNode& state (bool full);
private:
friend class IO;
@ -99,7 +99,7 @@ private:
* as it can be altered outside a ::configure_io by ::reflect_inputs.
*/
ChanCount current_meters;
std::vector<float> _peak_power;
std::vector<float> _visible_peak_power;
std::vector<float> _max_peak_power;

View File

@ -42,4 +42,4 @@ private:
};
}

View File

@ -95,9 +95,9 @@ public:
const_iterator begin() const { return const_iterator(*this, 0); }
const_iterator end() const { return const_iterator(*this, _size); }
uint8_t* data() const { return _data; }
uint8_t* data() const { return _data; }
private:
friend class iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> >;
friend class iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> >;

View File

@ -129,7 +129,7 @@ class MidiDiskstream : public Diskstream
void set_block_size (pframes_t);
int internal_playback_seek (framecnt_t distance);
int can_internal_playback_seek (framecnt_t distance);
std::list<boost::shared_ptr<Source> > steal_write_sources();
std::list<boost::shared_ptr<Source> > steal_write_sources();
void reset_write_sources (bool, bool force = false);
void non_realtime_input_change ();
void non_realtime_locate (framepos_t location);
@ -173,11 +173,11 @@ class MidiDiskstream : public Diskstream
void get_input_sources ();
void set_align_style_from_io();
/* fixed size buffers per instance of ardour for now (non-dynamic)
*/
/* fixed size buffers per instance of ardour for now (non-dynamic)
*/
void adjust_playback_buffering () {}
void adjust_capture_buffering () {}
void adjust_playback_buffering () {}
void adjust_capture_buffering () {}
void engage_record_enable ();
void disengage_record_enable ();

View File

@ -33,47 +33,47 @@ namespace ARDOUR {
class MidiPlaylist;
class MidiPlaylistSource : public MidiSource, public PlaylistSource {
public:
virtual ~MidiPlaylistSource ();
public:
virtual ~MidiPlaylistSource ();
bool empty() const;
framecnt_t length (framepos_t) const;
bool empty() const;
framecnt_t length (framepos_t) const;
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev);
void append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev, framepos_t source_start);
void load_model(bool lock=true, bool force_reload=false);
void destroy_model();
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
protected:
friend class SourceFactory;
void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev);
void append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev, framepos_t source_start);
void load_model(bool lock=true, bool force_reload=false);
void destroy_model();
MidiPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist>, uint32_t chn,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
MidiPlaylistSource (Session&, const XMLNode&);
void flush_midi();
protected:
friend class SourceFactory;
framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
framepos_t position,
framepos_t start, framecnt_t cnt,
MidiStateTracker* tracker) const;
framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
framepos_t position,
framecnt_t cnt);
MidiPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist>, uint32_t chn,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
MidiPlaylistSource (Session&, const XMLNode&);
private:
int set_state (const XMLNode&, int version, bool with_descendants);
framecnt_t _length;
void flush_midi();
framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
framepos_t position,
framepos_t start, framecnt_t cnt,
MidiStateTracker* tracker) const;
framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
framepos_t position,
framecnt_t cnt);
private:
int set_state (const XMLNode&, int version, bool with_descendants);
framecnt_t _length;
};
} /* namespace */
#endif /* __ardour_midi_playlist_source_h__ */

View File

@ -39,7 +39,7 @@ namespace ARDOUR {
namespace Properties {
/* this is pseudo-property: nothing has this as an actual
property, but it allows us to signal changes to the
MidiModel used by the MidiRegion
MidiModel used by the MidiRegion
*/
extern PBD::PropertyDescriptor<void*> midi_data;
extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats;
@ -64,7 +64,7 @@ class MidiRegion : public Region
~MidiRegion();
boost::shared_ptr<MidiRegion> clone ();
boost::shared_ptr<MidiSource> midi_source (uint32_t n=0) const;
/* Stub Readable interface */
@ -77,7 +77,7 @@ class MidiRegion : public Region
uint32_t chan_n = 0,
NoteMode mode = Sustained,
MidiStateTracker* tracker = 0) const;
framepos_t master_read_at (MidiRingBuffer<framepos_t>& dst,
framepos_t position,
framecnt_t dur,
@ -86,11 +86,11 @@ class MidiRegion : public Region
XMLNode& state ();
int set_state (const XMLNode&, int version);
int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
/* automation */
boost::shared_ptr<Evoral::Control>
control(const Evoral::Parameter& id, bool create=false) {
return model()->control(id, create);
@ -112,7 +112,7 @@ class MidiRegion : public Region
void transpose (int);
protected:
virtual bool can_trim_start_before_source_start () const {
return true;
}
@ -129,7 +129,7 @@ class MidiRegion : public Region
framepos_t position,
framecnt_t dur,
uint32_t chan_n = 0,
NoteMode mode = Sustained,
NoteMode mode = Sustained,
MidiStateTracker* tracker = 0) const;
void register_properties ();

View File

@ -48,8 +48,8 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
MidiSource (Session& session, const XMLNode&);
virtual ~MidiSource ();
boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime,
Evoral::MusicalTime end = Evoral::MaxMusicalTime);
boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime,
Evoral::MusicalTime end = Evoral::MaxMusicalTime);
/** Read the data in a given time range from the MIDI source.
* All time stamps in parameters are in audio frames (even if the source has tempo time).

View File

@ -47,9 +47,9 @@ public:
void reset ();
bool empty() const { return _on == 0; }
uint16_t on() const { return _on; }
bool active (uint8_t note, uint8_t channel) {
return _active_notes[(channel*128)+note] > 0;
}
bool active (uint8_t note, uint8_t channel) {
return _active_notes[(channel*128)+note] > 0;
}
private:
void track_note_onoffs(const Evoral::MIDIEvent<MidiBuffer::TimeType>& event);

View File

@ -31,7 +31,7 @@ class Session;
class MidiDiskstream;
class MidiPlaylist;
class RouteGroup;
class SMFSource;
class SMFSource;
class MidiTrack : public Track
{
@ -40,13 +40,13 @@ public:
~MidiTrack ();
int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
void realtime_handle_transport_stopped ();
void realtime_locate ();
void use_new_diskstream ();
void set_diskstream (boost::shared_ptr<Diskstream>);
void set_diskstream (boost::shared_ptr<Diskstream>);
void set_record_enabled (bool yn, void *src);
DataType data_type () const {
@ -57,7 +57,7 @@ public:
void freeze_me (InterThreadInfo&);
void unfreeze ();
boost::shared_ptr<Region> bounce (InterThreadInfo&);
boost::shared_ptr<Region> bounce_range (
framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing
@ -88,7 +88,7 @@ public:
void set_step_editing (bool yn);
MidiRingBuffer<framepos_t>& step_edit_ring_buffer() { return _step_edit_ring_buffer; }
PBD::Signal1<void,bool> StepEditStatusChange;
PBD::Signal1<void,bool> StepEditStatusChange;
bool midi_thru() const { return _midi_thru; }
void set_midi_thru (bool yn);
@ -102,15 +102,15 @@ public:
bool bounceable () const {
return false;
}
PBD::Signal2<void, boost::shared_ptr<MidiBuffer>, boost::weak_ptr<MidiSource> > DataRecorded;
protected:
XMLNode& state (bool full);
int _set_state (const XMLNode&, int, bool call_base);
bool should_monitor () const;
bool send_silence () const;
bool should_monitor () const;
bool send_silence () const;
private:
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;

View File

@ -6,7 +6,7 @@
#include "pbd/abstract_ui.h"
#include "pbd/signals.h"
namespace MIDI {
namespace MIDI {
class Port;
}
@ -32,15 +32,15 @@ class MidiControlUI : public AbstractUI<MidiUIRequest>
~MidiControlUI ();
static MidiControlUI* instance() { return _instance; }
static BaseUI::RequestType PortChange;
void change_midi_ports ();
protected:
void thread_init ();
void do_request (MidiUIRequest*);
private:
typedef std::list<GSource*> PortSources;
PortSources port_sources;

View File

@ -26,10 +26,10 @@
extern "C" {
/* SSE functions */
float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
float x86_sse_compute_peak (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
void x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
}
void x86_sse_find_peaks (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max);

View File

@ -36,177 +36,178 @@ namespace ARDOUR {
class Session;
template<typename T> class MPControl : public PBD::Controllable {
public:
MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
float lower = 0.0f, float upper = 1.0f)
: PBD::Controllable (name, flag)
, _value (initial)
, _lower (lower)
, _upper (upper)
{}
/* Controllable API */
void set_value (double v) {
T newval = (T) v;
if (newval != _value) {
_value = newval;
Changed(); /* EMIT SIGNAL */
}
}
double get_value () const {
return (float) _value;
}
double lower () const { return _lower; }
double upper () const { return _upper; }
template<typename T>
class MPControl : public PBD::Controllable {
public:
MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
float lower = 0.0f, float upper = 1.0f)
: PBD::Controllable (name, flag)
, _value (initial)
, _lower (lower)
, _upper (upper)
{}
/* "access as T" API */
MPControl& operator=(const T& v) {
if (v != _value) {
_value = v;
Changed (); /* EMIT SIGNAL */
}
return *this;
}
bool operator==(const T& v) const {
return _value == v;
}
bool operator<(const T& v) const {
return _value < v;
}
bool operator<=(const T& v) const {
return _value <= v;
}
bool operator>(const T& v) const {
return _value > v;
}
bool operator>=(const T& v) const {
return _value >= v;
}
operator T() const { return _value; }
T val() const { return _value; }
protected:
T _value;
T _lower;
T _upper;
/* Controllable API */
void set_value (double v) {
T newval = (T) v;
if (newval != _value) {
_value = newval;
Changed(); /* EMIT SIGNAL */
}
}
double get_value () const {
return (float) _value;
}
double lower () const { return _lower; }
double upper () const { return _upper; }
/* "access as T" API */
MPControl& operator=(const T& v) {
if (v != _value) {
_value = v;
Changed (); /* EMIT SIGNAL */
}
return *this;
}
bool operator==(const T& v) const {
return _value == v;
}
bool operator<(const T& v) const {
return _value < v;
}
bool operator<=(const T& v) const {
return _value <= v;
}
bool operator>(const T& v) const {
return _value > v;
}
bool operator>=(const T& v) const {
return _value >= v;
}
operator T() const { return _value; }
T val() const { return _value; }
protected:
T _value;
T _lower;
T _upper;
};
class MonitorProcessor : public Processor
{
public:
MonitorProcessor (Session&);
~MonitorProcessor ();
public:
MonitorProcessor (Session&);
~MonitorProcessor ();
bool display_to_user() const;
bool display_to_user() const;
void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/);
XMLNode& state (bool full);
int set_state (const XMLNode&, int /* version */);
XMLNode& state (bool full);
int set_state (const XMLNode&, int /* version */);
bool configure_io (ChanCount in, ChanCount out);
bool configure_io (ChanCount in, ChanCount out);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
void set_cut_all (bool);
void set_dim_all (bool);
void set_polarity (uint32_t, bool invert);
void set_cut (uint32_t, bool cut);
void set_dim (uint32_t, bool dim);
void set_solo (uint32_t, bool);
void set_mono (bool);
void set_cut_all (bool);
void set_dim_all (bool);
void set_polarity (uint32_t, bool invert);
void set_cut (uint32_t, bool cut);
void set_dim (uint32_t, bool dim);
void set_solo (uint32_t, bool);
void set_mono (bool);
gain_t dim_level() const { return _dim_level; }
gain_t solo_boost_level() const { return _solo_boost_level; }
gain_t dim_level() const { return _dim_level; }
gain_t solo_boost_level() const { return _solo_boost_level; }
bool dimmed (uint32_t chn) const;
bool soloed (uint32_t chn) const;
bool inverted (uint32_t chn) const;
bool cut (uint32_t chn) const;
bool cut_all () const;
bool dim_all () const;
bool mono () const;
bool dimmed (uint32_t chn) const;
bool soloed (uint32_t chn) const;
bool inverted (uint32_t chn) const;
bool cut (uint32_t chn) const;
bool cut_all () const;
bool dim_all () const;
bool mono () const;
PBD::Signal0<void> Changed;
PBD::Signal0<void> Changed;
boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_dim_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_polarity_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_solo_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> dim_control () const { return _dim_all_control; }
boost::shared_ptr<PBD::Controllable> cut_control () const { return _cut_all_control; }
boost::shared_ptr<PBD::Controllable> mono_control () const { return _mono_control; }
boost::shared_ptr<PBD::Controllable> dim_level_control () const { return _dim_level_control; }
boost::shared_ptr<PBD::Controllable> solo_boost_control () const { return _solo_boost_level_control; }
boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_dim_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_polarity_control (uint32_t) const;
boost::shared_ptr<PBD::Controllable> channel_solo_control (uint32_t) const;
private:
struct ChannelRecord {
gain_t current_gain;
boost::shared_ptr<PBD::Controllable> dim_control () const { return _dim_all_control; }
boost::shared_ptr<PBD::Controllable> cut_control () const { return _cut_all_control; }
boost::shared_ptr<PBD::Controllable> mono_control () const { return _mono_control; }
boost::shared_ptr<PBD::Controllable> dim_level_control () const { return _dim_level_control; }
boost::shared_ptr<PBD::Controllable> solo_boost_control () const { return _solo_boost_level_control; }
/* pointers - created first, but managed by boost::shared_ptr<> */
private:
struct ChannelRecord {
gain_t current_gain;
MPControl<gain_t>* cut_ptr;
MPControl<bool>* dim_ptr;
MPControl<gain_t>* polarity_ptr;
MPControl<bool>* soloed_ptr;
/* pointers - created first, but managed by boost::shared_ptr<> */
/* shared ptr access and lifetime management, for external users */
MPControl<gain_t>* cut_ptr;
MPControl<bool>* dim_ptr;
MPControl<gain_t>* polarity_ptr;
MPControl<bool>* soloed_ptr;
boost::shared_ptr<PBD::Controllable> cut_control;
boost::shared_ptr<PBD::Controllable> dim_control;
boost::shared_ptr<PBD::Controllable> polarity_control;
boost::shared_ptr<PBD::Controllable> soloed_control;
/* shared ptr access and lifetime management, for external users */
/* typed controllables for internal use */
boost::shared_ptr<PBD::Controllable> cut_control;
boost::shared_ptr<PBD::Controllable> dim_control;
boost::shared_ptr<PBD::Controllable> polarity_control;
boost::shared_ptr<PBD::Controllable> soloed_control;
MPControl<gain_t>& cut;
MPControl<bool>& dim;
MPControl<gain_t>& polarity;
MPControl<bool>& soloed;
ChannelRecord (uint32_t);
};
std::vector<ChannelRecord*> _channels;
/* typed controllables for internal use */
uint32_t solo_cnt;
MPControl<gain_t>& cut;
MPControl<bool>& dim;
MPControl<gain_t>& polarity;
MPControl<bool>& soloed;
/* pointers - created first, but managed by boost::shared_ptr<> */
ChannelRecord (uint32_t);
};
MPControl<bool>* _dim_all_ptr;
MPControl<bool>* _cut_all_ptr;
MPControl<bool>* _mono_ptr;
MPControl<volatile gain_t>* _dim_level_ptr;
MPControl<volatile gain_t>* _solo_boost_level_ptr;
std::vector<ChannelRecord*> _channels;
/* shared ptr access and lifetime management, for external users */
uint32_t solo_cnt;
boost::shared_ptr<PBD::Controllable> _dim_all_control;
boost::shared_ptr<PBD::Controllable> _cut_all_control;
boost::shared_ptr<PBD::Controllable> _mono_control;
boost::shared_ptr<PBD::Controllable> _dim_level_control;
boost::shared_ptr<PBD::Controllable> _solo_boost_level_control;
/* pointers - created first, but managed by boost::shared_ptr<> */
/* typed controllables for internal use */
MPControl<bool>* _dim_all_ptr;
MPControl<bool>* _cut_all_ptr;
MPControl<bool>* _mono_ptr;
MPControl<volatile gain_t>* _dim_level_ptr;
MPControl<volatile gain_t>* _solo_boost_level_ptr;
MPControl<bool>& _dim_all;
MPControl<bool>& _cut_all;
MPControl<bool>& _mono;
MPControl<volatile gain_t>& _dim_level;
MPControl<volatile gain_t>& _solo_boost_level;
/* shared ptr access and lifetime management, for external users */
void allocate_channels (uint32_t);
boost::shared_ptr<PBD::Controllable> _dim_all_control;
boost::shared_ptr<PBD::Controllable> _cut_all_control;
boost::shared_ptr<PBD::Controllable> _mono_control;
boost::shared_ptr<PBD::Controllable> _dim_level_control;
boost::shared_ptr<PBD::Controllable> _solo_boost_level_control;
/* typed controllables for internal use */
MPControl<bool>& _dim_all;
MPControl<bool>& _cut_all;
MPControl<bool>& _mono;
MPControl<volatile gain_t>& _dim_level;
MPControl<volatile gain_t>& _solo_boost_level;
void allocate_channels (uint32_t);
};
} /* namespace */

View File

@ -5,9 +5,9 @@ namespace ARDOUR {
class Movable {
public:
Movable() {}
Movable() {}
bool locked () const { return false; }
bool locked () const { return false; }
};
}

View File

@ -48,22 +48,22 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
~MuteMaster() {}
bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
bool muted_by_others_at (MutePoint mp) const;
gain_t mute_gain_at (MutePoint) const;
void set_muted_by_self (bool yn) { _muted_by_self = yn; }
void set_muted_by_self (bool yn) { _muted_by_self = yn; }
void mute_at (MutePoint);
void unmute_at (MutePoint);
void set_mute_points (const std::string& mute_point);
void set_mute_points (MutePoint);
MutePoint mute_points() const { return _mute_point; }
void set_mute_points (MutePoint);
MutePoint mute_points() const { return _mute_point; }
void set_soloed (bool);
void set_solo_ignore (bool yn) { _solo_ignore = yn; }
void set_soloed (bool);
void set_solo_ignore (bool yn) { _solo_ignore = yn; }
PBD::Signal0<void> MutePointChanged;
@ -72,9 +72,9 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
private:
volatile MutePoint _mute_point;
volatile bool _muted_by_self;
volatile bool _soloed;
volatile bool _solo_ignore;
volatile bool _muted_by_self;
volatile bool _soloed;
volatile bool _solo_ignore;
};
} // namespace ARDOUR

View File

@ -30,23 +30,24 @@ class XMLNode;
namespace ARDOUR
{
class Session;
class Playlist;
struct NamedSelection : public PBD::Stateful
{
NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&);
NamedSelection (Session&, const XMLNode&);
virtual ~NamedSelection ();
NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&);
NamedSelection (Session&, const XMLNode&);
virtual ~NamedSelection ();
std::string name;
std::list<boost::shared_ptr<Playlist> > playlists;
std::string name;
std::list<boost::shared_ptr<Playlist> > playlists;
XMLNode& get_state (void);
XMLNode& get_state (void);
int set_state (const XMLNode&, int version);
int set_state (const XMLNode&, int version);
static PBD::Signal1<void,NamedSelection*> NamedSelectionCreated;
static PBD::Signal1<void,NamedSelection*> NamedSelectionCreated;
};
}/* namespace ARDOUR */

View File

@ -29,26 +29,25 @@ class Session;
class OnsetDetector : public AudioAnalyser
{
public:
OnsetDetector (float sample_rate);
~OnsetDetector();
public:
OnsetDetector (float sample_rate);
~OnsetDetector();
static std::string operational_identifier();
static std::string operational_identifier();
void set_silence_threshold (float);
void set_peak_threshold (float);
void set_function (int);
void set_silence_threshold (float);
void set_peak_threshold (float);
void set_function (int);
int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
static void cleanup_onsets (AnalysisFeatureList&, float sr, float gap_msecs);
static void cleanup_onsets (AnalysisFeatureList&, float sr, float gap_msecs);
protected:
AnalysisFeatureList* current_results;
int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
protected:
AnalysisFeatureList* current_results;
int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
static std::string _op_id;
static std::string _op_id;
};
} /* namespace */

View File

@ -42,4 +42,4 @@ namespace Operations {
extern GQuark fixed_time_region_copy;
};

View File

@ -34,22 +34,21 @@ namespace ARDOUR {
class Session;
class Pannable;
class PanControllable : public AutomationControl
class PanControllable : public AutomationControl
{
public:
PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param)
: AutomationControl (s, param, boost::shared_ptr<AutomationList>(new AutomationList(param)), name)
, owner (o)
{}
double lower () const;
void set_value (double);
public:
PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param)
: AutomationControl (s, param, boost::shared_ptr<AutomationList>(new AutomationList(param)), name)
, owner (o)
{}
private:
Pannable* owner;
double lower () const;
void set_value (double);
private:
Pannable* owner;
};
} // namespace
} // namespace
#endif /* __libardour_pan_controllable_h__ */

View File

@ -36,22 +36,22 @@ class Session;
class AutomationControl;
class Panner;
class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef
class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef
{
public:
Pannable (Session& s);
~Pannable ();
Pannable (Session& s);
~Pannable ();
boost::shared_ptr<AutomationControl> pan_azimuth_control;
boost::shared_ptr<AutomationControl> pan_elevation_control;
boost::shared_ptr<AutomationControl> pan_width_control;
boost::shared_ptr<AutomationControl> pan_frontback_control;
boost::shared_ptr<AutomationControl> pan_lfe_control;
boost::shared_ptr<Panner> panner() const { return _panner.lock(); }
void set_panner(boost::shared_ptr<Panner>);
boost::shared_ptr<AutomationControl> pan_azimuth_control;
boost::shared_ptr<AutomationControl> pan_elevation_control;
boost::shared_ptr<AutomationControl> pan_width_control;
boost::shared_ptr<AutomationControl> pan_frontback_control;
boost::shared_ptr<AutomationControl> pan_lfe_control;
Session& session() { return _session; }
boost::shared_ptr<Panner> panner() const { return _panner.lock(); }
void set_panner(boost::shared_ptr<Panner>);
Session& session() { return _session; }
void set_automation_state (AutoState);
AutoState automation_state() const { return _auto_state; }
@ -65,37 +65,37 @@ class Pannable : public PBD::Stateful, public Automatable, public SessionHandleR
return (_auto_state & Play) || ((_auto_state & Touch) && !touching());
}
bool automation_write () const {
return ((_auto_state & Write) || ((_auto_state & Touch) && touching()));
}
return ((_auto_state & Write) || ((_auto_state & Touch) && touching()));
}
std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
void start_touch (double when);
void stop_touch (bool mark, double when);
bool touching() const { return g_atomic_int_get (&_touching); }
bool writing() const { return _auto_state == Write; }
bool touch_enabled() const { return _auto_state == Touch; }
bool touch_enabled() const { return _auto_state == Touch; }
XMLNode& get_state ();
XMLNode& state (bool full_state);
int set_state (const XMLNode&, int version);
XMLNode& get_state ();
XMLNode& state (bool full_state);
int set_state (const XMLNode&, int version);
bool has_state() const { return _has_state; }
bool has_state() const { return _has_state; }
protected:
boost::weak_ptr<Panner> _panner;
AutoState _auto_state;
AutoStyle _auto_style;
gint _touching;
bool _has_state;
uint32_t _responding_to_control_auto_state_change;
boost::weak_ptr<Panner> _panner;
AutoState _auto_state;
AutoStyle _auto_style;
gint _touching;
bool _has_state;
uint32_t _responding_to_control_auto_state_change;
void control_auto_state_changed (AutoState);
void control_auto_state_changed (AutoState);
private:
void value_changed ();
};
} // namespace
} // namespace
#endif /* __libardour_pannable_h__ */

View File

@ -44,46 +44,45 @@ class Speakers;
class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
{
public:
public:
Panner (boost::shared_ptr<Pannable>);
~Panner ();
virtual boost::shared_ptr<Speakers> get_speakers() const { return boost::shared_ptr<Speakers>(); }
virtual boost::shared_ptr<Speakers> get_speakers() const { return boost::shared_ptr<Speakers>(); }
virtual ChanCount in() const = 0;
virtual ChanCount out() const = 0;
virtual ChanCount in() const = 0;
virtual ChanCount out() const = 0;
virtual void configure_io (ARDOUR::ChanCount /*in*/, ARDOUR::ChanCount /*out*/) {}
/* derived implementations of these methods must indicate
whether it is legal for a Controllable to use the
value of the argument (post-call) in a call to
Controllable::set_value().
they have a choice of:
virtual void configure_io (ARDOUR::ChanCount /*in*/, ARDOUR::ChanCount /*out*/) {}
* return true, leave argument unchanged
* return true, modify argument
* return false
/* derived implementations of these methods must indicate
whether it is legal for a Controllable to use the
value of the argument (post-call) in a call to
Controllable::set_value().
*/
they have a choice of:
virtual bool clamp_position (double&) { return true; }
virtual bool clamp_width (double&) { return true; }
virtual bool clamp_elevation (double&) { return true; }
* return true, leave argument unchanged
* return true, modify argument
* return false
*/
virtual void set_position (double) { }
virtual void set_width (double) { }
virtual void set_elevation (double) { }
virtual double position () const { return 0.0; }
virtual double width () const { return 0.0; }
virtual double elevation () const { return 0.0; }
virtual bool clamp_position (double&) { return true; }
virtual bool clamp_width (double&) { return true; }
virtual bool clamp_elevation (double&) { return true; }
virtual PBD::AngularVector signal_position (uint32_t) const { return PBD::AngularVector(); }
virtual void set_position (double) { }
virtual void set_width (double) { }
virtual void set_elevation (double) { }
virtual double position () const { return 0.0; }
virtual double width () const { return 0.0; }
virtual double elevation () const { return 0.0; }
virtual PBD::AngularVector signal_position (uint32_t) const { return PBD::AngularVector(); }
virtual void reset() {}
virtual void reset() {}
virtual bool bypassed() const { return _bypassed; }
virtual void set_bypassed (bool yn);
@ -93,33 +92,33 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
AutoStyle automation_style() const;
virtual std::set<Evoral::Parameter> what_can_be_automated() const;
virtual std::string describe_parameter (Evoral::Parameter);
virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
virtual std::string describe_parameter (Evoral::Parameter);
virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
bool touching() const;
static double azimuth_to_lr_fract (double azi) {
static double azimuth_to_lr_fract (double azi) {
/* 180.0 degrees=> left => 0.0 */
/* 0.0 degrees => right => 1.0 */
/* humans can only distinguish 1 degree of arc between two positions,
so force azi back to an integral value before computing
*/
/* humans can only distinguish 1 degree of arc between two positions,
so force azi back to an integral value before computing
*/
return 1.0 - (rint(azi)/180.0);
}
static double lr_fract_to_azimuth (double fract) {
static double lr_fract_to_azimuth (double fract) {
/* fract = 0.0 => degrees = 180.0 => left */
/* fract = 1.0 => degrees = 0.0 => right */
/* humans can only distinguish 1 degree of arc between two positions,
so force azi back to an integral value after computing
*/
/* humans can only distinguish 1 degree of arc between two positions,
so force azi back to an integral value after computing
*/
return rint (180.0 - (fract * 180.0));
}
/**
* Pan some input buffers to a number of output buffers.
*
@ -127,59 +126,60 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
* @param obufs Output buffers (one per panner output).
* @param gain_coeff fixed, additional gain coefficient to apply to output samples.
* @param nframes Number of frames in the input.
*
* Derived panners can choose to implement these if they need to gain more control over the panning algorithm.
* the default is to call distribute_one() or distribute_one_automated() on each input buffer to deliver it to each output
* buffer.
*
* If a panner does not need to override this default behaviour, it can just implement
* distribute_one() and distribute_one_automated() (below).
*
* Derived panners can choose to implement these if they need to gain more
* control over the panning algorithm. The default is to call
* distribute_one() or distribute_one_automated() on each input buffer to
* deliver it to each output buffer.
*
* If a panner does not need to override this default behaviour, it can
* just implement distribute_one() and distribute_one_automated() (below).
*/
virtual void distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
virtual void distribute_automated (BufferSet& ibufs, BufferSet& obufs,
framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers);
framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers);
PBD::Signal0<void> StateChanged;
int set_state (const XMLNode&, int version);
virtual XMLNode& state (bool full_state) = 0;
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
//virtual std::string describe_parameter (Evoral::Parameter);
//virtual std::string value_as_string (Evoral::Parameter, double val);
//virtual std::string describe_parameter (Evoral::Parameter);
//virtual std::string value_as_string (Evoral::Parameter, double val);
static bool equivalent (pan_t a, pan_t b) {
return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
}
static bool equivalent (const PBD::AngularVector& a, const PBD::AngularVector& b) {
/* XXX azimuth only, at present */
/* XXX azimuth only, at present */
return fabs (a.azi - b.azi) < 1.0;
}
protected:
boost::shared_ptr<Pannable> _pannable;
bool _bypassed;
protected:
boost::shared_ptr<Pannable> _pannable;
bool _bypassed;
XMLNode& get_state ();
virtual void distribute_one (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which) = 0;
virtual void distribute_one_automated (AudioBuffer&, BufferSet& obufs,
framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers, uint32_t which) = 0;
framepos_t start, framepos_t end, pframes_t nframes,
pan_t** buffers, uint32_t which) = 0;
};
} // namespace
extern "C" {
struct PanPluginDescriptor {
std::string name;
int32_t in;
int32_t out;
ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
};
struct PanPluginDescriptor {
std::string name;
int32_t in;
int32_t out;
ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
};
}
#endif /* __ardour_panner_h__ */

View File

@ -8,36 +8,36 @@
namespace ARDOUR {
struct PannerInfo {
PanPluginDescriptor descriptor;
void* module;
PannerInfo (PanPluginDescriptor& d, void* handle)
: descriptor (d)
, module (handle)
{}
~PannerInfo () {
dlclose (module);
}
PanPluginDescriptor descriptor;
void* module;
PannerInfo (PanPluginDescriptor& d, void* handle)
: descriptor (d)
, module (handle)
{}
~PannerInfo () {
dlclose (module);
}
};
class PannerManager : public ARDOUR::SessionHandlePtr
{
public:
~PannerManager ();
static PannerManager& instance ();
void discover_panners ();
std::list<PannerInfo*> panner_info;
public:
~PannerManager ();
static PannerManager& instance ();
PannerInfo* select_panner (ChanCount in, ChanCount out);
private:
PannerManager();
static PannerManager* _instance;
void discover_panners ();
std::list<PannerInfo*> panner_info;
PannerInfo* get_descriptor (std::string path);
int panner_discover (std::string path);
PannerInfo* select_panner (ChanCount in, ChanCount out);
private:
PannerManager();
static PannerManager* _instance;
PannerInfo* get_descriptor (std::string path);
int panner_discover (std::string path);
};
} // namespace

View File

@ -67,14 +67,14 @@ public:
PBD::Signal0<void> Changed; /* panner and/or outputs count changed */
boost::shared_ptr<Panner> panner() const { return _panner; }
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
boost::shared_ptr<Panner> panner() const { return _panner; }
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
private:
void distribute_no_automation (BufferSet& src, BufferSet& dest, pframes_t nframes, gain_t gain_coeff);
boost::shared_ptr<Panner> _panner;
boost::shared_ptr<Pannable> _pannable;
boost::shared_ptr<Panner> _panner;
boost::shared_ptr<Pannable> _pannable;
static float current_automation_version_number;
};

View File

@ -1,11 +1,11 @@
/*
Copyright (C) 2008 Torben Hohn
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ -22,63 +22,61 @@
#include "ardour/types.h"
class PIController {
public:
PIController (double resample_factor, int fir_size);
~PIController();
public:
PIController (double resample_factor, int fir_size);
~PIController();
void reset (double resample_factor) {
resample_mean = resample_factor;
static_resample_factor = resample_factor;
out_of_bounds ();
}
double get_ratio (int fill_level, int period_size);
void out_of_bounds();
void reset (double resample_factor) {
resample_mean = resample_factor;
static_resample_factor = resample_factor;
out_of_bounds ();
}
public:
double resample_mean;
double static_resample_factor;
double* offset_array;
double* window_array;
int offset_differential_index;
double offset_integral;
double catch_factor;
double catch_factor2;
double pclamp;
double controlquant;
int smooth_size;
double smooth_offset;
double current_resample_factor;
bool fir_empty;
double get_ratio (int fill_level, int period_size);
void out_of_bounds();
public:
double resample_mean;
double static_resample_factor;
double* offset_array;
double* window_array;
int offset_differential_index;
double offset_integral;
double catch_factor;
double catch_factor2;
double pclamp;
double controlquant;
int smooth_size;
double smooth_offset;
double current_resample_factor;
bool fir_empty;
};
#define ESTIMATOR_SIZE 16
class PIChaser {
public:
PIChaser();
~PIChaser();
public:
PIChaser();
~PIChaser();
double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
void reset();
framepos_t want_locate() { return want_locate_val; }
double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
void reset();
framepos_t want_locate() { return want_locate_val; }
private:
PIController *pic;
framepos_t realtime_stamps[ESTIMATOR_SIZE];
framepos_t chasetime_stamps[ESTIMATOR_SIZE];
int array_index;
framepos_t want_locate_val;
private:
PIController *pic;
framepos_t realtime_stamps[ESTIMATOR_SIZE];
framepos_t chasetime_stamps[ESTIMATOR_SIZE];
int array_index;
framepos_t want_locate_val;
void feed_estimator( framepos_t realtime, framepos_t chasetime );
double get_estimate();
void feed_estimator( framepos_t realtime, framepos_t chasetime );
double get_estimate();
double speed;
double speed;
double speed_threshold;
framepos_t pos_threshold;
double speed_threshold;
framepos_t pos_threshold;
};
#endif /* __libardour_pi_controller__ */

View File

@ -49,19 +49,19 @@ namespace ARDOUR {
class Session;
class Region;
class Playlist;
class Crossfade;
class Crossfade;
namespace Properties {
/* fake the type, since regions are handled by SequenceProperty which doesn't
care about such things.
*/
extern PBD::PropertyDescriptor<bool> regions;
/* fake the type, since regions are handled by SequenceProperty which doesn't
care about such things.
*/
extern PBD::PropertyDescriptor<bool> regions;
}
class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
{
public:
RegionListProperty (Playlist&);
RegionListProperty (Playlist&);
RegionListProperty* clone () const;
void get_content_as_xml (boost::shared_ptr<Region>, XMLNode &) const;
@ -73,16 +73,16 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_
/* copy construction only by ourselves */
RegionListProperty (RegionListProperty const & p);
friend class Playlist;
/* we live and die with our playlist, no lifetime management needed */
Playlist& _playlist;
friend class Playlist;
/* we live and die with our playlist, no lifetime management needed */
Playlist& _playlist;
};
class Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist>
{
public:
typedef std::list<boost::shared_ptr<Region> > RegionList;
static void make_property_quarks ();
static void make_property_quarks ();
Playlist (Session&, const XMLNode&, DataType type, bool hidden = false);
Playlist (Session&, std::string name, DataType type, bool hidden = false);
@ -91,9 +91,9 @@ public:
virtual ~Playlist ();
void update (const RegionListProperty::ChangeRecord&);
void clear_owned_changes ();
void rdiff (std::vector<Command*>&) const;
void update (const RegionListProperty::ChangeRecord&);
void clear_owned_changes ();
void rdiff (std::vector<Command*>&) const;
boost::shared_ptr<Region> region_by_id (const PBD::ID&) const;
@ -109,7 +109,7 @@ public:
bool used () const { return _refcnt != 0; }
bool set_name (const std::string& str);
int sort_id() { return _sort_id; }
int sort_id() { return _sort_id; }
const DataType& data_type() const { return _type; }
@ -152,7 +152,7 @@ public:
const RegionListProperty& region_list () const { return regions; }
RegionList* regions_at (framepos_t frame);
uint32_t count_regions_at (framepos_t) const;
uint32_t count_regions_at (framepos_t) const;
uint32_t count_joined_regions () const;
RegionList* regions_touched (framepos_t start, framepos_t end);
RegionList* regions_to_read (framepos_t start, framepos_t end);
@ -165,7 +165,7 @@ public:
bool region_is_shuffle_constrained (boost::shared_ptr<Region>);
bool has_region_at (framepos_t const) const;
bool uses_source (boost::shared_ptr<const Source> src) const;
bool uses_source (boost::shared_ptr<const Source> src) const;
framepos_t find_next_transient (framepos_t position, int dir);
@ -211,7 +211,7 @@ public:
virtual bool destroy_region (boost::shared_ptr<Region>) = 0;
void sync_all_regions_with_regions ();
void sync_all_regions_with_regions ();
/* special case function used by UI selection objects, which have playlists that actually own the regions
within them.
@ -229,7 +229,7 @@ public:
return boost::shared_ptr<Crossfade> ();
}
framepos_t find_next_top_layer_position (framepos_t) const;
framepos_t find_next_top_layer_position (framepos_t) const;
uint32_t combine_ops() const { return _combine_ops; }
protected:
@ -255,11 +255,11 @@ public:
friend class RegionLock;
RegionListProperty regions; /* the current list of regions in the playlist */
RegionListProperty regions; /* the current list of regions in the playlist */
std::set<boost::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
PBD::ScopedConnectionList region_state_changed_connections;
DataType _type;
int _sort_id;
int _sort_id;
mutable gint block_notifications;
mutable gint ignore_state_changes;
mutable Glib::RecMutex region_lock;
@ -317,7 +317,7 @@ public:
virtual void flush_notifications (bool from_undo = false);
void clear_pending ();
void _set_sort_id ();
void _set_sort_id ();
void notify_region_removed (boost::shared_ptr<Region>);
void notify_region_added (boost::shared_ptr<Region>);

View File

@ -32,26 +32,26 @@ namespace ARDOUR {
class Playlist;
class PlaylistSource : virtual public Source {
public:
virtual ~PlaylistSource ();
int set_state (const XMLNode&, int version);
boost::shared_ptr<const Playlist> playlist() const { return _playlist; }
const PBD::ID& original() const { return _original; }
public:
virtual ~PlaylistSource ();
protected:
boost::shared_ptr<Playlist> _playlist;
PBD::ID _original;
frameoffset_t _playlist_offset;
framecnt_t _playlist_length;
int set_state (const XMLNode&, int version);
boost::shared_ptr<const Playlist> playlist() const { return _playlist; }
const PBD::ID& original() const { return _original; }
PlaylistSource (Session&, const PBD::ID&, const std::string& name, boost::shared_ptr<Playlist>, DataType,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
PlaylistSource (Session&, const XMLNode&);
void add_state (XMLNode&);
protected:
boost::shared_ptr<Playlist> _playlist;
PBD::ID _original;
frameoffset_t _playlist_offset;
framecnt_t _playlist_length;
PlaylistSource (Session&, const PBD::ID&, const std::string& name, boost::shared_ptr<Playlist>, DataType,
frameoffset_t begin, framecnt_t len, Source::Flag flags);
PlaylistSource (Session&, const XMLNode&);
void add_state (XMLNode&);
};
} /* namespace */
#endif /* __ardour_playlist_source_h__ */

View File

@ -116,7 +116,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
virtual uint32_t nth_parameter (uint32_t which, bool& ok) const = 0;
virtual void activate () = 0;
virtual void deactivate () = 0;
virtual void flush () { deactivate(); activate(); }
virtual void flush () { deactivate(); activate(); }
virtual int set_block_size (pframes_t nframes) = 0;
@ -150,7 +150,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
bool operator!= (PresetRecord const & a) const {
return uri != a.uri || label != a.label;
}
std::string uri;
std::string label;
bool user;
@ -160,7 +160,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
void remove_preset (std::string);
virtual bool load_preset (PresetRecord);
const PresetRecord * preset_by_label (const std::string &);
const PresetRecord * preset_by_uri (const std::string &);
@ -172,15 +172,15 @@ class Plugin : public PBD::StatefulDestructible, public Latent
PresetRecord last_preset () const {
return _last_preset;
}
bool parameter_changed_since_last_preset () const {
return _parameter_changed_since_last_preset;
}
virtual int first_user_preset_index () const {
return 0;
}
/** Emitted when a preset is added or removed, respectively */
PBD::Signal0<void> PresetAdded;
PBD::Signal0<void> PresetRemoved;
@ -225,7 +225,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
cycles_t cycles() const { return _cycles; }
protected:
friend class PluginInsert;
friend struct PluginInsert::PluginControl;

View File

@ -92,7 +92,7 @@ class PluginInsert : public Processor
private:
double user_to_plugin (double) const;
PluginInsert* _plugin;
bool _logarithmic;
bool _sr_dependent;

View File

@ -47,10 +47,10 @@ public:
virtual ~Port ();
static void set_connecting_blocked( bool yn ) {
static void set_connecting_blocked( bool yn ) {
_connecting_blocked = yn;
}
static bool connecting_blocked() {
static bool connecting_blocked() {
return _connecting_blocked;
}
@ -95,19 +95,19 @@ public:
int reestablish ();
int reconnect ();
void request_monitor_input (bool);
bool last_monitor() const { return _last_monitor; }
void set_last_monitor (bool yn) { _last_monitor = yn; }
jack_port_t* jack_port() const { return _jack_port; }
void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
bool last_monitor() const { return _last_monitor; }
void set_last_monitor (bool yn) { _last_monitor = yn; }
void set_private_latency_range (jack_latency_range_t& range, bool playback);
const jack_latency_range_t& private_latency_range (bool playback) const;
jack_port_t* jack_port() const { return _jack_port; }
void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
jack_latency_range_t public_latency_range (bool playback) const;
void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
void set_private_latency_range (jack_latency_range_t& range, bool playback);
const jack_latency_range_t& private_latency_range (bool playback) const;
void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
jack_latency_range_t public_latency_range (bool playback) const;
virtual void reset ();
@ -120,16 +120,16 @@ public:
virtual void transport_stopped () {}
virtual void realtime_locate () {}
bool physically_connected () const;
bool physically_connected () const;
static void set_engine (AudioEngine *);
PBD::Signal1<void,bool> MonitorInputChanged;
static void set_cycle_framecnt (pframes_t n) {
_cycle_nframes = n;
}
static void set_cycle_framecnt (pframes_t n) {
_cycle_nframes = n;
}
static framecnt_t port_offset() { return _global_port_buffer_offset; }
static void set_global_port_buffer_offset (pframes_t off) {
_global_port_buffer_offset = off;
@ -138,7 +138,7 @@ public:
_global_port_buffer_offset += n;
}
virtual void increment_port_buffer_offset (pframes_t n);
virtual void increment_port_buffer_offset (pframes_t n);
protected:
@ -148,13 +148,13 @@ protected:
static bool _connecting_blocked;
static pframes_t _global_port_buffer_offset; /* access only from process() tree */
static pframes_t _cycle_nframes; /* access only from process() tree */
static pframes_t _cycle_nframes; /* access only from process() tree */
framecnt_t _port_buffer_offset; /* access only from process() tree */
framecnt_t _port_buffer_offset; /* access only from process() tree */
jack_latency_range_t _private_playback_latency;
jack_latency_range_t _private_capture_latency;
jack_latency_range_t _private_playback_latency;
jack_latency_range_t _private_capture_latency;
static AudioEngine* _engine; ///< the AudioEngine
private:
@ -163,8 +163,8 @@ private:
bool _last_monitor;
/** ports that we are connected to, kept so that we can
reconnect to JACK when required
*/
reconnect to JACK when required
*/
std::set<std::string> _connections;
};

View File

@ -65,12 +65,12 @@ class PortInsert : public IOProcessor
uint32_t bit_slot() const { return bitslot; }
void start_latency_detection ();
void stop_latency_detection ();
void start_latency_detection ();
void stop_latency_detection ();
MTDM* mtdm () const { return _mtdm; }
void set_measured_latency (framecnt_t);
framecnt_t latency () const;
MTDM* mtdm () const { return _mtdm; }
void set_measured_latency (framecnt_t);
framecnt_t latency () const;
private:
/* disallow copy construction */
@ -79,10 +79,10 @@ class PortInsert : public IOProcessor
boost::shared_ptr<Delivery> _out;
uint32_t bitslot;
MTDM* _mtdm;
bool _latency_detect;
framecnt_t _latency_flush_frames;
framecnt_t _measured_latency;
MTDM* _mtdm;
bool _latency_detect;
framecnt_t _latency_flush_frames;
framecnt_t _measured_latency;
};
} // namespace ARDOUR

View File

@ -12,31 +12,31 @@ class ThreadBuffers;
class ProcessThread
{
public:
ProcessThread ();
~ProcessThread ();
public:
ProcessThread ();
~ProcessThread ();
static void init();
static void init();
void get_buffers ();
void drop_buffers ();
void get_buffers ();
void drop_buffers ();
/* these MUST be called by a process thread's thread, nothing else
*/
/* these MUST be called by a process thread's thread, nothing else
*/
static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
static BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
static BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO);
static gain_t* gain_automation_buffer ();
static pan_t** pan_automation_buffer ();
static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
static BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
static BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO);
static gain_t* gain_automation_buffer ();
static pan_t** pan_automation_buffer ();
protected:
void session_going_away ();
protected:
void session_going_away ();
private:
Glib::Thread* _thread;
private:
Glib::Thread* _thread;
static Glib::Private<ThreadBuffers>* _private_thread_buffers;
static Glib::Private<ThreadBuffers>* _private_thread_buffers;
};
} // namespace

View File

@ -47,7 +47,7 @@ class Processor : public SessionObject, public Automatable, public Latent
static const std::string state_node_name;
Processor(Session&, const std::string& name);
Processor (const Processor& other);
Processor (const Processor& other);
virtual ~Processor() { }
@ -64,17 +64,17 @@ class Processor : public SessionObject, public Automatable, public Latent
virtual framecnt_t signal_latency() const { return 0; }
virtual int set_block_size (pframes_t /*nframes*/) { return 0; }
virtual bool requires_fixed_sized_buffers() const { return false; }
virtual bool requires_fixed_sized_buffers() const { return false; }
/** @param result_required true if, on return from this method, @a bufs is required to contain valid data;
* if false, the method need not bother writing to @a bufs if it doesn't want to.
*/
*/
virtual void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/) {}
virtual void silence (framecnt_t /*nframes*/) {}
virtual void activate () { _pending_active = true; ActiveChanged(); }
virtual void deactivate () { _pending_active = false; ActiveChanged(); }
virtual void flush() {}
virtual void flush() {}
virtual bool configure_io (ChanCount in, ChanCount out);
@ -95,18 +95,18 @@ class Processor : public SessionObject, public Automatable, public Latent
virtual XMLNode& state (bool full);
XMLNode& get_state (void);
int set_state (const XMLNode&, int version);
void set_pre_fader (bool);
PBD::Signal0<void> ActiveChanged;
PBD::Signal2<void,ChanCount,ChanCount> ConfigurationChanged;
void set_ui (void*);
void* get_ui () const { return _ui_pointer; }
void set_ui (void*);
void* get_ui () const { return _ui_pointer; }
protected:
virtual int set_state_2X (const XMLNode&, int version);
int _pending_active;
bool _active;
bool _next_ab_is_active;
@ -115,7 +115,7 @@ protected:
ChanCount _configured_output;
bool _display_to_user;
bool _pre_fader; ///< true if this processor is currently placed before the Amp, otherwise false
void* _ui_pointer;
void* _ui_pointer;
};
} // namespace ARDOUR

View File

@ -24,7 +24,7 @@
namespace ARDOUR {
/** A class to handle reporting of progress of something */
/** A class to handle reporting of progress of something */
class Progress
{
public:
@ -36,7 +36,7 @@ public:
void descend (float);
bool cancelled () const;
protected:
void cancel ();
@ -48,7 +48,7 @@ private:
struct Level {
Level (float a) : allocation (a), normalised (0) {}
float allocation;
float normalised;
};

View File

@ -39,15 +39,15 @@ public:
, _setter (setter)
, _getter (getter)
{}
void set_value (double v) { _setter (v); }
double get_value () const { return _getter (); }
private:
boost::function1<void,double> _setter;
boost::function0<double> _getter;
};
} // namespace
#endif /* __libardour_proxy_controllable_h__ */

View File

@ -26,7 +26,7 @@ class Playlist;
class Source;
class Location;
/** Public interface to a Diskstream */
/** Public interface to a Diskstream */
class PublicDiskstream
{
public:
@ -61,7 +61,7 @@ public:
virtual void transport_stopped_wallclock (struct tm &, time_t, bool) = 0;
virtual bool pending_overwrite () const = 0;
virtual double speed () const = 0;
virtual void prepare_to_stop (framepos_t) = 0;
virtual void prepare_to_stop (framepos_t) = 0;
virtual void set_slaved (bool) = 0;
virtual ChanCount n_channels () = 0;
virtual framepos_t get_capture_start_frame (uint32_t n = 0) const = 0;
@ -74,9 +74,8 @@ public:
virtual void set_align_choice (AlignChoice, bool force=false) = 0;
virtual int use_copy_playlist () = 0;
virtual int use_new_playlist () = 0;
virtual void adjust_playback_buffering () = 0;
virtual void adjust_capture_buffering () = 0;
virtual void adjust_playback_buffering () = 0;
virtual void adjust_capture_buffering () = 0;
};
}

View File

@ -59,11 +59,11 @@ class RCConfiguration : public Configuration
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
#include "ardour/rc_configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL

View File

@ -70,7 +70,7 @@ namespace Properties {
class Playlist;
class Filter;
class ExportSpecification;
class Progress;
class Progress;
enum RegionEditState {
EditChangesNothing = 0,
@ -90,20 +90,20 @@ class Region
typedef std::vector<boost::shared_ptr<Source> > SourceList;
static void make_property_quarks ();
static PBD::Signal2<void,boost::shared_ptr<ARDOUR::Region>, const PBD::PropertyChange&> RegionPropertyChanged;
virtual ~Region();
/** Note: changing the name of a Region does not constitute an edit */
bool set_name (const std::string& str);
const DataType& data_type () const { return _type; }
AnalysisFeatureList transients () { return _transients; };
/** How the region parameters play together:
*
*
* POSITION: first frame of the region along the timeline
* START: first frame of the region within its source(s)
* LENGTH: number of frames the region represents
@ -123,7 +123,7 @@ class Region
framepos_t ancestral_start () const { return _ancestral_start; }
framecnt_t ancestral_length () const { return _ancestral_length; }
float stretch () const { return _stretch; }
float shift () const { return _shift; }
@ -132,7 +132,7 @@ class Region
frameoffset_t sync_offset (int& dir) const;
framepos_t sync_position () const;
framepos_t sync_point () const;
framepos_t adjust_to_sync (framepos_t) const;
/* first_frame() is an alias; last_frame() just hides some math */
@ -153,11 +153,11 @@ class Region
bool sync_marked () const { return _sync_marked; }
bool external () const { return _external; }
bool import () const { return _import; }
Trimmable::CanTrim can_trim () const;
Trimmable::CanTrim can_trim () const;
PositionLockStyle position_lock_style () const { return _position_lock_style; }
void set_position_lock_style (PositionLockStyle ps);
void recompute_position_from_lock_style ();
@ -178,7 +178,7 @@ class Region
bool source_equivalent (boost::shared_ptr<const Region>) const;
bool uses_source (boost::shared_ptr<const Source>) const;
bool uses_source_path (const std::string&) const;
std::string source_string () const;
@ -320,7 +320,7 @@ class Region
/** Construct a region from another region, at an offset within that region */
Region (boost::shared_ptr<const Region>, frameoffset_t start_offset);
/** Construct a region as a copy of another region, but with different sources */
Region (boost::shared_ptr<const Region>, const SourceList&);
@ -351,7 +351,7 @@ class Region
virtual void recompute_at_start () = 0;
virtual void recompute_at_end () = 0;
DataType _type;
PBD::Property<bool> _muted;
@ -384,7 +384,7 @@ class Region
mutable RegionEditState _first_edit;
Timecode::BBT_Time _bbt_time;
AnalysisFeatureList _transients;
mutable uint64_t _read_data_count; ///< modified in read()
uint64_t _last_layer_op; ///< timestamp
SourceList _sources;

View File

@ -59,22 +59,22 @@ public:
static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other, bool announce = false);
/** create a region from a single Source */
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
const PBD::PropertyList&, bool announce = true);
/** create a region from a multiple sources */
static boost::shared_ptr<Region> create (const SourceList &,
static boost::shared_ptr<Region> create (const SourceList &,
const PBD::PropertyList&, bool announce = true);
/** create a copy of @other starting at zero within @param other's sources */
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other,
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other,
const PBD::PropertyList&, bool announce = true);
/** create a copy of @param other starting at @param offset within @param other */
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset,
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset,
const PBD::PropertyList&, bool announce = true);
/** create a "copy" of @param other but using a different set of sources @param srcs */
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs,
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs,
const PBD::PropertyList&, bool announce = true);
/** create a region with no sources, using XML state */
static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
/** create a region with specified sources @param srcs and XML state */
@ -92,10 +92,10 @@ public:
static int region_name (std::string &, std::string, bool new_level = false);
static std::string new_region_name (std::string);
static std::string compound_region_name (const std::string& playlist, uint32_t compound_ops, uint32_t depth, bool whole_source);
/* when we make a compound region, for every region involved there
* are two "instances" - the original, which is removed from this
* playlist, and a copy, which is added to the playlist used as
* playlist, and a copy, which is added to the playlist used as
* the source for the compound.
*
* when we uncombine, we want to put the originals back into this
@ -110,13 +110,13 @@ public:
static CompoundAssociations& compound_associations() { return _compound_associations; }
static void add_compound_association (boost::shared_ptr<Region>, boost::shared_ptr<Region>);
private:
static void region_changed (PBD::PropertyChange const &, boost::weak_ptr<Region>);
static Glib::StaticMutex region_map_lock;
static RegionMap region_map;
static void map_add (boost::shared_ptr<Region>);

View File

@ -25,21 +25,21 @@
namespace ARDOUR {
struct RegionSortByPosition {
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->position() < b->position();
}
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->position() < b->position();
}
};
struct RegionSortByLastLayerOp {
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->last_layer_op() < b->last_layer_op();
}
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->last_layer_op() < b->last_layer_op();
}
};
struct RegionSortByLayer {
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->layer() < b->layer();
}
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
return a->layer() < b->layer();
}
};
struct RegionSortByLayerWithPending {
@ -59,6 +59,6 @@ struct RegionSortByLayerWithPending {
}
};
} // namespace
} // namespace
#endif /* __libardour_region_sorters_h__ */

View File

@ -51,7 +51,7 @@ class ResampledImportableSource : public ImportableSource
private:
boost::shared_ptr<ImportableSource> source;
float* input;
float* input;
int _src_type;
SRC_STATE* src_state;
SRC_DATA src_data;

View File

@ -109,13 +109,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
/* these are the core of the API of a Route. see the protected sections as well */
virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_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 (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool can_record, bool rec_monitors_input, bool& need_butler);
bool can_record, bool rec_monitors_input, bool& need_butler);
virtual void toggle_monitor_input ();
virtual bool can_record() { return false; }
@ -146,11 +146,11 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void set_solo (bool yn, void *src);
bool soloed () const { return self_soloed () || soloed_by_others (); }
bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
bool soloed_by_others_upstream () const { return _soloed_by_others_upstream; }
bool soloed_by_others_downstream () const { return _soloed_by_others_downstream; }
bool self_soloed () const { return _self_solo; }
void set_solo_isolated (bool yn, void *src);
bool solo_isolated() const;
@ -208,11 +208,11 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
bool processor_is_prefader (boost::shared_ptr<Processor> p);
bool has_io_processor_named (const std::string&);
bool has_io_processor_named (const std::string&);
ChanCount max_processor_streams () const { return processor_max_streams; }
std::list<std::string> unknown_processors () const;
/* special processors */
boost::shared_ptr<Delivery> monitor_send() const { return _monitor_send; }
@ -251,15 +251,15 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void all_processors_flip();
void all_processors_active (Placement, bool state);
framecnt_t set_private_port_latencies (bool playback) const;
void set_public_port_latencies (framecnt_t, bool playback) const;
framecnt_t set_private_port_latencies (bool playback) const;
void set_public_port_latencies (framecnt_t, bool playback) const;
framecnt_t update_signal_latency();
virtual void set_latency_compensation (framecnt_t);
void set_user_latency (framecnt_t);
framecnt_t initial_delay() const { return _initial_delay; }
framecnt_t signal_latency() const { return _signal_latency; }
framecnt_t signal_latency() const { return _signal_latency; }
PBD::Signal0<void> active_changed;
PBD::Signal0<void> phase_invert_changed;
@ -276,7 +276,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
PBD::Signal1<void,RouteProcessorChange> processors_changed;
PBD::Signal1<void,void*> record_enable_changed;
/** the metering point has changed */
PBD::Signal0<void> meter_change;
PBD::Signal0<void> meter_change;
PBD::Signal0<void> signal_latency_changed;
PBD::Signal0<void> initial_delay_changed;
PBD::Signal0<void> order_key_changed;
@ -305,39 +305,39 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
int listen_via (boost::shared_ptr<Route>, Placement p);
void drop_listen (boost::shared_ptr<Route>);
/**
* return true if this route feeds the first argument via at least one
* (arbitrarily long) signal pathway.
*/
bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
/**
* return true if this route feeds the first argument via at least one
* (arbitrarily long) signal pathway.
*/
bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
/**
* return true if this route feeds the first argument directly, via
* either its main outs or a send.
*/
/**
* return true if this route feeds the first argument directly, via
* either its main outs or a send.
*/
bool direct_feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
struct FeedRecord {
boost::weak_ptr<Route> r;
bool sends_only;
struct FeedRecord {
boost::weak_ptr<Route> r;
bool sends_only;
FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
: r (rp)
, sends_only (sendsonly) {}
};
FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
: r (rp)
, sends_only (sendsonly) {}
};
struct FeedRecordCompare {
bool operator() (const FeedRecord& a, const FeedRecord& b) const {
return a.r < b.r;
}
};
struct FeedRecordCompare {
bool operator() (const FeedRecord& a, const FeedRecord& b) const {
return a.r < b.r;
}
};
typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
const FedBy& fed_by() const { return _fed_by; }
void clear_fed_by ();
bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
bool not_fed() const { return _fed_by.empty(); }
const FedBy& fed_by() const { return _fed_by; }
void clear_fed_by ();
bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
bool not_fed() const { return _fed_by.empty(); }
/* Controls (not all directly owned by the Route */
@ -359,7 +359,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void set_value (double);
double get_value () const;
private:
private:
boost::weak_ptr<Route> _route;
};
@ -383,7 +383,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
boost::shared_ptr<Panner> panner() const; /* may return null */
boost::shared_ptr<PannerShell> panner_shell() const;
boost::shared_ptr<AutomationControl> gain_control() const;
boost::shared_ptr<Pannable> pannable() const;
boost::shared_ptr<Pannable> pannable() const;
void automation_snapshot (framepos_t now, bool force=false);
void protect_automation ();
@ -423,15 +423,15 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
framecnt_t /* nframes */) {}
virtual void process_output_buffers (BufferSet& bufs,
framepos_t start_frame, framepos_t end_frame,
pframes_t nframes, bool with_processors, int declick,
bool gain_automation_ok);
framepos_t start_frame, framepos_t end_frame,
pframes_t nframes, bool with_processors, int declick,
bool gain_automation_ok);
boost::shared_ptr<IO> _input;
boost::shared_ptr<IO> _output;
bool _active;
framecnt_t _signal_latency;
framecnt_t _signal_latency;
framecnt_t _initial_delay;
framecnt_t _roll_delay;
@ -441,7 +441,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
boost::shared_ptr<Delivery> _monitor_send;
boost::shared_ptr<InternalReturn> _intreturn;
boost::shared_ptr<MonitorProcessor> _monitor_control;
boost::shared_ptr<Pannable> _pannable;
boost::shared_ptr<Pannable> _pannable;
Flag _flags;
int _pending_declick;
@ -461,14 +461,14 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
boost::shared_ptr<SoloControllable> _solo_control;
boost::shared_ptr<MuteControllable> _mute_control;
boost::shared_ptr<MuteMaster> _mute_master;
std::string _comment;
bool _have_internal_generator;
bool _solo_safe;
DataType _default_type;
FedBy _fed_by;
FedBy _fed_by;
virtual ChanCount input_streams () const;
virtual ChanCount input_streams () const;
protected:
virtual XMLNode& state(bool);
@ -487,8 +487,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
uint32_t pans_required() const;
ChanCount n_process_buffers ();
virtual bool should_monitor () const;
virtual void maybe_declick (BufferSet&, framecnt_t, int);
virtual bool should_monitor () const;
virtual void maybe_declick (BufferSet&, framecnt_t, int);
virtual int _set_state (const XMLNode&, int, bool call_base);
@ -523,7 +523,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void set_mute_master_solo ();
void set_processor_positions ();
framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
void setup_invisible_processors ();

View File

@ -53,11 +53,11 @@ class Track;
class AudioTrack;
class Session;
class RouteGroup : public SessionObject
class RouteGroup : public SessionObject
{
public:
static void make_property_quarks();
RouteGroup (Session& s, const std::string &n);
~RouteGroup ();
@ -124,9 +124,9 @@ class RouteGroup : public SessionObject
PBD::Signal0<void> MembershipChanged;
XMLNode& get_state ();
int set_state (const XMLNode&, int version);
private:
boost::shared_ptr<RouteList> routes;
boost::shared_ptr<Route> subgroup_bus;

View File

@ -25,7 +25,7 @@ namespace ARDOUR {
class RouteGroup;
class RouteGroupMember
class RouteGroupMember
{
public:
RouteGroupMember () : _route_group (0) {}

View File

@ -206,7 +206,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void refresh_disk_space ();
int load_diskstreams_2X (XMLNode const &, int);
int load_routes (const XMLNode&, int);
boost::shared_ptr<RouteList> get_routes() const {
return routes.reader ();
@ -279,7 +279,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
* - engine halted
*/
PBD::Signal0<void> TransportStateChange;
PBD::Signal1<void,framepos_t> PositionChanged; /* sent after any non-sequential motion */
PBD::Signal1<void,framepos_t> Xrun;
PBD::Signal0<void> TransportLooped;
@ -360,7 +360,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
framecnt_t worst_track_latency () const { return _worst_track_latency; }
framecnt_t worst_playback_latency () const { return _worst_output_latency + _worst_track_latency; }
#ifdef HAVE_JACK_SESSION
#ifdef HAVE_JACK_SESSION
void jack_session_event (jack_session_event_t* event);
#endif
int save_state (std::string snapshot_name, bool pending = false, bool switch_to_snapshot = false);
@ -481,7 +481,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void timecode_duration_string (char *, framecnt_t) const;
framecnt_t convert_to_frames (AnyTime const & position);
framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
static PBD::Signal1<void, framepos_t> StartTimeChanged;
static PBD::Signal1<void, framepos_t> EndTimeChanged;
@ -554,7 +554,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
boost::shared_ptr<AudioFileSource> create_audio_source_for_session (
size_t, std::string const &, uint32_t, bool destructive);
boost::shared_ptr<MidiSource> create_midi_source_for_session (
Track*, std::string const &);
@ -612,7 +612,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
PBD::Signal1<void,bool> SoloActive;
PBD::Signal0<void> SoloChanged;
PBD::Signal0<void> IsolatedChanged;
/* control/master out */
boost::shared_ptr<Route> monitor_out() const { return _monitor_out; }
@ -733,7 +733,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* Speakers */
boost::shared_ptr<Speakers> get_speakers ();
boost::shared_ptr<Speakers> get_speakers ();
/* Controllables */
@ -743,7 +743,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void add_controllable (boost::shared_ptr<PBD::Controllable>);
void remove_controllable (PBD::Controllable*);
boost::shared_ptr<PBD::Controllable> solo_cut_control() const;
boost::shared_ptr<PBD::Controllable> solo_cut_control() const;
SessionMetadata & metadata () { return *_metadata; }
@ -784,7 +784,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
Waiting,
Running
};
SlaveState slave_state() const { return _slave_state; }
boost::shared_ptr<SessionPlaylists> playlists;
@ -862,7 +862,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
bool _silent;
void maybe_update_session_range (framepos_t, framepos_t);
// varispeed playback
double _transport_speed;
double _last_transport_speed;
@ -892,8 +892,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void set_worst_io_latencies_x (IOChange, void *) {
set_worst_io_latencies ();
}
void post_capture_latency ();
void post_playback_latency ();
void post_capture_latency ();
void post_playback_latency ();
void update_latency_compensation_proxy (void* ignored);
@ -1232,9 +1232,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
bool find_route_name (std::string const &, uint32_t& id, char* name, size_t name_len, bool);
void count_existing_track_channels (ChanCount& in, ChanCount& out);
void auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs,
bool with_lock, bool connect_inputs = true,
ChanCount input_start = ChanCount (), ChanCount output_start = ChanCount ());
void midi_output_change_handler (IOChange change, void* /*src*/, boost::weak_ptr<Route> midi_track);
bool with_lock, bool connect_inputs = true,
ChanCount input_start = ChanCount (), ChanCount output_start = ChanCount ());
void midi_output_change_handler (IOChange change, void* /*src*/, boost::weak_ptr<Route> midi_track);
/* mixer stuff */
@ -1262,10 +1262,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
mutable Glib::Mutex source_lock;
public:
public:
typedef std::map<PBD::ID,boost::shared_ptr<Source> > SourceMap;
private:
private:
SourceMap sources;
public:
@ -1376,7 +1376,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void reset_jack_connection (jack_client_t* jack);
void process_rtop (SessionEvent*);
void update_latency (bool playback);
void update_latency (bool playback);
XMLNode& state(bool);
@ -1440,7 +1440,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
Glib::Mutex controllables_lock;
Controllables controllables;
boost::shared_ptr<PBD::Controllable> _solo_cut_control;
boost::shared_ptr<PBD::Controllable> _solo_cut_control;
void reset_native_file_format();
bool first_file_data_format_reset;
@ -1467,7 +1467,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
/* realtime "apply to set of routes" operations */
SessionEvent* get_rt_event (
boost::shared_ptr<RouteList> rl, bool yn,
SessionEvent::RTeventCallback after, bool group_override,
SessionEvent::RTeventCallback after, bool group_override,
void (Session::*method) (boost::shared_ptr<RouteList>, bool, bool));
void rt_set_solo (boost::shared_ptr<RouteList>, bool yn, bool group_override);
@ -1497,10 +1497,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
void start_time_changed (framepos_t);
void end_time_changed (framepos_t);
void set_track_monitor_input_status (bool);
void set_track_monitor_input_status (bool);
framepos_t compute_stop_limit () const;
boost::shared_ptr<Speakers> _speakers;
boost::shared_ptr<Speakers> _speakers;
void load_nested_sources (const XMLNode& node);
};

View File

@ -40,11 +40,11 @@ public:
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
#include "ardour/session_configuration_vars.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL

View File

@ -17,117 +17,117 @@ class Slave;
class Region;
struct SessionEvent {
enum Type {
SetTransportSpeed,
SetTrackSpeed,
Locate,
LocateRoll,
LocateRollLocate,
SetLoop,
PunchIn,
PunchOut,
RangeStop,
RangeLocate,
Overwrite,
SetSyncSource,
Audition,
InputConfigurationChange,
SetPlayAudioRange,
RealTimeOperation,
AdjustPlaybackBuffering,
AdjustCaptureBuffering,
SetTimecodeTransmission,
enum Type {
SetTransportSpeed,
SetTrackSpeed,
Locate,
LocateRoll,
LocateRollLocate,
SetLoop,
PunchIn,
PunchOut,
RangeStop,
RangeLocate,
Overwrite,
SetSyncSource,
Audition,
InputConfigurationChange,
SetPlayAudioRange,
RealTimeOperation,
AdjustPlaybackBuffering,
AdjustCaptureBuffering,
SetTimecodeTransmission,
/* only one of each of these events can be queued at any one time */
StopOnce,
AutoLoop
};
enum Action {
Add,
Remove,
Replace,
Clear
};
Type type;
Action action;
framepos_t action_frame;
framepos_t target_frame;
double speed;
union {
void* ptr;
bool yes_or_no;
framepos_t target2_frame;
Slave* slave;
Route* route;
};
union {
bool second_yes_or_no;
};
/* only one of each of these events can be queued at any one time */
/* 4 members to handle a multi-group event handled in RT context */
StopOnce,
AutoLoop
};
typedef boost::function<void (SessionEvent*)> RTeventCallback;
enum Action {
Add,
Remove,
Replace,
Clear
};
boost::shared_ptr<RouteList> routes; /* apply to */
boost::function<void (void)> rt_slot; /* what to call in RT context */
RTeventCallback rt_return; /* called after rt_slot, with this event as an argument */
PBD::EventLoop* event_loop;
Type type;
Action action;
framepos_t action_frame;
framepos_t target_frame;
double speed;
std::list<AudioRange> audio_range;
std::list<MusicRange> music_range;
boost::shared_ptr<Region> region;
union {
void* ptr;
bool yes_or_no;
framepos_t target2_frame;
Slave* slave;
Route* route;
};
SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false)
: type (t)
, action (a)
, action_frame (when)
, target_frame (where)
, speed (spd)
, yes_or_no (yn)
, second_yes_or_no (yn2)
, event_loop (0) {}
union {
bool second_yes_or_no;
};
void set_ptr (void* p) {
ptr = p;
}
bool before (const SessionEvent& other) const {
return action_frame < other.action_frame;
}
bool after (const SessionEvent& other) const {
return action_frame > other.action_frame;
}
static bool compare (const SessionEvent *e1, const SessionEvent *e2) {
return e1->before (*e2);
}
void* operator new (size_t);
void operator delete (void *ptr, size_t /*size*/);
static const framepos_t Immediate = 0;
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
static void init_event_pool ();
/* 4 members to handle a multi-group event handled in RT context */
typedef boost::function<void (SessionEvent*)> RTeventCallback;
boost::shared_ptr<RouteList> routes; /* apply to */
boost::function<void (void)> rt_slot; /* what to call in RT context */
RTeventCallback rt_return; /* called after rt_slot, with this event as an argument */
PBD::EventLoop* event_loop;
std::list<AudioRange> audio_range;
std::list<MusicRange> music_range;
boost::shared_ptr<Region> region;
SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false)
: type (t)
, action (a)
, action_frame (when)
, target_frame (where)
, speed (spd)
, yes_or_no (yn)
, second_yes_or_no (yn2)
, event_loop (0) {}
void set_ptr (void* p) {
ptr = p;
}
bool before (const SessionEvent& other) const {
return action_frame < other.action_frame;
}
bool after (const SessionEvent& other) const {
return action_frame > other.action_frame;
}
static bool compare (const SessionEvent *e1, const SessionEvent *e2) {
return e1->before (*e2);
}
void* operator new (size_t);
void operator delete (void *ptr, size_t /*size*/);
static const framepos_t Immediate = 0;
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
static void init_event_pool ();
private:
static PerThreadPool* pool;
CrossThreadPool* own_pool;
static PerThreadPool* pool;
CrossThreadPool* own_pool;
friend class Butler;
friend class Butler;
};
class SessionEventManager {
public:
SessionEventManager () : pending_events (2048),
auto_loop_event(0), punch_out_event(0), punch_in_event(0) {}
auto_loop_event(0), punch_out_event(0), punch_in_event(0) {}
virtual ~SessionEventManager() {}
virtual void queue_event (SessionEvent *ev) = 0;

View File

@ -51,7 +51,7 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible
{
add_property (_name);
}
Session& session() const { return _session; }
std::string name() const { return _name; }

View File

@ -32,7 +32,7 @@
class XMLNode;
namespace PBD {
class ID;
class ID;
}
namespace ARDOUR {
@ -41,32 +41,32 @@ class Playlist;
class Region;
class Source;
class Session;
class Crossfade;
class Crossfade;
class SessionPlaylists : public PBD::ScopedConnectionList
{
public:
~SessionPlaylists ();
boost::shared_ptr<Playlist> by_name (std::string name);
boost::shared_ptr<Playlist> by_id (const PBD::ID&);
uint32_t source_use_count (boost::shared_ptr<const Source> src) const;
uint32_t region_use_count (boost::shared_ptr<Region> region) const;
uint32_t region_use_count (boost::shared_ptr<Region> region) const;
template<class T> void foreach (T *obj, void (T::*func)(boost::shared_ptr<Playlist>));
void get (std::vector<boost::shared_ptr<Playlist> >&);
void unassigned (std::list<boost::shared_ptr<Playlist> > & list);
void destroy_region (boost::shared_ptr<Region>);
void destroy_region (boost::shared_ptr<Region>);
boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
void sync_all_regions_with_regions ();
void sync_all_regions_with_regions ();
private:
friend class Session;
bool add (boost::shared_ptr<Playlist>);
void remove (boost::shared_ptr<Playlist>);
void remove_weak (boost::weak_ptr<Playlist>);
void track (bool, boost::weak_ptr<Playlist>);
uint32_t n_playlists() const;
void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
void update_after_tempo_map_change ();
@ -75,7 +75,7 @@ private:
int load (Session &, const XMLNode&);
int load_unused (Session &, const XMLNode&);
boost::shared_ptr<Playlist> XMLPlaylistFactory (Session &, const XMLNode&);
mutable Glib::Mutex lock;
typedef std::set<boost::shared_ptr<Playlist> > List;
List playlists;

View File

@ -55,7 +55,7 @@ protected:
}
framecnt_t write_unlocked (Sample */*dst*/, framecnt_t /*cnt*/) { return 0; }
void set_header_timeline_position () {}
int read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t /*start*/, framecnt_t /*cnt*/,

View File

@ -207,19 +207,19 @@ class SlaveSessionProxy : public ISlaveSessionProxy {
};
struct SafeTime {
volatile int guard1;
framepos_t position;
framepos_t timestamp;
double speed;
volatile int guard2;
SafeTime() {
guard1 = 0;
position = 0;
timestamp = 0;
speed = 0;
guard2 = 0;
}
volatile int guard1;
framepos_t position;
framepos_t timestamp;
double speed;
volatile int guard2;
SafeTime() {
guard1 = 0;
position = 0;
timestamp = 0;
speed = 0;
guard2 = 0;
}
};
class MTC_Slave : public Slave {

View File

@ -37,7 +37,7 @@ template<typename T> class MidiRingBuffer;
class SMFSource : public MidiSource, public FileSource, public Evoral::SMF {
public:
/** Constructor for existing external-to-session files */
SMFSource (Session& session, const std::string& path,
SMFSource (Session& session, const std::string& path,
Source::Flag flags = Source::Flag(0));
/** Constructor for existing in-session files */
@ -71,10 +71,10 @@ public:
static bool safe_midi_file_extension (const std::string& path);
protected:
void set_path (const std::string& newpath);
void set_path (const std::string& newpath);
private:
int open_for_write ();
int open_for_write ();
framecnt_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
framepos_t position,

View File

@ -44,10 +44,10 @@ class SndFileImportableSource : public ImportableSource {
protected:
SF_INFO sf_info;
boost::shared_ptr<SNDFILE> in;
/* these are int64_t so as to be independent of whatever
types Ardour may use for framepos_t, framecnt_t etc.
*/
/* these are int64_t so as to be independent of whatever
types Ardour may use for framepos_t, framecnt_t etc.
*/
int64_t timecode;
int64_t get_timecode_info (SNDFILE*, SF_BROADCAST_INFO*, bool&);

View File

@ -31,12 +31,12 @@ namespace ARDOUR {
class SndFileSource : public AudioFileSource {
public:
/** Constructor to be called for existing external-to-session files */
SndFileSource (Session&, const std::string& path, int chn, Flag flags);
SndFileSource (Session&, const std::string& path, int chn, Flag flags);
/* Constructor to be called for new in-session files */
SndFileSource (Session&, const std::string& path, const std::string& origin,
SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
Flag flags = SndFileSource::default_writable_flags);
SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
Flag flags = SndFileSource::default_writable_flags);
/** Constructor to be called for existing in-session files */
SndFileSource (Session&, const XMLNode&);
@ -66,7 +66,7 @@ class SndFileSource : public AudioFileSource {
static int get_soundfile_info (const std::string& path, SoundFileInfo& _info, std::string& error_msg);
protected:
void set_path (const std::string& p);
void set_path (const std::string& p);
void set_header_timeline_position ();
framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
@ -96,7 +96,7 @@ class SndFileSource : public AudioFileSource {
framecnt_t xfade_out_count;
framecnt_t xfade_in_count;
Sample* xfade_buf;
framecnt_t crossfade (Sample* data, framecnt_t cnt, int dir);
void set_timeline_position (framepos_t);
framecnt_t destructive_write_unlocked (Sample *dst, framecnt_t cnt);

Some files were not shown because too many files have changed in this diff Show More