mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
audun's waveview outline patch; some diskstream fixes; real splash screen; more reorganization of new session dialog use; about is not marked as a splashscreen anymore (help out KDE users)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2935 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
03d2616dbc
commit
574db5d874
22 changed files with 926 additions and 441 deletions
|
|
@ -211,6 +211,7 @@ route_ui.cc
|
||||||
selection.cc
|
selection.cc
|
||||||
sfdb_ui.cc
|
sfdb_ui.cc
|
||||||
send_ui.cc
|
send_ui.cc
|
||||||
|
splash.cc
|
||||||
streamview.cc
|
streamview.cc
|
||||||
audio_streamview.cc
|
audio_streamview.cc
|
||||||
tape_region_view.cc
|
tape_region_view.cc
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,8 @@ static const char* authors[] = {
|
||||||
N_("Nedko Arnaudov"),
|
N_("Nedko Arnaudov"),
|
||||||
N_("Carl Hetherington"),
|
N_("Carl Hetherington"),
|
||||||
N_("Colin Fletcher"),
|
N_("Colin Fletcher"),
|
||||||
|
N_("Roland Stigge"),
|
||||||
|
N_("Audun Halland"),
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -175,7 +177,7 @@ About::About ()
|
||||||
: paypal_pixmap (paypal_xpm)
|
: paypal_pixmap (paypal_xpm)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
|
// set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
string t;
|
string t;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Ardour>
|
<Ardour>
|
||||||
<Canvas>
|
<Canvas>
|
||||||
<Option name="waveform" value="000000cc"/>
|
<Option name="waveform" value="373737a7"/>
|
||||||
|
<Option name="waveform fill" value="73737378"/>
|
||||||
<Option name="clipped waveform" value="ff0000e5"/>
|
<Option name="clipped waveform" value="ff0000e5"/>
|
||||||
<Option name="region base" value="bfbfc1aa"/>
|
<Option name="region base" value="bfbfc1aa"/>
|
||||||
<Option name="selected region base" value="b591a8ff"/>
|
<Option name="selected region base" value="b591a8ff"/>
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@
|
||||||
#include "add_route_dialog.h"
|
#include "add_route_dialog.h"
|
||||||
#include "new_session_dialog.h"
|
#include "new_session_dialog.h"
|
||||||
#include "about.h"
|
#include "about.h"
|
||||||
|
#include "splash.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
#include "theme_manager.h"
|
#include "theme_manager.h"
|
||||||
|
|
@ -166,6 +167,12 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
||||||
}
|
}
|
||||||
|
|
||||||
about = 0;
|
about = 0;
|
||||||
|
splash = 0;
|
||||||
|
|
||||||
|
if (ARDOUR_COMMAND_LINE::session_name.length()) {
|
||||||
|
/* only show this if we're not going to post the new session dialog */
|
||||||
|
show_splash ();
|
||||||
|
}
|
||||||
|
|
||||||
if (theArdourUI == 0) {
|
if (theArdourUI == 0) {
|
||||||
theArdourUI = this;
|
theArdourUI = this;
|
||||||
|
|
@ -261,6 +268,13 @@ ARDOUR_UI::create_engine ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// OS X where everything is sllloooowwww
|
||||||
|
loading_dialog->set_message (_("Starting audio engine"));
|
||||||
|
loading_dialog->show_all ();
|
||||||
|
flush_pending ();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
engine = new ARDOUR::AudioEngine (ARDOUR_COMMAND_LINE::jack_client_name);
|
engine = new ARDOUR::AudioEngine (ARDOUR_COMMAND_LINE::jack_client_name);
|
||||||
|
|
||||||
|
|
@ -592,74 +606,39 @@ Please consider the possibilities, and perhaps (re)start JACK."));
|
||||||
win.show_all ();
|
win.show_all ();
|
||||||
win.set_position (Gtk::WIN_POS_CENTER);
|
win.set_position (Gtk::WIN_POS_CENTER);
|
||||||
|
|
||||||
if (!ARDOUR_COMMAND_LINE::no_splash) {
|
|
||||||
hide_splash ();
|
hide_splash ();
|
||||||
}
|
|
||||||
|
|
||||||
/* we just don't care about the result, but we want to block */
|
/* we just don't care about the result, but we want to block */
|
||||||
|
|
||||||
win.run ();
|
win.run ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
_hide_splash (gpointer arg)
|
||||||
|
{
|
||||||
|
((ARDOUR_UI*)arg)->hide_splash();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::startup ()
|
ARDOUR_UI::startup ()
|
||||||
{
|
{
|
||||||
string name, path;
|
string name, path;
|
||||||
bool isnew;
|
|
||||||
|
|
||||||
new_session_dialog = new NewSessionDialog();
|
new_session_dialog = new NewSessionDialog();
|
||||||
|
|
||||||
/* If no session name is given: we're not loading a session yet, nor creating a new one */
|
// in 4 seconds, hide the splash screen
|
||||||
|
|
||||||
if (ARDOUR_COMMAND_LINE::session_name.length()) {
|
Glib::signal_timeout().connect (bind (sigc::ptr_fun (_hide_splash), this), 4000);
|
||||||
|
|
||||||
/* Load session or start the new session dialog */
|
bool backend_audio_is_running = EngineControl::engine_running();
|
||||||
|
|
||||||
if (Session::find_session (ARDOUR_COMMAND_LINE::session_name, path, name, isnew)) {
|
|
||||||
|
|
||||||
MessageDialog msg (string_compose(_("Could not find command line session \"%1\""),
|
|
||||||
ARDOUR_COMMAND_LINE::session_name),
|
|
||||||
true,
|
|
||||||
Gtk::MESSAGE_ERROR,
|
|
||||||
Gtk::BUTTONS_OK);
|
|
||||||
|
|
||||||
msg.set_position (Gtk::WIN_POS_MOUSE);
|
|
||||||
msg.present ();
|
|
||||||
msg.run ();
|
|
||||||
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ARDOUR_COMMAND_LINE::new_session) {
|
|
||||||
|
|
||||||
/* Supposed to be loading an existing session, but the session doesn't exist */
|
|
||||||
|
|
||||||
if (isnew) {
|
|
||||||
MessageDialog msg (string_compose (_("\n\nNo session named \"%1\" exists.\n"
|
|
||||||
"To create it from the command line, start ardour as:\n ardour --new %1"), path),
|
|
||||||
true,
|
|
||||||
Gtk::MESSAGE_ERROR,
|
|
||||||
Gtk::BUTTONS_OK);
|
|
||||||
|
|
||||||
msg.set_position (Gtk::WIN_POS_MOUSE);
|
|
||||||
msg.present ();
|
|
||||||
msg.run ();
|
|
||||||
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hide_splash ();
|
|
||||||
|
|
||||||
bool have_backend = EngineControl::engine_running();
|
|
||||||
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
|
XMLNode* audio_setup = Config->extra_xml ("AudioSetup");
|
||||||
|
|
||||||
if (audio_setup) {
|
if (audio_setup) {
|
||||||
new_session_dialog->engine_control.set_state (*audio_setup);
|
new_session_dialog->engine_control.set_state (*audio_setup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_session_parameters (ARDOUR_COMMAND_LINE::session_name, have_backend, ARDOUR_COMMAND_LINE::new_session)) {
|
if (!get_session_parameters (backend_audio_is_running, ARDOUR_COMMAND_LINE::new_session)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2029,60 +2008,45 @@ ARDOUR_UI::fontconfig_dialog ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
void
|
||||||
ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_engine, bool should_be_new)
|
ARDOUR_UI::parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session)
|
||||||
{
|
{
|
||||||
bool existing_session = false;
|
existing_session = false;
|
||||||
Glib::ustring session_name;
|
|
||||||
Glib::ustring session_path;
|
|
||||||
Glib::ustring template_name;
|
|
||||||
|
|
||||||
if (!loading_dialog) {
|
if (Glib::file_test (cmdline_path, Glib::FILE_TEST_IS_DIR)) {
|
||||||
loading_dialog = new MessageDialog (*new_session_dialog,
|
session_path = cmdline_path;
|
||||||
"",
|
|
||||||
false,
|
|
||||||
Gtk::MESSAGE_INFO,
|
|
||||||
Gtk::BUTTONS_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int response = Gtk::RESPONSE_NONE;
|
|
||||||
|
|
||||||
if (predetermined_path.length()) {
|
|
||||||
|
|
||||||
/* before we start, lets see if the given path looks like
|
|
||||||
an existing ardour session. if it does, skip the
|
|
||||||
tabs that we don't need
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (Glib::file_test (predetermined_path, Glib::FILE_TEST_IS_DIR)) {
|
|
||||||
session_path = predetermined_path;
|
|
||||||
existing_session = true;
|
existing_session = true;
|
||||||
} else if (Glib::file_test (predetermined_path, Glib::FILE_TEST_IS_REGULAR)) {
|
} else if (Glib::file_test (cmdline_path, Glib::FILE_TEST_IS_REGULAR)) {
|
||||||
session_path = Glib::path_get_dirname (string (predetermined_path));
|
session_path = Glib::path_get_dirname (string (cmdline_path));
|
||||||
existing_session = true;
|
existing_session = true;
|
||||||
} else {
|
} else {
|
||||||
/* it doesn't exist, assume the best */
|
/* it doesn't exist, assume the best */
|
||||||
session_path = Glib::path_get_dirname (string (predetermined_path));
|
session_path = Glib::path_get_dirname (string (cmdline_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
session_name = basename_nosuffix (string (predetermined_path));
|
session_name = basename_nosuffix (string (cmdline_path));
|
||||||
|
}
|
||||||
|
|
||||||
new_session_dialog->set_session_name (session_name);
|
int
|
||||||
new_session_dialog->set_session_folder (session_path);
|
ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session)
|
||||||
new_session_dialog->set_modal (true);
|
{
|
||||||
|
/* when this is called, the backend audio system must be running */
|
||||||
|
|
||||||
if (existing_session) {
|
/* the main idea here is to deal with the fact that a cmdline argument for the session
|
||||||
|
can be interpreted in different ways - it could be a directory or a file, and before
|
||||||
|
we load, we need to know both the session directory and the snapshot (statefile) within it
|
||||||
|
that we are supposed to use.
|
||||||
|
*/
|
||||||
|
|
||||||
if (session_name.length() == 0 || session_path.length() == 0) {
|
if (session_name.length() == 0 || session_path.length() == 0) {
|
||||||
error << string_compose (_("Ardour cannot understand \"%1\" as a session name"), predetermined_path) << endmsg;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Glib::file_test (predetermined_path, Glib::FILE_TEST_IS_DIR)) {
|
if (Glib::file_test (session_path, Glib::FILE_TEST_IS_DIR)) {
|
||||||
|
|
||||||
Glib::ustring predicted_session_file;
|
Glib::ustring predicted_session_file;
|
||||||
|
|
||||||
predicted_session_file = predetermined_path;
|
predicted_session_file = session_path;
|
||||||
predicted_session_file += '/';
|
predicted_session_file += '/';
|
||||||
predicted_session_file += session_name;
|
predicted_session_file += session_name;
|
||||||
predicted_session_file += Session::statefile_suffix();
|
predicted_session_file += Session::statefile_suffix();
|
||||||
|
|
@ -2091,195 +2055,32 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e
|
||||||
existing_session = true;
|
existing_session = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (Glib::file_test (predetermined_path, Glib::FILE_TEST_EXISTS)) {
|
} else if (Glib::file_test (session_path, Glib::FILE_TEST_EXISTS)) {
|
||||||
|
|
||||||
if (predetermined_path.find (Session::statefile_suffix()) == predetermined_path.length() - 7) {
|
if (session_path.find (Session::statefile_suffix()) == session_path.length() - 7) {
|
||||||
/* existing .ardour file */
|
/* existing .ardour file */
|
||||||
existing_session = true;
|
existing_session = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
existing_session = false;
|
existing_session = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existing_session && have_engine) {
|
|
||||||
/* lets just try to load it */
|
/* lets just try to load it */
|
||||||
|
|
||||||
loading_dialog->set_message (_("Starting audio engine"));
|
|
||||||
loading_dialog->show_all ();
|
|
||||||
flush_pending ();
|
|
||||||
|
|
||||||
if (create_engine ()) {
|
if (create_engine ()) {
|
||||||
backend_audio_error (!have_engine, new_session_dialog);
|
hide_splash ();
|
||||||
loading_dialog->hide ();
|
loading_dialog->hide ();
|
||||||
return false;
|
backend_audio_error (false, new_session_dialog);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (load_session (session_path, session_name) == 0) {
|
return load_session (session_path, session_name);
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* loading failed, or we need the NSD for something */
|
bool
|
||||||
|
ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path)
|
||||||
new_session_dialog->set_position (WIN_POS_CENTER);
|
{
|
||||||
new_session_dialog->set_current_page (0);
|
|
||||||
new_session_dialog->set_existing_session (existing_session);
|
|
||||||
new_session_dialog->reset_recent();
|
|
||||||
|
|
||||||
do {
|
|
||||||
new_session_dialog->set_have_engine (have_engine);
|
|
||||||
new_session_dialog->present ();
|
|
||||||
response = new_session_dialog->run ();
|
|
||||||
loading_dialog->hide ();
|
|
||||||
|
|
||||||
_session_is_new = false;
|
|
||||||
|
|
||||||
/* handle possible negative responses */
|
|
||||||
|
|
||||||
if (response == Gtk::RESPONSE_CANCEL || response == Gtk::RESPONSE_DELETE_EVENT) {
|
|
||||||
|
|
||||||
if (!session) {
|
|
||||||
quit();
|
|
||||||
}
|
|
||||||
new_session_dialog->hide ();
|
|
||||||
return false;
|
|
||||||
|
|
||||||
} else if (response == Gtk::RESPONSE_NONE) {
|
|
||||||
/* "Clear" was pressed */
|
|
||||||
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
fontconfig_dialog();
|
|
||||||
|
|
||||||
/* if we're here to help set up audio parameters this is where want to do that.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!have_engine) {
|
|
||||||
if (new_session_dialog->engine_control.setup_engine ()) {
|
|
||||||
new_session_dialog->hide ();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
loading_dialog->set_message (_("Starting audio engine"));
|
|
||||||
loading_dialog->show_all ();
|
|
||||||
flush_pending ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (create_engine ()) {
|
|
||||||
backend_audio_error (!have_engine, new_session_dialog);
|
|
||||||
loading_dialog->hide ();
|
|
||||||
flush_pending ();
|
|
||||||
/* audio setup page */
|
|
||||||
new_session_dialog->set_existing_session (false);
|
|
||||||
new_session_dialog->set_current_page (2);
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
loading_dialog->hide ();
|
|
||||||
have_engine = true;
|
|
||||||
|
|
||||||
/* now handle possible affirmative responses */
|
|
||||||
|
|
||||||
if (response == Gtk::RESPONSE_YES) {
|
|
||||||
|
|
||||||
/* YES == OPEN from the session selector */
|
|
||||||
|
|
||||||
session_name = new_session_dialog->session_name();
|
|
||||||
|
|
||||||
if (session_name.empty()) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (session_name[0] == '/' ||
|
|
||||||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
|
|
||||||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
|
|
||||||
if (load_session (Glib::path_get_dirname (session_name), session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
session_path = new_session_dialog->session_folder();
|
|
||||||
if (load_session (session_path, session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (response == Gtk::RESPONSE_OK) {
|
|
||||||
|
|
||||||
/* OK == OPEN button */
|
|
||||||
|
|
||||||
session_name = new_session_dialog->session_name();
|
|
||||||
|
|
||||||
if (session_name.empty()) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (new_session_dialog->which_page()) {
|
|
||||||
case NewSessionDialog::OpenPage:
|
|
||||||
case NewSessionDialog::EnginePage:
|
|
||||||
|
|
||||||
if (session_name[0] == '/' ||
|
|
||||||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
|
|
||||||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
|
|
||||||
|
|
||||||
if (load_session (Glib::path_get_dirname (session_name), session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
session_path = new_session_dialog->session_folder();
|
|
||||||
if (load_session (session_path, session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NewSessionDialog::NewPage: /* nominally the "new" session creator, but could be in use for an old session */
|
|
||||||
|
|
||||||
if (new_session_dialog->get_current_page() == 0 && ARDOUR_COMMAND_LINE::session_name.empty()) {
|
|
||||||
should_be_new = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* handle what appear to be paths rather than just a name */
|
|
||||||
|
|
||||||
if (session_name[0] == '/' ||
|
|
||||||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
|
|
||||||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
|
|
||||||
|
|
||||||
session_path = Glib::path_get_dirname (session_name);
|
|
||||||
session_name = Glib::path_get_basename (session_name);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
session_path = new_session_dialog->session_folder();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//XXX This is needed because session constructor wants a
|
|
||||||
//non-existant path. hopefully this will be fixed at some point.
|
|
||||||
|
|
||||||
session_path = Glib::build_filename (session_path, session_name);
|
|
||||||
|
|
||||||
if (!should_be_new) {
|
|
||||||
|
|
||||||
if (load_session (session_path, session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
continue; /* leaves while() loop because response != NONE */
|
|
||||||
|
|
||||||
} else if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
|
|
||||||
|
|
||||||
Glib::ustring str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path);
|
Glib::ustring str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path);
|
||||||
|
|
||||||
MessageDialog msg (str,
|
MessageDialog msg (str,
|
||||||
|
|
@ -2295,41 +2096,15 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e
|
||||||
|
|
||||||
switch (msg.run()) {
|
switch (msg.run()) {
|
||||||
case RESPONSE_YES:
|
case RESPONSE_YES:
|
||||||
new_session_dialog->hide ();
|
return true;
|
||||||
goto_editor_window ();
|
|
||||||
flush_pending ();
|
|
||||||
if (load_session (session_path, session_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
goto done;
|
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
response = RESPONSE_NONE;
|
|
||||||
new_session_dialog->reset ();
|
|
||||||
new_session_dialog->set_existing_session (false);
|
|
||||||
loading_dialog->hide ();
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_session_is_new = true;
|
int
|
||||||
|
ARDOUR_UI::build_session_from_nsd (const Glib::ustring& session_path, const Glib::ustring& session_name)
|
||||||
if (new_session_dialog->use_session_template()) {
|
{
|
||||||
|
|
||||||
template_name = new_session_dialog->session_template_name();
|
|
||||||
|
|
||||||
new_session_dialog->hide ();
|
|
||||||
goto_editor_window ();
|
|
||||||
flush_pending ();
|
|
||||||
|
|
||||||
if (load_session (session_path, session_name, template_name)) {
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
|
||||||
goto try_again;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
uint32_t cchns;
|
uint32_t cchns;
|
||||||
uint32_t mchns;
|
uint32_t mchns;
|
||||||
|
|
@ -2393,19 +2168,192 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e
|
||||||
nphysout,
|
nphysout,
|
||||||
engine->frame_rate() * 60 * 5)) {
|
engine->frame_rate() * 60 * 5)) {
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be_new)
|
||||||
|
{
|
||||||
|
bool existing_session = false;
|
||||||
|
Glib::ustring session_name;
|
||||||
|
Glib::ustring session_path;
|
||||||
|
Glib::ustring template_name;
|
||||||
|
|
||||||
|
if (!loading_dialog) {
|
||||||
|
loading_dialog = new MessageDialog (*new_session_dialog,
|
||||||
|
"",
|
||||||
|
false,
|
||||||
|
Gtk::MESSAGE_INFO,
|
||||||
|
Gtk::BUTTONS_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int response = Gtk::RESPONSE_NONE;
|
||||||
|
|
||||||
|
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
|
||||||
|
|
||||||
|
parse_cmdline_path (ARDOUR_COMMAND_LINE::session_name, session_name, session_path, existing_session);
|
||||||
|
|
||||||
|
/* don't ever reuse this */
|
||||||
|
|
||||||
|
ARDOUR_COMMAND_LINE::session_name = string();
|
||||||
|
|
||||||
|
if (existing_session && backend_audio_is_running) {
|
||||||
|
|
||||||
|
/* just load the thing already */
|
||||||
|
|
||||||
|
if (load_cmdline_session (session_name, session_path, existing_session) == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make the NSD use whatever information we have */
|
||||||
|
|
||||||
|
new_session_dialog->set_session_name (session_name);
|
||||||
|
new_session_dialog->set_session_folder (session_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* loading failed, or we need the NSD for something */
|
||||||
|
|
||||||
|
new_session_dialog->set_modal (false);
|
||||||
|
new_session_dialog->set_position (WIN_POS_CENTER);
|
||||||
|
new_session_dialog->set_current_page (0);
|
||||||
|
new_session_dialog->set_existing_session (existing_session);
|
||||||
|
new_session_dialog->reset_recent();
|
||||||
|
|
||||||
|
/* get this out of the way */
|
||||||
|
|
||||||
|
hide_splash ();
|
||||||
|
|
||||||
|
do {
|
||||||
|
new_session_dialog->set_have_engine (backend_audio_is_running);
|
||||||
|
new_session_dialog->present ();
|
||||||
|
response = new_session_dialog->run ();
|
||||||
|
loading_dialog->hide ();
|
||||||
|
|
||||||
|
_session_is_new = false;
|
||||||
|
|
||||||
|
/* handle possible negative responses */
|
||||||
|
|
||||||
|
switch (response) {
|
||||||
|
case Gtk::RESPONSE_CANCEL:
|
||||||
|
case Gtk::RESPONSE_DELETE_EVENT:
|
||||||
|
if (!session) {
|
||||||
|
quit();
|
||||||
|
}
|
||||||
|
new_session_dialog->hide ();
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case Gtk::RESPONSE_NONE:
|
||||||
|
/* "Clear" was pressed */
|
||||||
|
goto try_again;
|
||||||
|
}
|
||||||
|
|
||||||
|
fontconfig_dialog();
|
||||||
|
|
||||||
|
if (!backend_audio_is_running) {
|
||||||
|
if (new_session_dialog->engine_control.setup_engine ()) {
|
||||||
|
new_session_dialog->hide ();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (create_engine ()) {
|
||||||
|
|
||||||
|
backend_audio_error (!backend_audio_is_running, new_session_dialog);
|
||||||
|
loading_dialog->hide ();
|
||||||
|
flush_pending ();
|
||||||
|
|
||||||
|
new_session_dialog->set_existing_session (false);
|
||||||
|
new_session_dialog->set_current_page (2);
|
||||||
|
|
||||||
response = Gtk::RESPONSE_NONE;
|
response = Gtk::RESPONSE_NONE;
|
||||||
goto try_again;
|
goto try_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_session_dialog->hide ();
|
loading_dialog->hide ();
|
||||||
goto_editor_window ();
|
backend_audio_is_running = true;
|
||||||
flush_pending ();
|
|
||||||
|
if (response == Gtk::RESPONSE_OK) {
|
||||||
|
|
||||||
|
session_name = new_session_dialog->session_name();
|
||||||
|
|
||||||
|
if (session_name.empty()) {
|
||||||
|
response = Gtk::RESPONSE_NONE;
|
||||||
|
goto try_again;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if the user mistakenly typed path information into the session filename entry,
|
||||||
|
convert what they typed into a path & a name
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (session_name[0] == '/' ||
|
||||||
|
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == '/') ||
|
||||||
|
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == '/')) {
|
||||||
|
|
||||||
|
session_path = Glib::path_get_dirname (session_name);
|
||||||
|
session_name = Glib::path_get_basename (session_name);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
session_path = new_session_dialog->session_folder();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (new_session_dialog->which_page()) {
|
||||||
|
|
||||||
|
case NewSessionDialog::OpenPage:
|
||||||
|
case NewSessionDialog::EnginePage:
|
||||||
|
goto loadit;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NewSessionDialog::NewPage: /* nominally the "new" session creator, but could be in use for an old session */
|
||||||
|
|
||||||
|
should_be_new = true;
|
||||||
|
|
||||||
|
//XXX This is needed because session constructor wants a
|
||||||
|
//non-existant path. hopefully this will be fixed at some point.
|
||||||
|
|
||||||
|
session_path = Glib::build_filename (session_path, session_name);
|
||||||
|
|
||||||
|
if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
|
||||||
|
|
||||||
|
if (ask_about_loading_existing_session (session_path)) {
|
||||||
|
goto loadit;
|
||||||
|
} else {
|
||||||
|
response = RESPONSE_NONE;
|
||||||
|
goto try_again;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_session_is_new = true;
|
||||||
|
|
||||||
|
if (new_session_dialog->use_session_template()) {
|
||||||
|
|
||||||
|
template_name = new_session_dialog->session_template_name();
|
||||||
|
goto loadit;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (build_session_from_nsd (session_path, session_name)) {
|
||||||
|
response = RESPONSE_NONE;
|
||||||
|
goto try_again;
|
||||||
|
}
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadit:
|
||||||
|
new_session_dialog->hide ();
|
||||||
|
|
||||||
|
if (load_session (session_path, session_name)) {
|
||||||
|
/* force a retry */
|
||||||
|
response = Gtk::RESPONSE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_again:
|
try_again:
|
||||||
|
|
@ -2414,6 +2362,7 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e
|
||||||
new_session_dialog->set_existing_session (false);
|
new_session_dialog->set_existing_session (false);
|
||||||
new_session_dialog->reset ();
|
new_session_dialog->reset ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} while (response == Gtk::RESPONSE_NONE);
|
} while (response == Gtk::RESPONSE_NONE);
|
||||||
|
|
||||||
|
|
@ -2421,6 +2370,8 @@ ARDOUR_UI::get_session_parameters (Glib::ustring predetermined_path, bool have_e
|
||||||
show();
|
show();
|
||||||
loading_dialog->hide ();
|
loading_dialog->hide ();
|
||||||
new_session_dialog->hide();
|
new_session_dialog->hide();
|
||||||
|
new_session_dialog->reset();
|
||||||
|
goto_editor_window ();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2433,7 +2384,7 @@ ARDOUR_UI::close_session ()
|
||||||
|
|
||||||
unload_session (true);
|
unload_session (true);
|
||||||
|
|
||||||
get_session_parameters ("", true, false);
|
get_session_parameters (true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -2467,10 +2418,13 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// OS X where everything is sllloooowwww
|
||||||
if (loading_dialog) {
|
if (loading_dialog) {
|
||||||
loading_dialog->set_markup (_("Please wait while Ardour loads your session"));
|
loading_dialog->set_markup (_("Please wait while Ardour loads your session"));
|
||||||
flush_pending ();
|
flush_pending ();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
disable_screen_updates ();
|
disable_screen_updates ();
|
||||||
|
|
||||||
|
|
@ -2612,28 +2566,52 @@ ARDOUR_UI::show ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::show_splash ()
|
ARDOUR_UI::show_about ()
|
||||||
{
|
{
|
||||||
if (about == 0) {
|
if (about == 0) {
|
||||||
about = new About();
|
about = new About;
|
||||||
about->signal_response().connect(mem_fun (*this, &ARDOUR_UI::about_signal_response) );
|
about->signal_response().connect(mem_fun (*this, &ARDOUR_UI::about_signal_response) );
|
||||||
}
|
}
|
||||||
about->present();
|
|
||||||
flush_pending ();
|
about->show_all ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::hide_about ()
|
||||||
|
{
|
||||||
|
if (about) {
|
||||||
|
about->get_window()->set_cursor ();
|
||||||
|
about->hide ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::about_signal_response(int response)
|
ARDOUR_UI::about_signal_response(int response)
|
||||||
{
|
{
|
||||||
hide_splash();
|
hide_about();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::show_splash ()
|
||||||
|
{
|
||||||
|
if (splash == 0) {
|
||||||
|
try {
|
||||||
|
splash = new Splash;
|
||||||
|
} catch (...) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
splash->show ();
|
||||||
|
splash->get_window()->process_updates (true);
|
||||||
|
flush_pending ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::hide_splash ()
|
ARDOUR_UI::hide_splash ()
|
||||||
{
|
{
|
||||||
if (about) {
|
if (splash) {
|
||||||
about->get_window()->set_cursor ();
|
splash->hide();
|
||||||
about->hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3041,26 +3019,6 @@ ARDOUR_UI::reconnect_to_jack ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
ARDOUR_UI::cmdline_new_session (string path)
|
|
||||||
{
|
|
||||||
if (path[0] != '/') {
|
|
||||||
char buf[PATH_MAX+1];
|
|
||||||
string str;
|
|
||||||
|
|
||||||
getcwd (buf, sizeof (buf));
|
|
||||||
str = buf;
|
|
||||||
str += '/';
|
|
||||||
str += path;
|
|
||||||
path = str;
|
|
||||||
}
|
|
||||||
|
|
||||||
get_session_parameters (path, false, true);
|
|
||||||
|
|
||||||
_will_create_new_session_automatically = false; /* done it */
|
|
||||||
return FALSE; /* don't call it again */
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::use_config ()
|
ARDOUR_UI::use_config ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ class Mixer_UI;
|
||||||
class ConnectionEditor;
|
class ConnectionEditor;
|
||||||
class RouteParams_UI;
|
class RouteParams_UI;
|
||||||
class About;
|
class About;
|
||||||
|
class Splash;
|
||||||
class AddRouteDialog;
|
class AddRouteDialog;
|
||||||
class LocationUI;
|
class LocationUI;
|
||||||
class ThemeManager;
|
class ThemeManager;
|
||||||
|
|
@ -110,6 +111,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void show_splash ();
|
void show_splash ();
|
||||||
void hide_splash ();
|
void hide_splash ();
|
||||||
|
|
||||||
|
void show_about ();
|
||||||
|
void hide_about ();
|
||||||
|
|
||||||
int load_session (const Glib::ustring & path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
|
int load_session (const Glib::ustring & path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
|
||||||
bool session_loaded;
|
bool session_loaded;
|
||||||
int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
|
int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
|
||||||
|
|
@ -132,8 +136,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
_will_create_new_session_automatically = yn;
|
_will_create_new_session_automatically = yn;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_session_parameters (Glib::ustring path, bool have_engine = false, bool should_be_new = false);
|
bool get_session_parameters (bool have_engine = false, bool should_be_new = false);
|
||||||
gint cmdline_new_session (string path);
|
void parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session);
|
||||||
|
int load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session);
|
||||||
|
int build_session_from_nsd (const Glib::ustring& session_name, const Glib::ustring& session_path);
|
||||||
|
bool ask_about_loading_existing_session (const Glib::ustring& session_path);
|
||||||
int unload_session (bool hide_stuff = false);
|
int unload_session (bool hide_stuff = false);
|
||||||
void close_session();
|
void close_session();
|
||||||
|
|
||||||
|
|
@ -639,6 +646,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void count_recenabled_streams (ARDOUR::Route&);
|
void count_recenabled_streams (ARDOUR::Route&);
|
||||||
|
|
||||||
About* about;
|
About* about;
|
||||||
|
Splash* splash;
|
||||||
bool shown_flag;
|
bool shown_flag;
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,12 +111,15 @@ ARDOUR_UI::goto_editor_window ()
|
||||||
{
|
{
|
||||||
editor->show_window ();
|
editor->show_window ();
|
||||||
editor->present();
|
editor->present();
|
||||||
|
flush_pending ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::goto_mixer_window ()
|
ARDOUR_UI::goto_mixer_window ()
|
||||||
{
|
{
|
||||||
mixer->show_window ();
|
mixer->show_window ();
|
||||||
mixer->present();
|
mixer->present();
|
||||||
|
flush_pending ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ ARDOUR_UI::install_actions ()
|
||||||
|
|
||||||
/* the real actions */
|
/* the real actions */
|
||||||
|
|
||||||
act = ActionManager::register_action (main_actions, X_("New"), _("New"), hide_return (bind (mem_fun(*this, &ARDOUR_UI::get_session_parameters), string (), true, true)));
|
act = ActionManager::register_action (main_actions, X_("New"), _("New"), hide_return (bind (mem_fun(*this, &ARDOUR_UI::get_session_parameters), true, true)));
|
||||||
|
|
||||||
ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session));
|
ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session));
|
||||||
ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
||||||
|
|
@ -207,7 +207,7 @@ ARDOUR_UI::install_actions ()
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
|
act = ActionManager::register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
ActionManager::register_action (common_actions, X_("About"), _("About"), mem_fun(*this, &ARDOUR_UI::show_splash));
|
ActionManager::register_action (common_actions, X_("About"), _("About"), mem_fun(*this, &ARDOUR_UI::show_about));
|
||||||
ActionManager::register_toggle_action (common_actions, X_("ToggleThemeManager"), _("Theme Manager"), mem_fun(*this, &ARDOUR_UI::toggle_theme_manager));
|
ActionManager::register_toggle_action (common_actions, X_("ToggleThemeManager"), _("Theme Manager"), mem_fun(*this, &ARDOUR_UI::toggle_theme_manager));
|
||||||
ActionManager::register_toggle_action (common_actions, X_("ToggleKeyEditor"), _("Keybindings"), mem_fun(*this, &ARDOUR_UI::toggle_key_editor));
|
ActionManager::register_toggle_action (common_actions, X_("ToggleKeyEditor"), _("Keybindings"), mem_fun(*this, &ARDOUR_UI::toggle_key_editor));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1200,6 +1200,7 @@ AudioRegionView::set_frame_color ()
|
||||||
(*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
(*w)->property_wave_color() = UINT_RGBA_CHANGE_A(ARDOUR_UI::config()->canvasvar_WaveForm.get(), MUTED_ALPHA);
|
||||||
} else {
|
} else {
|
||||||
(*w)->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
(*w)->property_wave_color() = ARDOUR_UI::config()->canvasvar_WaveForm.get();
|
||||||
|
(*w)->property_fill_color() = ARDOUR_UI::config()->canvasvar_WaveFormFill.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,10 @@ enum {
|
||||||
PROP_WAVE_COLOR,
|
PROP_WAVE_COLOR,
|
||||||
PROP_CLIP_COLOR,
|
PROP_CLIP_COLOR,
|
||||||
PROP_ZERO_COLOR,
|
PROP_ZERO_COLOR,
|
||||||
|
PROP_FILL_COLOR,
|
||||||
|
PROP_FILLED,
|
||||||
PROP_RECTIFIED,
|
PROP_RECTIFIED,
|
||||||
|
PROP_ZERO_LINE,
|
||||||
PROP_REGION_START,
|
PROP_REGION_START,
|
||||||
PROP_LOGSCALED,
|
PROP_LOGSCALED,
|
||||||
};
|
};
|
||||||
|
|
@ -266,6 +269,20 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
||||||
0, G_MAXUINT, 0,
|
0, G_MAXUINT, 0,
|
||||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(gobject_class,
|
||||||
|
PROP_FILL_COLOR,
|
||||||
|
g_param_spec_uint ("fill_color", NULL, NULL,
|
||||||
|
0, G_MAXUINT, 0,
|
||||||
|
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(gobject_class,
|
||||||
|
PROP_FILLED,
|
||||||
|
g_param_spec_boolean ("filled", NULL, NULL,
|
||||||
|
FALSE,
|
||||||
|
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||||
|
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(gobject_class,
|
(gobject_class,
|
||||||
PROP_RECTIFIED,
|
PROP_RECTIFIED,
|
||||||
|
|
@ -273,6 +290,13 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
||||||
FALSE,
|
FALSE,
|
||||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(gobject_class,
|
||||||
|
PROP_ZERO_LINE,
|
||||||
|
g_param_spec_boolean ("zero_line", NULL, NULL,
|
||||||
|
FALSE,
|
||||||
|
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||||
|
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(gobject_class,
|
(gobject_class,
|
||||||
PROP_LOGSCALED,
|
PROP_LOGSCALED,
|
||||||
|
|
@ -335,6 +359,8 @@ gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview)
|
||||||
waveview->gain_src = NULL;
|
waveview->gain_src = NULL;
|
||||||
waveview->rectified = FALSE;
|
waveview->rectified = FALSE;
|
||||||
waveview->logscaled = FALSE;
|
waveview->logscaled = FALSE;
|
||||||
|
waveview->filled = TRUE;
|
||||||
|
waveview->zero_line = FALSE;
|
||||||
waveview->region_start = 0;
|
waveview->region_start = 0;
|
||||||
waveview->samples_per_unit = 1.0;
|
waveview->samples_per_unit = 1.0;
|
||||||
waveview->amplitude_above_axis = 1.0;
|
waveview->amplitude_above_axis = 1.0;
|
||||||
|
|
@ -345,6 +371,7 @@ gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview)
|
||||||
waveview->wave_color = RGBA_TO_UINT(44,35,126,255);
|
waveview->wave_color = RGBA_TO_UINT(44,35,126,255);
|
||||||
waveview->clip_color = RGBA_TO_UINT(44,0,0,100);
|
waveview->clip_color = RGBA_TO_UINT(44,0,0,100);
|
||||||
waveview->zero_color = RGBA_TO_UINT(44,0,128,100);
|
waveview->zero_color = RGBA_TO_UINT(44,0,128,100);
|
||||||
|
waveview->fill_color = RGBA_TO_UINT(44,35,126,128);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -830,12 +857,34 @@ gnome_canvas_waveview_set_property (GObject *object,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_FILL_COLOR:
|
||||||
|
if (waveview->fill_color != g_value_get_uint(value)) {
|
||||||
|
waveview->fill_color = g_value_get_uint(value);
|
||||||
|
redraw = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROP_FILLED:
|
||||||
|
if (waveview->filled != g_value_get_boolean(value)) {
|
||||||
|
waveview->filled = g_value_get_boolean(value);
|
||||||
|
redraw = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case PROP_RECTIFIED:
|
case PROP_RECTIFIED:
|
||||||
if (waveview->rectified != g_value_get_boolean(value)) {
|
if (waveview->rectified != g_value_get_boolean(value)) {
|
||||||
waveview->rectified = g_value_get_boolean(value);
|
waveview->rectified = g_value_get_boolean(value);
|
||||||
redraw = TRUE;
|
redraw = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_ZERO_LINE:
|
||||||
|
if (waveview->zero_line != g_value_get_boolean(value)) {
|
||||||
|
waveview->zero_line = g_value_get_boolean(value);
|
||||||
|
redraw = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case PROP_LOGSCALED:
|
case PROP_LOGSCALED:
|
||||||
if (waveview->logscaled != g_value_get_boolean(value)) {
|
if (waveview->logscaled != g_value_get_boolean(value)) {
|
||||||
waveview->logscaled = g_value_get_boolean(value);
|
waveview->logscaled = g_value_get_boolean(value);
|
||||||
|
|
@ -950,10 +999,22 @@ gnome_canvas_waveview_get_property (GObject *object,
|
||||||
g_value_set_uint (value, waveview->zero_color);
|
g_value_set_uint (value, waveview->zero_color);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_FILL_COLOR:
|
||||||
|
g_value_set_uint (value, waveview->fill_color);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROP_FILLED:
|
||||||
|
g_value_set_boolean (value, waveview->filled);
|
||||||
|
break;
|
||||||
|
|
||||||
case PROP_RECTIFIED:
|
case PROP_RECTIFIED:
|
||||||
g_value_set_boolean (value, waveview->rectified);
|
g_value_set_boolean (value, waveview->rectified);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PROP_ZERO_LINE:
|
||||||
|
g_value_set_boolean (value, waveview->zero_line);
|
||||||
|
break;
|
||||||
|
|
||||||
case PROP_LOGSCALED:
|
case PROP_LOGSCALED:
|
||||||
g_value_set_boolean (value, waveview->logscaled);
|
g_value_set_boolean (value, waveview->logscaled);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1012,6 +1073,8 @@ gnome_canvas_waveview_update (GnomeCanvasItem *item, double *affine, ArtSVP *cli
|
||||||
&waveview->wave_a);
|
&waveview->wave_a);
|
||||||
UINT_TO_RGBA (waveview->clip_color, &waveview->clip_r, &waveview->clip_g, &waveview->clip_b,
|
UINT_TO_RGBA (waveview->clip_color, &waveview->clip_r, &waveview->clip_g, &waveview->clip_b,
|
||||||
&waveview->clip_a);
|
&waveview->clip_a);
|
||||||
|
UINT_TO_RGBA (waveview->fill_color, &waveview->fill_r, &waveview->fill_g, &waveview->fill_b,
|
||||||
|
&waveview->fill_a);
|
||||||
|
|
||||||
// check_cache (waveview, "end of update");
|
// check_cache (waveview, "end of update");
|
||||||
}
|
}
|
||||||
|
|
@ -1028,6 +1091,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
double half_height;
|
double half_height;
|
||||||
int x, end, begin;
|
int x, end, begin;
|
||||||
int zbegin, zend;
|
int zbegin, zend;
|
||||||
|
char rectify;
|
||||||
|
|
||||||
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||||
|
|
||||||
|
|
@ -1107,10 +1171,18 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
waveview->reload_cache_in_render = FALSE;
|
waveview->reload_cache_in_render = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
|
|
||||||
|
|
||||||
// check_cache (waveview, "post-ensure");
|
// check_cache (waveview, "post-ensure");
|
||||||
|
|
||||||
|
/* don't rectify at single-sample zoom */
|
||||||
|
if(waveview->rectified && waveview->samples_per_unit > 1) {
|
||||||
|
rectify = TRUE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rectify = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
clip_length = MIN(5,(waveview->height/4));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now draw each line, clipping it appropriately. The clipping
|
Now draw each line, clipping it appropriately. The clipping
|
||||||
is done by the macros PAINT_FOO().
|
is done by the macros PAINT_FOO().
|
||||||
|
|
@ -1119,9 +1191,332 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
half_height = waveview->half_height;
|
half_height = waveview->half_height;
|
||||||
|
|
||||||
/* this makes it slightly easier to comprehend whats going on */
|
/* this makes it slightly easier to comprehend whats going on */
|
||||||
|
|
||||||
#define origin half_height
|
#define origin half_height
|
||||||
|
|
||||||
|
if(waveview->filled && !rectify) {
|
||||||
|
int prev_pymin = 1;
|
||||||
|
int prev_pymax = 0;
|
||||||
|
int last_pymin = 1;
|
||||||
|
int last_pymax = 0;
|
||||||
|
int next_pymin, next_pymax;
|
||||||
|
double max, min;
|
||||||
|
int next_clip_max = 0;
|
||||||
|
int next_clip_min = 0;
|
||||||
|
|
||||||
|
if(s1 < waveview->samples_per_unit) {
|
||||||
|
/* we haven't got a prev vars to compare with, so outline the whole line here */
|
||||||
|
prev_pymax = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
|
||||||
|
prev_pymin = prev_pymax;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s1 -= waveview->samples_per_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(end == waveview->bbox_lrx) {
|
||||||
|
/* we don't have the NEXT vars for the last sample */
|
||||||
|
last_pymax = (int) rint ((item->y1 + origin) * item->canvas->pixels_per_unit);
|
||||||
|
last_pymin = last_pymax;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s2 += waveview->samples_per_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Compute the variables outside the rendering rect
|
||||||
|
*/
|
||||||
|
if(prev_pymax != prev_pymin) {
|
||||||
|
prev_pymax = (int) rint ((item->y1 + origin - MIN(waveview->cache->data[cache_index].max, 1.0) * half_height) * item->canvas->pixels_per_unit);
|
||||||
|
prev_pymin = (int) rint ((item->y1 + origin - MAX(waveview->cache->data[cache_index].min, -1.0) * half_height) * item->canvas->pixels_per_unit);
|
||||||
|
++cache_index;
|
||||||
|
}
|
||||||
|
if(last_pymax != last_pymin) {
|
||||||
|
/* take the index of one sample right of what we render */
|
||||||
|
int index = cache_index + (end - begin);
|
||||||
|
|
||||||
|
last_pymax = (int) rint ((item->y1 + origin - MIN(waveview->cache->data[index].max, 1.0) * half_height) * item->canvas->pixels_per_unit);
|
||||||
|
last_pymin = (int) rint ((item->y1 + origin - MAX(waveview->cache->data[index].min, -1.0) * half_height) * item->canvas->pixels_per_unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* initialize NEXT* variables for the first run, duplicated in the loop for speed
|
||||||
|
*/
|
||||||
|
max = waveview->cache->data[cache_index].max;
|
||||||
|
min = waveview->cache->data[cache_index].min;
|
||||||
|
|
||||||
|
if (max >= 1.0) {
|
||||||
|
max = 1.0;
|
||||||
|
next_clip_max = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (min <= -1.0) {
|
||||||
|
min = -1.0;
|
||||||
|
next_clip_min = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
max *= half_height;
|
||||||
|
min *= half_height;
|
||||||
|
|
||||||
|
next_pymax = (int) rint ((item->y1 + origin - max) * item->canvas->pixels_per_unit);
|
||||||
|
next_pymin = (int) rint ((item->y1 + origin - min) * item->canvas->pixels_per_unit);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* And now the loop
|
||||||
|
*/
|
||||||
|
for(x = begin; x < end; ++x) {
|
||||||
|
int clip_max = next_clip_max;
|
||||||
|
int clip_min = next_clip_min;
|
||||||
|
int fill_max, fill_min;
|
||||||
|
|
||||||
|
pymax = next_pymax;
|
||||||
|
pymin = next_pymin;
|
||||||
|
|
||||||
|
/* compute next */
|
||||||
|
if(x == end - 1) {
|
||||||
|
/*next is now the last column, which is outside the rendering rect, and possibly outside the region*/
|
||||||
|
next_pymax = last_pymax;
|
||||||
|
next_pymin = last_pymin;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
++cache_index;
|
||||||
|
|
||||||
|
max = waveview->cache->data[cache_index].max;
|
||||||
|
min = waveview->cache->data[cache_index].min;
|
||||||
|
|
||||||
|
next_clip_max = 0;
|
||||||
|
next_clip_min = 0;
|
||||||
|
|
||||||
|
if (max >= 1.0) {
|
||||||
|
max = 1.0;
|
||||||
|
next_clip_max = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (min <= -1.0) {
|
||||||
|
min = -1.0;
|
||||||
|
next_clip_min = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
max *= half_height;
|
||||||
|
min *= half_height;
|
||||||
|
|
||||||
|
next_pymax = (int) rint ((item->y1 + origin - max) * item->canvas->pixels_per_unit);
|
||||||
|
next_pymin = (int) rint ((item->y1 + origin - min) * item->canvas->pixels_per_unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* render */
|
||||||
|
if (pymax == pymin) {
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
|
||||||
|
} else {
|
||||||
|
if((prev_pymax < pymax && next_pymax < pymax) ||
|
||||||
|
(prev_pymax == pymax && next_pymax == pymax)) {
|
||||||
|
fill_max = pymax + 1;
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fill_max = MAX(prev_pymax, next_pymax);
|
||||||
|
if(pymax == fill_max) {
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax);
|
||||||
|
++fill_max;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PAINT_VERTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax, fill_max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if((prev_pymin > pymin && next_pymin > pymin) ||
|
||||||
|
(prev_pymin == pymin && next_pymin == pymin)) {
|
||||||
|
fill_min = pymin - 1;
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin-1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fill_min = MIN(prev_pymin, next_pymin);
|
||||||
|
if(pymin == fill_min) {
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PAINT_VERTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, fill_min, pymin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fill_max < fill_min) {
|
||||||
|
PAINT_VERTA(buf, waveview->fill_r, waveview->fill_g, waveview->fill_b, waveview->fill_a, x, fill_max, fill_min);
|
||||||
|
}
|
||||||
|
else if(fill_max == fill_min) {
|
||||||
|
PAINT_DOTA(buf, waveview->fill_r, waveview->fill_g, waveview->fill_b, waveview->fill_a, x, fill_max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip_max) {
|
||||||
|
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip_min) {
|
||||||
|
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymin-clip_length, pymin);
|
||||||
|
}
|
||||||
|
|
||||||
|
prev_pymax = pymax;
|
||||||
|
prev_pymin = pymin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(waveview->filled && rectify) {
|
||||||
|
int prev_pymax = -1;
|
||||||
|
int last_pymax = -1;
|
||||||
|
int next_pymax;
|
||||||
|
double max, min;
|
||||||
|
int next_clip_max = 0;
|
||||||
|
int next_clip_min = 0;
|
||||||
|
|
||||||
|
// for rectified, this stays constant throughout the loop
|
||||||
|
pymin = (int) rint ((item->y1 + waveview->height) * item->canvas->pixels_per_unit);
|
||||||
|
|
||||||
|
if(s1 < waveview->samples_per_unit) {
|
||||||
|
/* we haven't got a prev vars to compare with, so outline the whole line here */
|
||||||
|
prev_pymax = pymin;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s1 -= waveview->samples_per_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(end == waveview->bbox_lrx) {
|
||||||
|
/* we don't have the NEXT vars for the last sample */
|
||||||
|
last_pymax = pymin;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s2 += waveview->samples_per_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Compute the variables outside the rendering rect
|
||||||
|
*/
|
||||||
|
if(prev_pymax < 0) {
|
||||||
|
max = MIN(waveview->cache->data[cache_index].max, 1.0);
|
||||||
|
min = MAX(waveview->cache->data[cache_index].min, -1.0);
|
||||||
|
|
||||||
|
if (fabs (min) > fabs (max)) {
|
||||||
|
max = fabs (min);
|
||||||
|
}
|
||||||
|
|
||||||
|
prev_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
|
||||||
|
++cache_index;
|
||||||
|
}
|
||||||
|
if(last_pymax < 0) {
|
||||||
|
/* take the index of one sample right of what we render */
|
||||||
|
int index = cache_index + (end - begin);
|
||||||
|
|
||||||
|
max = MIN(waveview->cache->data[index].max, 1.0);
|
||||||
|
min = MAX(waveview->cache->data[index].min, -1.0);
|
||||||
|
|
||||||
|
if (fabs (min) > fabs (max)) {
|
||||||
|
max = fabs (min);
|
||||||
|
}
|
||||||
|
|
||||||
|
last_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* initialize NEXT* variables for the first run, duplicated in the loop for speed
|
||||||
|
*/
|
||||||
|
max = waveview->cache->data[cache_index].max;
|
||||||
|
min = waveview->cache->data[cache_index].min;
|
||||||
|
|
||||||
|
if (max >= 1.0) {
|
||||||
|
max = 1.0;
|
||||||
|
next_clip_max = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (min <= -1.0) {
|
||||||
|
min = -1.0;
|
||||||
|
next_clip_min = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fabs (min) > fabs (max)) {
|
||||||
|
max = fabs (min);
|
||||||
|
}
|
||||||
|
|
||||||
|
next_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* And now the loop
|
||||||
|
*/
|
||||||
|
for(x = begin; x < end; ++x) {
|
||||||
|
int clip_max = next_clip_max;
|
||||||
|
int clip_min = next_clip_min;
|
||||||
|
int fill_max;
|
||||||
|
|
||||||
|
pymax = next_pymax;
|
||||||
|
|
||||||
|
/* compute next */
|
||||||
|
if(x == end - 1) {
|
||||||
|
/*next is now the last column, which is outside the rendering rect, and possibly outside the region*/
|
||||||
|
next_pymax = last_pymax;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
++cache_index;
|
||||||
|
|
||||||
|
max = waveview->cache->data[cache_index].max;
|
||||||
|
min = waveview->cache->data[cache_index].min;
|
||||||
|
|
||||||
|
if (max >= 1.0) {
|
||||||
|
max = 1.0;
|
||||||
|
next_clip_max = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (min <= -1.0) {
|
||||||
|
min = -1.0;
|
||||||
|
next_clip_min = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fabs (min) > fabs (max)) {
|
||||||
|
max = fabs (min);
|
||||||
|
}
|
||||||
|
|
||||||
|
next_pymax = (int) rint ((item->y1 + waveview->height - max * waveview->height) * item->canvas->pixels_per_unit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* render */
|
||||||
|
if (pymax == pymin) {
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymin);
|
||||||
|
} else {
|
||||||
|
if((prev_pymax < pymax && next_pymax < pymax) ||
|
||||||
|
(prev_pymax == pymax && next_pymax == pymax)) {
|
||||||
|
fill_max = pymax + 1;
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fill_max = MAX(prev_pymax, next_pymax);
|
||||||
|
if(pymax == fill_max) {
|
||||||
|
PAINT_DOTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax);
|
||||||
|
++fill_max;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PAINT_VERTA(buf, waveview->wave_r, waveview->wave_g, waveview->wave_b, waveview->wave_a, x, pymax, fill_max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fill_max < pymin) {
|
||||||
|
PAINT_VERTA(buf, waveview->fill_r, waveview->fill_g, waveview->fill_b, waveview->fill_a, x, fill_max, pymin);
|
||||||
|
}
|
||||||
|
else if(fill_max == pymin) {
|
||||||
|
PAINT_DOTA(buf, waveview->fill_r, waveview->fill_g, waveview->fill_b, waveview->fill_a, x, pymin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip_max) {
|
||||||
|
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip_min) {
|
||||||
|
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymin-clip_length, pymin);
|
||||||
|
}
|
||||||
|
|
||||||
|
prev_pymax = pymax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
|
||||||
|
|
||||||
for (x = begin; x < end; x++) {
|
for (x = begin; x < end; x++) {
|
||||||
|
|
||||||
|
|
@ -1144,9 +1539,7 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
clip_min = 1;
|
clip_min = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't rectify at single-sample zoom */
|
if (rectify) {
|
||||||
|
|
||||||
if (waveview->rectified && waveview->samples_per_unit > 1) {
|
|
||||||
|
|
||||||
if (fabs (min) > fabs (max)) {
|
if (fabs (min) > fabs (max)) {
|
||||||
max = fabs (min);
|
max = fabs (min);
|
||||||
|
|
@ -1178,10 +1571,6 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
|
|
||||||
/* show clipped waveforms with small red lines */
|
/* show clipped waveforms with small red lines */
|
||||||
|
|
||||||
if (clip_max || clip_min) {
|
|
||||||
clip_length = MIN(5,(waveview->height/4));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (clip_max) {
|
if (clip_max) {
|
||||||
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
|
PAINT_VERTA(buf, waveview->clip_r, waveview->clip_g, waveview->clip_b, waveview->clip_a, x, pymax, pymax+clip_length);
|
||||||
}
|
}
|
||||||
|
|
@ -1194,8 +1583,9 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||||
|
|
||||||
cache_index++;
|
cache_index++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!waveview->rectified) {
|
if (!waveview->rectified && waveview->zero_line) {
|
||||||
// Paint zeroline.
|
// Paint zeroline.
|
||||||
//PAINT_HORIZA(buf, waveview->zero_r, waveview->zero_g, waveview->zero_b, waveview->zero_a, begin, endi-1, origin );
|
//PAINT_HORIZA(buf, waveview->zero_r, waveview->zero_g, waveview->zero_b, waveview->zero_a, begin, endi-1, origin );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,11 @@ struct _GnomeCanvasWaveView
|
||||||
uint32_t wave_color;
|
uint32_t wave_color;
|
||||||
uint32_t clip_color;
|
uint32_t clip_color;
|
||||||
uint32_t zero_color;
|
uint32_t zero_color;
|
||||||
|
uint32_t fill_color;
|
||||||
|
|
||||||
|
char filled;
|
||||||
char rectified;
|
char rectified;
|
||||||
|
char zero_line;
|
||||||
char logscaled;
|
char logscaled;
|
||||||
|
|
||||||
/* These are updated by the update() routine
|
/* These are updated by the update() routine
|
||||||
|
|
@ -116,6 +119,7 @@ struct _GnomeCanvasWaveView
|
||||||
int32_t bbox_lry;
|
int32_t bbox_lry;
|
||||||
unsigned char wave_r, wave_g, wave_b, wave_a;
|
unsigned char wave_r, wave_g, wave_b, wave_a;
|
||||||
unsigned char clip_r, clip_g, clip_b, clip_a;
|
unsigned char clip_r, clip_g, clip_b, clip_a;
|
||||||
|
unsigned char fill_r, fill_g, fill_b, fill_a;
|
||||||
uint32_t samples;
|
uint32_t samples;
|
||||||
uint32_t region_start;
|
uint32_t region_start;
|
||||||
int32_t reload_cache_in_render;
|
int32_t reload_cache_in_render;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
CANVAS_VARIABLE(canvasvar_WaveForm, "waveform")
|
CANVAS_VARIABLE(canvasvar_WaveForm, "waveform")
|
||||||
|
CANVAS_VARIABLE(canvasvar_WaveFormFill, "waveform fill")
|
||||||
CANVAS_VARIABLE(canvasvar_WaveFormClip, "clipped waveform")
|
CANVAS_VARIABLE(canvasvar_WaveFormClip, "clipped waveform")
|
||||||
CANVAS_VARIABLE(canvasvar_FrameBase, "region base")
|
CANVAS_VARIABLE(canvasvar_FrameBase, "region base")
|
||||||
CANVAS_VARIABLE(canvasvar_SelectedFrameBase, "selected region base")
|
CANVAS_VARIABLE(canvasvar_SelectedFrameBase, "selected region base")
|
||||||
|
|
|
||||||
|
|
@ -59,16 +59,6 @@ extern int curvetest (string);
|
||||||
static ARDOUR_UI *ui = 0;
|
static ARDOUR_UI *ui = 0;
|
||||||
static char* localedir = LOCALEDIR;
|
static char* localedir = LOCALEDIR;
|
||||||
|
|
||||||
gint
|
|
||||||
show_ui_callback (void *arg)
|
|
||||||
{
|
|
||||||
ARDOUR_UI * ui = (ARDOUR_UI *) arg;
|
|
||||||
|
|
||||||
ui->hide_splash();
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
|
|
@ -335,13 +325,6 @@ int main (int argc, char* argv[])
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!no_splash) {
|
|
||||||
ui->show_splash ();
|
|
||||||
if (session_name.length()) {
|
|
||||||
g_timeout_add (4000, show_ui_callback, ui);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_keybindings (ui);
|
setup_keybindings (ui);
|
||||||
|
|
||||||
ui->run (text_receiver);
|
ui->run (text_receiver);
|
||||||
|
|
|
||||||
|
|
@ -378,12 +378,9 @@ NewSessionDialog::NewSessionDialog()
|
||||||
title += _("Session Control");
|
title += _("Session Control");
|
||||||
set_title(title.get_string());
|
set_title(title.get_string());
|
||||||
|
|
||||||
//set_modal(false);
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
//property_window_position().set_value(Gtk::WIN_POS_NONE);
|
|
||||||
set_resizable(false);
|
set_resizable(false);
|
||||||
//property_destroy_with_parent().set_value(false);
|
|
||||||
set_has_separator(false);
|
set_has_separator(false);
|
||||||
// add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
|
|
||||||
add_button(Gtk::Stock::QUIT, Gtk::RESPONSE_CANCEL);
|
add_button(Gtk::Stock::QUIT, Gtk::RESPONSE_CANCEL);
|
||||||
add_button(Gtk::Stock::CLEAR, Gtk::RESPONSE_NONE);
|
add_button(Gtk::Stock::CLEAR, Gtk::RESPONSE_NONE);
|
||||||
m_okbutton = add_button(Gtk::Stock::NEW, Gtk::RESPONSE_OK);
|
m_okbutton = add_button(Gtk::Stock::NEW, Gtk::RESPONSE_OK);
|
||||||
|
|
@ -906,7 +903,7 @@ NewSessionDialog::template_chosen ()
|
||||||
void
|
void
|
||||||
NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col)
|
NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col)
|
||||||
{
|
{
|
||||||
response (Gtk::RESPONSE_YES);
|
response (Gtk::RESPONSE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,9 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
||||||
|
|
||||||
label_view ();
|
label_view ();
|
||||||
|
|
||||||
if (!Profile->get_sae()) {
|
if (0) {
|
||||||
|
|
||||||
|
/* old school - when we used to put an extra row of buttons in place */
|
||||||
|
|
||||||
controls_table.attach (hide_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
controls_table.attach (hide_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||||
controls_table.attach (visual_button, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
controls_table.attach (visual_button, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||||
|
|
@ -185,11 +187,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
controls_table.attach (automation_button, 4, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
controls_table.attach (automation_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_track() && track()->mode() == ARDOUR::Normal) {
|
if (is_track() && track()->mode() == ARDOUR::Normal) {
|
||||||
controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
controls_table.attach (playlist_button, 4, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
y_position = -1;
|
y_position = -1;
|
||||||
|
|
|
||||||
55
gtk2_ardour/splash.cc
Normal file
55
gtk2_ardour/splash.cc
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <pbd/failed_constructor.h>
|
||||||
|
#include <ardour/ardour.h>
|
||||||
|
|
||||||
|
#include "splash.h"
|
||||||
|
|
||||||
|
using namespace Gtk;
|
||||||
|
using namespace Glib;
|
||||||
|
using namespace std;
|
||||||
|
using namespace ARDOUR;
|
||||||
|
|
||||||
|
Splash::Splash ()
|
||||||
|
{
|
||||||
|
string path = find_data_file ("splash.png");
|
||||||
|
|
||||||
|
if (path.empty()) {
|
||||||
|
throw failed_constructor();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
pixbuf = Gdk::Pixbuf::create_from_file (path);
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (...) {
|
||||||
|
throw failed_constructor();
|
||||||
|
}
|
||||||
|
|
||||||
|
set_size_request (pixbuf->get_width(), pixbuf->get_height());
|
||||||
|
set_type_hint (Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
|
||||||
|
set_keep_above (true);
|
||||||
|
set_position (WIN_POS_CENTER);
|
||||||
|
add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Splash::on_button_release_event (GdkEventButton* ev)
|
||||||
|
{
|
||||||
|
hide ();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Splash::on_expose_event (GdkEventExpose* ev)
|
||||||
|
{
|
||||||
|
RefPtr<Gdk::Window> window = get_window();
|
||||||
|
|
||||||
|
Window::on_expose_event (ev);
|
||||||
|
|
||||||
|
window->draw_pixbuf (get_style()->get_bg_gc (STATE_NORMAL), pixbuf,
|
||||||
|
ev->area.x, ev->area.y,
|
||||||
|
ev->area.x, ev->area.y,
|
||||||
|
ev->area.width, ev->area.height,
|
||||||
|
Gdk::RGB_DITHER_NONE, 0, 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
41
gtk2_ardour/splash.h
Normal file
41
gtk2_ardour/splash.h
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
Copyright (C) 2008 Paul Davis
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ardour_gtk_splash_h__
|
||||||
|
#define __ardour_gtk_splash_h__
|
||||||
|
|
||||||
|
#include <gtkmm/window.h>
|
||||||
|
#include <gdkmm/pixbuf.h>
|
||||||
|
|
||||||
|
class ARDOUR_UI;
|
||||||
|
|
||||||
|
class Splash : public Gtk::Window
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Splash ();
|
||||||
|
~Splash () {}
|
||||||
|
|
||||||
|
bool on_expose_event (GdkEventExpose*);
|
||||||
|
bool on_button_release_event (GdkEventButton*);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ardour_gtk_splash_h__ */
|
||||||
|
|
@ -125,7 +125,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
|
||||||
controls_table.set_col_spacings (0);
|
controls_table.set_col_spacings (0);
|
||||||
controls_table.set_homogeneous (true);
|
controls_table.set_homogeneous (true);
|
||||||
|
|
||||||
controls_table.attach (name_hbox, 0, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
controls_table.attach (name_hbox, 0, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 3, 0);
|
||||||
controls_table.show_all ();
|
controls_table.show_all ();
|
||||||
controls_table.set_no_show_all ();
|
controls_table.set_no_show_all ();
|
||||||
|
|
||||||
|
|
@ -140,8 +140,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
|
||||||
controls_ebox.signal_button_release_event().connect (mem_fun (*this, &TimeAxisView::controls_ebox_button_release));
|
controls_ebox.signal_button_release_event().connect (mem_fun (*this, &TimeAxisView::controls_ebox_button_release));
|
||||||
controls_ebox.signal_scroll_event().connect (mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true);
|
controls_ebox.signal_scroll_event().connect (mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true);
|
||||||
|
|
||||||
controls_lhs_pad.set_name ("TimeAxisViewControlsPadding");
|
|
||||||
controls_hbox.pack_start (controls_lhs_pad,false,false);
|
|
||||||
controls_hbox.pack_start (controls_ebox,true,true);
|
controls_hbox.pack_start (controls_ebox,true,true);
|
||||||
controls_hbox.show ();
|
controls_hbox.show ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,22 @@ Glib::PropertyProxy_ReadOnly<guint> WaveView::property_zero_color() const
|
||||||
{
|
{
|
||||||
return Glib::PropertyProxy_ReadOnly<guint> (this, "zero_color");
|
return Glib::PropertyProxy_ReadOnly<guint> (this, "zero_color");
|
||||||
}
|
}
|
||||||
|
Glib::PropertyProxy<guint> WaveView::property_fill_color()
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy<guint> (this, "fill_color");
|
||||||
|
}
|
||||||
|
Glib::PropertyProxy_ReadOnly<guint> WaveView::property_fill_color() const
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy_ReadOnly<guint> (this, "fill_color");
|
||||||
|
}
|
||||||
|
Glib::PropertyProxy<gint> WaveView::property_filled()
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy<gint> (this, "filled");
|
||||||
|
}
|
||||||
|
Glib::PropertyProxy_ReadOnly<gint> WaveView::property_filled() const
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy_ReadOnly<gint> (this, "filled");
|
||||||
|
}
|
||||||
Glib::PropertyProxy<gint> WaveView::property_rectified()
|
Glib::PropertyProxy<gint> WaveView::property_rectified()
|
||||||
{
|
{
|
||||||
return Glib::PropertyProxy<gint> (this, "rectified");
|
return Glib::PropertyProxy<gint> (this, "rectified");
|
||||||
|
|
@ -275,6 +291,14 @@ Glib::PropertyProxy_ReadOnly<gint> WaveView::property_rectified() const
|
||||||
{
|
{
|
||||||
return Glib::PropertyProxy_ReadOnly<gint> (this, "rectified");
|
return Glib::PropertyProxy_ReadOnly<gint> (this, "rectified");
|
||||||
}
|
}
|
||||||
|
Glib::PropertyProxy<gint> WaveView::property_zero_line()
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy<gint> (this, "zero_line");
|
||||||
|
}
|
||||||
|
Glib::PropertyProxy_ReadOnly<gint> WaveView::property_zero_line() const
|
||||||
|
{
|
||||||
|
return Glib::PropertyProxy_ReadOnly<gint> (this, "zero_line");
|
||||||
|
}
|
||||||
Glib::PropertyProxy<guint> WaveView::property_region_start()
|
Glib::PropertyProxy<guint> WaveView::property_region_start()
|
||||||
{
|
{
|
||||||
return Glib::PropertyProxy<guint> (this, "region_start");
|
return Glib::PropertyProxy<guint> (this, "region_start");
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,15 @@ public:
|
||||||
Glib::PropertyProxy_ReadOnly<guint> property_wave_color() const;
|
Glib::PropertyProxy_ReadOnly<guint> property_wave_color() const;
|
||||||
Glib::PropertyProxy<guint> property_clip_color();
|
Glib::PropertyProxy<guint> property_clip_color();
|
||||||
Glib::PropertyProxy_ReadOnly<guint> property_clip_color() const;
|
Glib::PropertyProxy_ReadOnly<guint> property_clip_color() const;
|
||||||
Glib::PropertyProxy<gint> property_rectified();
|
Glib::PropertyProxy<guint> property_fill_color();
|
||||||
|
Glib::PropertyProxy_ReadOnly<guint> property_fill_color() const;
|
||||||
|
Glib::PropertyProxy<gint> property_filled();
|
||||||
|
Glib::PropertyProxy_ReadOnly<gint> property_filled() const;
|
||||||
|
Glib::PropertyProxy<gint> property_zero_line();
|
||||||
|
Glib::PropertyProxy_ReadOnly<gint> property_zero_line() const;
|
||||||
Glib::PropertyProxy<guint> property_zero_color();
|
Glib::PropertyProxy<guint> property_zero_color();
|
||||||
Glib::PropertyProxy_ReadOnly<guint> property_zero_color() const;
|
Glib::PropertyProxy_ReadOnly<guint> property_zero_color() const;
|
||||||
|
Glib::PropertyProxy<gint> property_rectified();
|
||||||
Glib::PropertyProxy_ReadOnly<gint> property_rectified() const;
|
Glib::PropertyProxy_ReadOnly<gint> property_rectified() const;
|
||||||
Glib::PropertyProxy<guint> property_region_start();
|
Glib::PropertyProxy<guint> property_region_start();
|
||||||
Glib::PropertyProxy_ReadOnly<guint> property_region_start() const;
|
Glib::PropertyProxy_ReadOnly<guint> property_region_start() const;
|
||||||
|
|
|
||||||
|
|
@ -526,6 +526,11 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
|
||||||
|
|
||||||
commit_should_unlock = false;
|
commit_should_unlock = false;
|
||||||
|
|
||||||
|
if (!_io->active()) {
|
||||||
|
_processed = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
check_record_status (transport_frame, nframes, can_record);
|
check_record_status (transport_frame, nframes, can_record);
|
||||||
|
|
||||||
nominally_recording = (can_record && re);
|
nominally_recording = (can_record && re);
|
||||||
|
|
@ -742,6 +747,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
|
||||||
nframes_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1];
|
nframes_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1];
|
||||||
|
|
||||||
if (necessary_samples > total) {
|
if (necessary_samples > total) {
|
||||||
|
cerr << "underrun for " << _name << endl;
|
||||||
DiskUnderrun ();
|
DiskUnderrun ();
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
@ -825,6 +831,10 @@ AudioDiskstream::commit (nframes_t nframes)
|
||||||
{
|
{
|
||||||
bool need_butler = false;
|
bool need_butler = false;
|
||||||
|
|
||||||
|
if (!_io->active()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (_actual_speed < 0.0) {
|
if (_actual_speed < 0.0) {
|
||||||
playback_sample -= playback_distance;
|
playback_sample -= playback_distance;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __ardour_svn_revision_h__
|
#ifndef __ardour_svn_revision_h__
|
||||||
#define __ardour_svn_revision_h__
|
#define __ardour_svn_revision_h__
|
||||||
static const char* ardour_svn_revision = "2914";
|
static const char* ardour_svn_revision = "2918";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue