mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
fix SNAFU with jack driver selection, caused by enabling FFADO driver (exposing a lurking bug); reduce per-scroll-event step when h-scrolling with mousewheel
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2917 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
679e7fcffa
commit
8bea8385ab
4 changed files with 49 additions and 35 deletions
|
|
@ -133,7 +133,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
break;
|
||||
|
||||
case GDK_SCROLL_LEFT:
|
||||
xdelta = (current_page_frames() / 2);
|
||||
xdelta = (current_page_frames() / 8);
|
||||
if (leftmost_frame > xdelta) {
|
||||
reset_x_origin (leftmost_frame - xdelta);
|
||||
} else {
|
||||
|
|
@ -142,7 +142,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
break;
|
||||
|
||||
case GDK_SCROLL_RIGHT:
|
||||
xdelta = (current_page_frames() / 2);
|
||||
xdelta = (current_page_frames() / 8);
|
||||
if (max_frames - xdelta > leftmost_frame) {
|
||||
reset_x_origin (leftmost_frame + xdelta);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -122,9 +122,6 @@ EngineControl::EngineControl ()
|
|||
set_popdown_strings (driver_combo, strings);
|
||||
driver_combo.set_active_text (strings.front());
|
||||
|
||||
/* figure out available devices and set up interface_combo */
|
||||
|
||||
enumerate_devices ();
|
||||
driver_combo.signal_changed().connect (mem_fun (*this, &EngineControl::driver_changed));
|
||||
driver_changed ();
|
||||
|
||||
|
|
@ -366,7 +363,7 @@ EngineControl::build_command_line (vector<string>& cmd)
|
|||
bool using_coreaudio = false;
|
||||
bool using_netjack = false;
|
||||
bool using_ffado = false;
|
||||
bool using_dummy = false;
|
||||
bool using_dummy = false;
|
||||
|
||||
/* first, path to jackd */
|
||||
|
||||
|
|
@ -466,10 +463,10 @@ EngineControl::build_command_line (vector<string>& cmd)
|
|||
cmd.push_back ("-C");
|
||||
}
|
||||
|
||||
if (! using_dummy ) {
|
||||
cmd.push_back ("-n");
|
||||
cmd.push_back (to_string ((uint32_t) floor (periods_spinner.get_value()), std::dec));
|
||||
}
|
||||
if (! using_dummy ) {
|
||||
cmd.push_back ("-n");
|
||||
cmd.push_back (to_string ((uint32_t) floor (periods_spinner.get_value()), std::dec));
|
||||
}
|
||||
}
|
||||
|
||||
cmd.push_back ("-r");
|
||||
|
|
@ -577,19 +574,25 @@ EngineControl::realtime_changed ()
|
|||
}
|
||||
|
||||
void
|
||||
EngineControl::enumerate_devices ()
|
||||
EngineControl::enumerate_devices (const string& driver)
|
||||
{
|
||||
/* note: case matters for the map keys */
|
||||
|
||||
#ifdef __APPLE__
|
||||
devices["CoreAudio"] = enumerate_coreaudio_devices ();
|
||||
#else
|
||||
devices["ALSA"] = enumerate_alsa_devices ();
|
||||
devices["FFADO"] = enumerate_ffado_devices ();
|
||||
devices["OSS"] = enumerate_oss_devices ();
|
||||
devices["Dummy"] = enumerate_dummy_devices ();
|
||||
devices["NetJACK"] = enumerate_netjack_devices ();
|
||||
if (driver == "CoreAudio") {
|
||||
#ifdef __APPLE__
|
||||
devices[driver] = enumerate_coreaudio_devices ();
|
||||
#endif
|
||||
} else if (driver == "ALSA") {
|
||||
devices[driver] = enumerate_alsa_devices ();
|
||||
} else if (driver == "FFADO") {
|
||||
devices[driver] = enumerate_ffado_devices ();
|
||||
} else if (driver == "OSS") {
|
||||
devices[driver] = enumerate_oss_devices ();
|
||||
} else if (driver == "Dummy") {
|
||||
devices[driver] = enumerate_dummy_devices ();
|
||||
} else if (driver == "NetJACK") {
|
||||
devices[driver] = enumerate_netjack_devices ();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
@ -679,6 +682,7 @@ EngineControl::enumerate_coreaudio_devices ()
|
|||
delete [] coreDeviceIDs;
|
||||
}
|
||||
|
||||
|
||||
if (devs.size() == 0) {
|
||||
MessageDialog msg (_("\
|
||||
You do not have any audio devices capable of\n\
|
||||
|
|
@ -699,6 +703,7 @@ Ardour and choose the relevant device then."
|
|||
exit (1);
|
||||
}
|
||||
|
||||
|
||||
return devs;
|
||||
}
|
||||
#else
|
||||
|
|
@ -770,6 +775,7 @@ EngineControl::enumerate_ffado_devices ()
|
|||
backend_devs.clear ();
|
||||
return devs;
|
||||
}
|
||||
|
||||
vector<string>
|
||||
EngineControl::enumerate_oss_devices ()
|
||||
{
|
||||
|
|
@ -794,11 +800,19 @@ void
|
|||
EngineControl::driver_changed ()
|
||||
{
|
||||
string driver = driver_combo.get_active_text();
|
||||
vector<string>& strings = devices[driver];
|
||||
string::size_type maxlen = 0;
|
||||
int maxindex = -1;
|
||||
int n = 0;
|
||||
|
||||
enumerate_devices (driver);
|
||||
|
||||
vector<string>& strings = devices[driver];
|
||||
|
||||
if (strings.empty()) {
|
||||
error << string_compose (_("No devices found for driver \"%1\""), driver) << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
for (vector<string>::iterator i = strings.begin(); i != strings.end(); ++i, ++n) {
|
||||
if ((*i).length() > maxlen) {
|
||||
maxlen = (*i).length();
|
||||
|
|
@ -1071,19 +1085,18 @@ EngineControl::set_state (const XMLNode& root)
|
|||
XMLNodeConstIterator citer;
|
||||
XMLNode* child;
|
||||
XMLProperty* prop;
|
||||
|
||||
bool using_dummy = false;
|
||||
|
||||
bool using_dummy = false;
|
||||
|
||||
int val;
|
||||
string strval;
|
||||
|
||||
if ( (child = root.child("driver"))){
|
||||
prop = child->property("val");
|
||||
if (prop && (prop->value() == "Dummy") ) {
|
||||
using_dummy = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( (child = root.child ("driver"))){
|
||||
prop = child->property("val");
|
||||
if (prop && (prop->value() == "Dummy") ) {
|
||||
using_dummy = true;
|
||||
}
|
||||
}
|
||||
|
||||
clist = root.children();
|
||||
|
||||
for (citer = clist.begin(); citer != clist.end(); ++citer) {
|
||||
|
|
@ -1093,8 +1106,9 @@ EngineControl::set_state (const XMLNode& root)
|
|||
prop = child->property ("val");
|
||||
|
||||
if (!prop || prop->value().empty()) {
|
||||
if ( using_dummy && ( child->name() == "interface" || child->name() == "inputdevice" || child->name() == "outputdevice" ))
|
||||
continue;
|
||||
|
||||
if ( using_dummy && ( child->name() == "interface" || child->name() == "inputdevice" || child->name() == "outputdevice" ))
|
||||
continue;
|
||||
error << string_compose (_("AudioSetup value for %1 is missing data"), child->name()) << endmsg;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class EngineControl : public Gtk::VBox {
|
|||
|
||||
std::map<std::string,std::vector<std::string> > devices;
|
||||
std::vector<std::string> backend_devs;
|
||||
void enumerate_devices ();
|
||||
void enumerate_devices (const string& driver);
|
||||
|
||||
#ifdef __APPLE__
|
||||
std::vector<std::string> enumerate_coreaudio_devices ();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __ardour_svn_revision_h__
|
||||
#define __ardour_svn_revision_h__
|
||||
static const char* ardour_svn_revision = "2903";
|
||||
static const char* ardour_svn_revision = "2914";
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue