diff --git a/gtk2_ardour/device_connection_control.cc b/gtk2_ardour/device_connection_control.cc index dd46420bee..24b84b80a6 100644 --- a/gtk2_ardour/device_connection_control.cc +++ b/gtk2_ardour/device_connection_control.cc @@ -75,6 +75,7 @@ void DeviceConnectionControl::init(const std::string& name, bool active, uint16_ if (_name_label != NULL) { _name_label->set_text (name); + _name_label->set_tooltip_text(name); } if (_number_label != NULL) { @@ -121,6 +122,7 @@ DeviceConnectionControl::set_track_name (const std::string& new_track_name) { if (_track_name_label != NULL ) { _track_name_label->set_text (new_track_name); + _track_name_label->set_tooltip_text(new_track_name); if (new_track_name.empty() ) { _track_name_label->get_parent()->hide(); } else { diff --git a/gtk2_ardour/midi_device_connection_control.cc b/gtk2_ardour/midi_device_connection_control.cc index b7437fd211..c7699865af 100644 --- a/gtk2_ardour/midi_device_connection_control.cc +++ b/gtk2_ardour/midi_device_connection_control.cc @@ -73,6 +73,7 @@ void MidiDeviceConnectionControl::init(const std::string& name, bool capture_act } _name_label->set_text (name); + _name_label->set_tooltip_text(name); set_capture_active(capture_active); set_playback_active(playback_active); diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp index 8a48f4b30b..ec19b9fd43 100644 --- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp +++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp @@ -390,27 +390,30 @@ WTErr WCMRCoreAudioDevice::UpdateDeviceInputs() for (int channel = 0; channel < maxInputChannels; channel++) { - AudioObjectPropertyAddress pa; - pa.mSelector = kAudioObjectPropertyElementName; - pa.mScope = kAudioObjectPropertyScopeInput; - pa.mElement = channel + 1; - CFStringRef cfName; std::stringstream chNameStream; UInt32 nameSize = 0; OSStatus error = kAudioHardwareNoError; - bool hasChannelNames = AudioObjectHasProperty(m_DeviceID, &pa); + error = AudioDeviceGetPropertyInfo (m_DeviceID, + channel + 1, + true /* Input */, + kAudioDevicePropertyChannelNameCFString, + &nameSize, + NULL); - if (hasChannelNames) { - error = AudioObjectGetPropertyDataSize(m_DeviceID, &pa, 0, 0, &nameSize ); + if (error == kAudioHardwareNoError) + { + error = AudioDeviceGetProperty (m_DeviceID, + channel + 1, + true /* Input */, + kAudioDevicePropertyChannelNameCFString, + &nameSize, + &cfName); + } + - if (error == kAudioHardwareNoError) { - error = AudioObjectGetPropertyData (m_DeviceID, &pa, 0, 0, &nameSize, &cfName); - } - } - - if (hasChannelNames && (error == kAudioHardwareNoError) ) + if (error == kAudioHardwareNoError) { CFIndex length = CFStringGetLength(cfName); CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); @@ -419,7 +422,9 @@ WTErr WCMRCoreAudioDevice::UpdateDeviceInputs() CFStringGetCString(cfName, cstr_name, maxSize, kCFStringEncodingUTF8); chNameStream << cstr_name; - } else { + } + else + { chNameStream << "Input " << (channel+1); } @@ -501,27 +506,29 @@ WTErr WCMRCoreAudioDevice::UpdateDeviceOutputs() m_OutputChannels.clear(); for (int channel = 0; channel < maxOutputChannels; channel++) { - AudioObjectPropertyAddress pa; - pa.mSelector = kAudioObjectPropertyElementName; - pa.mScope = kAudioObjectPropertyScopeOutput; - pa.mElement = channel + 1; - CFStringRef cfName; std::stringstream chNameStream; UInt32 nameSize = 0; OSStatus error = kAudioHardwareNoError; - bool hasChannelNames = AudioObjectHasProperty(m_DeviceID, &pa); + error = AudioDeviceGetPropertyInfo (m_DeviceID, + channel + 1, + false /* Output */, + kAudioDevicePropertyChannelNameCFString, + &nameSize, + NULL); - if (hasChannelNames) { - error = AudioObjectGetPropertyDataSize(m_DeviceID, &pa, 0, 0, &nameSize ); - - if (error == kAudioHardwareNoError) { - error = AudioObjectGetPropertyData (m_DeviceID, &pa, 0, 0, &nameSize, &cfName); - } + if (error == kAudioHardwareNoError) + { + error = AudioDeviceGetProperty (m_DeviceID, + channel + 1, + false /* Output */, + kAudioDevicePropertyChannelNameCFString, + &nameSize, + &cfName); } - if (hasChannelNames && (error == kAudioHardwareNoError) ) + if (error == kAudioHardwareNoError ) { CFIndex length = CFStringGetLength(cfName); CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); @@ -530,7 +537,9 @@ WTErr WCMRCoreAudioDevice::UpdateDeviceOutputs() CFStringGetCString(cfName, cstr_name, maxSize, kCFStringEncodingUTF8); chNameStream << cstr_name; - } else { + } + else + { chNameStream << "Output " << (channel+1); } diff --git a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp index 2f6cd710ff..057dc1d0e6 100644 --- a/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp +++ b/libs/backends/wavesaudio/wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp @@ -409,9 +409,20 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/) m_InputChannels.clear(); for (int channel = 0; channel < maxInputChannels; channel++) { + const char* channelName[32]; // 32 is max leth declared by PortAudio for this operation std::stringstream chNameStream; - //A better implementation would be to retrieve the names from ASIO or CoreAudio interfaces - chNameStream << "Input " << (channel+1); + + PaError error = PaAsio_GetInputChannelName(m_DeviceID, channel, channelName); + + if (error == paNoError) + { + chNameStream << *channelName; + } + else + { + chNameStream << "Input " << (channel+1); + } + m_InputChannels.push_back (chNameStream.str()); } @@ -420,9 +431,20 @@ void WCMRPortAudioDevice::updateDeviceInfo (bool callerIsWaiting/*=false*/) m_OutputChannels.clear(); for (int channel = 0; channel < maxOutputChannels; channel++) { + const char* channelName[32]; // 32 is max leth declared by PortAudio for this operation std::stringstream chNameStream; - //A better implementation would be to retrieve the names from ASIO or CoreAudio interfaces - chNameStream << "Output " << (channel+1); + + PaError error = PaAsio_GetOutputChannelName(m_DeviceID, channel, channelName); + + if (error == paNoError) + { + chNameStream << *channelName; + } + else + { + chNameStream << "Output " << (channel+1); + } + m_OutputChannels.push_back (chNameStream.str()); } } diff --git a/libs/backends/wavesaudio/wscript b/libs/backends/wavesaudio/wscript index 3f3a7080b7..2b3684b0fd 100644 --- a/libs/backends/wavesaudio/wscript +++ b/libs/backends/wavesaudio/wscript @@ -32,8 +32,11 @@ def build(bld): obj = bld(features = 'c cxx cxxshlib') if sys.platform == 'darwin': - obj.framework = 'CoreMidi' - + if bld.env['build_target'] not in [ 'lion' ]: + obj.framework = 'CoreMidi' + else: + obj.framework = 'CoreMIDI' + obj.source = [ 'waves_audiobackend.cc', 'waves_audiobackend.latency.cc',