mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
Merge branch 'master' of git.waves.com:waves/tracks
This commit is contained in:
commit
c5d6531dcf
5 changed files with 72 additions and 35 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue