start of a nominal debug tracing system, with 64 bits available for flags; track notes by region in MidiPlaylist, and resolve them if they are left hanging at region boundaries. note: MIDI playback is still not working 100% though its better now.

git-svn-id: svn://localhost/ardour2/branches/3.0@5902 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-10-24 13:26:26 +00:00
parent a532e7247c
commit dbc75e0749
2 changed files with 49 additions and 1 deletions

View File

@ -18,9 +18,11 @@
*/
#include <getopt.h>
#include <string.h>
#include <iostream>
#include <cstdlib>
#include "ardour/debug.h"
#include "ardour/session.h"
#include "opts.h"
@ -54,6 +56,7 @@ print_help (const char *execname)
<< _(" -b, --bindings Print all possible keyboard binding names\n")
<< _(" -c, --name <name> Use a specific jack client name, default is ardour\n")
<< _(" -d, --disable-plugins Disable all plugins in an existing session\n")
<< _(" -D, --debug <options> Set debug flags. Use \"-D list\" to see available options\n")
<< _(" -n, --show-splash Show splash screen\n")
<< _(" -m, --menus file Use \"file\" for Ardour menus\n")
<< _(" -N, --new session-name Create a new session from the command line\n")
@ -71,10 +74,47 @@ print_help (const char *execname)
}
static void
list_debug_options ()
{
cerr << _("The following debug options are available. Their use is case-insensitive.\n\n");
cerr << "\tMidiSourceIO\n";
}
static int
parse_debug_options (const char* str)
{
char* p;
char* sp;
uint64_t bits = 0;
char* copy = strdup (str);
p = strtok_r (copy, ",", &sp);
while (p) {
if (strcasecmp (p, "list") == 0) {
list_debug_options ();
free (copy);
return 1;
}
if (strcasecmp (p, "midisourceio") == 0) {
bits |= ARDOUR::DEBUG::MidiSourceIO;
}
p = strtok_r (0, ",", &sp);
}
free (copy);
ARDOUR::set_debug_bits (bits);
return 0;
}
int
ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
{
const char *optstring = "U:hSbvVnOdc:C:m:N:k:p:E:";
const char *optstring = "bc:C:dD:hk:E:m:N:nOp:SU:vV";
const char *execname = strrchr (argv[0], '/');
if (getenv ("ARDOUR_SAE")) {
@ -92,6 +132,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
{ "version", 0, 0, 'v' },
{ "help", 0, 0, 'h' },
{ "bindings", 0, 0, 'b' },
{ "debug", 1, 0, 'D' },
{ "show-splash", 0, 0, 'n' },
{ "menus", 1, 0, 'm' },
{ "name", 1, 0, 'c' },
@ -134,6 +175,12 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
ARDOUR::Session::set_disable_all_loaded_plugins (true);
break;
case 'D':
if (parse_debug_options (optarg)) {
exit (0);
}
break;
case 'm':
menus_file = optarg;
break;

View File

@ -123,6 +123,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
playlist_menu = 0;
playlist_action_menu = 0;
automation_action_menu = 0;
mode_menu = 0;
_view = 0;
if (!_route->is_hidden()) {