enable packaging for OSX native without jack; use which_page() everywhere in NSD; fix bad use of set_filename() in NSD; do not offer non-duplex devices in ardour's own audio setup dialog

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2896 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-01-11 20:33:47 +00:00
parent cec81ceb3c
commit 5c3ba06c8d
5 changed files with 104 additions and 35 deletions

View file

@ -4,6 +4,7 @@
#include <map>
#include <glibmm.h>
#include <gtkmm/messagedialog.h>
#include <pbd/xml++.h>
#ifdef __APPLE__
@ -621,10 +622,29 @@ EngineControl::enumerate_coreaudio_devices ()
// Look for the CoreAudio device name...
char coreDeviceName[256];
size_t nameSize;
for (int i = 0; i < numCoreDevices; i++) {
nameSize = sizeof (coreDeviceName);
/* enforce duplex devices only */
err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i],
0, true, kAudioDevicePropertyStreams,
&outSize, &isWritable);
if (err != noErr || outSize == 0) {
continue;
}
err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i],
0, false, kAudioDevicePropertyStreams,
&outSize, &isWritable);
if (err != noErr || outSize == 0) {
continue;
}
err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i],
0, true, kAudioDevicePropertyDeviceName,
&outSize, &isWritable);
@ -649,6 +669,26 @@ EngineControl::enumerate_coreaudio_devices ()
delete [] coreDeviceIDs;
}
if (devs.size() == 0) {
MessageDialog msg (_("\
You do not have any audio devices capable of\n\
simultaneous playback and recording.\n\n\
Please use Applications -> Utilities -> Audio MIDI Setup\n\
to create an \"aggregrate\" device, or install a suitable\n\
audio interface.\n\n\
Please send email to Apple and ask them why new Macs\n\
have no duplex audio device.\n\n\
Alternatively, if you really want just playback\n\
or recording but not both, start JACK before running\n\
Ardour and choose the relevant device then."
),
true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK);
msg.set_title (_("No suitable audio devices"));
msg.set_position (Gtk::WIN_POS_MOUSE);
msg.run ();
exit (1);
}
return devs;
}
#else
@ -863,7 +903,7 @@ EngineControl::find_jack_servers (vector<string>& strings)
std::map<string,int> un;
path = getenv ("PATH");
jack_servers = scanner (path, jack_server_filter, 0, false, true);
vector<string *>::iterator iter;
@ -877,7 +917,6 @@ EngineControl::find_jack_servers (vector<string>& strings)
}
}
string
EngineControl::get_device_name (const string& driver, const string& human_readable)
{