13
0

* fixed bug introduced in revision 3335: Hibyte lost in channel mask when restoring state from XML

git-svn-id: svn://localhost/ardour2/branches/3.0@4356 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier 2008-12-29 00:19:18 +00:00
parent fa71e0e12a
commit cca4f22141
3 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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<ChannelMode>((g_atomic_int_get(&_channel_mask) & 0x0000FFFF));
return g_atomic_int_get(&_channel_mask) & 0x0000FFFF;
}
protected: