A few tweaks to make Ardour build in GCC -std=c++0x mode.
git-svn-id: svn://localhost/ardour2/branches/3.0@11983 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2c0f704f28
commit
23973bae24
@ -830,7 +830,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
|
||||
|
||||
model_to_view_coord (tx, ty);
|
||||
|
||||
if (isnan (tx) || isnan (ty)) {
|
||||
if (std::isnan (tx) || std::isnan (ty)) {
|
||||
warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
|
||||
_name) << endmsg;
|
||||
continue;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define fader_cursor_height 25
|
||||
#define fader_cursor_x_hot 3
|
||||
#define fader_cursor_y_hot 21
|
||||
static const gchar fader_cursor_bits[] = {
|
||||
static const unsigned char fader_cursor_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00,
|
||||
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x02, 0x01,
|
||||
0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x01,
|
||||
@ -15,7 +15,7 @@ static const gchar fader_cursor_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
/* Created with The GIMP */
|
||||
static const gchar fader_cursor_mask_bits[] = {
|
||||
static const unsigned char fader_cursor_mask_bits[] = {
|
||||
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00,
|
||||
0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01,
|
||||
0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfe, 0x01,
|
||||
@ -31,7 +31,7 @@ static const gchar fader_cursor_mask_bits[] = {
|
||||
#define speaker_cursor_height 26
|
||||
#define speaker_cursor_x_hot 0
|
||||
#define speaker_cursor_y_hot 0
|
||||
static const gchar speaker_cursor_bits[] = {
|
||||
static const unsigned char speaker_cursor_bits[] = {
|
||||
0x00, 0xc0, 0x00, 0xc0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xcc, 0x00, 0xcc,
|
||||
0xff, 0xc3, 0xff, 0xc3, 0x03, 0xc0, 0x03, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0,
|
||||
0xc3, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0, 0xc3, 0xc0, 0x03, 0xc0, 0x03, 0xc0,
|
||||
@ -42,7 +42,7 @@ static const gchar speaker_cursor_bits[] = {
|
||||
#define speaker_cursor_mask_height 26
|
||||
#define speaker_cursor_mask_x_hot 0
|
||||
#define speaker_cursor_mask_y_hot 0
|
||||
static const gchar speaker_cursor_mask_bits[] = {
|
||||
static const unsigned char speaker_cursor_mask_bits[] = {
|
||||
0x00, 0xc0, 0x00, 0xc0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0xfc,
|
||||
0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff,
|
||||
@ -85,7 +85,7 @@ static const short cursor_timestretch_mask_bits[] = {
|
||||
#define cursor_zoom_height 16
|
||||
#define cursor_zoom_x_hot 6
|
||||
#define cursor_zoom_y_hot 6
|
||||
static const short cursor_zoom_bits[] = {
|
||||
static const unsigned short cursor_zoom_bits[] = {
|
||||
0x00e0, 0x0000, 0x03b8, 0x0000, 0x0604, 0x0000, 0x0806, 0x0000, 0x0842,
|
||||
0x0000, 0x1843, 0x0000, 0x11f1, 0x0000, 0x1843, 0x0000, 0x0842, 0x0000,
|
||||
0x1806, 0x0000, 0x2604, 0x0000, 0x4758, 0x0000, 0x88e0, 0x0000, 0x1000,
|
||||
@ -95,7 +95,7 @@ static const short cursor_zoom_bits[] = {
|
||||
#define cursor_zoom_mask_height 16
|
||||
#define cursor_zoom_mask_x_hot 6
|
||||
#define cursor_zoom_mask_y_hot 6
|
||||
static const short cursor_zoom_mask_bits[] = {
|
||||
static const unsigned short cursor_zoom_mask_bits[] = {
|
||||
0x00e0, 0x0000, 0x03f8, 0x0000, 0x07fc, 0x0000, 0x0ffe, 0x0000, 0x0ffe,
|
||||
0x0000, 0x1fff, 0x0000, 0x1fff, 0x0000, 0x1fff, 0x0000, 0x0ffe, 0x0000,
|
||||
0x1ffe, 0x0000, 0x3ffc, 0x0000, 0x7ff8, 0x0000, 0xf8e0, 0x0000, 0xf000,
|
||||
|
@ -112,7 +112,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, boost::shared_ptr<Route> rt
|
||||
, RouteUI (sess)
|
||||
, _mixer(mx)
|
||||
, _mixer_owned (in_mixer)
|
||||
, processor_box (sess, sigc::mem_fun(*this, &MixerStrip::plugin_selector), mx.selection(), this, in_mixer)
|
||||
, processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer)
|
||||
, gpm (sess, 250)
|
||||
, panners (sess)
|
||||
, button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL))
|
||||
|
@ -41,14 +41,14 @@ MouseCursors::MouseCursors ()
|
||||
Color ffg ("#000000");
|
||||
|
||||
{
|
||||
RefPtr<Bitmap> source = Bitmap::create (fader_cursor_bits, fader_cursor_width, fader_cursor_height);
|
||||
RefPtr<Bitmap> mask = Bitmap::create (fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
|
||||
RefPtr<Bitmap> source = Bitmap::create ((char const *) fader_cursor_bits, fader_cursor_width, fader_cursor_height);
|
||||
RefPtr<Bitmap> mask = Bitmap::create ((char const *) fader_cursor_mask_bits, fader_cursor_width, fader_cursor_height);
|
||||
fader = new Cursor (source, mask, ffg, fbg, fader_cursor_x_hot, fader_cursor_y_hot);
|
||||
}
|
||||
|
||||
{
|
||||
RefPtr<Bitmap> source = Bitmap::create (speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
|
||||
RefPtr<Bitmap> mask = Bitmap::create (speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
|
||||
RefPtr<Bitmap> source = Bitmap::create ((char const *) speaker_cursor_bits, speaker_cursor_width, speaker_cursor_height);
|
||||
RefPtr<Bitmap> mask = Bitmap::create ((char const *) speaker_cursor_mask_bits, speaker_cursor_width, speaker_cursor_height);
|
||||
speaker = new Cursor (source, mask, ffg, fbg, speaker_cursor_x_hot, speaker_cursor_y_hot);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
|
||||
|
||||
void set_session (ARDOUR::Session*);
|
||||
void session_going_away ();
|
||||
PluginSelector* plugin_selector() { return _plugin_selector; }
|
||||
PluginSelector* plugin_selector() { return _plugin_selector; }
|
||||
|
||||
private:
|
||||
Gtk::HBox global_hpacker;
|
||||
|
@ -128,10 +128,9 @@ MidiPort::cycle_split ()
|
||||
void
|
||||
MidiPort::resolve_notes (void* jack_buffer, MidiBuffer::TimeType when)
|
||||
{
|
||||
|
||||
for (uint8_t channel = 0; channel <= 0xF; channel++) {
|
||||
|
||||
uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
|
||||
uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), MIDI_CTL_SUSTAIN, 0 };
|
||||
|
||||
/* we need to send all notes off AND turn the
|
||||
* sustain/damper pedal off to handle synths
|
||||
|
@ -131,7 +131,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
|
||||
for (int channel = 0; channel < 16; ++channel) {
|
||||
for (int note = 0; note < 128; ++note) {
|
||||
while (_active_notes[note + 128 * channel]) {
|
||||
uint8_t buffer[3] = { MIDI_CMD_NOTE_OFF | channel, note, 0 };
|
||||
uint8_t buffer[3] = { ((uint8_t) (MIDI_CMD_NOTE_OFF | channel)), uint8_t (note), 0 };
|
||||
Evoral::MIDIEvent<MidiBuffer::TimeType> noteoff
|
||||
(MIDI_CMD_NOTE_OFF, time, 3, buffer, false);
|
||||
/* note that we do not care about failure from
|
||||
|
@ -525,7 +525,7 @@ MidiTrack::midi_panic()
|
||||
{
|
||||
DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 delivers panic data\n", name()));
|
||||
for (uint8_t channel = 0; channel <= 0xF; channel++) {
|
||||
uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
|
||||
uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), ((uint8_t) MIDI_CTL_SUSTAIN), 0 };
|
||||
write_immediate_event(3, ev);
|
||||
ev[1] = MIDI_CTL_ALL_NOTES_OFF;
|
||||
write_immediate_event(3, ev);
|
||||
@ -551,9 +551,9 @@ void
|
||||
MidiTrack::MidiControl::set_value(double val)
|
||||
{
|
||||
bool valid = false;
|
||||
if (isinf(val)) {
|
||||
if (std::isinf(val)) {
|
||||
cerr << "MIDIControl value is infinity" << endl;
|
||||
} else if (isnan(val)) {
|
||||
} else if (std::isnan(val)) {
|
||||
cerr << "MIDIControl value is NaN" << endl;
|
||||
} else if (val < _list->parameter().min()) {
|
||||
cerr << "MIDIControl value is < " << _list->parameter().min() << endl;
|
||||
@ -570,7 +570,7 @@ MidiTrack::MidiControl::set_value(double val)
|
||||
assert(val <= _list->parameter().max());
|
||||
if ( ! automation_playback()) {
|
||||
size_t size = 3;
|
||||
uint8_t ev[3] = { _list->parameter().channel(), int(val), 0 };
|
||||
uint8_t ev[3] = { _list->parameter().channel(), uint8_t (val), 0 };
|
||||
switch(_list->parameter().type()) {
|
||||
case MidiCCAutomation:
|
||||
ev[0] += MIDI_CMD_CONTROL;
|
||||
@ -733,7 +733,7 @@ MidiTrack::act_on_mute ()
|
||||
if ((1<<channel) & mask) {
|
||||
|
||||
DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 delivers mute message to channel %2\n", name(), channel+1));
|
||||
uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 };
|
||||
uint8_t ev[3] = { ((uint8_t) (MIDI_CMD_CONTROL | channel)), MIDI_CTL_SUSTAIN, 0 };
|
||||
write_immediate_event (3, ev);
|
||||
ev[1] = MIDI_CTL_ALL_NOTES_OFF;
|
||||
write_immediate_event (3, ev);
|
||||
|
@ -679,7 +679,7 @@ ControlList::modify (iterator iter, double when, double val)
|
||||
(*iter)->when = when;
|
||||
(*iter)->value = val;
|
||||
|
||||
if (isnan (val)) {
|
||||
if (std::isnan (val)) {
|
||||
abort ();
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ UI::UI (string namestr, int *argc, char ***argv)
|
||||
errors->set_title (title.get_string());
|
||||
|
||||
errors->dismiss_button().set_name ("ErrorLogCloseButton");
|
||||
errors->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), (Window *) errors));
|
||||
errors->signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), (Window *) errors));
|
||||
errors->set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
|
||||
|
||||
//load_rcfile (rcfile);
|
||||
|
@ -57,8 +57,8 @@ public:
|
||||
Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK
|
||||
);
|
||||
|
||||
signal_button_press_event().connect (bind (mem_fun (*this, &DnDVBox::button_press), (T *) 0));
|
||||
signal_button_release_event().connect (bind (mem_fun (*this, &DnDVBox::button_release), (T *) 0));
|
||||
signal_button_press_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_press), (T *) 0));
|
||||
signal_button_release_event().connect (sigc::bind (mem_fun (*this, &DnDVBox::button_release), (T *) 0));
|
||||
signal_drag_motion().connect (mem_fun (*this, &DnDVBox::drag_motion));
|
||||
signal_drag_leave().connect (mem_fun (*this, &DnDVBox::drag_leave));
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <algorithm>
|
||||
|
||||
using namespace Mackie;
|
||||
using std::isnan;
|
||||
|
||||
JogWheel::JogWheel (MackieControlProtocol & mcp)
|
||||
: _mcp (mcp)
|
||||
|
Loading…
Reference in New Issue
Block a user