diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc index 4415a65f65..1b5baff7d5 100644 --- a/gtk2_ardour/midi_channel_selector.cc +++ b/gtk2_ardour/midi_channel_selector.cc @@ -160,7 +160,7 @@ MidiMultipleChannelSelector::~MidiMultipleChannelSelector() } void -MidiMultipleChannelSelector::set_channel_mode(ChannelMode mode, uint8_t mask) +MidiMultipleChannelSelector::set_channel_mode(ChannelMode mode, uint16_t mask) { switch (mode) { case AllChannels: diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h index e026c12325..a72bea0cf1 100644 --- a/gtk2_ardour/midi_channel_selector.h +++ b/gtk2_ardour/midi_channel_selector.h @@ -72,7 +72,7 @@ public: virtual ~MidiMultipleChannelSelector(); - void set_channel_mode(ARDOUR::ChannelMode mode, uint8_t mask); + void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask); /** * @return each bit in the returned word represents a midi channel, eg. diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h index ec489ee5b6..7ffdcf3b8c 100644 --- a/libs/ardour/ardour/midi_ring_buffer.h +++ b/libs/ardour/ardour/midi_ring_buffer.h @@ -59,7 +59,7 @@ public: * be forced to while reading. */ void set_channel_mode(ChannelMode mode, uint16_t mask) { - g_atomic_int_set(&_channel_mask, ((uint16_t)mode << 16) | mask); + g_atomic_int_set(&_channel_mask, (uint32_t(mode) << 16) | uint32_t(mask)); } ChannelMode get_channel_mode() const { @@ -67,7 +67,7 @@ public: } uint16_t get_channel_mask() const { - return static_cast((g_atomic_int_get(&_channel_mask) & 0x0000FFFF)); + return g_atomic_int_get(&_channel_mask) & 0x0000FFFF; } protected: