diff options
author | Carl Hetherington <carl@carlh.net> | 2012-04-15 19:28:44 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-04-15 19:28:44 +0000 |
commit | 23973bae24b7f569e26c7f869a103aacbaf66ab2 (patch) | |
tree | a5c9004823ce44c6bef1473293c38d11d3b4ccc7 /libs/ardour | |
parent | 2c0f704f286f05ce1505f6eb882391222e770331 (diff) |
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
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/midi_port.cc | 3 | ||||
-rw-r--r-- | libs/ardour/midi_state_tracker.cc | 2 | ||||
-rw-r--r-- | libs/ardour/midi_track.cc | 10 |
3 files changed, 7 insertions, 8 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index 6d09ddb52c..9a7d3eeb27 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -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 diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc index 7537ca04d1..7bf23f9358 100644 --- a/libs/ardour/midi_state_tracker.cc +++ b/libs/ardour/midi_state_tracker.cc @@ -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 diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index e99df0ffb9..73f19e9224 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -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); |