Fix some mangled whitespace (noop).
This commit is contained in:
parent
a85827da1c
commit
c35e94a3c8
@ -66,7 +66,7 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream
|
||||
float capture_buffer_load() const;
|
||||
|
||||
void get_playback (MidiBuffer& dst, framecnt_t);
|
||||
void flush_playback (framepos_t, framepos_t);
|
||||
void flush_playback (framepos_t, framepos_t);
|
||||
|
||||
void set_record_enabled (bool yn);
|
||||
|
||||
@ -127,9 +127,11 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream
|
||||
friend class Auditioner;
|
||||
int seek (framepos_t which_sample, bool complete_refill = false);
|
||||
|
||||
int process (BufferSet&, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_diskstream);
|
||||
frameoffset_t calculate_playback_distance (pframes_t nframes);
|
||||
bool commit (framecnt_t nframes);
|
||||
int process (BufferSet&, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_diskstream);
|
||||
|
||||
frameoffset_t calculate_playback_distance (pframes_t nframes);
|
||||
bool commit (framecnt_t nframes);
|
||||
|
||||
static framecnt_t midi_readahead;
|
||||
|
||||
private:
|
||||
|
@ -46,7 +46,7 @@ class LIBARDOUR_API MidiPort : public Port {
|
||||
void transport_stopped ();
|
||||
void realtime_locate ();
|
||||
void reset ();
|
||||
void require_resolve ();
|
||||
void require_resolve ();
|
||||
|
||||
bool input_active() const { return _input_active; }
|
||||
void set_input_active (bool yn);
|
||||
@ -55,20 +55,20 @@ class LIBARDOUR_API MidiPort : public Port {
|
||||
|
||||
MidiBuffer& get_midi_buffer (pframes_t nframes);
|
||||
|
||||
void set_always_parse (bool yn);
|
||||
MIDI::Parser& self_parser() { return _self_parser; }
|
||||
void set_always_parse (bool yn);
|
||||
MIDI::Parser& self_parser() { return _self_parser; }
|
||||
|
||||
protected:
|
||||
friend class PortManager;
|
||||
friend class PortManager;
|
||||
|
||||
MidiPort (const std::string& name, PortFlags);
|
||||
MidiPort (const std::string& name, PortFlags);
|
||||
|
||||
private:
|
||||
MidiBuffer* _buffer;
|
||||
bool _has_been_mixed_down;
|
||||
bool _resolve_required;
|
||||
bool _input_active;
|
||||
bool _always_parse;
|
||||
bool _always_parse;
|
||||
|
||||
/* Naming this is tricky. AsyncMIDIPort inherits (for now, aug 2013) from
|
||||
* both MIDI::Port, which has _parser, and this (ARDOUR::MidiPort). We
|
||||
@ -81,7 +81,7 @@ class LIBARDOUR_API MidiPort : public Port {
|
||||
* into this object, somehow.
|
||||
*/
|
||||
|
||||
MIDI::Parser _self_parser;
|
||||
MIDI::Parser _self_parser;
|
||||
|
||||
void resolve_notes (void* buffer, framepos_t when);
|
||||
};
|
||||
|
@ -53,7 +53,7 @@ class MIDISceneChange : public SceneChange
|
||||
XMLNode& get_state();
|
||||
int set_state (const XMLNode&, int version);
|
||||
|
||||
bool operator==(const MIDISceneChange& other) const;
|
||||
bool operator==(const MIDISceneChange& other) const;
|
||||
|
||||
private:
|
||||
int _bank;
|
||||
|
@ -45,12 +45,13 @@ class MIDISceneChanger : public SceneChanger
|
||||
void set_recording (bool);
|
||||
void locate (framepos_t);
|
||||
|
||||
/** Signal emitted whenever any relevant MIDI input is detected.
|
||||
*/
|
||||
PBD::Signal0<void> MIDIInputActivity;
|
||||
/** Signal emitted whenever any relevant MIDI output is sent.
|
||||
*/
|
||||
PBD::Signal0<void> MIDIOutputActivity;
|
||||
/** Signal emitted whenever any relevant MIDI input is detected.
|
||||
*/
|
||||
PBD::Signal0<void> MIDIInputActivity;
|
||||
|
||||
/** Signal emitted whenever any relevant MIDI output is sent.
|
||||
*/
|
||||
PBD::Signal0<void> MIDIOutputActivity;
|
||||
|
||||
private:
|
||||
typedef std::multimap<framepos_t,boost::shared_ptr<MIDISceneChange> > Scenes;
|
||||
|
@ -115,30 +115,30 @@ public:
|
||||
* If mode is ForceChannel, mask is simply a channel number which all events will
|
||||
* be forced to while reading.
|
||||
*/
|
||||
void set_capture_channel_mode (ChannelMode mode, uint16_t mask);
|
||||
void set_playback_channel_mode (ChannelMode mode, uint16_t mask);
|
||||
void set_playback_channel_mask (uint16_t mask);
|
||||
void set_capture_channel_mask (uint16_t mask);
|
||||
void set_capture_channel_mode (ChannelMode mode, uint16_t mask);
|
||||
void set_playback_channel_mode (ChannelMode mode, uint16_t mask);
|
||||
void set_playback_channel_mask (uint16_t mask);
|
||||
void set_capture_channel_mask (uint16_t mask);
|
||||
|
||||
ChannelMode get_playback_channel_mode() const {
|
||||
return static_cast<ChannelMode>((g_atomic_int_get(&_playback_channel_mask) & 0xffff0000) >> 16);
|
||||
}
|
||||
uint16_t get_playback_channel_mask() const {
|
||||
uint16_t get_playback_channel_mask() const {
|
||||
return g_atomic_int_get(&_playback_channel_mask) & 0x0000ffff;
|
||||
}
|
||||
ChannelMode get_capture_channel_mode() const {
|
||||
return static_cast<ChannelMode>((g_atomic_int_get(&_capture_channel_mask) & 0xffff0000) >> 16);
|
||||
}
|
||||
uint16_t get_capture_channel_mask() const {
|
||||
uint16_t get_capture_channel_mask() const {
|
||||
return g_atomic_int_get(&_capture_channel_mask) & 0x0000ffff;
|
||||
}
|
||||
|
||||
boost::shared_ptr<MidiPlaylist> midi_playlist ();
|
||||
|
||||
PBD::Signal0<void> PlaybackChannelMaskChanged;
|
||||
PBD::Signal0<void> PlaybackChannelModeChanged;
|
||||
PBD::Signal0<void> CaptureChannelMaskChanged;
|
||||
PBD::Signal0<void> CaptureChannelModeChanged;
|
||||
PBD::Signal0<void> PlaybackChannelMaskChanged;
|
||||
PBD::Signal0<void> PlaybackChannelModeChanged;
|
||||
PBD::Signal0<void> CaptureChannelMaskChanged;
|
||||
PBD::Signal0<void> CaptureChannelModeChanged;
|
||||
|
||||
PBD::Signal1<void, boost::weak_ptr<MidiSource> > DataRecorded;
|
||||
boost::shared_ptr<MidiBuffer> get_gui_feed_buffer () const;
|
||||
@ -161,8 +161,8 @@ private:
|
||||
NoteMode _note_mode;
|
||||
bool _step_editing;
|
||||
bool _input_active;
|
||||
uint32_t _playback_channel_mask; // 16 bits mode, 16 bits mask
|
||||
uint32_t _capture_channel_mask; // 16 bits mode, 16 bits mask
|
||||
uint32_t _playback_channel_mask; // 16 bits mode, 16 bits mask
|
||||
uint32_t _capture_channel_mask; // 16 bits mode, 16 bits mask
|
||||
|
||||
virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
|
||||
|
||||
@ -183,7 +183,7 @@ private:
|
||||
void track_input_active (IOChange, void*);
|
||||
void map_input_active (bool);
|
||||
|
||||
void filter_channels (BufferSet& bufs, ChannelMode mode, uint32_t mask);
|
||||
void filter_channels (BufferSet& bufs, ChannelMode mode, uint32_t mask);
|
||||
|
||||
/* if mode is ForceChannel, force mask to the lowest set channel or 1 if no
|
||||
* channels are set.
|
||||
@ -194,7 +194,7 @@ private:
|
||||
mask = force_mask (mode, mask);
|
||||
g_atomic_int_set(&_playback_channel_mask, (uint32_t(mode) << 16) | uint32_t(mask));
|
||||
}
|
||||
void _set_playback_channel_mask (uint16_t mask) {
|
||||
void _set_playback_channel_mask (uint16_t mask) {
|
||||
mask = force_mask (get_playback_channel_mode(), mask);
|
||||
g_atomic_int_set(&_playback_channel_mask, (uint32_t(get_playback_channel_mode()) << 16) | uint32_t(mask));
|
||||
}
|
||||
@ -202,7 +202,7 @@ private:
|
||||
mask = force_mask (mode, mask);
|
||||
g_atomic_int_set(&_capture_channel_mask, (uint32_t(mode) << 16) | uint32_t(mask));
|
||||
}
|
||||
void _set_capture_channel_mask (uint16_t mask) {
|
||||
void _set_capture_channel_mask (uint16_t mask) {
|
||||
mask = force_mask (get_capture_channel_mode(), mask);
|
||||
g_atomic_int_set(&_capture_channel_mask, (uint32_t(get_capture_channel_mode()) << 16) | uint32_t(mask));
|
||||
}
|
||||
|
@ -166,25 +166,25 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
|
||||
|
||||
std::vector<PresetRecord> get_presets ();
|
||||
|
||||
/** @return true if this plugin will respond to MIDI program
|
||||
/** @return true if this plugin will respond to MIDI program
|
||||
* change messages by changing presets.
|
||||
*
|
||||
* This is hard to return a correct value for because most plugin APIs
|
||||
* do not specify plugin behaviour. However, if you want to force
|
||||
* the display of plugin built-in preset names rather than MIDI program
|
||||
* numbers, return true. If you want a generic description, return
|
||||
* the display of plugin built-in preset names rather than MIDI program
|
||||
* numbers, return true. If you want a generic description, return
|
||||
* false.
|
||||
*/
|
||||
virtual bool presets_are_MIDI_programs() const { return false; }
|
||||
*/
|
||||
virtual bool presets_are_MIDI_programs() const { return false; }
|
||||
|
||||
/** @return true if this plugin is General MIDI compliant, false
|
||||
/** @return true if this plugin is General MIDI compliant, false
|
||||
* otherwise.
|
||||
*
|
||||
* It is important to note that it is is almost impossible for a host
|
||||
* (e.g. Ardour) to determine this for just about any plugin API
|
||||
* known as of June 2012
|
||||
*/
|
||||
virtual bool current_preset_uses_general_midi() const { return false; }
|
||||
virtual bool current_preset_uses_general_midi() const { return false; }
|
||||
|
||||
/** @return Last preset to be requested; the settings may have
|
||||
* been changed since; find out with parameter_changed_since_last_preset.
|
||||
@ -266,8 +266,8 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
|
||||
/** Emitted when a property is changed in the plugin. */
|
||||
PBD::Signal2<void, uint32_t, Variant> PropertyChanged;
|
||||
|
||||
PBD::Signal1<void,uint32_t> StartTouch;
|
||||
PBD::Signal1<void,uint32_t> EndTouch;
|
||||
PBD::Signal1<void,uint32_t> StartTouch;
|
||||
PBD::Signal1<void,uint32_t> EndTouch;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -207,8 +207,8 @@ class LIBARDOUR_API PluginInsert : public Processor
|
||||
boost::shared_ptr<Plugin> plugin_factory (boost::shared_ptr<Plugin>);
|
||||
void add_plugin (boost::shared_ptr<Plugin>);
|
||||
|
||||
void start_touch (uint32_t param_id);
|
||||
void end_touch (uint32_t param_id);
|
||||
void start_touch (uint32_t param_id);
|
||||
void end_touch (uint32_t param_id);
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
@ -118,8 +118,8 @@ class LIBARDOUR_API Processor : public SessionObject, public Automatable, public
|
||||
ProcessorWindowProxy * window_proxy () const { return _window_proxy; }
|
||||
void set_window_proxy (ProcessorWindowProxy* wp);
|
||||
|
||||
void set_owner (SessionObject*);
|
||||
SessionObject* owner() const;
|
||||
void set_owner (SessionObject*);
|
||||
SessionObject* owner() const;
|
||||
|
||||
protected:
|
||||
virtual int set_state_2X (const XMLNode&, int version);
|
||||
@ -134,7 +134,7 @@ protected:
|
||||
bool _pre_fader; ///< true if this processor is currently placed before the Amp, otherwise false
|
||||
void* _ui_pointer;
|
||||
ProcessorWindowProxy *_window_proxy;
|
||||
SessionObject* _owner;
|
||||
SessionObject* _owner;
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
@ -40,17 +40,16 @@ public:
|
||||
, _getter (getter)
|
||||
{}
|
||||
|
||||
void set_value (double v) { if (_setter (v)) { Changed(); /* EMIT SIGNAL */ } }
|
||||
double get_value () const { return _getter (); }
|
||||
void set_value (double v) { if (_setter (v)) { Changed(); /* EMIT SIGNAL */ } }
|
||||
double get_value () const { return _getter (); }
|
||||
|
||||
double internal_to_user (double i) const { return accurate_coefficient_to_dB (i);}
|
||||
double user_to_internal (double u) const { return dB_to_coefficient(u) ;}
|
||||
double internal_to_user (double i) const { return accurate_coefficient_to_dB (i);}
|
||||
double user_to_internal (double u) const { return dB_to_coefficient(u) ;}
|
||||
|
||||
std::string get_user_string () const
|
||||
{
|
||||
char theBuf[32]; sprintf( theBuf, "%3.1f dB", accurate_coefficient_to_dB (get_value()));
|
||||
return std::string(theBuf);
|
||||
}
|
||||
std::string get_user_string () const {
|
||||
char theBuf[32]; sprintf( theBuf, "%3.1f dB", accurate_coefficient_to_dB (get_value()));
|
||||
return std::string(theBuf);
|
||||
}
|
||||
|
||||
private:
|
||||
boost::function1<bool,double> _setter;
|
||||
|
@ -30,22 +30,22 @@ namespace ARDOUR
|
||||
class SceneChange : public PBD::Stateful
|
||||
{
|
||||
public:
|
||||
SceneChange ();
|
||||
virtual ~SceneChange () {};
|
||||
SceneChange ();
|
||||
virtual ~SceneChange () {};
|
||||
|
||||
static boost::shared_ptr<SceneChange> factory (const XMLNode&, int version);
|
||||
static std::string xml_node_name;
|
||||
|
||||
uint32_t color() const;
|
||||
void set_color (uint32_t);
|
||||
bool color_out_of_bounds() const { return _color == out_of_bound_color; }
|
||||
static const uint32_t out_of_bound_color;
|
||||
uint32_t color() const;
|
||||
void set_color (uint32_t);
|
||||
bool color_out_of_bounds() const { return _color == out_of_bound_color; }
|
||||
static const uint32_t out_of_bound_color;
|
||||
|
||||
PBD::Signal0<void> ColorChanged;
|
||||
PBD::Signal0<void> ColorChanged;
|
||||
|
||||
protected:
|
||||
/* derived classes are responsible for serializing & deserializing this value */
|
||||
uint32_t _color;
|
||||
protected:
|
||||
/* derived classes are responsible for serializing & deserializing this value */
|
||||
uint32_t _color;
|
||||
|
||||
};
|
||||
|
||||
|
@ -180,7 +180,7 @@ MidiModel::NoteDiffCommand::get_value (const NotePtr note, Property prop)
|
||||
return Variant(note->length());
|
||||
}
|
||||
|
||||
return Variant ();
|
||||
return Variant();
|
||||
}
|
||||
|
||||
Variant::Type
|
||||
|
@ -141,10 +141,10 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */)
|
||||
_channel = atoi (prop->value());
|
||||
|
||||
if ((prop = node.property (X_("color"))) != 0) {
|
||||
_color = atoi (prop->value());
|
||||
} else {
|
||||
_color = out_of_bound_color;
|
||||
}
|
||||
_color = atoi (prop->value());
|
||||
} else {
|
||||
_color = out_of_bound_color;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -152,7 +152,7 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */)
|
||||
bool
|
||||
MIDISceneChange::operator==(const MIDISceneChange& other) const
|
||||
{
|
||||
return _program == other._program &&
|
||||
_bank == other._bank &&
|
||||
_channel == other._channel;
|
||||
return _program == other._program &&
|
||||
_bank == other._bank &&
|
||||
_channel == other._channel;
|
||||
}
|
||||
|
@ -43,12 +43,12 @@ MIDISceneChanger::MIDISceneChanger (Session& s)
|
||||
, last_delivered_bank (-1)
|
||||
|
||||
{
|
||||
/* catch any add/remove/clear etc. for all Locations */
|
||||
/* catch any add/remove/clear etc. for all Locations */
|
||||
_session.locations()->changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
|
||||
_session.locations()->added.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
|
||||
_session.locations()->removed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
|
||||
|
||||
/* catch class-based signal that notifies of us changes in the scene change state of any Location */
|
||||
/* catch class-based signal that notifies of us changes in the scene change state of any Location */
|
||||
Location::scene_changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
|
||||
}
|
||||
|
||||
@ -83,9 +83,9 @@ MIDISceneChanger::gather (const Locations::LocationList& locations)
|
||||
|
||||
if (msc) {
|
||||
|
||||
if (msc->bank() >= 0) {
|
||||
have_seen_bank_changes = true;
|
||||
}
|
||||
if (msc->bank() >= 0) {
|
||||
have_seen_bank_changes = true;
|
||||
}
|
||||
|
||||
scenes.insert (std::make_pair ((*l)->start(), msc));
|
||||
}
|
||||
@ -99,7 +99,7 @@ MIDISceneChanger::rt_deliver (MidiBuffer& mbuf, framepos_t when, boost::shared_p
|
||||
uint8_t buf[4];
|
||||
size_t cnt;
|
||||
|
||||
MIDIOutputActivity (); /* EMIT SIGNAL */
|
||||
MIDIOutputActivity (); /* EMIT SIGNAL */
|
||||
|
||||
if ((cnt = msc->get_bank_msb_message (buf, sizeof (buf))) > 0) {
|
||||
mbuf.push_back (when, cnt, buf);
|
||||
@ -130,7 +130,7 @@ MIDISceneChanger::non_rt_deliver (boost::shared_ptr<MIDISceneChange> msc)
|
||||
possible" (practically speaking, in the next process callback).
|
||||
*/
|
||||
|
||||
MIDIOutputActivity (); /* EMIT SIGNAL */
|
||||
MIDIOutputActivity (); /* EMIT SIGNAL */
|
||||
|
||||
if ((cnt = msc->get_bank_msb_message (buf, sizeof (buf))) > 0) {
|
||||
aport->write (buf, cnt, 0);
|
||||
@ -260,9 +260,9 @@ void
|
||||
MIDISceneChanger::bank_change_input (MIDI::Parser& /*parser*/, unsigned short, int)
|
||||
{
|
||||
if (recording()) {
|
||||
have_seen_bank_changes = true;
|
||||
}
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
have_seen_bank_changes = true;
|
||||
}
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
@ -273,7 +273,7 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
|
||||
last_program_message_time = time;
|
||||
|
||||
if (!recording()) {
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
jump_to (input_port->channel (channel)->bank(), program);
|
||||
return;
|
||||
}
|
||||
@ -301,28 +301,28 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
|
||||
new_mark = true;
|
||||
}
|
||||
|
||||
unsigned short bank;
|
||||
unsigned short bank;
|
||||
|
||||
if (have_seen_bank_changes) {
|
||||
bank = input_port->channel (channel)->bank();
|
||||
} else {
|
||||
bank = -1;
|
||||
}
|
||||
if (have_seen_bank_changes) {
|
||||
bank = input_port->channel (channel)->bank();
|
||||
} else {
|
||||
bank = -1;
|
||||
}
|
||||
|
||||
MIDISceneChange* msc =new MIDISceneChange (channel, bank, program & 0x7f);
|
||||
|
||||
/* check for identical scene change so we can re-use color, if any */
|
||||
/* check for identical scene change so we can re-use color, if any */
|
||||
|
||||
Locations::LocationList copy (locations->list());
|
||||
Locations::LocationList copy (locations->list());
|
||||
|
||||
for (Locations::LocationList::const_iterator l = copy.begin(); l != copy.end(); ++l) {
|
||||
boost::shared_ptr<MIDISceneChange> sc = boost::dynamic_pointer_cast<MIDISceneChange>((*l)->scene_change());
|
||||
for (Locations::LocationList::const_iterator l = copy.begin(); l != copy.end(); ++l) {
|
||||
boost::shared_ptr<MIDISceneChange> sc = boost::dynamic_pointer_cast<MIDISceneChange>((*l)->scene_change());
|
||||
|
||||
if (sc && (*sc.get()) == *msc) {
|
||||
msc->set_color (sc->color ());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sc && (*sc.get()) == *msc) {
|
||||
msc->set_color (sc->color ());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
loc->set_scene_change (boost::shared_ptr<MIDISceneChange> (msc));
|
||||
|
||||
@ -334,7 +334,7 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
|
||||
locations->add (loc);
|
||||
}
|
||||
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
MIDIInputActivity (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -123,8 +123,8 @@ MidiControlUI::reset_ports ()
|
||||
}
|
||||
|
||||
for (vector<AsyncMIDIPort*>::const_iterator pi = ports.begin(); pi != ports.end(); ++pi) {
|
||||
(*pi)->xthread().set_receive_handler (sigc::bind (sigc::mem_fun (this, &MidiControlUI::midi_input_handler), *pi));
|
||||
(*pi)->xthread().attach (_main_loop->get_context());
|
||||
(*pi)->xthread().set_receive_handler (sigc::bind (sigc::mem_fun (this, &MidiControlUI::midi_input_handler), *pi));
|
||||
(*pi)->xthread().attach (_main_loop->get_context());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ Transform::Value::eval(const Context& ctx) const
|
||||
return Variant(g_random_double());
|
||||
}
|
||||
|
||||
return Variant ();
|
||||
return Variant();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user