diff -Nru qjackctl-0.3.4/AUTHORS qjackctl-0.3.6/AUTHORS --- qjackctl-0.3.4/AUTHORS 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/AUTHORS 2003-07-26 22:07:57.000000000 +0100 @@ -0,0 +1 @@ +Rui Nuno Capela diff -Nru qjackctl-0.3.4/ChangeLog qjackctl-0.3.6/ChangeLog --- qjackctl-0.3.4/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/ChangeLog 2010-03-09 18:47:23.000000000 +0000 @@ -0,0 +1,1083 @@ +QjackCtl - JACK Audio Connection Kit Qt GUI Interface +----------------------------------------------------- + +ChangeLog + +0.3.6 2010-03-09 Full D-Busification! + +- Make sure socket names are unique on each side of the Patchbay + (another patch from Dominic Sacre, thanks). + +- A bunch of primitive D-Bus interface slots have been added, + allowing shortcut access to most of main applications actions + like toggling Messages, Status, Connections, Patchbay widget + pop-ups, reset stats, transport and so on. New bindings are + given eg. via dbus-send --system / org.rncbc.qjackctl.(main, + messages, status, connections, patchbay, setup, about, reset, + rewind, backward, play, pause, forward). (from an original + idea from Sebastian Gutsfeld, thanks). + +- Patchbay snapshot now tolerates JACK client port strings that + have more than one semi-colon in it, honoring just the first + one exactly as everywhere else eg. Connections. (a glitch as + reported by Geoff Beasley while using a2jmidid). + +- Most modal message dialog boxes (eg. critical errors) are now + replaced by system tray icon bubble messages where available + (mitigating feature request #2936455). + +- Comply with jackd >= 0.118.0 which now runs in real-time mode by + default; use of -R is now deprecated from the jackd command line + interface options; use -r to run in non-real-time-scheduling. + +- A man page has beed added. + +- Got rid of a pretty old and never really useful "jackd-realtime" + server path option--actually, it was only seen available on the + now defunct old Mandrake Linux distro. + +- D-Bus support, as provided by org.jackaudio.service aka jackdbus, + is now being introduced and used wherever available and whenever + enabled. Configuring, starting, stopping and logging the JACK + back-end server through the "infamous" jackdbus service is now + being seamlessly exploited. + +- Global configuration state is now explicitly saved/committed to + disk when Setup dialog changes are accepted and applied. + +- Server name command line option added (-n, --server-name). + +- Single application instance restriction option added (X11). + +- Setup for the netjack (slave) "net" driver has now sample-rate + and frames per buffer (period size) settings disabled and/or + ignored, as those are pretty much auto-detected by default; + also, a new "netone" backend driver option has been introduced + (as suggested by Torben Hohn). + +- Czech (cs) translation added (by Pavel Fric). + +- Fixed some main window keyboard shortcuts. Escape key now closes + Connections, Patchbay, Status and Messages widgets as usual (bug + #2871548). + +- Fixed glitch on configure portaudio support, specially when the + library is not detected as available. + + +0.3.5 2009-09-30 Slipped away! + +- Late support for UTF-8 encoded client/port names. + +- Allow only one single patchbay connection to or from an exclusive + socket (mitigating bug #2859119). + +- Automatic crash-dump reports, debugger stack-traces (gdb), back- + traces, whatever, are being introduced as a brand new configure + option (--enable-stacktrace) and default enabled on debug build + targets (--enable-debug). + +- Probable fix on the audio connections with regard to client/port + (re)name changes (an ancient bug reported by Fons Adriaensen). + +- Portaudio device selector is now available (after a patch handed + by Torben Hohn and Stephane Letz). + +- A couple of primitive D-Bus interface slots have been introduced, + giving the option to start/stop the jackd server from the system + bus eg. via dbus-send --system / org.rncbc.qjackctl.start (.stop), + (a nice addition supplied by Robin Gareus, thanks). + +- New command line option (-a, --active-patchbay=[path]) to specify + and activate a given patchbay definition file (a simple patch sent + by John Schneiderman, thanks). + +- Added one significant digit to DSP Load percentage status display. + +- Tentative support for netjack (slave) by adding the "net" driver to + the existing backend driver options on the Setup/Settings section. + +- Converted obsolete QMessageBox forms to standard buttons. + +- New patchbay snapshot now raises the dirty flag and allows for the + immediate salvage of patchbay definition profile. + +- Conditional build for JACK port aliases support (JACK >= 0.109.2). + +- Alternate icon sizes other than default 16x16, are now effective to + the Connections widget (Setup/Dislay/Connections Window/Icon size). + + +0.3.4 2008-12-05 Patchbay snapshot revamp. + +- Introducing the very first and complete translations in-package: + German (de), Spanish (es), French (fr) and Russian (ru); credits + in TRANSLATORS. + +- At last, after years of retarded procrastination, the old infamous + patchbay snapshot feature has been the subject of a almost complete + rewrite and it does try to give a way better mapping of all actual + and current running client/port connections, both JACK (audio, MIDI) + and ALSA MIDI, of course ;) + +- On Setup/Settings/Parameters dialog, all device selection options + are now reset to default when disabled interactively. + +- Grayed/disabled palette color group fix for dark color themes. + +- Qt Software logo update. + +- Fait-divers: desktop menu file touched to openSUSE conventions. + +- ALSA PCM devices now only listed/enumerated iif strictly compliant + with the audio mode criteria (Duplex, Capture-only or Playback-only) + as kindly suggested by Nedko Ardaunov. + +- JACK client/port aliases may now be displayed as a global user option + (see Setup/Display/Connections/JACK client/port aliases). + +- Lighten up the connections line and highlight colors, as seen to fit + best on some darker background themes. + +- Patchbay snapshot fixed to differentiate socket clients according + to its type (Audio, MIDI or ALSA-Seq), avoiding the mess and gross + mistake of hanging disparate type ports under the same client item. + +- JACK_DEFAULT_SERVER environment variable is now appended to the X11 + unique application identifier, allowing for having multiple instances + each controlling its own JACK server, besides the default one. + +- Due to some trouble with newer Qt >= 4.4 applications regarding font + size configuration, a new global user option is now available to the + rescue: Setup/Misc/Defaults/Base font size (default is no-op). + + +0.3.3 2008-06-07 Patchbay JACK-MIDI, file logging and X11 uniqueness. + +- Attempt to load Qt's own translation support and get rid of + the ever warning startup message, unless built in debug mode. + (transaction by Guido Scholz, while on qsynth-devel, thanks). + +- Messages file logging makes its first long overdue appearance, + with user configurable settings in Setup/Options/Logging. + +- Only one application instance is now allowed to be up and running, + with immediate but graceful termination upon startup iif an already + running instance is detected, which will see its main widget shown + up and the server started automatically (Qt/X11 platform only). + +- Finally, full JACK MIDI support sneaks into the patchbay; socket + types now differ in Audio, MIDI and ALSA, following the very same + nomenclature as found on the Connections widget tabs. + +- Sun driver support (by Jacob Meuser). + +- Delay window positioning at startup option is now being disabled, + on the Setup/Misc tab, when Minimize to system tray is enabled. + +- Cosmetic fix: Setup/Settings tab, 'Input Device' text label was + using a slightly smaller font than the rest of the application + (bug#1872545, reported by Jouni Rinne). + + +0.3.2 2007-12-20 Patchbay heads-up with season greetings. + +- Patchbay port matching has been slightly extended, this time + allowing for the multiple or as many-to-many connections between + socket plugs, provided these are specified in proper regex form + (after a patch proposed by Dave Moore, thanks). + +- A new option to start the program minimized when the system tray + icon is enabled, is now available from Setup/Misc/Start minimized + to system tray (as kindly suggested by Marc-Olivier Barre). + +- Regression from QSystemTrayIcon (Qt4 >= 4.2) implementation, at + least on X11 environments: while the main application widget was + minimized to the system-tray, closing any other top-level widget + was causing the immediate and unexpected application shutdown. + +- Some portaudio backend settings are now being enabled, specially + suited for the jackdmp flavouring. + +- Server mode display blinking, usually shown as the RT indicator, + is now an option (Setup/Display/Blink server mode indicator when + started). + +- Tool/child windows position and size preservation fixed. + +- The connections/patchbay auto-refresh option has been finally + removed due to several user requests, although deprecated for + quite some time now it has been the probable cause of some + periodic xrun occurrences due to graph-locking in jackd (while + making Geoff Beasley angry in the process:). + +- Messages line limit was not being checked, now honored. + +- Simple as it could ever be, the build executive summary report + is now given on configure. + +- Patchbay snapshot ot its socket and port ordering back. + +- ALSA Sequencer support is now an optional feature on setup, + preventing the annoying "MIDI patchbay will be not available" + warning message, ruining window placement on Linux systems + where the snd-midi-seq kernel module is not loaded or not + favorable (eg. OSS) at startup (by request from Jussi Laako). + +- Get configure to try and detect the correct qmake location and + insert it the search order, so let the qt4 tools take precedence + when --with-qt option is given and older qt3 ones coexist and + are found located ahead in the PATH. + +- The connections widget is now being properly refreshed, due to + some quirk in the QTreeWidget which was preventing some items, + specially the expanded ones, to disappear in the void. Meanwhile, + with a hand from Stephane Letz, the client/port lookup method was + changed to prevent duplicated, missing entries or worse, crashes + due to weird behaved windows applications. + +- The xrun count stats can now be reset simply by middle clicking + on the systray icon or the main window's display area (thanks to + patch sent by Dominic Sacre). + +- An improved version of the "shiny" background image was issued. + The original somehow looked like two different images put together, + probably most apparent on a bright TFT screen (by Dominic Sacre). + +- A warning is now being issued, asking whether one wants to remove + a corresponding Patchbay connection, when client/ports are being + disconnected over the Connections window, thus avoiding automatic + reconnection annoyance due to normal active Patchbay behavior. + +- The infamous "Keep child windows always on top" global option is + now supposed to behave a little better when disabled, layering + child windows as naturally as far the window manager dictates. + +- Input/Output Channel setting is now allowed to be greater than 32; + the special default text is now displayed, also on Input/Output + Latency and Priority settings spin-boxes. + +- Andreas Persson just sent a patch that makes it possible to compile + and run qjackctl with Qt version 4.1. Applied without hesitation, + thanks. + + +0.3.1a 2007-07-19 System-tray tooltip icon crash fix. + +- An immediate showstopper crash upon client start was irradicated, + which was affecting those with the system-tray icon disabled, + as is the default (thanks to Ken Ellinwood for first reporting + this sloppy one). + + +0.3.1 2007-07-18 Shallowed bug-fix release. + +- The current DSP load percentage activity is now also displayed on + the system-tray icon tooltip. + +- An illusive but nasty Connections/Patchbay item tooltip crash bug + has been hopefully fixed (Qt >= 4.3). + +- Now using QSystemTrayIcon class facility if available (Qt4 >= 4.2) + making the system-tray option available on most platforms, notably + on Windows and Mac OS X. + +- Usage of QProcess class has been severely refactored, now using + QProcess::start() instead of QProcess::startDetached(), giving + much tighter control over the started jackd(mp) process. Downside + is that QjackCtl lost its ability and option to leave the process + detached upon quitting the application. Too bad. + +- A new eye-candy bit has sneaked in: server mode display, that is + the RT indicator, now blinks when server/client is started/active. + +- Combo-box setup history has been corrected on restore, which was + discarding the very initial default (factory) contents. + +- Now that Qt4 is accessible to open-source Windows appplications, + there's some experimental stuff sneaking in for jackdmp support + on win32 (http://www.grame.fr/~letz/jackdmp.html). + +- Connections list items were initially sorted in descending order + by default. Fixed. Client items are now naturally sorted, again. + + +0.3.0 2007-07-10 Qt4 migration was complete. + +- Qt4 migration was complete. Care must be taken with this new + configuration file and location: this release starts a new one + from scratch and won't reuse any of the previous existing ones, + although cut and paste might help if you know what you're doing :) + +- On a last-minute addition, the "firewire" audio backend driver + option has been also included, supporting the ffado.org project + which is evolving where "freebob" is leaving (thanks to Klaus + Zimmermann for this one). + + +0.2.23 2007-07-02 JACK MIDI support debut. + +- JACK MIDI support is now being introduced. Connections window + now has a brand new MIDI tab, the older being renamed to ALSA, + as for the ALSA/MIDI sequencer conveniency. The server settings + now include the MIDI driver setup option (ALSA backend only). + +- Application icon is now installed to ${prefix}/share/pixmaps; + application desktop entry file is now included in installation; + spec file (RPM) is now a bit more openSUSE compliant; initial + debianization. + +- Invalidation of the JACK client handle is now forced right on + jack_shutdown notification, preventing a most probable fatal + crash due to jack_deactivate and/or jack_client_close being + called after the jack_watchdog kicks in. + +- Default font option names were adjusted to "Sans Serif" and + "Monospace", wherever available. + +- The "keep child windows always on top" option is not set as + default anymore, because window focus behavior gets tricky + on some desktop environments (eg. Mac OS X, Gnome). + +- Autoconf (configure) scripting gets an update. + + +0.2.22 2007-03-31 Long overdue but better late than never. + +- Fixed default settings for the freebob backend (JACK >= 0.103.0). + +- CPU Load status label now says correctly DSP Load. + +- The most recently used patchbay definitions can now be correctly + selected in round-robin fashion from its drop-down list widget. + +- Avoid mixing JACK MIDI ports with regular audio ports on the + Connections and Patchbay widgets; strictly list only audio ports. + +- Added 192k sample rate to setup settings drop down list (as kindly + reminded by Klaus Zimmermann, thanks). + +- Most top-level widgets were missing the normal-widget flag, which + were causing some sticky size behavior on some window managers. + + +0.2.21 2006-10-07 Shrinking on screen real-estate. + +- GPL address update. + +- All window captions can now be set smaller as tool-widgets. This + option takes effect when child windows are kept always on top. + +- For the brave of heart, specially the ones brave enough to try with + Stephane Letz's jackdmp, a win32 build should be now possible. + +- The main window button text labels are now optional (after a kind + suggestion by Geoff Beasley, thanks). + +- Increse default maximum number of ports setting from 128 to 256. + +- Initial freebob backend driver support. Also changed the coreaudio + backend driver command line device name/id parameter. + +- Closing the main window while not as an active JACK client, nor under + a server running state, will just quit the whole application, even + though the system-tray icon option is in effect. + +- The most relevant transport commands (Rewind, Play and Pause) are now + made available on the main window context popup menu. + +- The post-shutdown script is now also being called when using the Stop + button, whether the jackd server has been started internally or not. + The initial hard-coded default is now on and set to `killall jackd` + (as a workaround to an old request from Stephane Letz). + +- The main window buttons display are now optional. One can choose + whether the left, right and/or transport buttons are hidden, making + it for a total of six different modes for the main window presentation + (after a much simpler suggestion from Paul Davis and Stephane Letz). + +- Added configure support for x86_64 libraries (UNTESTED). + + +0.2.20 2006-03-05 Featuring patchbay socket forwarding. + +- Server path setting now accepts custom command line parameters + (after a kind suggestion from Jussi Laako). + +- The internal XRUN callback notification statistics and reporting has + been changed to be a bit less intrusive. + +- Patchbay socket dialog gets some more eye-candy as icons have been + added to the client and plug selection (combobox) widgets. + +- Connections and patchbay lines coloring has changed just slightly :) + +- New patchbay socket forwarding feature. Any patchbay socket can now + be set to have all its connections replicated (i.e. forwarded) to + another one, which will behave actively as a clone of the former. + Forward connections are shown by vertical directed colored lines, + and can be selected either on socket dialog or from context menu + (currently experimental, only applicable to input/writable sockets). + +- Optional specification of alternate JACK and/or ALSA installation + paths on configure time (after a patch from Lucas Brasilino, thanks). + + +0.2.19a 2005-11-28 MIDI aliases are back in town. + +- ALSA sequencer client/port name aliases are functional again; all + actual MIDI sequencer client/port numerical identifier prefixes are + also back in business. + + +0.2.19 2005-11-19 MRU patchbay selection, Mac OS X and other fixes. + +- Connections widget views are now properly refreshed after renaming + client/ports (aliases). + +- Disabled system tray and ALSA sequencer support on configure time, + whenever building for MacOSX as default. + +- Fixed the major issues with selecting an audio interface on Mac OSX; + the button the right of the interface combo is now much better + looking than it was before; input/output channel counts are also + updated automatically now (thanks to Jesse Chappell for the patch). + +- Prevent the setting of the coreaudio device id on the jackd command + line (-n) whenever the default interface is being selected. + +- The connections and patchbay windows are now allowed to have a wider + connection lines frame panel; splitter width sizes are now persistent + across application sessions (thanks to Filipe Tomas for the hint). + +- Activation toggling feedback on the patchbay widget has been fixed; + additionally and as found convenient, the most recently used patchbay + definitions can now be loaded immediately by selecting from a drop-down + list widget, which replaces the old static patchbay name status text, + and adds a lil'icon too :) + +- All widget captions changed to include proper application title prefix. + +- Attempt to bring those aging autoconf templates to date; sample SPEC file + for RPM build is now being included and generated at configure time. + +- The current selected device is now shown with a checkmark on the + device selection menu(s), while on the settings dialog. + +- Set to use QApplication::setMainWidget() instead of registering the + traditional lastWindowClosed() signal to quit() slot, just to let + the -geometry command line argument have some effect on X11. + + +0.2.18 2005-07-18 The mantra of bugfixes stays on. + +- A freezing and endless loop condition on the patchbay socket item + duplication (copy) has been fixed. + +- Fixed output disability when messages limit option is turned off + (thanks again to Wolfgang Woehl for spotting this one). + + +0.2.17 2005-06-17 Systemic I/O Latency settings are in. + +- Systemic I/O Latency settings are now featured for the alsa, oss and + coreaudio backends, letting you specify the known latency of external + hardware for client aware compensation purposes (thanks to Wolfgang Woehl, + for the reminder). + +- Update on last backstage changes to the coreaudio backend options + (due to Stephane Letz. Thanks). + + +0.2.16 2005-06-13 OSS device name selection and Mac OS X breakthrough. + +- ALSA sequencer client/port name changes are now properly detected on the + MIDI connections widget (as noted by Chris Cannam. Thanks). + +- Long overdue transport buttons (rewind, backward and forward) finally + landed onto the main control window, at last :). + +- Duplication (copy) of patchbay socket items was added. + +- Do not ever try to start the JACK server if there's one already found + running, on which case the client-only mode of operation is then activated + (as kindly suggested by Orm Finnendahl, thanks). + +- After several Mac OS X user requests, ALSA/MIDI sequencer support is + now an option, otherwise detected at configure time and conditionally + compiled in if, and only if, ALSA is found available (which has been + a primordial assumption on Linux systems:). Ah, and that just makes + for the blind inclusion of another backend driver option: coreaudio. + +- Actual OSS device selection menu now featured on setup dialog; these + adds to the device selection button menus for the OSS driver settings. + +- Delayed geometry setup of windows upon startup was added as an optional + workaround to subtle problems due to window decoration information not + being available at window creation time on some window managers (as patch + proposed by Dirk Jagdmann. Thanks). + +- Fixed some minor but rather old bug that was quitting the application + abruptly, when one switches off the system tray icon while the main + application widget is hidden. + +- Cancel is now an option when creating a new patchbay definition. + +- Context menus are finally littered with icons. + +- Minor configure and Makefile install fixes, as Debian and Mac OS X + specialties. Also, install does the right thing with target file modes + (thanks to Matt Flax and Ebrahim Mayat, for pointing these out). + + +0.2.15a 2005-02-09 Return of the paranoid. + +- Regression from 0.2.13, of the not so stupid pseudo-mutex guards on the + connections management framework, after fixing some crash reports from + Fernando Pablo Lopez-Lezcano and Dave Phillips (thanks!); it pays to be + such a paranoid after all :). + + +0.2.15 2005-02-06 Client/port names aliasing and other minors. + +- JACK/ALSA client and port name aliasing (renaming) is now an optional + feature for the connections window; all client/port aliases are saved + on a per preset basis (as proposed for Lionstracs' Mediastation). + +- Server state now shown (back gain) on the system tray icon tooltip; + speaking of which, tooltips are now also featured on connections, status + and patchbay windows. + +- New actual hardware device selection menu featured on setup dialog; these + new button menus are only available for the ALSA driver settings. + +- Server path factory default to jackd instead of jackstart; preset setup + button icons are back. + +- Fixed rare connection port item removal/disconnection dangling pointer bug. + + +0.2.14 2005-01-23 More progressive optimizations. + +- Put a limit on XRUN callback messages and statistics report rate, preventing + the potential hosing of the GUI due to a XRUN cascade storm. The maximum + reasonable report rate has been fixed to be one XRUN callback occurrence + per second. + +- Set to ignore the SIGPIPE ("Broken pipe") signal, where available, as the + default handler is usually fatal when a JACK client is zombified abruptly. + +- All conection view items are now sorted in natural case insensitive order, + not just as audio port names as was before. + +- Got rid of those nonsense paranoid and rather stupid pseudo-mutex guards on + the connections management framework and event notifications (nuff said :). + +- Optional confirmation warning on audio server shutdown, if there's some + audio clients still active and connected (as suggested by Sampo Savolainen). + +- Check for on configure time (as of JACK 0.99.42+ CVS). + +- "Unlock memory" server setup option was added, allowing the release + of memory used by common toolkit libraries (GTK+, Qt, FLTK, Wine) that + were being superfluously locked on every GUI JACK client; number of periods + has now the minimum allowed value of 2; server start delay widget converted + to spinbox; setup dialog layout slighly changed. + +- Removed stand-alone usx2y driver support. Since JACK 0.99.41+ CVS, the + special "rawusb" support on the Tascam US-122/224/428 USB Audio/MIDI + interface controllers have been merged and properly integrated into the + regular alsa backend driver. Being still experimental, this special mode + of operation is now triggered only when "hw:N,2" is specified as the alsa + device name (N = soundcard index of snd-usb-usx2y module). + +- Messages window limit is now enforced only when the line count exceeds + in one third the user configured line count maximum; if Qt 3.2.0+ is in use, + the QTextView widget is otherwise set to the optimized Qt::LogText format. + +- XRUN status items are kept double-dashed if none has been detected. + + +0.2.13 2004-11-21 Retouches and minor optimizations. + +- Main window is now properly minimized instead of simply hidden when + the system tray icon is not available nor opted in (as suggested + by Florian Schmidt). + +- Some informational status items are now updated 10 times less frequently + (e.g. CPU Load, Sample Rate, Buffer Size, Realtime Mode, etc.), lowering + the CPU burden of most probably redundant status updates. + +- XRUN detection and statistics are being conditionally included if + jack_get_xrun_delayed_usecs() is available (as of JACK 0.99.7+ CVS). + +- Fixed ancient bug on client shutdown event handling, which was + invoking the xrun notification handler by mistake. + +- Support for maximum scheduling delay status added; this status relies + on jack_get_max_delayed_usecs() function availability at configure time, + depending on a Lee Revell's non-official JACK patch. + +- Patchbay Activate button is now a toggle button widget, allowing the + deactivation of the current patchbay profile. + +- Reset-status icon has been changed to a simple red circle instead of + previous one which was much like a power-switch symbol. + +- Preset selection has been added to the context menu. + + +0.2.12a 2004-10-11 Audio connections now naturally sorted. + +- Client port list on audio connections are now hopefully fixed for good; + the sort comparison function now takes full natural order into account. + + +0.2.12 2004-10-08 Larger icons and font option on connections/patchbay. + +- Fixed some old and slow memory-leak due to redundand and repetitive call + to jack_port_by_name() (discovered and solved, thanks to Jesse Chappell); + some other free() and configure fixes were also applied. + +- Shiny display effect toggling has immediate feedback on setup dialog. + +- Added new usx2y driver support. + +- New scaled connections/patchbay icons were added; meanwhile, all inline + XPM icons were removed and brainlessly converted to PNG format. + +- New setup options as for the connections/patchbay view apprearence: larger + icon sizes and font selection are now possible, to better ease manipulation + on a touchscreen (feature requested for Lionstracs' Mediastation). + +- Connection line width follows icon size in discrete proportion. + +- "Other" setup options moved to a new dialog tab, "Misc"; new extreme item + values, 32 and 16 frames, added to the drop-down list of the Frames/Buffer + setting (as suggested by Mark Knetch). + + +0.2.11 2004-09-10 Shiny display now optional and other fixes. + +- Fixed Input/Output channels settings, being now either enabled when + the ALSA driver is selected for Capture/Playback only. + +- Shiny display effect: after some conservative user complaints this + pure cosmetic feature is now made optional ;) + + +0.2.10 2004-09-04 Shiny display and curved connections. + +- New pre-shutdown script setup option, allowing to specify a shell-script + to be run before the JACK server daemon is shutted-down. This overrides + any previous shutdown script setting, which should be now moved onto the + existing post-shutdown script option, as to keep old procedural behaviour. + +- Avoid stopping JACK prematurely with QProcess::kill() (oneliner fix); + stopping JACK will now take a little bit longer, but hopefully will take + the time to cleanup properly (thanks to Kjetil Matheussen). + +- ALSA driver Duplex mode accepts alternate Input or Output device name. + +- Context menu reset option is now always enabled (yet another suggestion + from Sampo Savolainen). + +- Main display background gets shinny effect; adjusted system tray background + palette color mode. + +- Priority and setup control is now a spinbox ranging from 0..89 (as + suggested by Florian Schmidt). Same for Periods/Buffer. + +- Patchbay connection lines are now drawn correctly when items are + scrolled out of view. Additionally, the connection lines can now be + optionally drawn as bezier spline curves (big thanks to Wilfried Huss). + + +0.2.9 2004-07-04 Sloppy boy fixes and minor featuritis. + +- Patchbay socket dialog client and plug list option items are now + properly escaped as regular expressions. + +- JACK callbacks are now internally mapped to QCustomeEvent's instead + of using the traditional pipe notifications. + +- The system tray popup menu is now featured as a context menu on the + main application window too. + +- The reset status option is now included in the system tray popup menu. + +- Server stop command button now enabled during client startup interval; + this makes it possible to stop the server just in case the client + can't be activated for any reason. + +- Top level sub-windows are now always raised and set with active focus + when shown to visibility. + + +0.2.8 2004-04-30 System tray icon and menu option. + +- New option for system tray icon and menu, which is known to be effective + on KDE enabled desktops; support for freedesktop.org's system tray protocol + specification has been included so this maybe also effective on Gnome2. + +- Capture or Playback-only optional alternate device interface name may now + be specified for the ALSA audio driver server settings. + +- Maximum number of ports setting was added to server setup. + +- The dash (-) is now a legal character for preset names. + + +0.2.7b 2004-04-05 OSS driver setup fix. + +- OSS driver halfduplex setup operation is now fixed, thanks to + Jussi Laako. + + +0.2.7a 2004-04-05 Compilation fix for Qt 3.1. + +- QSplitter::setChildrenCollapsible call is now conditionally compiled, + applied only on Qt 3.2+. + + +0.2.7 2004-04-04 User-interface refinements and OSS driver support. + +- Connections and patchbay windows horizontal layout are now user + configurable via splitter widgets. + +- Refresh on connections window now take effect on both tabs, Audio + (JACK) and MIDI (ALSA). + +- OSS driver support and no-mlock option added to server settings, setup + dialog (as of JACK 0.95.7+). + +- Temporary server configuration option added, applicable to the auto-start + server feature on client applications, whether the server shall exit once + all clients are closed. + +- Server mode (RT) status display added. + +- Warning messages are now prompted to the user when there are any pending + changes not saved nor applied while on the setup dialog. + +- Translation support for the default preset name "(default)". + +- Messages window pops up whenever a critical error message is issued. + + +0.2.6 2004-02-29 More work in progress. + +- Message window line limit is now a configurable option on setup, as is + whether the command-line local configuration file gets saved at all; + the first argument of the command-line configuration is stuffed + to be the executable server command absolute path, when possible. + +- Warning message issued if ALSA sequencer is not available on startup; + also if server settings are changed while client is currently active. + +- Server autostart magic is locally disabled by forcing the environment + variable JACK_NO_START_SERVER at startup; with any luck this will + maintain qjackctl's behaviour whether the JACK server is already + started or not. + +- Makefile.cvs makes its late entrance on the build toolset. + + +0.2.5 2004-02-16 Server survival option and command-line wrapper feature. + +- New option on application exit for leaving the JACK server daemon running, + surviving the parent process; the confirmation prompt on application close + now features a "Terminate", "Leave" and "Cancel" button options. + +- New command-line wrapper feature for JACK client applications, thus + giving a convenient head start for the JACK audio server as needed + (as suggested by Fernando Pablo Lopez-Lezcano, of Planet CCRMA fame). + +- Messages, Status, Connections and Patchbay pop-up windows are not hinted + as dialogs anymore and thus are not centered relative to parent main window + which has become a strict Qt dialog widget behaviour (as of Qt 3.3+). + +- Patchbay window content changes are now properly updated, without the need + for a later manual refresh to redraw stalled connection lines. + +- The snapshot option for creating a new patchbay definition from current + actual connections now takes client and port names as regular expressions + and smart enough when regarding more than two contiguous decimal digits :) + +- Patchbay socket list view ordering is now properly preserved; socket + dialog gets plug list handling ehancements; active patchbay gets reloaded + when commited and saved to file; connections redraw on socket removal has + been fixed. + +- Server literal command-line is now saved into local configuration file + (~/.jackdrc) for convenience of future auto-start client applications. + +- New setup option on whether all child windows are kept on top of the main + window, or otherwise floating with probable taskbar entries of their own. + +- Setup changes that are only effective next time the program is run gets + an informational message box shown to the user. + + +0.2.4 2004-02-01 Exclusive patchbay sockets. + +- Patchbay definitions may now be configured with exclusive sockets; + this way, only one defined connection is allowed as soon as it's available, + being all others immediatelly disconnected whenever attempted. + +- On the connections view, current connected client ports are now slightly + highlighted (blue) whenever a client or port is selected on the opposite + column (as suggested by Lawrie Abbott). + +- Connections and patchbay drag and drop feature is now bilateral; you can + now drag and drop an item from right to left to establish the connection. + + +0.2.3a 2004-01-19 Time format combo-box tooltip fix. + +- A qt-designer copy-paste leftover has been fixed; sloppy boy I am ;) + + +0.2.3 2004-01-19 Tenths, hundredths, milliseconds, whatever. + +- Custom time format setup for all elapsed times, allowing the display + of tenths, hundredths or even milliseconds instead of just hundredths + of second for transport time code. + + +0.2.2 2004-01-16 Hundredths are back. + +- Transport time is now shown with hundredths of second (hh:mm:ss.dd), + as it was once before but not constant zero. + +- Client start delay now configurable on setup; this may be of help for + slow machines or unusual long server driver startups (e.g. portaudio). + +- Client-only mode restart has been fixed. + +- Messages color retouching. + +- Popup menus memory leak fixed. + + +0.2.1 2003-12-29 The fix of fixes. + +- Fixed jackstart/jackd command line parameter argument concatenation. + +- Front panel status display font can now be customized. + +- Some connection graph changes were being silently missed, now fixed. + +- Messages window fallback fix; stdout handling has been retouched to + be more line buffer oriented. + + +0.2.0 2003-12-12 ALSA sequencer patchbay entrance. + +- ALSA sequencer subscription patchbay feature, complementing current + audio service with a MIDI application connection graph, gracefuly + included on the same front-end. + +- Current preset name is shown on main window caption title. New button + and form icons. Messages window blankness rendering fix. + +- Immediate server startup option was made persistent and therefore + remembered across sessions. + +- Standard output/error stream capture setup option. + + +0.1.3 2003-11-26 Server settings profile/preset feature. + +- Server setup settings can now be profiled, named and saved as presets. + Command line preset name option and scripting argument meta-symbols are + also featured for convenience (kindly suggested by Sampo Savolainen). + +- New configure time argument debugging support (--enable-debug). + + +0.1.2 2003-11-16 More work in progress. + +- Qmake project file (qjackctl.pro) now generated by configure (autoconf), + introducing the explicit binding support to libqt-mt (multi-thread). + +- Main window is not hinted as a dialog anymore, giving room to the minimize + button on some other window managers; application close confirm warning is + now an option. + +- Removed deprecated settings options: temporary directory and ASIO mode; + new available settings for the ALSA driver: force 16bit format, maximum + input channels and output channels (as of JACK 0.90.x). + +- Transport time display looses static hundredth seconds decimal digits. + + +0.1.1a 2003-11-01 Whatever happened to OK button icons. + +- Restored missing OK button icons. + + +0.1.1 2003-10-29 Minor feature enhancements and bugfixes. + +- Main window display items are now made fixed in width, at least those more + prone to change frequently and thus caused some display jitter. + +- Messages, status, connections and patchbay module windows are now reopened + automagicaly on startup as they were on previous session. + +- New patchbay definition snapshot option from current actual connections; + current active patchbay filename status indication on title. + +- New icons patchbay editor window and socket dialogs; own stdout/stdin is + now properly captured and shown on messages log window. + +- Fixed an obvious patchbay connection scan freezing bug; default .xml file + extension enforcement on save. + + +0.1.0 2003-10-22 Major user interface redesign. + +- Main application window complete redesign, now more like a multimedia/LCD + control panel -- old main window dialog tabs are now splitted in separate + pop-up windows/dialogs; big time display options. In other words, this sums + up to a nice complete application rewrite. + +- Deprecated options for forcing aRTs and jackd daemons are no longer + available; this functionality can be officially superceded by the more + generic startup/shutdown script options. + +- Seamless support for externally started JACK server, providing a client-only + mode of operation; if the JACK daemon is already started, qjackctl enters in + client detached mode automagically. + +- Messages window font is configurable and saved across sessions (by Jack + O'Quin's humble request). Some colorization has been introduced on some + event messages. + +- Preliminary patchbay persistence feature is under way. A patchbay definition + editor is already included, following an alternative socket-plug patchbay + model that aliases and is a direct map to the client-port JACK connections + model. The patchbay definitions are stored as text/xml files. + +- New post-startup script option; immediate JACK server startup command line + option (as suggested by Kasper Souren). + + +0.0.9a 2003-10-03 Tiny bugfixes. + +- Startup/shutdown script options now correctly saved and restored. + +- Dummy driver wait parameter is now properly set on startup. + +- Confirmation warning on disconnecting all ports (as suggested by Robert + Jonsson). + + +0.0.9 2003-09-25 Work in progress. + +- New connection port item pixmaps that distinguishes physical from + logical ports. + +- History of most recently used values gets saved for some settings + and options comboboxes widgets. + +- New startup and shutdown script options, intended to supersede the + mess of forcing artsd and jackd itself, in a near future ;) this way, + one can also include the operation of the LADCCA daemon (following a + suggestion from Kasper Souren). + +- Connections command buttons are now shortly disabled after clicking, + avoiding accidental duplicated connections. + + +0.0.8 2003-09-19 Preliminary transport and buffer size status control. + +- Transport status and control introduced (requires JACK 0.80.0+); + +- Statistics tab renamed to Status, where the transport state info and + simple play/pause control buttons are now placed; + +- Buffer size status is yet another item on the list view. + + +0.0.7 2003-09-15 Minor bugfixes. + +- Inverse alphabetic ordering fixed on Connections port listing. + +- Verbose option added; messages view font size fix; about Qt dialog; + logo pixmap retouched. + +- Configure script now checks for Qt 3.1.1 or greater. + + +0.0.6 2003-09-12 Drag-n-drop and more feature enhancements and bufixes. + +- Patchbay connection user interface handling has been fairly rewritten; + (features new bugs while fixing old ones ;-) + +- Reset XRUN statistics button added; reset time recorded on statistics; + calculated latency is now shown on settings; ASIO mode disables + Periods/Buffer setting (all suggestions by Lawrie Abbott). + +- Context popup menu introduced for port connection handling; includes + new command for disconnecting all currently connected ports. + +- Closing the application while JACK is running, is now presented with a + warning confirmation message (preventing accidental Esc key press? :). + +- Patchbay port lists ordering are now more numerical-friendly than ever, + taking account for sub-numbering port names (following yet another + suggestion from Lawrie). + +- Connection drag-and-drop is now featured after many, many requests. + +- Corrected the configure script to properly recognize Qt 3.0.1 or greater. + + +0.0.5 2003-09-05 Minor feature enhancements and bugfixes. + +- Internationalization support added; future qjackctl_${LANG}.qm translation + files are located on ${prefix}/share/locale . + +- New dummy and portaudio driver support (as of JACK release 0.80.0+). + +- A couple of silent memory leak bugs have been corrected. + + +0.0.4 2003-08-29 Minor changes and bugfixes. + +- The patchbay port lists are now sorted in a more numerical friendly manner + (as suggested by Steve Harris); the sort code has been "borrowed" from + qjackconnect, yet again. + +- Patchbay port connection lines are now always visible, even if their + respective connected port items aren't. + +- Multiple simultaneous port connections can now be handled when a client + application item is selected for connection/disconnection (again, suggested + by Steve Harris), replicating and extending qjackconnect's similar behaviour. + +- An auto-refresh option for the patchbay connections is now available, + for those cases when client code just can't handle properly some callbacks. + +- Window positioning and sizing is now almost persistent across sessions; + as before, position is saved for the minimal view mode; but now, the details + dialog view mode gets its position and size independantly saved also. + + +0.0.3 2003-08-07 Integrated visual patchbay. + +- A patchbay for jack port connections is now integrated, much like the + greatest Mathias Nagorni's qjackconnect (http://www.suse.de/~mana/jack.html). + + +0.0.2 2003-08-02 Client code features introduced. + +- JACK library and header files are checked on configure. + +- Server CPU load, sample rate and time elapsed since last XRUN + detected, are now displayed on statistics. + + +0.0.1 2003-07-26 Initial release. + diff -Nru qjackctl-0.3.4/config.h.in qjackctl-0.3.6/config.h.in --- qjackctl-0.3.4/config.h.in 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/config.h.in 2010-03-09 18:51:27.000000000 +0000 @@ -0,0 +1,121 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if ALSA/MIDI sequencer support is enabled. */ +#undef CONFIG_ALSA_SEQ + +/* Define if CoreAudio/CoreAudio.h is available (Mac OS X). */ +#undef CONFIG_COREAUDIO + +/* Define if D-Bus interface is enabled. */ +#undef CONFIG_DBUS + +/* Define if debugging is enabled. */ +#undef CONFIG_DEBUG + +/* Define if jack_get_max_delayed_usecs is available. */ +#undef CONFIG_JACK_MAX_DELAY + +/* Define if JACK MIDI support is available. */ +#undef CONFIG_JACK_MIDI + +/* Define if jack_port_get_aliases is available. */ +#undef CONFIG_JACK_PORT_ALIASES + +/* Define if jack_is_realtime is available. */ +#undef CONFIG_JACK_REALTIME + +/* Define if jack/statistics.h is available. */ +#undef CONFIG_JACK_STATISTICS + +/* Define if jack_tranport_query is available. */ +#undef CONFIG_JACK_TRANSPORT + +/* Define if jack_get_xrun_delayed_usecs is available. */ +#undef CONFIG_JACK_XRUN_DELAY + +/* Define if PortAudio interface is enabled. */ +#undef CONFIG_PORTAUDIO + +/* Default installation prefix. */ +#undef CONFIG_PREFIX + +/* Define if round is available. */ +#undef CONFIG_ROUND + +/* Define if debugger stack-trace is enabled. */ +#undef CONFIG_STACKTRACE + +/* Define if system tray is enabled. */ +#undef CONFIG_SYSTEM_TRAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `X11' library (-lX11). */ +#undef HAVE_LIBX11 + +/* Define to 1 if you have the `Xext' library (-lXext). */ +#undef HAVE_LIBXEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_POLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `system' function. */ +#undef HAVE_SYSTEM + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS diff -Nru qjackctl-0.3.4/configure qjackctl-0.3.6/configure --- qjackctl-0.3.4/configure 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/configure 2010-03-09 18:51:28.000000000 +0000 @@ -0,0 +1,8086 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63 for QjackCtl 0.3.6. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='QjackCtl' +PACKAGE_TARNAME='qjackctl' +PACKAGE_VERSION='0.3.6' +PACKAGE_STRING='QjackCtl 0.3.6' +PACKAGE_BUGREPORT='rncbc@rncbc.org' + +ac_unique_file="src/qjackctlMainForm.ui" +ac_default_prefix=/usr/local +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +ac_incpath +ac_libs +ac_lrelease +ac_lupdate +ac_uic +ac_moc +ac_qmake +EGREP +GREP +CXXCPP +ac_ct_CXX +CXXFLAGS +CXX +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +ac_qdbus +ac_debug +ac_prefix +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_debug +enable_system_tray +enable_jack_midi +enable_alsa_seq +enable_portaudio +enable_dbus +enable_stacktrace +with_qt +with_jack +with_alsa +with_portaudio +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures QjackCtl 0.3.6 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/qjackctl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of QjackCtl 0.3.6:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-debug enable debugging (default=no) + --enable-system-tray enable system tray (default=yes) + --enable-jack-midi enable JACK MIDI support (default=yes) + --enable-alsa-seq enable ALSA/MIDI sequencer support (default=yes) + --enable-portaudio enable PortAudio interface (default=yes) + --enable-dbus enable D-Bus interface (default=yes) + --enable-stacktrace enable debugger stack-trace (default=no) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-qt=PATH use alternate Qt install path + --with-jack=PATH use alternate JACK install path + --with-alsa=PATH use alternate ALSA install path + --with-portaudio=PATH use alternate PortAudio install path + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +QjackCtl configure 0.3.6 +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by QjackCtl $as_me 0.3.6, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_config_headers="$ac_config_headers config.h" + +ac_config_files="$ac_config_files Makefile qjackctl.pro qjackctl.spec qjackctl.desktop" + + +# Set default installation prefix. + +ac_prefix=$prefix +if test "x$ac_prefix" = "xNONE"; then + ac_prefix=$ac_default_prefix +fi + + +cat >>confdefs.h <<_ACEOF +#define CONFIG_PREFIX "$ac_prefix" +_ACEOF + + +# Enable debugging argument option. +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; ac_debug="$enableval" +fi + + +if test "x$ac_debug" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_DEBUG 1 +_ACEOF + + ac_stacktrace="yes" + ac_debug="debug" +else + ac_stacktrace="no" + ac_debug="release" +fi + + +# Disable system tray argument option. +# Check whether --enable-system_tray was given. +if test "${enable_system_tray+set}" = set; then + enableval=$enable_system_tray; ac_system_tray="$enableval" +else + ac_system_tray="yes" +fi + + +# Disable JACK MIDI support option. +# Check whether --enable-jack_midi was given. +if test "${enable_jack_midi+set}" = set; then + enableval=$enable_jack_midi; ac_jack_midi="$enableval" +else + ac_jack_midi="yes" +fi + + +# Disable ALSA sequencer support option. +# Check whether --enable-alsa_seq was given. +if test "${enable_alsa_seq+set}" = set; then + enableval=$enable_alsa_seq; ac_alsa_seq="$enableval" +else + ac_alsa_seq="yes" +fi + + +# Enable PortAudio argument option. +# Check whether --enable-portaudio was given. +if test "${enable_portaudio+set}" = set; then + enableval=$enable_portaudio; ac_portaudio="$enableval" +else + ac_portaudio="yes" +fi + + +# Enable D-Bus argument option. +# Check whether --enable-dbus was given. +if test "${enable_dbus+set}" = set; then + enableval=$enable_dbus; ac_dbus="$enableval" +else + ac_dbus="yes" +fi + + +if test "x$ac_dbus" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_DBUS 1 +_ACEOF + + ac_qdbus="qdbus" +fi + + +# Enable debugger stack-trace option (assumes --enable-debug). +# Check whether --enable-stacktrace was given. +if test "${enable_stacktrace+set}" = set; then + enableval=$enable_stacktrace; ac_stacktrace="$enableval" +fi + + + +# Standard installation base dirs. +ac_with_paths="/usr /usr/local" + +# Some a-la-debian alternatives... +for X in /usr/lib /usr/lib64 /usr/share; do + for Y in qt qt4; do + if test -d $X/$Y/bin; then + ac_with_paths="$ac_with_paths $X/$Y" + fi + done +done + +# Set for alternate Qt installation dir. + +# Check whether --with-qt was given. +if test "${with_qt+set}" = set; then + withval=$with_qt; ac_with_paths="$ac_with_paths $withval" +fi + + +# Set for alternate JACK installation dir. + +# Check whether --with-jack was given. +if test "${with_jack+set}" = set; then + withval=$with_jack; ac_with_paths="$ac_with_paths $withval" +fi + + +# Set for alternate ALSA installation dir. + +# Check whether --with-alsa was given. +if test "${with_alsa+set}" = set; then + withval=$with_alsa; ac_with_paths="$ac_with_paths $withval" +fi + + +# Set for alternate PortAudio installation dir. + +# Check whether --with-portaudio was given. +if test "${with_portaudio+set}" = set; then + withval=$with_portaudio; ac_with_paths="$ac_with_paths $withval" +fi + + +# Checks for programs. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + +# Checks for languages. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +# Prepend alternate dependencies paths. +ac_path=$PATH +for X in $ac_with_paths; do + if test -d $X/bin; then + ac_path="$X/bin:$ac_path" + fi + if test -x $X/qmake; then + ac_path="$X:$ac_path" + fi + if test -d $X/include; then + for Y in qt qt4; do + if test -d $X/include/$Y; then + CFLAGS="-I$X/include/$Y $CFLAGS" + CPPFLAGS="-I$X/include/$Y $CPPFLAGS" + ac_incpath="$X/include/$Y $ac_incpath" + fi + done + CFLAGS="-I$X/include $CFLAGS" + CPPFLAGS="-I$X/include $CPPFLAGS" + ac_incpath="$X/include $ac_incpath" + fi + if test -d $X/lib64; then + LIBS="-L$X/lib64 $LIBS" + ac_libs="-L$X/lib64 $ac_libs" + fi + if test -d $X/lib; then + LIBS="-L$X/lib $LIBS" + ac_libs="-L$X/lib $ac_libs" + fi +done + +# Check for proper Qt version. + +{ $as_echo "$as_me:$LINENO: checking for Qt library version >= 4.1" >&5 +$as_echo_n "checking for Qt library version >= 4.1... " >&6; } +if test "${ac_cv_qtversion+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "Qt/qglobal.h" +int +main () +{ + +#if QT_VERSION < 0x040100 +#error Qt library 4.1 or greater required. +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_qtversion="yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "no; Qt 4.1 or greater is required" + exit + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_qtversion" >&5 +$as_echo "$ac_cv_qtversion" >&6; } + +# A common error message: +ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." + +# Check for Qt qmake utility. +# Extract the first word of "qmake", so it can be a program name with args. +set dummy qmake; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_qmake+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_qmake in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_qmake="$ac_qmake" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $ac_path +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_qmake="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ac_qmake" && ac_cv_path_ac_qmake="no" + ;; +esac +fi +ac_qmake=$ac_cv_path_ac_qmake +if test -n "$ac_qmake"; then + { $as_echo "$as_me:$LINENO: result: $ac_qmake" >&5 +$as_echo "$ac_qmake" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_qmake" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: qmake $ac_errmsg" >&5 +$as_echo "$as_me: error: qmake $ac_errmsg" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check for Qt moc utility. +# Extract the first word of "moc", so it can be a program name with args. +set dummy moc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_moc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_moc in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_moc="$ac_moc" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $ac_path +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_moc="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ac_moc" && ac_cv_path_ac_moc="no" + ;; +esac +fi +ac_moc=$ac_cv_path_ac_moc +if test -n "$ac_moc"; then + { $as_echo "$as_me:$LINENO: result: $ac_moc" >&5 +$as_echo "$ac_moc" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_moc" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: moc $ac_errmsg" >&5 +$as_echo "$as_me: error: moc $ac_errmsg" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check for Qt uic utility. +# Extract the first word of "uic", so it can be a program name with args. +set dummy uic; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_uic+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_uic in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_uic="$ac_uic" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $ac_path +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_uic="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ac_uic" && ac_cv_path_ac_uic="no" + ;; +esac +fi +ac_uic=$ac_cv_path_ac_uic +if test -n "$ac_uic"; then + { $as_echo "$as_me:$LINENO: result: $ac_uic" >&5 +$as_echo "$ac_uic" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_uic" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: uic $ac_errmsg" >&5 +$as_echo "$as_me: error: uic $ac_errmsg" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check for Qt lupdate utility. +# Extract the first word of "lupdate", so it can be a program name with args. +set dummy lupdate; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_lupdate+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_lupdate in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_lupdate="$ac_lupdate" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $ac_path +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_lupdate="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ac_lupdate" && ac_cv_path_ac_lupdate="no" + ;; +esac +fi +ac_lupdate=$ac_cv_path_ac_lupdate +if test -n "$ac_lupdate"; then + { $as_echo "$as_me:$LINENO: result: $ac_lupdate" >&5 +$as_echo "$ac_lupdate" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_lupdate" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: lupdate $ac_errmsg" >&5 +$as_echo "$as_me: error: lupdate $ac_errmsg" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check for Qt lrelease utility. +# Extract the first word of "lrelease", so it can be a program name with args. +set dummy lrelease; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_lrelease+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_lrelease in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_lrelease="$ac_lrelease" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $ac_path +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_lrelease="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ac_lrelease" && ac_cv_path_ac_lrelease="no" + ;; +esac +fi +ac_lrelease=$ac_cv_path_ac_lrelease +if test -n "$ac_lrelease"; then + { $as_echo "$as_me:$LINENO: result: $ac_lrelease" >&5 +$as_echo "$ac_lrelease" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_release" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: lrelease $ac_errmsg" >&5 +$as_echo "$as_me: error: lrelease $ac_errmsg" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Checks for libraries. + +{ $as_echo "$as_me:$LINENO: checking for main in -lm" >&5 +$as_echo_n "checking for main in -lm... " >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_m_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +$as_echo "$ac_cv_lib_m_main" >&6; } +if test "x$ac_cv_lib_m_main" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for main in -lX11" >&5 +$as_echo_n "checking for main in -lX11... " >&6; } +if test "${ac_cv_lib_X11_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_X11_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_X11_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 +$as_echo "$ac_cv_lib_X11_main" >&6; } +if test "x$ac_cv_lib_X11_main" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBX11 1 +_ACEOF + + LIBS="-lX11 $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for main in -lXext" >&5 +$as_echo_n "checking for main in -lXext... " >&6; } +if test "${ac_cv_lib_Xext_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_Xext_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xext_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 +$as_echo "$ac_cv_lib_Xext_main" >&6; } +if test "x$ac_cv_lib_Xext_main" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXEXT 1 +_ACEOF + + LIBS="-lXext $LIBS" + +fi + + +# Check for round math function. +{ $as_echo "$as_me:$LINENO: checking for lroundf in -lm" >&5 +$as_echo_n "checking for lroundf in -lm... " >&6; } +if test "${ac_cv_lib_m_lroundf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lroundf (); +int +main () +{ +return lroundf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_m_lroundf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_lroundf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_lroundf" >&5 +$as_echo "$ac_cv_lib_m_lroundf" >&6; } +if test "x$ac_cv_lib_m_lroundf" = x""yes; then + ac_round="yes" +else + ac_round="no" +fi + +if test "x$ac_round" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_ROUND 1 +_ACEOF + +fi + +# Check for JACK libraries. +{ $as_echo "$as_me:$LINENO: checking for main in -ljack" >&5 +$as_echo_n "checking for main in -ljack... " >&6; } +if test "${ac_cv_lib_jack_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_main" >&5 +$as_echo "$ac_cv_lib_jack_main" >&6; } +if test "x$ac_cv_lib_jack_main" = x""yes; then + ac_jack_lib="yes" +else + ac_jack_lib="no" +fi + +if test "x$ac_jack_lib" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: JACK library not found." >&5 +$as_echo "$as_me: error: JACK library not found." >&2;} + { (exit 1); exit 1; }; } +fi +ac_libs="$ac_libs -ljack" + +# Check for ALSA libraries and primarily +# for ALSA/MIDI sequencer support. +if test "x$ac_alsa_seq" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for main in -lasound" >&5 +$as_echo_n "checking for main in -lasound... " >&6; } +if test "${ac_cv_lib_asound_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lasound $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_asound_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_asound_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_asound_main" >&5 +$as_echo "$ac_cv_lib_asound_main" >&6; } +if test "x$ac_cv_lib_asound_main" = x""yes; then + ac_alsa_lib="yes" +else + ac_alsa_lib="no" +fi + + if test "x$ac_alsa_lib" = "xno"; then + { $as_echo "$as_me:$LINENO: WARNING: *** ALSA library not found." >&5 +$as_echo "$as_me: WARNING: *** ALSA library not found." >&2;} + ac_alsa_seq="no" + else + ac_libs="$ac_libs -lasound" + fi +fi + +if test "x$ac_portaudio" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for main in -lportaudio" >&5 +$as_echo_n "checking for main in -lportaudio... " >&6; } +if test "${ac_cv_lib_portaudio_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lportaudio $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_portaudio_main=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_portaudio_main=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_main" >&5 +$as_echo "$ac_cv_lib_portaudio_main" >&6; } +if test "x$ac_cv_lib_portaudio_main" = x""yes; then + ac_portaudio_lib="yes" +else + ac_portaudio_lib="no" +fi + + if test "x$ac_portaudio_lib" = "xno"; then + { $as_echo "$as_me:$LINENO: WARNING: *** PortAudio library not found." >&5 +$as_echo "$as_me: WARNING: *** PortAudio library not found." >&2;} + ac_portaudio="no" + else + ac_libs="$ac_libs -lportaudio" + fi +fi + + + + +# Checks for header files. + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_sys_wait_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + +for ac_header in fcntl.h sys/ioctl.h unistd.h poll.h signal.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Check for JACK headers. +if test "${ac_cv_header_jack_jack_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for jack/jack.h" >&5 +$as_echo_n "checking for jack/jack.h... " >&6; } +if test "${ac_cv_header_jack_jack_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5 +$as_echo "$ac_cv_header_jack_jack_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking jack/jack.h usability" >&5 +$as_echo_n "checking jack/jack.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking jack/jack.h presence" >&5 +$as_echo_n "checking jack/jack.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for jack/jack.h" >&5 +$as_echo_n "checking for jack/jack.h... " >&6; } +if test "${ac_cv_header_jack_jack_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_jack_jack_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5 +$as_echo "$ac_cv_header_jack_jack_h" >&6; } + +fi +if test "x$ac_cv_header_jack_jack_h" = x""yes; then + ac_jack_h="yes" +else + ac_jack_h="no" +fi + + +if test "x$ac_jack_h" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: JACK headers not found." >&5 +$as_echo "$as_me: error: JACK headers not found." >&2;} + { (exit 1); exit 1; }; } +fi + +# Check for jack/statistics.h header. +if test "${ac_cv_header_jack_statistics_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for jack/statistics.h" >&5 +$as_echo_n "checking for jack/statistics.h... " >&6; } +if test "${ac_cv_header_jack_statistics_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_statistics_h" >&5 +$as_echo "$ac_cv_header_jack_statistics_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking jack/statistics.h usability" >&5 +$as_echo_n "checking jack/statistics.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking jack/statistics.h presence" >&5 +$as_echo_n "checking jack/statistics.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/statistics.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jack/statistics.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for jack/statistics.h" >&5 +$as_echo_n "checking for jack/statistics.h... " >&6; } +if test "${ac_cv_header_jack_statistics_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_jack_statistics_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_statistics_h" >&5 +$as_echo "$ac_cv_header_jack_statistics_h" >&6; } + +fi +if test "x$ac_cv_header_jack_statistics_h" = x""yes; then + ac_jack_statistics_h="yes" +else + ac_jack_statistics_h="no" +fi + + +if test "x$ac_jack_statistics_h" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_STATISTICS 1 +_ACEOF + +fi + +# Check for CoreAudio/CoreAudio.h header (MacOSX). +if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 +$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } +if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 +$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5 +$as_echo_n "checking CoreAudio/CoreAudio.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5 +$as_echo_n "checking CoreAudio/CoreAudio.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 +$as_echo_n "checking for CoreAudio/CoreAudio.h... " >&6; } +if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 +$as_echo "$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } + +fi +if test "x$ac_cv_header_CoreAudio_CoreAudio_h" = x""yes; then + ac_coreaudio="yes" +else + ac_coreaudio="no" +fi + + +if test "x$ac_coreaudio" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_COREAUDIO 1 +_ACEOF + + ac_alsa_seq="no" + ac_libs="-framework CoreAudio -framework CoreFoundation $ac_libs" +fi + +# Check for some JACK MIDI headers. +if test "x$ac_jack_midi" = "xyes"; then + if test "${ac_cv_header_jack_midiport_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for jack/midiport.h" >&5 +$as_echo_n "checking for jack/midiport.h... " >&6; } +if test "${ac_cv_header_jack_midiport_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_midiport_h" >&5 +$as_echo "$ac_cv_header_jack_midiport_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking jack/midiport.h usability" >&5 +$as_echo_n "checking jack/midiport.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking jack/midiport.h presence" >&5 +$as_echo_n "checking jack/midiport.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: jack/midiport.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: jack/midiport.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for jack/midiport.h" >&5 +$as_echo_n "checking for jack/midiport.h... " >&6; } +if test "${ac_cv_header_jack_midiport_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_jack_midiport_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jack_midiport_h" >&5 +$as_echo "$ac_cv_header_jack_midiport_h" >&6; } + +fi +if test "x$ac_cv_header_jack_midiport_h" = x""yes; then + ac_jack_midi="yes" +else + ac_jack_midi="no" +fi + + +fi + +# Check for ALSA headers and ultimately +# for ALSA/MIDI sequencer support. +if test "x$ac_alsa_seq" = "xyes"; then + if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +$as_echo_n "checking for alsa/asoundlib.h... " >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +$as_echo "$ac_cv_header_alsa_asoundlib_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5 +$as_echo_n "checking alsa/asoundlib.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking alsa/asoundlib.h presence" >&5 +$as_echo_n "checking alsa/asoundlib.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 +$as_echo_n "checking for alsa/asoundlib.h... " >&6; } +if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_alsa_asoundlib_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 +$as_echo "$ac_cv_header_alsa_asoundlib_h" >&6; } + +fi +if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then + ac_alsa_h="yes" +else + ac_alsa_h="no" +fi + + + if test "x$ac_alsa_h" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_ALSA_SEQ 1 +_ACEOF + + else + { $as_echo "$as_me:$LINENO: WARNING: *** ALSA headers not found." >&5 +$as_echo "$as_me: WARNING: *** ALSA headers not found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** ALSA/MIDI sequencer support will be disabled." >&5 +$as_echo "$as_me: WARNING: *** ALSA/MIDI sequencer support will be disabled." >&2;} + ac_alsa_seq="no" + fi +fi + +# Check for PortAudio headers and library support. +if test "x$ac_portaudio" = "xyes"; then + if test "${ac_cv_header_portaudio_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for portaudio.h" >&5 +$as_echo_n "checking for portaudio.h... " >&6; } +if test "${ac_cv_header_portaudio_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portaudio_h" >&5 +$as_echo "$ac_cv_header_portaudio_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking portaudio.h usability" >&5 +$as_echo_n "checking portaudio.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking portaudio.h presence" >&5 +$as_echo_n "checking portaudio.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: portaudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: portaudio.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: portaudio.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: portaudio.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: portaudio.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: portaudio.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: portaudio.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: portaudio.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: portaudio.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------ ## +## Report this to rncbc@rncbc.org ## +## ------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for portaudio.h" >&5 +$as_echo_n "checking for portaudio.h... " >&6; } +if test "${ac_cv_header_portaudio_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_portaudio_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portaudio_h" >&5 +$as_echo "$ac_cv_header_portaudio_h" >&6; } + +fi +if test "x$ac_cv_header_portaudio_h" = x""yes; then + ac_portaudio_h="yes" +else + ac_portaudio_h="no" +fi + + + if test "x$ac_portaudio_h" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_PORTAUDIO 1 +_ACEOF + + else + { $as_echo "$as_me:$LINENO: WARNING: *** PortAudio headers not found." >&5 +$as_echo "$as_me: WARNING: *** PortAudio headers not found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** PortAudio interface support will be disabled." >&5 +$as_echo "$as_me: WARNING: *** PortAudio interface support will be disabled." >&2;} + ac_portaudio="no" + fi +fi + +# Check for debugging stack-trace. +if test "x$ac_stacktrace" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_STACKTRACE 1 +_ACEOF + +fi + + + + +# Checks for typedefs, structures, and compiler characteristics. +# AC_C_CONST + +# Checks for library functions. + +for ac_func in system +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# Check for system-tray icon. +if test "x$ac_system_tray" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_SYSTEM_TRAY 1 +_ACEOF + +fi + +# Check for jack_transport_query function. +{ $as_echo "$as_me:$LINENO: checking for jack_transport_query in -ljack" >&5 +$as_echo_n "checking for jack_transport_query in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_transport_query+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_transport_query (); +int +main () +{ +return jack_transport_query (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_transport_query=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_transport_query=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_transport_query" >&5 +$as_echo "$ac_cv_lib_jack_jack_transport_query" >&6; } +if test "x$ac_cv_lib_jack_jack_transport_query" = x""yes; then + ac_jack_transport="yes" +else + ac_jack_transport="no" +fi + +if test "x$ac_jack_transport" = "xno"; then + { $as_echo "$as_me:$LINENO: WARNING: *** jack_transport_query: function not found." >&5 +$as_echo "$as_me: WARNING: *** jack_transport_query: function not found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** JACK 0.80.0 or later may be required." >&5 +$as_echo "$as_me: WARNING: *** JACK 0.80.0 or later may be required." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** Transport features will be disabled." >&5 +$as_echo "$as_me: WARNING: *** Transport features will be disabled." >&2;} +else + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_TRANSPORT 1 +_ACEOF + +fi + +# Check for jack_is_realtime function. +{ $as_echo "$as_me:$LINENO: checking for jack_is_realtime in -ljack" >&5 +$as_echo_n "checking for jack_is_realtime in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_is_realtime+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_is_realtime (); +int +main () +{ +return jack_is_realtime (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_is_realtime=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_is_realtime=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_is_realtime" >&5 +$as_echo "$ac_cv_lib_jack_jack_is_realtime" >&6; } +if test "x$ac_cv_lib_jack_jack_is_realtime" = x""yes; then + ac_jack_realtime="yes" +else + ac_jack_realtime="no" +fi + +if test "x$ac_jack_realtime" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_REALTIME 1 +_ACEOF + +fi + +# Check for jack_get_xrun_delayed_usecs function. +{ $as_echo "$as_me:$LINENO: checking for jack_get_xrun_delayed_usecs in -ljack" >&5 +$as_echo_n "checking for jack_get_xrun_delayed_usecs in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_get_xrun_delayed_usecs+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_get_xrun_delayed_usecs (); +int +main () +{ +return jack_get_xrun_delayed_usecs (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_get_xrun_delayed_usecs=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_get_xrun_delayed_usecs=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_get_xrun_delayed_usecs" >&5 +$as_echo "$ac_cv_lib_jack_jack_get_xrun_delayed_usecs" >&6; } +if test "x$ac_cv_lib_jack_jack_get_xrun_delayed_usecs" = x""yes; then + ac_jack_xrun_delay="yes" +else + ac_jack_xrun_delay="no" +fi + +if test "x$ac_jack_xrun_delay" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_XRUN_DELAY 1 +_ACEOF + +fi + +# Check for jack_get_max_delayed_usecs function. +{ $as_echo "$as_me:$LINENO: checking for jack_get_max_delayed_usecs in -ljack" >&5 +$as_echo_n "checking for jack_get_max_delayed_usecs in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_get_max_delayed_usecs+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_get_max_delayed_usecs (); +int +main () +{ +return jack_get_max_delayed_usecs (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_get_max_delayed_usecs=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_get_max_delayed_usecs=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_get_max_delayed_usecs" >&5 +$as_echo "$ac_cv_lib_jack_jack_get_max_delayed_usecs" >&6; } +if test "x$ac_cv_lib_jack_jack_get_max_delayed_usecs" = x""yes; then + ac_jack_max_delay="yes" +else + ac_jack_max_delay="no" +fi + +if test "x$ac_jack_max_delay" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_MAX_DELAY 1 +_ACEOF + +fi + +# Check for JACK MIDI library support. +if test "x$ac_jack_midi" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for jack_midi_event_get in -ljack" >&5 +$as_echo_n "checking for jack_midi_event_get in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_midi_event_get+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_midi_event_get (); +int +main () +{ +return jack_midi_event_get (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_midi_event_get=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_midi_event_get=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_midi_event_get" >&5 +$as_echo "$ac_cv_lib_jack_jack_midi_event_get" >&6; } +if test "x$ac_cv_lib_jack_jack_midi_event_get" = x""yes; then + ac_jack_midi="yes" +else + ac_jack_midi="no" +fi + + if test "x$ac_jack_midi" = "xno"; then + { $as_echo "$as_me:$LINENO: WARNING: *** jack_midi_event_get: function not found." >&5 +$as_echo "$as_me: WARNING: *** jack_midi_event_get: function not found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** JACK 0.103.0 or later may be required." >&5 +$as_echo "$as_me: WARNING: *** JACK 0.103.0 or later may be required." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: *** JACK MIDI support will be disabled." >&5 +$as_echo "$as_me: WARNING: *** JACK MIDI support will be disabled." >&2;} + else + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_MIDI 1 +_ACEOF + + fi +fi + +# Check for jack_port_get_aliases function. +{ $as_echo "$as_me:$LINENO: checking for jack_port_get_aliases in -ljack" >&5 +$as_echo_n "checking for jack_port_get_aliases in -ljack... " >&6; } +if test "${ac_cv_lib_jack_jack_port_get_aliases+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljack $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jack_port_get_aliases (); +int +main () +{ +return jack_port_get_aliases (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_jack_jack_port_get_aliases=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jack_jack_port_get_aliases=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_port_get_aliases" >&5 +$as_echo "$ac_cv_lib_jack_jack_port_get_aliases" >&6; } +if test "x$ac_cv_lib_jack_jack_port_get_aliases" = x""yes; then + ac_jack_port_aliases="yes" +else + ac_jack_port_aliases="no" +fi + +if test "x$ac_jack_port_aliases" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_JACK_PORT_ALIASES 1 +_ACEOF + +fi + +# Finally produce a configure header file and the main makefile. +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by QjackCtl $as_me 0.3.6, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +QjackCtl config.status 0.3.6 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "qjackctl.pro") CONFIG_FILES="$CONFIG_FILES qjackctl.pro" ;; + "qjackctl.spec") CONFIG_FILES="$CONFIG_FILES qjackctl.spec" ;; + "qjackctl.desktop") CONFIG_FILES="$CONFIG_FILES qjackctl.desktop" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +# make clean > /dev/null 2>&1 + +# Output summary message + +echo +echo " $PACKAGE_NAME $PACKAGE_VERSION" +echo +echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" +echo +echo " JACK Audio Connection Kit support . . . . . . . .: $ac_jack_lib" +echo " JACK Realtime support . . . . . . . . . . . . . .: $ac_jack_realtime" +echo " JACK Transport support . . . . . . . . . . . . . .: $ac_jack_transport" +echo " JACK XRUN delay support . . . . . . . . . . . . .: $ac_jack_xrun_delay" +echo " JACK Maximum scheduling delay support . . . . . .: $ac_jack_max_delay" +echo " JACK Port aliases support . . . . . . . . . . . .: $ac_jack_port_aliases" +echo " JACK MIDI support . . . . . . . . . . . . . . . .: $ac_jack_midi" +echo " ALSA MIDI Sequencer support . . . . . . . . . . .: $ac_alsa_seq" +echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" +echo " D-Bus interface support . . . . . . . . . . . . .: $ac_dbus" +echo " PortAudio interface support . . . . . . . . . . .: $ac_portaudio" +echo " CoreAudio interface support . . . . . . . . . . .: $ac_coreaudio" +echo +echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" +echo +echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" +echo +echo "Now type 'make', followed by 'make install' as root." +echo diff -Nru qjackctl-0.3.4/configure.ac qjackctl-0.3.6/configure.ac --- qjackctl-0.3.4/configure.ac 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/configure.ac 2010-03-09 18:47:23.000000000 +0000 @@ -0,0 +1,392 @@ +# Process this file with autoconf to produce a configure script. +AC_INIT(QjackCtl, 0.3.6, rncbc@rncbc.org, qjackctl) + +AC_CONFIG_SRCDIR(src/qjackctlMainForm.ui) +AC_CONFIG_HEADERS(config.h) +AC_CONFIG_FILES(Makefile qjackctl.pro qjackctl.spec qjackctl.desktop) + +# Set default installation prefix. +AC_PREFIX_DEFAULT(/usr/local) +ac_prefix=$prefix +if test "x$ac_prefix" = "xNONE"; then + ac_prefix=$ac_default_prefix +fi +AC_SUBST(ac_prefix) +AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) + +# Enable debugging argument option. +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), + [ac_debug="$enableval"]) + +if test "x$ac_debug" = "xyes"; then + AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) + ac_stacktrace="yes" + ac_debug="debug" +else + ac_stacktrace="no" + ac_debug="release" +fi +AC_SUBST(ac_debug) + +# Disable system tray argument option. +AC_ARG_ENABLE(system_tray, + AC_HELP_STRING([--enable-system-tray], [enable system tray (default=yes)]), + [ac_system_tray="$enableval"], + [ac_system_tray="yes"]) + +# Disable JACK MIDI support option. +AC_ARG_ENABLE(jack_midi, + AC_HELP_STRING([--enable-jack-midi], [enable JACK MIDI support (default=yes)]), + [ac_jack_midi="$enableval"], + [ac_jack_midi="yes"]) + +# Disable ALSA sequencer support option. +AC_ARG_ENABLE(alsa_seq, + AC_HELP_STRING([--enable-alsa-seq], [enable ALSA/MIDI sequencer support (default=yes)]), + [ac_alsa_seq="$enableval"], + [ac_alsa_seq="yes"]) + +# Enable PortAudio argument option. +AC_ARG_ENABLE(portaudio, + AC_HELP_STRING([--enable-portaudio], [enable PortAudio interface (default=yes)]), + [ac_portaudio="$enableval"], + [ac_portaudio="yes"]) + +# Enable D-Bus argument option. +AC_ARG_ENABLE(dbus, + AC_HELP_STRING([--enable-dbus], [enable D-Bus interface (default=yes)]), + [ac_dbus="$enableval"], + [ac_dbus="yes"]) + +if test "x$ac_dbus" = "xyes"; then + AC_DEFINE(CONFIG_DBUS, 1, [Define if D-Bus interface is enabled.]) + ac_qdbus="qdbus" +fi +AC_SUBST(ac_qdbus) + +# Enable debugger stack-trace option (assumes --enable-debug). +AC_ARG_ENABLE(stacktrace, + AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), + [ac_stacktrace="$enableval"]) + + +# Standard installation base dirs. +ac_with_paths="/usr /usr/local" + +# Some a-la-debian alternatives... +for X in /usr/lib /usr/lib64 /usr/share; do + for Y in qt qt4; do + if test -d $X/$Y/bin; then + ac_with_paths="$ac_with_paths $X/$Y" + fi + done +done + +# Set for alternate Qt installation dir. +AC_ARG_WITH(qt, + AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), + [ac_with_paths="$ac_with_paths $withval"]) + +# Set for alternate JACK installation dir. +AC_ARG_WITH(jack, + AC_HELP_STRING([--with-jack=PATH], [use alternate JACK install path]), + [ac_with_paths="$ac_with_paths $withval"]) + +# Set for alternate ALSA installation dir. +AC_ARG_WITH(alsa, + AC_HELP_STRING([--with-alsa=PATH], [use alternate ALSA install path]), + [ac_with_paths="$ac_with_paths $withval"]) + +# Set for alternate PortAudio installation dir. +AC_ARG_WITH(portaudio, + AC_HELP_STRING([--with-portaudio=PATH], [use alternate PortAudio install path]), + [ac_with_paths="$ac_with_paths $withval"]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CXX +AC_PROG_CXXCPP +AC_PROG_GCC_TRADITIONAL + +# Checks for languages. +AC_LANG_C +AC_LANG_CPLUSPLUS + +# Prepend alternate dependencies paths. +ac_path=$PATH +for X in $ac_with_paths; do + if test -d $X/bin; then + ac_path="$X/bin:$ac_path" + fi + if test -x $X/qmake; then + ac_path="$X:$ac_path" + fi + if test -d $X/include; then + for Y in qt qt4; do + if test -d $X/include/$Y; then + CFLAGS="-I$X/include/$Y $CFLAGS" + CPPFLAGS="-I$X/include/$Y $CPPFLAGS" + ac_incpath="$X/include/$Y $ac_incpath" + fi + done + CFLAGS="-I$X/include $CFLAGS" + CPPFLAGS="-I$X/include $CPPFLAGS" + ac_incpath="$X/include $ac_incpath" + fi + if test -d $X/lib64; then + LIBS="-L$X/lib64 $LIBS" + ac_libs="-L$X/lib64 $ac_libs" + fi + if test -d $X/lib; then + LIBS="-L$X/lib $LIBS" + ac_libs="-L$X/lib $ac_libs" + fi +done + +# Check for proper Qt version. +AC_CACHE_CHECK([for Qt library version >= 4.1], + ac_cv_qtversion, [ + AC_TRY_LINK([#include "Qt/qglobal.h"], [ +#if QT_VERSION < 0x040100 +#error Qt library 4.1 or greater required. +#endif + ], ac_cv_qtversion="yes", [ + echo "no; Qt 4.1 or greater is required" + exit + ]) +]) + +# A common error message: +ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." + +# Check for Qt qmake utility. +AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path) +if test "x$ac_qmake" = "xno"; then + AC_MSG_ERROR([qmake $ac_errmsg]) +fi +AC_SUBST(ac_qmake) + +# Check for Qt moc utility. +AC_PATH_PROG(ac_moc, moc, [no], $ac_path) +if test "x$ac_moc" = "xno"; then + AC_MSG_ERROR([moc $ac_errmsg]) +fi +AC_SUBST(ac_moc) + +# Check for Qt uic utility. +AC_PATH_PROG(ac_uic, uic, [no], $ac_path) +if test "x$ac_uic" = "xno"; then + AC_MSG_ERROR([uic $ac_errmsg]) +fi +AC_SUBST(ac_uic) + +# Check for Qt lupdate utility. +AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) +if test "x$ac_lupdate" = "xno"; then + AC_MSG_ERROR([lupdate $ac_errmsg]) +fi +AC_SUBST(ac_lupdate) + +# Check for Qt lrelease utility. +AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) +if test "x$ac_release" = "xno"; then + AC_MSG_ERROR([lrelease $ac_errmsg]) +fi +AC_SUBST(ac_lrelease) + +# Checks for libraries. +AC_CHECK_LIB(m, main) +AC_CHECK_LIB(X11, main) +AC_CHECK_LIB(Xext, main) + +# Check for round math function. +AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"]) +if test "x$ac_round" = "xyes"; then + AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) +fi + +# Check for JACK libraries. +AC_CHECK_LIB(jack, main, [ac_jack_lib="yes"], [ac_jack_lib="no"]) +if test "x$ac_jack_lib" = "xno"; then + AC_MSG_ERROR([JACK library not found.]) +fi +ac_libs="$ac_libs -ljack" + +# Check for ALSA libraries and primarily +# for ALSA/MIDI sequencer support. +if test "x$ac_alsa_seq" = "xyes"; then + AC_CHECK_LIB(asound, main, [ac_alsa_lib="yes"], [ac_alsa_lib="no"]) + if test "x$ac_alsa_lib" = "xno"; then + AC_MSG_WARN([*** ALSA library not found.]) + ac_alsa_seq="no" + else + ac_libs="$ac_libs -lasound" + fi +fi + +if test "x$ac_portaudio" = "xyes"; then + AC_CHECK_LIB(portaudio, main, [ac_portaudio_lib="yes"], [ac_portaudio_lib="no"]) + if test "x$ac_portaudio_lib" = "xno"; then + AC_MSG_WARN([*** PortAudio library not found.]) + ac_portaudio="no" + else + ac_libs="$ac_libs -lportaudio" + fi +fi + +AC_SUBST(ac_libs) + + +# Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h poll.h signal.h) + +# Check for JACK headers. +AC_CHECK_HEADER(jack/jack.h, [ac_jack_h="yes"], [ac_jack_h="no"]) +if test "x$ac_jack_h" = "xno"; then + AC_MSG_ERROR([JACK headers not found.]) +fi + +# Check for jack/statistics.h header. +AC_CHECK_HEADER(jack/statistics.h, [ac_jack_statistics_h="yes"], [ac_jack_statistics_h="no"]) +if test "x$ac_jack_statistics_h" = "xyes"; then + AC_DEFINE(CONFIG_JACK_STATISTICS, 1, [Define if jack/statistics.h is available.]) +fi + +# Check for CoreAudio/CoreAudio.h header (MacOSX). +AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ac_coreaudio="yes"], [ac_coreaudio="no"]) +if test "x$ac_coreaudio" = "xyes"; then + AC_DEFINE(CONFIG_COREAUDIO, 1, [Define if CoreAudio/CoreAudio.h is available (Mac OS X).]) + ac_alsa_seq="no" + ac_libs="-framework CoreAudio -framework CoreFoundation $ac_libs" +fi + +# Check for some JACK MIDI headers. +if test "x$ac_jack_midi" = "xyes"; then + AC_CHECK_HEADER(jack/midiport.h, [ac_jack_midi="yes"], [ac_jack_midi="no"]) +fi + +# Check for ALSA headers and ultimately +# for ALSA/MIDI sequencer support. +if test "x$ac_alsa_seq" = "xyes"; then + AC_CHECK_HEADER(alsa/asoundlib.h, [ac_alsa_h="yes"], [ac_alsa_h="no"]) + if test "x$ac_alsa_h" = "xyes"; then + AC_DEFINE(CONFIG_ALSA_SEQ, 1, [Define if ALSA/MIDI sequencer support is enabled.]) + else + AC_MSG_WARN([*** ALSA headers not found.]) + AC_MSG_WARN([*** ALSA/MIDI sequencer support will be disabled.]) + ac_alsa_seq="no" + fi +fi + +# Check for PortAudio headers and library support. +if test "x$ac_portaudio" = "xyes"; then + AC_CHECK_HEADER(portaudio.h, [ac_portaudio_h="yes"], [ac_portaudio_h="no"]) + if test "x$ac_portaudio_h" = "xyes"; then + AC_DEFINE(CONFIG_PORTAUDIO, 1, [Define if PortAudio interface is enabled.]) + else + AC_MSG_WARN([*** PortAudio headers not found.]) + AC_MSG_WARN([*** PortAudio interface support will be disabled.]) + ac_portaudio="no" + fi +fi + +# Check for debugging stack-trace. +if test "x$ac_stacktrace" = "xyes"; then + AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) +fi + +AC_SUBST(ac_incpath) + + +# Checks for typedefs, structures, and compiler characteristics. +# AC_C_CONST + +# Checks for library functions. +AC_CHECK_FUNCS(system) + +# Check for system-tray icon. +if test "x$ac_system_tray" = "xyes"; then + AC_DEFINE(CONFIG_SYSTEM_TRAY, 1, [Define if system tray is enabled.]) +fi + +# Check for jack_transport_query function. +AC_CHECK_LIB(jack, jack_transport_query, [ac_jack_transport="yes"], [ac_jack_transport="no"]) +if test "x$ac_jack_transport" = "xno"; then + AC_MSG_WARN([*** jack_transport_query: function not found.]) + AC_MSG_WARN([*** JACK 0.80.0 or later may be required.]) + AC_MSG_WARN([*** Transport features will be disabled.]) +else + AC_DEFINE(CONFIG_JACK_TRANSPORT, 1, [Define if jack_tranport_query is available.]) +fi + +# Check for jack_is_realtime function. +AC_CHECK_LIB(jack, jack_is_realtime, [ac_jack_realtime="yes"], [ac_jack_realtime="no"]) +if test "x$ac_jack_realtime" = "xyes"; then + AC_DEFINE(CONFIG_JACK_REALTIME, 1, [Define if jack_is_realtime is available.]) +fi + +# Check for jack_get_xrun_delayed_usecs function. +AC_CHECK_LIB(jack, jack_get_xrun_delayed_usecs, [ac_jack_xrun_delay="yes"], [ac_jack_xrun_delay="no"]) +if test "x$ac_jack_xrun_delay" = "xyes"; then + AC_DEFINE(CONFIG_JACK_XRUN_DELAY, 1, [Define if jack_get_xrun_delayed_usecs is available.]) +fi + +# Check for jack_get_max_delayed_usecs function. +AC_CHECK_LIB(jack, jack_get_max_delayed_usecs, [ac_jack_max_delay="yes"], [ac_jack_max_delay="no"]) +if test "x$ac_jack_max_delay" = "xyes"; then + AC_DEFINE(CONFIG_JACK_MAX_DELAY, 1, [Define if jack_get_max_delayed_usecs is available.]) +fi + +# Check for JACK MIDI library support. +if test "x$ac_jack_midi" = "xyes"; then + AC_CHECK_LIB(jack, jack_midi_event_get, [ac_jack_midi="yes"], [ac_jack_midi="no"]) + if test "x$ac_jack_midi" = "xno"; then + AC_MSG_WARN([*** jack_midi_event_get: function not found.]) + AC_MSG_WARN([*** JACK 0.103.0 or later may be required.]) + AC_MSG_WARN([*** JACK MIDI support will be disabled.]) + else + AC_DEFINE(CONFIG_JACK_MIDI, 1, [Define if JACK MIDI support is available.]) + fi +fi + +# Check for jack_port_get_aliases function. +AC_CHECK_LIB(jack, jack_port_get_aliases, [ac_jack_port_aliases="yes"], [ac_jack_port_aliases="no"]) +if test "x$ac_jack_port_aliases" = "xyes"; then + AC_DEFINE(CONFIG_JACK_PORT_ALIASES, 1, [Define if jack_port_get_aliases is available.]) +fi + +# Finally produce a configure header file and the main makefile. +AC_OUTPUT + +# make clean > /dev/null 2>&1 + +# Output summary message + +echo +echo " $PACKAGE_NAME $PACKAGE_VERSION" +echo +echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" +echo +echo " JACK Audio Connection Kit support . . . . . . . .: $ac_jack_lib" +echo " JACK Realtime support . . . . . . . . . . . . . .: $ac_jack_realtime" +echo " JACK Transport support . . . . . . . . . . . . . .: $ac_jack_transport" +echo " JACK XRUN delay support . . . . . . . . . . . . .: $ac_jack_xrun_delay" +echo " JACK Maximum scheduling delay support . . . . . .: $ac_jack_max_delay" +echo " JACK Port aliases support . . . . . . . . . . . .: $ac_jack_port_aliases" +echo " JACK MIDI support . . . . . . . . . . . . . . . .: $ac_jack_midi" +echo " ALSA MIDI Sequencer support . . . . . . . . . . .: $ac_alsa_seq" +echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" +echo " D-Bus interface support . . . . . . . . . . . . .: $ac_dbus" +echo " PortAudio interface support . . . . . . . . . . .: $ac_portaudio" +echo " CoreAudio interface support . . . . . . . . . . .: $ac_coreaudio" +echo +echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" +echo +echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" +echo +echo "Now type 'make', followed by 'make install' as root." +echo diff -Nru qjackctl-0.3.4/COPYING qjackctl-0.3.6/COPYING --- qjackctl-0.3.4/COPYING 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/COPYING 2006-09-24 13:31:55.000000000 +0100 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff -Nru qjackctl-0.3.4/debian/changelog qjackctl-0.3.6/debian/changelog --- qjackctl-0.3.4/debian/changelog 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/changelog 2010-05-30 16:12:28.000000000 +0100 @@ -1,47 +1,40 @@ -qjackctl (0.3.4-0ubuntu4) lucid; urgency=low +qjackctl (0.3.6-1ubuntu1~ppa1) lucid; urgency=low - * Comply with jackd >= 0.118.0 which now runs in real-time mode by - default, cherrypicked from upstream. Update debian/control to - require jackd >= 0.118. (LP: #538702) + * backport to lucid to address the following bugs: + - fixes port renames ignored bug (LP: #490436) + - hopefully fixes no close button on children windows (LP: #447793) + - (this might not work until build depends: libqt4-dev (>= 4.5.0) + * this does *NOT* change the build depends yet for libqt4-dev - -- David Henningsson Sun, 14 Mar 2010 13:13:27 +0100 + -- Scott Lavender Sun, 30 May 2010 09:43:15 -0500 -qjackctl (0.3.4-0ubuntu3) lucid; urgency=low +qjackctl (0.3.6-1) unstable; urgency=low - * No-change rebuild for jack transition. + * New upstream release (Closes: #548870) + * Fix config filename mentioned in the manpage (Closes: #531106) - -- Steve Kowalik Tue, 19 Jan 2010 12:48:51 +1100 + -- Adrian Knoth Mon, 11 Jan 2010 17:10:32 +0100 -qjackctl (0.3.4-0ubuntu2) jaunty; urgency=low +qjackctl (0.3.5-1) unstable; urgency=low - * Some changes taken from debian: (NOTE to next uploader, this package cannot - be merged till Debian has a new upstream release, due to Debian changing - the format of the source package. - - Add libx11-dev as a build dependency - - Add a patch which updates to a recent CVS snapshot - - Enable realtime by default - - -- Luke Yelavich Fri, 13 Feb 2009 14:47:18 +1100 - -qjackctl (0.3.4-0ubuntu1) jaunty; urgency=low - - * New upstream release. - * Remove some empt directories from the package. - * Updated qjackctl wrapper script to match the behavior of the mscore script. - (LP: #209694, #273750) + * New upstream version + * New maintainer (Debian Multimedia Maintainers). (Closes: #547029) + * Drop versioned build-dependency on libjack-dev (Closes: #527442) - -- Luke Yelavich Sat, 06 Dec 2008 16:20:31 -0800 + -- Adrian Knoth Sun, 27 Sep 2009 18:32:26 +0200 -qjackctl (0.3.2-1ubuntu1) hardy; urgency=low +qjackctl (0.3.4-1) unstable; urgency=low - * Merge from debian unstable, remaining changes: - - debian/control: Bump JACK build-dependency to 0.103.0. - - Add jackd as a dependency of qjackctl. - - Update maintainer as per spec. - * Add wrapper script to suspend pulseaudio if it is running. - * Bring the desktop file up to spec. + * Add CVS snapshot patch: + - Conditional build for JACK port aliases support (JACK >= 0.109.2). + - Alternate icon sizes other than default 16x16, are now effective to + the Connections widget (Setup/Dislay/Connections Window/Icon size). + * New upstream release (closes: #486201) + * Set RT mode as default, like upstream does + * Add myself to Uploaders + * Depend on libx11-dev - -- Luke Yelavich Fri, 08 Feb 2008 14:30:03 +1100 + -- Free Ekanayaka Thu, 05 Feb 2009 15:15:47 +0000 qjackctl (0.3.2-1) unstable; urgency=low @@ -52,57 +45,18 @@ -- Guenter Geiger (Debian/GNU) Wed, 06 Feb 2008 16:37:36 +0100 -qjackctl (0.3.1a-0ubuntu1) hardy; urgency=low - - * New upstream version. - * debian/{control,rules,patches/*}: Update for Qt4. - - -- Daniel T Chen Mon, 29 Oct 2007 14:34:40 -0400 - -qjackctl (0.2.22-2ubuntu1) gutsy; urgency=low - - * Merge from Debian unstable. Remaining Ubuntu changes: - - debian/control: Bump JACK build-dependency to 0.103.0. - - Add jackd as a dependency of qjackctl. - - Update maintainer in field debian/control. - - -- Lionel Porcheron Fri, 15 Jun 2007 11:05:26 +0200 - qjackctl (0.2.22-2) unstable; urgency=low * removed wflags file in src/main.c (closes: #427707, #427706) -- Guenter Geiger (Debian/GNU) Mon, 11 Jun 2007 19:07:41 +0200 -qjackctl (0.2.22-1ubuntu1) gutsy; urgency=low - - * Merge from debian unstable, remaining changes: - - debian/control: Bump JACK build-dependency to 0.103.0. - - Add jackd as a dependency of qjackctl. - - Update maintainer in field debian/control. - - -- Michele Angrisano Mon, 28 May 2007 22:32:04 +0100 - qjackctl (0.2.22-1) unstable; urgency=low * New upstream version (closes: #418830) -- Guenter Geiger (Debian/GNU) Fri, 27 Apr 2007 19:45:00 +0200 -qjackctl (0.2.22-0ubuntu1) gutsy; urgency=low - - * New upstream version - - debian/control: Bump JACK build-dependency to 0.103.0. - - -- Daniel T Chen Tue, 15 May 2007 01:16:39 -0400 - -qjackctl (0.2.21-1ubuntu1) feisty; urgency=low - - * Add jackd as a dependency of qjackctl. - * Update maintainer field. - - -- Luke Yelavich Wed, 11 Apr 2007 09:58:58 +1000 - qjackctl (0.2.21-1) unstable; urgency=low * New upstream version diff -Nru qjackctl-0.3.4/debian/clean qjackctl-0.3.6/debian/clean --- qjackctl-0.3.4/debian/clean 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/debian/clean 2010-05-30 16:12:28.000000000 +0100 @@ -0,0 +1,5 @@ +Makefile +config.h +qjackctl.desktop +qjackctl.pro +qjackctl.spec diff -Nru qjackctl-0.3.4/debian/compat qjackctl-0.3.6/debian/compat --- qjackctl-0.3.4/debian/compat 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/compat 2010-05-30 16:12:28.000000000 +0100 @@ -1 +1 @@ -4 +7 diff -Nru qjackctl-0.3.4/debian/control qjackctl-0.3.6/debian/control --- qjackctl-0.3.4/debian/control 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/control 2010-05-30 16:12:28.000000000 +0100 @@ -1,14 +1,23 @@ Source: qjackctl Section: sound Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Guenter Geiger (Debian/GNU) -Build-Depends: debhelper (>> 4.0.0), cdbs, libqt4-dev, libjack0.100.0-dev (>= 0.103.0) | libjack-dev, libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] -Standards-Version: 3.7.2 +Maintainer: Debian Multimedia Maintainers +Uploaders: Adrian Knoth , Free Ekanayaka +Build-Depends: debhelper (>= 7.0.0), + cdbs, + libqt4-dev, + libjack-dev, + libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], + libx11-dev +Standards-Version: 3.8.3 +DM-Upload-Allowed: yes +Homepage: http://qjackctl.sourceforge.net +Vcs-Git: git://git.debian.org/git/pkg-multimedia/qjackctl.git +Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/qjackctl.git;a=summary Package: qjackctl Architecture: any -Depends: ${shlibs:Depends} ${misc:Depends}, jackd (>= 0.118) +Depends: ${shlibs:Depends}, ${misc:Depends} Description: User interface for controlling the JACK sound server Qjackctl offers a user interface for controlling the JACK sound server daemon. At the same time it figures as a JACK patch bay and monitoring diff -Nru qjackctl-0.3.4/debian/copyright qjackctl-0.3.6/debian/copyright --- qjackctl-0.3.4/debian/copyright 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/copyright 2010-05-30 16:12:28.000000000 +0100 @@ -5,7 +5,7 @@ Upstream Author: Rui Nuno Capela -Copyright: +Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela qjackctl is distributed under the GNU General Public License, see /usr/share/common-licenses/GPL-2 diff -Nru qjackctl-0.3.4/debian/dirs qjackctl-0.3.6/debian/dirs --- qjackctl-0.3.4/debian/dirs 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/dirs 2010-05-30 16:12:28.000000000 +0100 @@ -1 +1,3 @@ usr/bin +usr/sbin +usr/share/gnome/apps/Multimedia diff -Nru qjackctl-0.3.4/debian/gbp.conf qjackctl-0.3.6/debian/gbp.conf --- qjackctl-0.3.4/debian/gbp.conf 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/debian/gbp.conf 2010-05-30 16:12:28.000000000 +0100 @@ -0,0 +1,6 @@ +[DEFAULT] +upstream-branch = upstream +debian-branch = master +upstream-tag = upstream/%(version)s +debian-tag = debian/%(version)s +pristine-tar = True diff -Nru qjackctl-0.3.4/debian/menu qjackctl-0.3.6/debian/menu --- qjackctl-0.3.4/debian/menu 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/menu 2010-05-30 16:12:28.000000000 +0100 @@ -1,4 +1,4 @@ -?package(qjackctl):needs="X11" section="Apps/Sound"\ +?package(qjackctl):needs="X11" section="Applications/Sound"\ title="JACK Control" command="/usr/bin/qjackctl" sort="$" \ icon="/usr/share/pixmaps/qjackctl.xpm"\ hints="JACK" diff -Nru qjackctl-0.3.4/debian/patches/01_wmanager.patch qjackctl-0.3.6/debian/patches/01_wmanager.patch --- qjackctl-0.3.4/debian/patches/01_wmanager.patch 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/patches/01_wmanager.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -diff -ur qjackctl-0.3.4/src/main.cpp qjackctl-0.3.4.new/src/main.cpp ---- qjackctl-0.3.4/src/main.cpp 2007-12-04 11:41:46.000000000 +0100 -+++ qjackctl-0.3.4.new/src/main.cpp 2008-02-06 16:36:31.000000000 +0100 -@@ -74,8 +74,8 @@ - | Qt::WindowTitleHint - | Qt::WindowSystemMenuHint - | Qt::WindowMinMaxButtonsHint; -- if (settings.bKeepOnTop) -- wflags |= Qt::Tool; -+// if (settings.bKeepOnTop) -+// wflags |= Qt::Tool; - // Construct the main form, and show it to the world. - qjackctlMainForm w(0, wflags); - // app.setMainWidget(&w); diff -Nru qjackctl-0.3.4/debian/patches/02_cvs-snaphost.patch qjackctl-0.3.6/debian/patches/02_cvs-snaphost.patch --- qjackctl-0.3.4/debian/patches/02_cvs-snaphost.patch 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/patches/02_cvs-snaphost.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,1632 +0,0 @@ -diff --git a/ChangeLog b/ChangeLog -index 50ccddb..c196af8 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -3,6 +3,14 @@ QjackCtl - JACK Audio Connection Kit Qt GUI Interface - - ChangeLog - -+CVS HEAD -+ -+- Conditional build for JACK port aliases support (JACK >= 0.109.2). -+ -+- Alternate icon sizes other than default 16x16, are now effective to -+ the Connections widget (Setup/Dislay/Connections Window/Icon size). -+ -+ - 0.3.4 2008-12-05 Patchbay snapshot revamp. - - - Introducing the very first and complete translations in-package: -diff --git a/qjackctl.desktop.in b/qjackctl.desktop.in -index eb1c767..01ed952 100644 ---- a/qjackctl.desktop.in -+++ b/qjackctl.desktop.in -@@ -4,7 +4,7 @@ GenericName=JACK Control - Comment=QjackCtl is a JACK Audio Connection Kit Qt GUI Interface - Exec=@ac_prefix@/bin/qjackctl - Icon=@ac_prefix@/share/pixmaps/qjackctl.png --Categories=Audio;AudioVideo;MIDI;JACK;ALSA;Qt; -+Categories=Audio;AudioVideo;JACK;ALSA;Qt; - Terminal=false - Type=Application - X-SuSE-translate=true -diff --git a/src/qjackctlAboutForm.cpp b/src/qjackctlAboutForm.cpp -index 3f65f0a..3ebcc6a 100644 ---- a/src/qjackctlAboutForm.cpp -+++ b/src/qjackctlAboutForm.cpp -@@ -1,7 +1,7 @@ - // qjackctlAboutForm.cpp - // - /**************************************************************************** -- Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. -+ Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License -@@ -84,6 +84,12 @@ qjackctlAboutForm::qjackctlAboutForm ( - sText += "
\n"; - sText += ""; - #endif -+#ifndef CONFIG_JACK_PORT_ALIASES -+ sText += ""; -+ sText += tr("JACK Port aliases support disabled."); -+ sText += "
\n"; -+ sText += "
"; -+#endif - #ifndef CONFIG_ALSA_SEQ - #if !defined(WIN32) - sText += ""; -diff --git a/src/qjackctlAboutForm.h b/src/qjackctlAboutForm.h -index 603ebd9..1d30f11 100644 ---- a/src/qjackctlAboutForm.h -+++ b/src/qjackctlAboutForm.h -@@ -1,7 +1,7 @@ - // qjackctlAboutForm.h - // - /**************************************************************************** -- Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. -+ Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License -diff --git a/src/qjackctlAboutForm.ui b/src/qjackctlAboutForm.ui -index 7f67f3f..88563df 100644 ---- a/src/qjackctlAboutForm.ui -+++ b/src/qjackctlAboutForm.ui -@@ -2,7 +2,7 @@ - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - -- Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. -+ Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License -@@ -18,7 +18,7 @@ - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -- -+ - qjackctlAboutForm - - -diff --git a/src/qjackctlConnect.cpp b/src/qjackctlConnect.cpp -index 3a89b4e..7905bce 100644 ---- a/src/qjackctlConnect.cpp -+++ b/src/qjackctlConnect.cpp -@@ -36,7 +36,6 @@ - #include - #include - -- - //---------------------------------------------------------------------- - // class qjackctlPortItem -- Port list item. - // -@@ -1295,6 +1294,12 @@ void qjackctlConnectView::setIconSize ( int iIconSize ) - // Go for it... - m_iIconSize = iIconSize; - -+ // Update item sizes properly... -+ int px = (16 << m_iIconSize); -+ const QSize iconsize(px, px); -+ m_pOListView->setIconSize(iconsize); -+ m_pIListView->setIconSize(iconsize); -+ - // Call binding descendant implementation, - // and do a complete content reset... - if (m_pConnect) -diff --git a/src/qjackctlJackConnect.cpp b/src/qjackctlJackConnect.cpp -index 6b93af5..7b226ae 100644 ---- a/src/qjackctlJackConnect.cpp -+++ b/src/qjackctlJackConnect.cpp -@@ -217,9 +217,11 @@ int qjackctlJackClientList::updateClientPorts (void) - qjackctlJackPort *pPort = 0; - jack_port_t *pJackPort = jack_port_by_name(m_pJackClient, - ppszClientPorts[iClientPort]); -+ #ifdef CONFIG_JACK_PORT_ALIASES - if (g_iJackClientPortAlias > 0 && - jack_port_get_aliases(pJackPort, aliases) >= g_iJackClientPortAlias) - sClientPort = aliases[g_iJackClientPortAlias - 1]; -+ #endif - int iColon = sClientPort.indexOf(':'); - if (pJackPort && iColon >= 0) { - QString sClientName = sClientPort.left(iColon); -diff --git a/src/qjackctlSetupForm.cpp b/src/qjackctlSetupForm.cpp -index 0fb1ce1..a6d4401 100644 ---- a/src/qjackctlSetupForm.cpp -+++ b/src/qjackctlSetupForm.cpp -@@ -603,6 +603,11 @@ void qjackctlSetupForm::setup ( qjackctlSetup *pSetup ) - m_ui.MidiDriverTextLabel->setEnabled(false); - m_ui.MidiDriverComboBox->setEnabled(false); - #endif -+#ifndef CONFIG_JACK_PORT_ALIASES -+ m_ui.JackClientPortAliasComboBox->setCurrentIndex(0); -+ m_ui.JackClientPortAliasTextLabel->setEnabled(false); -+ m_ui.JackClientPortAliasComboBox->setEnabled(false); -+#endif - #ifndef CONFIG_ALSA_SEQ - m_ui.AlsaSeqEnabledCheckBox->setEnabled(false); - #endif -diff --git a/translations/qjackctl_de.ts b/translations/qjackctl_de.ts -index d964b26..afc94d7 100644 ---- a/translations/qjackctl_de.ts -+++ b/translations/qjackctl_de.ts -@@ -117,89 +117,94 @@ - JACK MIDI wird nicht unterstütz. - - -- -+ - ALSA/MIDI sequencer support disabled. - ALSA/MIDI Sequencer wird nicht unterstütz. - - -- -+ - Website - Webseite - - -- -+ - This program is free software; you can redistribute it and/or modify it - Dieses Programm ist freie Software; Sie können es gemäß der - - -- -+ - under the terms of the GNU General Public License version 2 or later. - GNU General Public License weiterverteilen und/oder modifizieren. - -+ -+ -+ JACK Port aliases support disabled. -+ -+ - - - qjackctlClientListView - -- -+ - Readable Clients / Output Ports - Lesbare Clients/Ausgänge - - -- -+ - Writable Clients / Input Ports - Beschreibbare Clients/Eingänge - - -- -+ - &Connect - &Verbinden - - -- -+ - Alt+C - Connect - Alt+V - - -- -+ - &Disconnect - &Trennen - - -- -+ - Alt+D - Disconnect - Alt+T - - -- -+ - Disconnect &All - &Alle trennen - - -- -+ - Alt+A - Disconect All - Alt+A - - -- -+ - Re&name - &Umbenennen - - -- -+ - Alt+N - Rename - Alt+U - - -- -+ - &Refresh - Au&ffrischen - - -- -+ - Alt+R - Refresh - Alt+E -@@ -208,12 +213,12 @@ - - qjackctlConnect - -- -+ - Warning - Warnung - - -- -+ - This will suspend sound processing - from all client applications. - -@@ -223,12 +228,12 @@ aller Client-Anwendungen unterbrochen. - Sind Sie sicher? - - -- -+ - Yes - Ja - - -- -+ - No - Nein - -@@ -348,45 +353,45 @@ Do you want to save the changes? - - qjackctlConnectorView - -- -+ - &Connect - &Verbinden - - -- -+ - Alt+C - Connect - Alt+V - - -- -+ - &Disconnect - &Trennen - - -- -+ - Alt+D - Disconnect - Trennen - - -- -+ - Disconnect &All - &Alle trennen - - -- -+ - Alt+A - Disconect All - Alt+A - - -- -+ - &Refresh - Au&ffrischen - - -- -+ - Alt+R - Refresh - Alt+F -@@ -3111,12 +3116,12 @@ der aktuell vorhandenen Verbindungen erstellen? - Abbrechen - - -- -+ - Warning - Warnung - - -- -+ - Some settings have been changed: - - "%1" -@@ -3127,17 +3132,17 @@ Do you want to save the changes? - Wollen Sie diese übernehmen? - - -- -+ - Save - Speichern - - -- -+ - Discard - Verwerfen - - -- -+ - Delete preset: - - "%1" -@@ -3146,92 +3151,92 @@ Are you sure? - - - -- -+ - msec - ms - - -- -+ - n/a - n/a - - -- -+ - &Preset Name - - - -- -+ - &Server Path - &Serverpfad - - -- -+ - &Driver - Trei&ber - - -- -+ - &Interface - Sc&hnittstelle - - -- -+ - Sample &Rate - Abtast&rate - - -- -+ - &Frames/Period - &Frames/Periode - - -- -+ - Periods/&Buffer - Perioden/&Puffer - - -- -+ - Startup Script - - - -- -+ - Post-Startup Script - - - -- -+ - Shutdown Script - - - -- -+ - Post-Shutdown Script - - - -- -+ - Active Patchbay Definition - Aktive Steckfelddefinition - - -- -+ - Patchbay Definition files - Steckfelddefinitionsdateien - - -- -+ - Messages Log - Meldungsprotokoll - - -- -+ - Log files - Protokolldateien - - -- -+ - Some settings have been changed. - - Do you want to apply the changes? -@@ -3239,7 +3244,7 @@ Do you want to apply the changes? - Wollen Sie diese übernehmen? - - -- -+ - Apply - Anwenden - -diff --git a/translations/qjackctl_es.ts b/translations/qjackctl_es.ts -index 1d4cd58..a87c4e5 100644 ---- a/translations/qjackctl_es.ts -+++ b/translations/qjackctl_es.ts -@@ -108,22 +108,22 @@ - Reporte del retardo máximo deshabilitado. - - -- -+ - ALSA/MIDI sequencer support disabled. - Soporte para secuenciador ALSA/MIDI deshabilitado. - - -- -+ - Website - Website - - -- -+ - This program is free software; you can redistribute it and/or modify it - Este programa es software libre; Usted puede redistribuirlo y/o modificarlo - - -- -+ - under the terms of the GNU General Public License version 2 or later. - bajo los términos de la Licencia Pública General GNU versión 2 o posterior. - -@@ -137,71 +137,76 @@ - About QjackCtl - Acerca de QjackCtl - -+ -+ -+ JACK Port aliases support disabled. -+ -+ - - - qjackctlClientListView - -- -+ - &Connect - &Conectar - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Desconectar - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - Desconectar &Todo - - -- -+ - Alt+A - Disconect All - Alt+T - - -- -+ - Re&name - Cambiar &Nombre - - -- -+ - Alt+N - Rename - Alt+N - - -- -+ - &Refresh - &Refrescar - - -- -+ - Alt+R - Refresh - Alt+R - - -- -+ - Readable Clients / Output Ports - Puertos de Salida / Clientes Leíbles - - -- -+ - Writable Clients / Input Ports - Puertos de Entrada / Clientes Escribibles - -@@ -209,22 +214,22 @@ - - qjackctlConnect - -- -+ - Warning - Advertencia - - -- -+ - Yes - Si - - -- -+ - No - No - - -- -+ - This will suspend sound processing - from all client applications. - -@@ -353,45 +358,45 @@ Desea guardar los cambios? - - qjackctlConnectorView - -- -+ - &Connect - &Conectar - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Desconectar - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - Desconectar &Todo - - -- -+ - Alt+A - Disconect All - Alt+T - - -- -+ - &Refresh - &Refrescar - - -- -+ - Alt+R - Refresh - Alt+R -@@ -2941,77 +2946,77 @@ una instantánea de las conexiones actuales? - Cancelar - - -- -+ - Warning - Advertencia - - -- -+ - Save - Salvar - - -- -+ - Discard - Descartar cambios - - -- -+ - msec - mseg - - -- -+ - n/a - n/d - - -- -+ - &Preset Name - Nombre del &Preset - - -- -+ - &Server Path - Ruta hacia el &Servidor - - -- -+ - &Driver - &Driver - - -- -+ - &Interface - &Interfaz - - -- -+ - Sample &Rate - &Frecuencia de muestreo - - -- -+ - &Frames/Period - &Cuadros / Período - - -- -+ - Periods/&Buffer - Períodos / &Buffer - - -- -+ - Patchbay Definition files - Archivos de esquema de patchbay - - -- -+ - Apply - Aplicar - - -- -+ - Some settings have been changed: - - "%1" -@@ -3024,7 +3029,7 @@ Do you want to save the changes? - Desea guardarlas? - - -- -+ - Delete preset: - - "%1" -@@ -3037,42 +3042,42 @@ Are you sure? - Está seguro? - - -- -+ - Startup Script - Script de Inicio - - -- -+ - Post-Startup Script - Script de Post-Inicio - - -- -+ - Shutdown Script - Script de Apagado - - -- -+ - Post-Shutdown Script - Script de Post-Acabado - - -- -+ - Active Patchbay Definition - Definición Activa de Patchbay - - -- -+ - Messages Log - Registro de Mensajes - - -- -+ - Log files - Archivos de registros - - -- -+ - Some settings have been changed. - - Do you want to apply the changes? -diff --git a/translations/qjackctl_fr.ts b/translations/qjackctl_fr.ts -index d381e72..48adc30 100644 ---- a/translations/qjackctl_fr.ts -+++ b/translations/qjackctl_fr.ts -@@ -138,22 +138,22 @@ - Statut du délai maximal désactivé. - - -- -+ - ALSA/MIDI sequencer support disabled. - Support du séquencer ALSA/MIDI désactivé. - - -- -+ - Website - Site web - - -- -+ - This program is free software; you can redistribute it and/or modify it - Ce programme est libre; vous pouvez le redistribuer et/ou le modifier - - -- -+ - under the terms of the GNU General Public License version 2 or later. - selon les termes de la Licence Publique Générale GNU version 2 ou ultérieure. - -@@ -162,6 +162,11 @@ - JACK MIDI support disabled. - Support JACK MIDI désactivé. - -+ -+ -+ JACK Port aliases support disabled. -+ -+ - - - qjackctlClientListView -@@ -186,67 +191,67 @@ - Ports d'entrée - - -- -+ - &Connect - &Connecter - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Déconnecter - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - &Tout déconnecter - - -- -+ - Alt+A - Disconect All - Alt+T - - -- -+ - Re&name - Re&nommer - - -- -+ - Alt+N - Rename - Alt+N - - -- -+ - &Refresh - &Rafraîchir - - -- -+ - Alt+R - Refresh - Alt+R - - -- -+ - Readable Clients / Output Ports - Clients en lecture / Ports de sortie - - -- -+ - Writable Clients / Input Ports - Clients en ecriture / Ports d'entrée - -@@ -254,7 +259,7 @@ - - qjackctlConnect - -- -+ - Warning - Attention - -@@ -274,17 +279,17 @@ - Êtes-vous certain? - - -- -+ - Yes - Oui - - -- -+ - No - Non - - -- -+ - This will suspend sound processing - from all client applications. - -@@ -424,45 +429,45 @@ Voulez-vous enregistrer les changements? - - qjackctlConnectorView - -- -+ - &Connect - &Connecter - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Déconnecter - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - &Tout déconnecter - - -- -+ - Alt+A - Disconect All - Alt+T - - -- -+ - &Refresh - &Rafraîchir - - -- -+ - Alt+R - Refresh - Alt+R -@@ -3272,7 +3277,7 @@ pour créer une définition de baie de brassage? - Annuler - - -- -+ - Warning - Attention - -@@ -3287,12 +3292,12 @@ pour créer une définition de baie de brassage? - Voulez-vous enregistrer les changements? - - -- -+ - Save - Enregistrer - - -- -+ - Discard - Ignorer - -@@ -3307,77 +3312,77 @@ pour créer une définition de baie de brassage? - Êtes vous certain? - - -- -+ - msec - ms - - -- -+ - n/a - n/a - - -- -+ - &Preset Name - &Nom du préréglage - - -- -+ - &Server Path - &Chemin du serveur - - -- -+ - &Driver - Pilot&e - - -- -+ - &Interface - &Interface - - -- -+ - Sample &Rate - &Fréquence d'échantillonnage - - -- -+ - &Frames/Period - &Échantillons/Période - - -- -+ - Periods/&Buffer - Périodes/&Tampon - - -- -+ - Startup Script - Script de démarrage - - -- -+ - Post-Startup Script - Script post-démarrage - - -- -+ - Shutdown Script - Script d'extinction - - -- -+ - Post-Shutdown Script - Script post-extinction - - -- -+ - Patchbay Definition files - Fichiers de définition de baie de brassage - - -- -+ - Active Patchbay Definition - Définition de baie de brassage à activer - -@@ -3392,7 +3397,7 @@ pour créer une définition de baie de brassage? - Voulez-vous appliquer les changements? - - -- -+ - Apply - Appliquer - -@@ -3447,7 +3452,7 @@ pour créer une définition de baie de brassage? - plughw:0 - - -- -+ - Some settings have been changed: - - "%1" -@@ -3460,7 +3465,7 @@ Do you want to save the changes? - Voulez-vous enregistrer les changements? - - -- -+ - Delete preset: - - "%1" -@@ -3473,7 +3478,7 @@ Are you sure? - Êtes vous certain? - - -- -+ - Some settings have been changed. - - Do you want to apply the changes? -@@ -3482,12 +3487,12 @@ Do you want to apply the changes? - Voulez-vous appliquer les changements? - - -- -+ - Messages Log - - - -- -+ - Log files - - -diff --git a/translations/qjackctl_ru.ts b/translations/qjackctl_ru.ts -index 54f9a1a..791615d 100644 ---- a/translations/qjackctl_ru.ts -+++ b/translations/qjackctl_ru.ts -@@ -108,18 +108,18 @@ - Статус режима реального времени отключён. - - -- -+ - Website - Домашняя страница - - -- -+ - This program is free software; you can redistribute it and/or modify it - Это программа является свободной; вы можете распространять - и/или изменять её без ограничений - - -- -+ - under the terms of the GNU General Public License version 2 or later. - на условиях лицензии GNU General Public License версии 2 или более новой. - -@@ -149,7 +149,7 @@ - Поддержка JACK MIDI отключена. - - -- -+ - ALSA/MIDI sequencer support disabled. - Поддержка секвенсера ALSA/MIDI отключена. - -@@ -158,6 +158,11 @@ - About QjackCtl - о QJackCtl - -+ -+ -+ JACK Port aliases support disabled. -+ -+ - - - qjackctlClientListView -@@ -182,66 +187,66 @@ - Порты входа - - -- -+ - Readable Clients / Output Ports - - - -- -+ - Writable Clients / Input Ports - - - -- -+ - &Connect - - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Рассоединить - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - Рассоединить &все - - -- -+ - Alt+A - Disconect All - Alt+A - - -- -+ - Re&name - - - -- -+ - Alt+N - Rename - Alt+N - - -- -+ - &Refresh - &Обновить - - -- -+ - Alt+R - Refresh - Alt+R -@@ -250,7 +255,7 @@ - - qjackctlConnect - -- -+ - Warning - Предупреждение - -@@ -270,17 +275,17 @@ - Вы уверены? - - -- -+ - Yes - Да - - -- -+ - No - Нет - - -- -+ - This will suspend sound processing - from all client applications. - -@@ -450,45 +455,45 @@ Do you want to save the changes? - - qjackctlConnectorView - -- -+ - &Connect - - - -- -+ - Alt+C - Connect - Alt+C - - -- -+ - &Disconnect - &Рассоединить - - -- -+ - Alt+D - Disconnect - Alt+D - - -- -+ - Disconnect &All - Рассоединить &все - - -- -+ - Alt+A - Disconect All - Alt+A - - -- -+ - &Refresh - &Обновить - - -- -+ - Alt+R - Refresh - Alt+R -@@ -2670,12 +2675,12 @@ of all actual client connections? - Выберите шрифт для отображения сообщений сервера - - -- -+ - msec - мс - - -- -+ - n/a - н/д - -@@ -2695,7 +2700,7 @@ of all actual client connections? - Сценарий, выполняемый после остановки - - -- -+ - Patchbay Definition files - Файлы описания patchbay - -@@ -2845,37 +2850,37 @@ of all actual client connections? - Спрашивать ли подтверждение на выход из программы - - -- -+ - &Preset Name - Имя &предустановки - - -- -+ - &Server Path - &Путь к серверу - - -- -+ - &Driver - &Драйвер - - -- -+ - &Interface - &Интерфейс - - -- -+ - Sample &Rate - &Частота семпл. - - -- -+ - &Frames/Period - &Фреймов на период - - -- -+ - Periods/&Buffer - Периодов на &буфер - -@@ -3121,7 +3126,7 @@ of all actual client connections? - - - -- -+ - Warning - Предупреждение - -@@ -3136,12 +3141,12 @@ of all actual client connections? - Вы хотите сохранить изменения? - - -- -+ - Save - Сохранить - - -- -+ - Discard - Отказаться - -@@ -3166,12 +3171,12 @@ of all actual client connections? - Вы хотите учесть изменения? - - -- -+ - Apply - Учесть - - -- -+ - Some settings have been changed: - - "%1" -@@ -3180,7 +3185,7 @@ Do you want to save the changes? - - - -- -+ - Delete preset: - - "%1" -@@ -3189,42 +3194,42 @@ Are you sure? - - - -- -+ - Startup Script - - - -- -+ - Post-Startup Script - - - -- -+ - Shutdown Script - - - -- -+ - Post-Shutdown Script - - - -- -+ - Active Patchbay Definition - - - -- -+ - Messages Log - - - -- -+ - Log files - - - -- -+ - Some settings have been changed. - - Do you want to apply the changes? -diff --git a/win32/config.h b/win32/config.h -index 37af96b..d0413df 100644 ---- a/win32/config.h -+++ b/win32/config.h -@@ -1,6 +1,6 @@ - - #define PACKAGE_NAME "QjackCtl" --#define PACKAGE_VERSION "0.3.4" -+#define PACKAGE_VERSION "0.3.4.2" - - #define CONFIG_PREFIX "." - #define CONFIG_DEBUG 1 -@@ -12,6 +12,7 @@ - #define CONFIG_JACK_STATISTICS - #define CONFIG_JACK_XRUN_DELAY - #define CONFIG_JACK_MAX_DELAY -+#define CONFIG_JACK_PORT_ALIASES - - #undef CONFIG_JACK_MIDI - #undef CONFIG_ALSA_SEQ diff -Nru qjackctl-0.3.4/debian/patches/03_realtimedefault.patch qjackctl-0.3.6/debian/patches/03_realtimedefault.patch --- qjackctl-0.3.4/debian/patches/03_realtimedefault.patch 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/patches/03_realtimedefault.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -Description: Comply with jackd >= 0.118.0 which now runs in real-time mode by default -Origin: http://qjackctl.svn.sourceforge.net/viewvc/qjackctl/trunk/src/qjackctlMainForm.cpp?r1=576&r2=579 -Forwarded: not-needed -diff -Nur -x '*.orig' -x '*~' qjackctl-0.3.4/build-tree/qjackctl-0.3.4/src/qjackctlMainForm.cpp qjackctl-0.3.4.new/build-tree/qjackctl-0.3.4/src/qjackctlMainForm.cpp ---- qjackctl-0.3.4/src/qjackctlMainForm.cpp 2008-10-02 18:18:12.000000000 +0200 -+++ qjackctl-0.3.4/src/qjackctlMainForm.cpp 2010-03-14 13:02:07.412430975 +0100 -@@ -801,10 +801,11 @@ - if (m_preset.bVerbose) - args.append("-v"); - if (m_preset.bRealtime) { -- args.append("-R"); -+ // args.append("-R"); - if (m_preset.iPriority > 0 && !bCoreaudio) - args.append("-P" + QString::number(m_preset.iPriority)); - } -+ else args.append("-r"); - if (m_preset.iPortMax > 0 && m_preset.iPortMax != 256) - args.append("-p" + QString::number(m_preset.iPortMax)); - if (m_preset.iTimeout > 0 && m_preset.iTimeout != 500) diff -Nru qjackctl-0.3.4/debian/qjackctl.1 qjackctl-0.3.6/debian/qjackctl.1 --- qjackctl-0.3.4/debian/qjackctl.1 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/qjackctl.1 2010-05-30 16:12:28.000000000 +0100 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH QJACKCTL 1 "March 29, 2004" +.TH QJACKCTL 1 "January 11, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -29,14 +29,14 @@ .PP \fBqjackctl \fP is used for controlling the Jack Audio Connection -Kit (JACK) and as a patchbay for ALSA Midi devices. Qjackctl also has +Kit (JACK) and as a patchbay for ALSA MIDI devices. Qjackctl also has support for the JACK transport control protocol, so you can use it to -start and stop the JACK transport. Once you start qjachctl you get +start and stop the JACK transport. Once you start qjackctl, you get presented with a single GUI window, the buttons are self-explanatory and have tooltips. .SH OPTIONS -This program follow the usual GNU command line syntax, with long +This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. @@ -57,7 +57,8 @@ .br .SH FILES -Settings for the jack system are stored in ~/.qt/qjackctlrc and ~/.jackdrc. +Settings for the jack system are stored in ~/.config/rncbc.org/QjackCtl.conf +and ~/.jackdrc. .SH AUTHOR This manual page was written by Guenter Geiger , diff -Nru qjackctl-0.3.4/debian/qjackctl.desktop qjackctl-0.3.6/debian/qjackctl.desktop --- qjackctl-0.3.4/debian/qjackctl.desktop 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/qjackctl.desktop 2010-05-30 16:12:28.000000000 +0100 @@ -4,5 +4,5 @@ Exec=/usr/bin/qjackctl Terminal=false Type=Application -Icon=qjackctl -Categories=AudioVideo;Audio; +Icon=qjackctl.xpm +Categories=Application;AudioVideo;Audio; diff -Nru qjackctl-0.3.4/debian/qjackctl.install qjackctl-0.3.6/debian/qjackctl.install --- qjackctl-0.3.4/debian/qjackctl.install 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/qjackctl.install 2010-05-30 16:12:28.000000000 +0100 @@ -1,3 +1,2 @@ debian/qjackctl.xpm usr/share/pixmaps debian/qjackctl.desktop usr/share/applications -debian/qjackctl.wrapper /usr/bin diff -Nru qjackctl-0.3.4/debian/qjackctl.wrapper qjackctl-0.3.6/debian/qjackctl.wrapper --- qjackctl-0.3.4/debian/qjackctl.wrapper 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/qjackctl.wrapper 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -#!/bin/sh -PATH=/bin:/usr/bin:/sbin:/usr/sbin -QJACKCTL=$(which qjackctl.bin) -PULSEAUDIO=$(pgrep -f pulseaudio > /dev/null) - -if $PULSEAUDIO; then - - PACTL=$(which pactl) - JACK=$($PACTL list | grep jack-sink) - PASUSPENDER=$(which pasuspender) - - if [ $PACTL -a $JACK ]; then - echo "Using JACK for audio"; - $QJACKCTL "$@"; - elif [ $PASUSPENDER ]; then - echo "Suspending PulseAudio"; - $PASUSPENDER -- $QJACKCTL "$@"; - else - echo "Cannot suspend PulseAudio"; - $QJACKCTL "$@"; - exit 1; - fi - -else - - $QJACKCTL "$@"; - -fi diff -Nru qjackctl-0.3.4/debian/rules qjackctl-0.3.6/debian/rules --- qjackctl-0.3.4/debian/rules 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/rules 2010-05-30 16:12:28.000000000 +0100 @@ -1,19 +1,25 @@ #!/usr/bin/make -f -DEB_TAR_SRCDIR := qjackctl-0.3.4 - CFLAGS = -Wall -g export QTDIR=/usr/share/qt4 include /usr/share/cdbs/1/rules/simple-patchsys.mk -include /usr/share/cdbs/1/rules/tarball.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/usr DEB_MAKE_INSTALL_TARGET := install prefix=$(DEB_DESTDIR)/usr +DEB_MAKE_CLEAN_TARGET := clean + +cleanbuilddir:: + rm -rf .moc/ .obj/ .ui/ + -cp -a debian/translations . ; rm -rf debian/translations + +install/qjackctl:: + rm -rf debian/qjackctl/usr/share/gnome debian/qjackctl/usr/sbin/ + +makebuilddir/qjackctl:: + cp -a translations debian/ + -binary-install/qjackctl:: - mv $(CURDIR)/debian/qjackctl/usr/bin/qjackctl $(CURDIR)/debian/qjackctl/usr/bin/qjackctl.bin - mv $(CURDIR)/debian/qjackctl/usr/bin/qjackctl.wrapper $(CURDIR)/debian/qjackctl/usr/bin/qjackctl diff -Nru qjackctl-0.3.4/debian/watch qjackctl-0.3.6/debian/watch --- qjackctl-0.3.4/debian/watch 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/debian/watch 2010-05-30 16:12:28.000000000 +0100 @@ -2,5 +2,5 @@ # Rename this file to "watch" and then you can run the "uscan" command # to check for upstream updates and more. # Site Directory Pattern Version Script -version=2 -http://heanet.dl.sourceforge.net/sourceforge/qjackctl/qjackctl-(.*).tar.gz debian uupdate +version=3 +http://sf.net/qjackctl/qjackctl-(.+)\.tar\.gz Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/about1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/about1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/accept1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/accept1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aclienti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aclienti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aclienti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aclienti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aclienti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aclienti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/acliento_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/acliento_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/acliento_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/acliento_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/acliento.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/acliento.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/add1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/add1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlni_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlni_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlni_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlni_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlni.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlni.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlno_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlno_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlno_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlno_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlno.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlno.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportlto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportlto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpni_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpni_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpni_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpni_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpni.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpni.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpno_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpno_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpno_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpno_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpno.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpno.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/aportpto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/aportpto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/apply1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/apply1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/asocketi.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/asocketi.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/asocketo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/asocketo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/backward1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/backward1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/connect1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/connect1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/connections1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/connections1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/copy1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/copy1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/disconnect1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/disconnect1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/disconnectall1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/disconnectall1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/displaybg1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/displaybg1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/down1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/down1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/edit1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/edit1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/forward1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/forward1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mclienti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mclienti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mclienti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mclienti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mclienti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mclienti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mcliento_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mcliento_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mcliento_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mcliento_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mcliento.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mcliento.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/messages1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/messages1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/mporto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/mporto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/msocketi.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/msocketi.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/msocketo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/msocketo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/new1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/new1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/open1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/open1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/patchbay1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/patchbay1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/pause1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/pause1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/play1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/play1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/qjackctl.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/qjackctl.png differ diff -Nru qjackctl-0.3.4/icons/qjackctl.qrc qjackctl-0.3.6/icons/qjackctl.qrc --- qjackctl-0.3.4/icons/qjackctl.qrc 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/icons/qjackctl.qrc 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,92 @@ + + + qjackctl.png + about1.png + accept1.png + aclienti.png + aclienti_32x32.png + aclienti_64x64.png + acliento.png + acliento_32x32.png + acliento_64x64.png + add1.png + aportlni.png + aportlni_32x32.png + aportlni_64x64.png + aportlno.png + aportlno_32x32.png + aportlno_64x64.png + aportlti.png + aportlti_32x32.png + aportlti_64x64.png + aportlto.png + aportlto_32x32.png + aportlto_64x64.png + aportpni.png + aportpni_32x32.png + aportpni_64x64.png + aportpno.png + aportpno_32x32.png + aportpno_64x64.png + aportpti.png + aportpti_32x32.png + aportpti_64x64.png + aportpto.png + aportpto_32x32.png + aportpto_64x64.png + apply1.png + asocketi.png + asocketo.png + backward1.png + connect1.png + connections1.png + copy1.png + disconnect1.png + disconnectall1.png + displaybg1.png + down1.png + edit1.png + forward1.png + mclienti.png + mclienti_32x32.png + mclienti_64x64.png + mcliento.png + mcliento_32x32.png + mcliento_64x64.png + messages1.png + mporti.png + mporti_32x32.png + mporti_64x64.png + mporto.png + mporto_32x32.png + mporto_64x64.png + msocketi.png + msocketo.png + new1.png + open1.png + patchbay1.png + pause1.png + play1.png + quit1.png + refresh1.png + remove1.png + reset1.png + rewind1.png + save1.png + setup1.png + socket1.png + start1.png + status1.png + stop1.png + up1.png + xactivating1.png + xactive1.png + xinactive1.png + xsocket1.png + xstarted1.png + xstarting1.png + xstopped1.png + xstopping1.png + qtlogo.png + + Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/qtlogo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/qtlogo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/quit1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/quit1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/refresh1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/refresh1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/remove1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/remove1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/reset1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/reset1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/rewind1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/rewind1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/save1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/save1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/setup1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/setup1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/socket1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/socket1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/start1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/start1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/status1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/status1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/stop1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/stop1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/up1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/up1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xactivating1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xactivating1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xactive1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xactive1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xinactive1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xinactive1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xsocket1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xsocket1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xstarted1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xstarted1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xstarting1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xstarting1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xstopped1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xstopped1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/icons/xstopping1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/icons/xstopping1.png differ diff -Nru qjackctl-0.3.4/INSTALL qjackctl-0.3.6/INSTALL --- qjackctl-0.3.4/INSTALL 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/INSTALL 2003-07-26 22:07:57.000000000 +0100 @@ -0,0 +1,167 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Type `make install' to install the programs and any data files and + documentation. + + 4. You can remove the program binaries and object files from the + source code directory by typing `make clean'. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff -Nru qjackctl-0.3.4/Makefile.in qjackctl-0.3.6/Makefile.in --- qjackctl-0.3.4/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/Makefile.in 2010-01-11 19:23:27.000000000 +0000 @@ -0,0 +1,111 @@ +prefix = @ac_prefix@ +qmake = @ac_qmake@ +lupdate = @ac_lupdate@ +lrelease = @ac_lrelease@ + +name = qjackctl + +headers = config.h \ + src/qjackctlAbout.h \ + src/qjackctlAlsaConnect.h \ + src/qjackctlConnect.h \ + src/qjackctlConnectAlias.h \ + src/qjackctlJackConnect.h \ + src/qjackctlPatchbay.h \ + src/qjackctlPatchbayFile.h \ + src/qjackctlPatchbayRack.h \ + src/qjackctlSetup.h \ + src/qjackctlStatus.h \ + src/qjackctlSystemTray.h \ + src/qjackctlAboutForm.h \ + src/qjackctlConnectionsForm.h \ + src/qjackctlMainForm.h \ + src/qjackctlMessagesForm.h \ + src/qjackctlPatchbayForm.h \ + src/qjackctlSetupForm.h \ + src/qjackctlSocketForm.h \ + src/qjackctlStatusForm.h + +sources = src/main.cpp \ + src/qjackctlAlsaConnect.cpp \ + src/qjackctlConnect.cpp \ + src/qjackctlConnectAlias.cpp \ + src/qjackctlJackConnect.cpp \ + src/qjackctlPatchbay.cpp \ + src/qjackctlPatchbayFile.cpp \ + src/qjackctlPatchbayRack.cpp \ + src/qjackctlSetup.cpp \ + src/qjackctlSystemTray.cpp \ + src/qjackctlAboutForm.cpp \ + src/qjackctlConnectionsForm.cpp \ + src/qjackctlMainForm.cpp \ + src/qjackctlMessagesForm.cpp \ + src/qjackctlPatchbayForm.cpp \ + src/qjackctlSetupForm.cpp \ + src/qjackctlSocketForm.cpp \ + src/qjackctlStatusForm.cpp + +forms = \ + src/qjackctlAboutForm.ui \ + src/qjackctlConnectionsForm.ui \ + src/qjackctlMainForm.ui \ + src/qjackctlMessagesForm.ui \ + src/qjackctlPatchbayForm.ui \ + src/qjackctlSetupForm.ui \ + src/qjackctlSocketForm.ui \ + src/qjackctlStatusForm.ui + +translations_sources = \ + translations/qjackctl_cs.ts \ + translations/qjackctl_de.ts \ + translations/qjackctl_es.ts \ + translations/qjackctl_fr.ts \ + translations/qjackctl_ru.ts + +translations_targets = \ + translations/qjackctl_cs.qm \ + translations/qjackctl_de.qm \ + translations/qjackctl_es.qm \ + translations/qjackctl_fr.qm \ + translations/qjackctl_ru.qm + +all: $(name) + +$(name).mak: $(name).pro + @$(qmake) -o $(name).mak $(name).pro + +$(name): $(name).mak $(sources) $(headers) $(forms) + @make -f $(name).mak + +%.ts: $(name).pro $(sources) $(headers) $(forms) + @$(lupdate) -verbose $(name).pro + +%.qm: %.ts + @$(lrelease) -verbose $< -qm $@ + +install: $(name) icons/$(name).png $(translations_targets) $(name).1 + @install -d -v -m 0755 $(DESTDIR)$(prefix)/bin + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/pixmaps + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/applications + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/locale + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/man/man1 + @install -v -m 0755 $(name) $(DESTDIR)$(prefix)/bin/$(name) + @install -v -m 0644 icons/$(name).png $(DESTDIR)$(prefix)/share/pixmaps/$(name).png + @install -v -m 0644 $(name).desktop $(DESTDIR)$(prefix)/share/applications/$(name).desktop + @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/locale + @install -v -m 0644 $(name).1 $(DESTDIR)$(prefix)/share/man/man1/$(name).1 + +uninstall: $(DESTDIR)$(prefix)/bin/$(name) + @rm -vf $(DESTDIR)$(prefix)/bin/$(name) + @rm -vf $(DESTDIR)$(prefix)/share/pixmaps/$(name).png + @rm -vf $(DESTDIR)$(prefix)/share/applications/$(name).desktop + @rm -vf $(DESTDIR)$(prefix)/share/locale/$(translations_targets) + @for x in $(translations_targets); do \ + rm -vf $(DESTDIR)$(prefix)/share/locale/`basename $$x`; done + @rm -vf $(DESTDIR)$(prefix)/share/man/man1/$(name).1 + +clean: $(name).mak + @make -f $(name).mak clean + @rm -f $(name) $(name).mak + @rm -rf *.cache *.log *.status $(translations_targets) + diff -Nru qjackctl-0.3.4/Makefile.svn qjackctl-0.3.6/Makefile.svn --- qjackctl-0.3.4/Makefile.svn 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/Makefile.svn 2009-10-22 23:49:32.000000000 +0100 @@ -0,0 +1,11 @@ +all: configure + +configure: Makefile.in configure.ac + @autoheader + @autoconf + @rm -rf *.cache + +clean: + @if [ -f Makefile ]; then make clean; fi || true + @rm -rvf Makefile configure config.* .ui .obj .moc + @rm -rvf *.cache *.log *.status *.pro *.spec *.desktop Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/qjackctl-0.3.4.tar.gz and /tmp/xtkBrD3mXL/qjackctl-0.3.6/qjackctl-0.3.4.tar.gz differ diff -Nru qjackctl-0.3.4/qjackctl-0.3.4.tar.gz.cdbs-config_list qjackctl-0.3.6/qjackctl-0.3.4.tar.gz.cdbs-config_list --- qjackctl-0.3.4/qjackctl-0.3.4.tar.gz.cdbs-config_list 2010-05-30 16:12:27.000000000 +0100 +++ qjackctl-0.3.6/qjackctl-0.3.4.tar.gz.cdbs-config_list 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -qjackctl-0.3.4/config.h.in -qjackctl-0.3.4/win32/config.h diff -Nru qjackctl-0.3.4/qjackctl.1 qjackctl-0.3.6/qjackctl.1 --- qjackctl-0.3.4/qjackctl.1 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/qjackctl.1 2010-01-11 20:01:09.000000000 +0000 @@ -0,0 +1,71 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH QJACKCTL 1 "January 11, 2010" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +qjackctl \- User interface for controlling JACK (Jack Audio Connection Kit) +.SH SYNOPSIS +.B qjackctl +.RI [options] +.SH DESCRIPTION +This manual page documents briefly the +.B qjackctl +command. +This manual page was written for the Debian distribution +because the original program does not have a manual page. + +.PP +\fBqjackctl \fP is used for controlling the Jack Audio Connection +Kit (JACK) and as a patchbay for ALSA MIDI devices. Qjackctl also has +support for the JACK transport control protocol, so you can use it to +start and stop the JACK transport. Once you start qjackctl, you get +presented with a single GUI window, the buttons are self-explanatory +and have tooltips. + +.SH OPTIONS +This program follows the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +For a complete description, see the Info files. +.TP +.B \-s, \-\-start +Start JACK audio server immediately +.TP +.B \-p, \-\-preset=[label] +Set default settings preset name +.TP +.B \-a, \-\-active\-patchbay=[path] +Set active patchbay definition file +.TP +.B \-n, \-\-server\-name=[label] +Set default JACK audio server name +.TP +.B \-h, \-\-help +Show help about command line options +.TP +.B \-v, \-\-version +Show version information. +.SH SEE ALSO +.BR jackd(1). +.br + +.SH FILES +Settings for the JACK system are stored in ~/.config/rncbc.org/QjackCtl.conf +and optionally in ~/.jackdrc. + +.SH AUTHOR +This manual page was written by Guenter Geiger , +for the Debian project (but may be used by others). diff -Nru qjackctl-0.3.4/qjackctl.desktop.in qjackctl-0.3.6/qjackctl.desktop.in --- qjackctl-0.3.4/qjackctl.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/qjackctl.desktop.in 2009-09-25 19:35:05.000000000 +0100 @@ -0,0 +1,16 @@ +[Desktop Entry] +Name=QjackCtl +GenericName=JACK Control +GenericName[de]=JACK-Steuerung +GenericName[fr]=Contrôle JACK +GenericName[ru]=Управление JACK +Comment=QjackCtl is a JACK Audio Connection Kit Qt GUI Interface +Comment[de]=Grafisches Werkzeug zur Steuerung des JACK-Audio-Systems +Comment[fr]=QjackCtl est une interface graphique Qt pour le kit de connexion audio JACK +Comment[ru]=Программа для управления звуковым сервером JACK +Exec=@ac_prefix@/bin/qjackctl +Icon=@ac_prefix@/share/pixmaps/qjackctl.png +Categories=Audio;AudioVideo;MIDI;JACK;ALSA;Qt; +Terminal=false +Type=Application +X-SuSE-translate=true diff -Nru qjackctl-0.3.4/qjackctl.pro.in qjackctl-0.3.6/qjackctl.pro.in --- qjackctl-0.3.4/qjackctl.pro.in 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/qjackctl.pro.in 2009-10-06 09:03:08.000000000 +0100 @@ -0,0 +1,72 @@ +INCPATH += ./src + +HEADERS += src/qjackctlAbout.h \ + src/qjackctlAlsaConnect.h \ + src/qjackctlConnect.h \ + src/qjackctlConnectAlias.h \ + src/qjackctlJackConnect.h \ + src/qjackctlPatchbay.h \ + src/qjackctlPatchbayFile.h \ + src/qjackctlPatchbayRack.h \ + src/qjackctlSetup.h \ + src/qjackctlStatus.h \ + src/qjackctlSystemTray.h \ + src/qjackctlAboutForm.h \ + src/qjackctlConnectionsForm.h \ + src/qjackctlMainForm.h \ + src/qjackctlMessagesForm.h \ + src/qjackctlPatchbayForm.h \ + src/qjackctlSetupForm.h \ + src/qjackctlSocketForm.h \ + src/qjackctlStatusForm.h + +SOURCES += src/main.cpp \ + src/qjackctlAlsaConnect.cpp \ + src/qjackctlConnect.cpp \ + src/qjackctlConnectAlias.cpp \ + src/qjackctlJackConnect.cpp \ + src/qjackctlPatchbay.cpp \ + src/qjackctlPatchbayFile.cpp \ + src/qjackctlPatchbayRack.cpp \ + src/qjackctlSetup.cpp \ + src/qjackctlSystemTray.cpp \ + src/qjackctlAboutForm.cpp \ + src/qjackctlConnectionsForm.cpp \ + src/qjackctlMainForm.cpp \ + src/qjackctlMessagesForm.cpp \ + src/qjackctlPatchbayForm.cpp \ + src/qjackctlSetupForm.cpp \ + src/qjackctlSocketForm.cpp \ + src/qjackctlStatusForm.cpp + +FORMS = src/qjackctlAboutForm.ui \ + src/qjackctlConnectionsForm.ui \ + src/qjackctlMainForm.ui \ + src/qjackctlMessagesForm.ui \ + src/qjackctlPatchbayForm.ui \ + src/qjackctlSetupForm.ui \ + src/qjackctlSocketForm.ui \ + src/qjackctlStatusForm.ui + +RESOURCES += icons/qjackctl.qrc + +TEMPLATE = app +CONFIG += qt thread warn_on @ac_debug@ @ac_qdbus@ +LANGUAGE = C++ + +TRANSLATIONS = \ + translations/qjackctl_cs.ts \ + translations/qjackctl_de.ts \ + translations/qjackctl_es.ts \ + translations/qjackctl_fr.ts \ + translations/qjackctl_ru.ts + +LIBS += @ac_libs@ +INCPATH += @ac_incpath@ + +OBJECTS_DIR = .obj +MOC_DIR = .moc +UI_DIR = .ui + +# XML/DOM support +QT += xml diff -Nru qjackctl-0.3.4/qjackctl.spec.in qjackctl-0.3.6/qjackctl.spec.in --- qjackctl-0.3.4/qjackctl.spec.in 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/qjackctl.spec.in 2010-03-09 18:47:23.000000000 +0000 @@ -0,0 +1,85 @@ +%define name @PACKAGE_TARNAME@ +%define version @PACKAGE_VERSION@ +%define release 13 +%define prefix @ac_prefix@ + +Summary: JACK Audio Connection Kit Qt GUI Interface +Name: %{name} +Version: %{version} +Release: %{release} +Prefix: %{prefix} +License: GPL +Group: Productivity/Multimedia/Sound/Utilities +Source0: %{name}-%{version}.tar.gz +URL: http://qjackctl.sourceforge.net/ + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +Requires: libqt4 >= 4.1 +Requires: libjack >= 0.100.0 +Requires: alsa + +BuildRequires: libqt4-devel >= 4.1 +BuildRequires: libjack-devel >= 0.100.0 +BuildRequires: alsa-devel + +%description +JACK Audio Connection Kit - Qt GUI Interface: A simple Qt application +to control the JACK server. Written in C++ around the Qt4 toolkit +for X11, most exclusively using Qt Designer. Provides a simple GUI +dialog for setting several JACK server parameters, which are properly +saved between sessions, and a way control of the status of the audio +server. With time, this primordial interface has become richer by +including a enhanced patchbay and connection control features. + +%prep +%setup +[ -f Makefile.svn ] && %__make -f Makefile.svn + +%build +%configure +%__make + +%install +%makeinstall + +%clean +[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog README TODO +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/locale/%{name}_*.qm +%{_datadir}/man/man1/%{name}.1 + +%changelog +* Mon Jan 11 2010 Rui Nuno Capela 0.3.6 +- Full D-Busification! +* Mon Jan 11 2010 Rui Nuno Capela +- Man page added. +* Wed Sep 30 2009 Rui Nuno Capela 0.3.5 +- Slipped away! +* Fri Dec 05 2008 Rui Nuno Capela 0.3.4 +- Patchbay snapshot revamp. +* Sat Jun 07 2008 Rui Nuno Capela 0.3.3 +- Patchbay JACK-MIDI, file logging and X11 uniqueness. +* Thu Dec 20 2007 Rui Nuno Capela 0.3.2 +- Patchbay heads-up with season greetings. +* Thu Jul 19 2007 Rui Nuno Capela +- System-tray tooltip icon crash fix. +* Wed Jul 18 2007 Rui Nuno Capela 0.3.1 +- Shallowed bug-fix release.. +* Tue Jul 10 2007 Rui Nuno Capela 0.3.0 +- Qt4 migration was complete. +* Mon Jun 25 2007 Rui Nuno Capela +- Application icon is now installed to (prefix)/share/pixmaps. +- Declared fundamental build and run-time requirements. +- Destination install directory prefix is now in spec. +- Spec is now a bit more openSUSE compliant. +* Wed May 31 2006 Rui Nuno Capela +- Changed copyright to license attribute +* Wed Aug 24 2005 Rui Nuno Capela +- Created initial qjackctl.spec diff -Nru qjackctl-0.3.4/README qjackctl-0.3.6/README --- qjackctl-0.3.4/README 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/README 2010-03-05 15:23:16.000000000 +0000 @@ -0,0 +1,143 @@ +QjackCtl - JACK Audio Connection Kit Qt GUI Interface +----------------------------------------------------- + +QjackCtl is a simple Qt application to control the JACK sound server +(http://jackaudio.org), for the Linux Audio infrastructure. + +Written in C++ around the Qt4 toolkit for X11, most exclusively using +Qt Designer. + +Provides a simple GUI dialog for setting several JACK server parameters, +which are properly saved between sessions, and a way control of the +status of the audio server. With time, this primordial interface has +become richer by including a enhanced patchbay and connection control +features. + +Homepage: http://qjackctl.sourceforge.net + +License: GNU General Public License (GPL) + + +Requirements +------------ + +The software requirements for build and runtime are listed as follows: + + Mandatory: + + - Qt4 (core, gui, xml), C++ class library and tools for + crossplatform development and internationalization + http://qt.nokia.com/products/ + + - JACK Audio Connection Kit + http://jackaudio.org/ + + Optional (opted-in at build time): + + - ALSA, Advanced Linux Sound Architecture + http://www.alsa-project.org/ + + +Installation +------------ + +The installation procedure follows the standard for source distributions: + + ./configure [--prefix=/usr/local] + make + +and optionally as root: + + make install + +This procedure will end installing the following files: + + ${prefix}/bin/qjackctl + ${prefix}/share/pixmaps/qjackctl.png + ${prefix}/share/applications/qjackctl.desktop + ${prefix}/share/locale/qjackctl_*.qm + ${prefix}/share/man/man1/qjackctl.1 + +Just launch ${prefix}/bin/qjackctl and you're off (hopefully). + +If you're checking out from Subversion (SVN), you'll have to prepare the +configure script just before you proceed with the above instructions: + + make -f Makefile.svn + + +Configuration +------------- + +QjackCtl holds its settings and configuration state per user, in a file +located as $HOME/.config/rncbc.org/QjackCtl.conf . Normally, there's no +need to edit this file, as it is recreated and rewritten everytime +qjackctl is run. + + +Bugs +---- + +Probably plenty still, QjackCtl maybe considered on beta stage already. +It has been locally tested since JACK release 0.98.0, with custom 2.4 +kernels with low-latency, preemptible and capabilities enabling patches. +As for 2.6 kernels, the emergence of Ingo Molnar's Realtime Preemption +kernel patch it's being now recommended for your taking benefit of the +realtime and low-latency audio pleasure JACK can give. + + +Support +------- + +QjackCtl is open source free software. For bug reports, feature +requests, discussion forums, mailling lists, or any other matter +related to the development of this piece of software, please use the +Sourceforge project page (http://sourceforge.net/projects/qjackctl). + +You can also find timely and closer contact information on my personal +web site (http://www.rncbc.org). + + +Acknowledgments +--------------- + +QjackCtl's user interface layout (and the whole idea for that matter) +was partially borrowed from origoinal Lawrie Abbott's jacko project, +which was taken from wxWindow/Python into the Qt/C++ arena. + +Since 2003-08-06, qjackctl has been included in the awesome Planet CCRMA +(http://ccrma-www.stanford.edu/planetccrma/software/) software collection. +Thanks a lot Fernando! + +Here are some people who helped this project in one way or another, +and in fair and strict alphabetic order: + + Alexandre Prokoudine Kasper Souren + Andreas Persson Kjetil Matheussen + Austin Acton Ken Ellinwood + Ben Powers Lawrie Abbott + Chris Cannam Lee Revell + Dan Nigrin Lucas Brasilino + Dave Moore Marc-Olivier Barre + Dave Phillips Mark Knecht + Dirk Jagdmann Matthias Nagorni + Dominic Sacre Melanie + Fernando Pablo Lopez-Lezcano Nedko Arnaudov + Filipe Tomas Orm Finnendahl + Florian Schmidt Paul Davis + Fons Adriaensen Robert Jonsson + Geoff Beasley Robin Gareus + Jack O'Quin Sampo Savolainen + Jacob Meuser Stephane Letz + Jesse Chappell Steve Harris + Joachim Deguara Taybin Rutkin + John Schneiderman Wilfried Huss + Jussi Laako Wolfgang Woehl + Karsten Wiese + +A special mention should go to the translators of QjackCtl (see TRANSLATORS). + +Thanks to you all. +-- +rncbc aka Rui Nuno Capela +rncbc@rncbc.org diff -Nru qjackctl-0.3.4/src/main.cpp qjackctl-0.3.6/src/main.cpp --- qjackctl-0.3.4/src/main.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/main.cpp 2009-11-04 12:00:52.000000000 +0000 @@ -0,0 +1,416 @@ +// main.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlSetup.h" +#include "qjackctlMainForm.h" + +#include +#include +#include +#include + +#if QT_VERSION < 0x040300 +#define lighter(x) light(x) +#define darker(x) dark(x) +#endif + +#if QT_VERSION < 0x040500 +namespace Qt { +const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); +#if QT_VERSION < 0x040200 +const WindowFlags CustomizeWindowHint = WindowFlags(0x02000000); +#endif +} +#endif + + +//------------------------------------------------------------------------- +// Singleton application instance stuff (Qt/X11 only atm.) +// + +#if defined(Q_WS_X11) + +#include + +#include +#include + +#define QJACKCTL_XUNIQUE "qjackctlApplication" + +#endif + +class qjackctlApplication : public QApplication +{ +public: + + // Constructor. + qjackctlApplication(int& argc, char **argv) : QApplication(argc, argv), + m_pQtTranslator(0), m_pMyTranslator(0), m_pWidget(0) + { + // Load translation support. + QLocale loc; + if (loc.language() != QLocale::C) { + // Try own Qt translation... + m_pQtTranslator = new QTranslator(this); + QString sLocName = "qt_" + loc.name(); + QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); + if (m_pQtTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pQtTranslator); + } else { + delete m_pQtTranslator; + m_pQtTranslator = 0; + #ifdef CONFIG_DEBUG + qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", + loc.name().toUtf8().constData(), + sLocPath.toUtf8().constData(), + sLocName.toUtf8().constData()); + #endif + } + // Try own application translation... + m_pMyTranslator = new QTranslator(this); + sLocName = "qjackctl_" + loc.name(); + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); + } else { + sLocPath = CONFIG_PREFIX "/share/locale"; + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); + } else { + delete m_pMyTranslator; + m_pMyTranslator = 0; + #ifdef CONFIG_DEBUG + qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", + loc.name().toUtf8().constData(), + sLocPath.toUtf8().constData(), + sLocName.toUtf8().constData()); + #endif + } + } + } + #if defined(Q_WS_X11) + m_pDisplay = NULL; + m_wOwner = None; + #endif + } + + // Destructor. + ~qjackctlApplication() + { + if (m_pMyTranslator) delete m_pMyTranslator; + if (m_pQtTranslator) delete m_pQtTranslator; + } + + // Main application widget accessors. + void setMainWidget(QWidget *pWidget) + { + m_pWidget = pWidget; + #if defined(Q_WS_X11) + if (m_pDisplay) { + XGrabServer(m_pDisplay); + m_wOwner = m_pWidget->winId(); + XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); + XUngrabServer(m_pDisplay); + } + #endif + } + + QWidget *mainWidget() const { return m_pWidget; } + + // Check if another instance is running, + // and raise its proper main widget... + bool setup(const QString& sServerName) + { + #if defined(Q_WS_X11) + m_pDisplay = QX11Info::display(); + QString sUnique = QJACKCTL_XUNIQUE; + if (sServerName.isEmpty()) { + const char *pszServerName = ::getenv("JACK_DEFAULT_SERVER"); + if (pszServerName) { + sUnique += '_'; + sUnique += pszServerName; + } + } else { + sUnique += '_'; + sUnique += sServerName; + } + char szHostName[255]; + if (::gethostname(szHostName, sizeof(szHostName)) == 0) { + sUnique += '@'; + sUnique += szHostName; + } + m_aUnique = XInternAtom(m_pDisplay, sUnique.toUtf8().constData(), false); + XGrabServer(m_pDisplay); + m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); + XUngrabServer(m_pDisplay); + if (m_wOwner != None) { + // First, notify any freedesktop.org WM + // that we're about to show the main widget... + Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay); + int iScreen = XScreenNumberOfScreen(pScreen); + XEvent ev; + memset(&ev, 0, sizeof(ev)); + ev.xclient.type = ClientMessage; + ev.xclient.display = m_pDisplay; + ev.xclient.window = m_wOwner; + ev.xclient.message_type = XInternAtom(m_pDisplay, "_NET_ACTIVE_WINDOW", false); + ev.xclient.format = 32; + ev.xclient.data.l[0] = 0; // Source indication. + ev.xclient.data.l[1] = 0; // Timestamp. + ev.xclient.data.l[2] = 0; // Requestor's currently active window (none) + ev.xclient.data.l[3] = 0; + ev.xclient.data.l[4] = 0; + XSelectInput(m_pDisplay, m_wOwner, StructureNotifyMask); + XSendEvent(m_pDisplay, RootWindow(m_pDisplay, iScreen), false, + (SubstructureNotifyMask | SubstructureRedirectMask), &ev); + XSync(m_pDisplay, false); + XRaiseWindow(m_pDisplay, m_wOwner); + // And then, let it get caught on destination + // by QApplication::x11EventFilter... + QByteArray value = QJACKCTL_XUNIQUE; + XChangeProperty( + m_pDisplay, + m_wOwner, + m_aUnique, + m_aUnique, 8, + PropModeReplace, + (unsigned char *) value.data(), + value.length()); + // Done. + return true; + } + #endif + return false; + } + +#if defined(Q_WS_X11) + bool x11EventFilter(XEvent *pEv) + { + if (m_pWidget && m_wOwner != None + && pEv->type == PropertyNotify + && pEv->xproperty.window == m_wOwner + && pEv->xproperty.state == PropertyNewValue) { + // Always check whether our property-flag is still around... + Atom aType; + int iFormat = 0; + unsigned long iItems = 0; + unsigned long iAfter = 0; + unsigned char *pData = 0; + if (XGetWindowProperty( + m_pDisplay, + m_wOwner, + m_aUnique, + 0, 1024, + false, + m_aUnique, + &aType, + &iFormat, + &iItems, + &iAfter, + &pData) == Success + && aType == m_aUnique && iItems > 0 && iAfter == 0) { + // Avoid repeating it-self... + XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); + // Just make it always shows up fine... + m_pWidget->show(); + m_pWidget->raise(); + m_pWidget->activateWindow(); + // FIXME: Do our best speciality, although it should be + // done iif configuration says so, we'll do it anyway! + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->startJack(); + } + // Free any left-overs... + if (iItems > 0 && pData) + XFree(pData); + } + return QApplication::x11EventFilter(pEv); + } +#endif + +private: + + // Translation support. + QTranslator *m_pQtTranslator; + QTranslator *m_pMyTranslator; + + // Instance variables. + QWidget *m_pWidget; + +#if defined(Q_WS_X11) + Display *m_pDisplay; + Atom m_aUnique; + Window m_wOwner; +#endif +}; + + +//------------------------------------------------------------------------- +// stacktrace - Signal crash handler. +// + +#ifdef CONFIG_STACKTRACE +#if defined(__GNUC__) && defined(Q_OS_LINUX) + +#include +#include +#include +#include + +void stacktrace ( int signo ) +{ + pid_t pid; + int rc; + int status = 0; + char cmd[80]; + + // Reinstall default handler; prevent race conditions... + signal(signo, SIG_DFL); + + static const char *shell = "/bin/sh"; + static const char *format = "gdb -q --batch --pid=%d --eval-command=bt"; + + snprintf(cmd, sizeof(cmd), format, (int) getpid()); + + pid = fork(); + + // Fork failure! + if (pid < 0) + return; + + // Fork child... + if (pid == 0) { + execl(shell, shell, "-c", cmd, NULL); + _exit(1); + return; + } + + // Parent here: wait for child to terminate... + do { rc = waitpid(pid, &status, 0); } + while ((rc < 0) && (errno == EINTR)); + + // Dispatch any logging, if any... + QApplication::processEvents(QEventLoop::AllEvents, 3000); + + // Make sure everyone terminates... + kill(pid, SIGTERM); + _exit(1); +} + +#endif +#endif + + +//------------------------------------------------------------------------- +// main - The main program trunk. +// + +int main ( int argc, char **argv ) +{ +#ifdef CONFIG_STACKTRACE +#if defined(__GNUC__) && defined(Q_OS_LINUX) + signal(SIGILL, stacktrace); + signal(SIGFPE, stacktrace); + signal(SIGSEGV, stacktrace); + signal(SIGABRT, stacktrace); + signal(SIGBUS, stacktrace); +#endif +#endif + qjackctlApplication app(argc, argv); + + // Construct default settings; override with command line arguments. + qjackctlSetup settings; + if (!settings.parse_args(app.arguments())) { + app.quit(); + return 1; + } + + // Check if we'll just start an external program... + if (!settings.sCmdLine.isEmpty()) { + jack_client_t *pJackClient + = jack_client_open("qjackctl-start", JackNoStartServer, NULL); + if (pJackClient) { + jack_client_close(pJackClient); + int iExitStatus = ::system(settings.sCmdLine.toUtf8().constData()); + app.quit(); + return iExitStatus; + } + } + + // Have another instance running? + if (settings.bSingleton) { + if (app.setup(settings.sServerName)) { + app.quit(); + return 2; + } + } + + // Dark themes grayed/disabled color group fix... + QPalette pal(app.palette()); + if (pal.base().color().value() < 0x7f) { + pal.setColorGroup(QPalette::Disabled, + pal.windowText().color().darker(), + pal.button(), + pal.light(), + pal.dark(), + pal.mid(), + pal.text().color().darker(), + pal.text().color().lighter(), + pal.base(), + pal.window()); + app.setPalette(pal); + } + + // Set default base font... + int iBaseFontSize = app.font().pointSize(); + if (settings.iBaseFontSize > 0) + iBaseFontSize = settings.iBaseFontSize; + app.setFont(QFont(app.font().family(), iBaseFontSize)); + + // What style do we create these forms? + Qt::WindowFlags wflags = Qt::Window + | Qt::CustomizeWindowHint + | Qt::WindowTitleHint + | Qt::WindowSystemMenuHint + | Qt::WindowMinMaxButtonsHint + | Qt::WindowCloseButtonHint; + if (settings.bKeepOnTop) + wflags |= Qt::Tool; + // Construct the main form, and show it to the world. + qjackctlMainForm w(0, wflags); + w.setup(&settings); + // If we have a systray icon, we'll skip this. + if (!settings.bSystemTray) { + w.show(); + w.adjustSize(); + } + + // Settle this one as application main widget... + app.setMainWidget(&w); + + // Register the quit signal/slot. + app.setQuitOnLastWindowClosed(false); + + return app.exec(); +} + +// end of main.cpp diff -Nru qjackctl-0.3.4/src/qjackctlAboutForm.cpp qjackctl-0.3.6/src/qjackctlAboutForm.cpp --- qjackctl-0.3.4/src/qjackctlAboutForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAboutForm.cpp 2009-05-12 20:01:22.000000000 +0100 @@ -0,0 +1,147 @@ +// qjackctlAboutForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlAboutForm.h" + +#include + + +//---------------------------------------------------------------------------- +// qjackctlAboutForm -- UI wrapper form. + +// Constructor. +qjackctlAboutForm::qjackctlAboutForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QDialog(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + // Stuff the about box... + QString sText = "


\n"; + sText += "" + tr(QJACKCTL_SUBTITLE) + "
\n"; + sText += "
\n"; + sText += tr("Version") + ": " QJACKCTL_VERSION "
\n"; + sText += tr("Build") + ": " __DATE__ " " __TIME__ "
\n"; +#ifdef CONFIG_DEBUG + sText += ""; + sText += tr("Debugging option enabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_SYSTEM_TRAY + sText += ""; + sText += tr("System tray disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_TRANSPORT + sText += ""; + sText += tr("Transport status control disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_REALTIME + sText += ""; + sText += tr("Realtime status disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_XRUN_DELAY + sText += ""; + sText += tr("XRUN delay status disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_MAX_DELAY + sText += ""; + sText += tr("Maximum delay status disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_MIDI + sText += ""; + sText += tr("JACK MIDI support disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_JACK_PORT_ALIASES + sText += ""; + sText += tr("JACK Port aliases support disabled."); + sText += "
\n"; + sText += "
"; +#endif +#ifndef CONFIG_ALSA_SEQ +#if !defined(WIN32) + sText += ""; + sText += tr("ALSA/MIDI sequencer support disabled."); + sText += "
\n"; + sText += "
"; +#endif +#endif +#ifndef CONFIG_DBUS +#if !defined(WIN32) + sText += ""; + sText += tr("D-Bus interface support disabled."); + sText += "
\n"; + sText += "
"; +#endif +#endif + sText += "
\n"; + sText += tr("Website") + ": " QJACKCTL_WEBSITE "
\n"; + sText += "
\n"; + sText += ""; + sText += QJACKCTL_COPYRIGHT "
\n"; + sText += "
\n"; + sText += tr("This program is free software; you can redistribute it and/or modify it") + "
\n"; + sText += tr("under the terms of the GNU General Public License version 2 or later."); + sText += "
"; + sText += "

\n"; +#if QT_VERSION >= 0x040200 + m_ui.AboutTextView->setText(sText); +#else + m_ui.AboutTextView->setHtml(sText); +#endif + // UI connections... + QObject::connect(m_ui.AboutQtButton, + SIGNAL(clicked()), + SLOT(aboutQt())); + QObject::connect(m_ui.ClosePushButton, + SIGNAL(clicked()), + SLOT(close())); +} + + +// Destructor. +qjackctlAboutForm::~qjackctlAboutForm (void) +{ +} + + +// About Qt request. +void qjackctlAboutForm::aboutQt() +{ + QMessageBox::aboutQt(this); +} + + +// end of qjackctlAboutForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlAboutForm.h qjackctl-0.3.6/src/qjackctlAboutForm.h --- qjackctl-0.3.4/src/qjackctlAboutForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAboutForm.h 2009-05-12 20:01:22.000000000 +0100 @@ -0,0 +1,62 @@ +// qjackctlAboutForm.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlAboutForm_h +#define __qjackctlAboutForm_h + +#include + +#if QT_VERSION < 0x040200 +#define setOpenExternalLinks(x) parent() +#endif + +#include "ui_qjackctlAboutForm.h" + + +//---------------------------------------------------------------------------- +// qjackctlAboutForm -- UI wrapper form. + +class qjackctlAboutForm : public QDialog +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlAboutForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlAboutForm(); + +public slots: + + void aboutQt(); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlAboutForm m_ui; +}; + + +#endif // __qjackctlAboutForm_h + + +// end of qjackctlAboutForm.h diff -Nru qjackctl-0.3.4/src/qjackctlAboutForm.ui qjackctl-0.3.6/src/qjackctlAboutForm.ui --- qjackctl-0.3.4/src/qjackctlAboutForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAboutForm.ui 2008-12-09 17:21:43.000000000 +0000 @@ -0,0 +1,147 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlAboutForm + + + + 0 + 0 + 520 + 280 + + + + + + + About QjackCtl + + + :/icons/about1.png + + + true + + + + 4 + + + 4 + + + + + Qt::Horizontal + + + + 8 + 8 + + + + + + + + &Close + + + Alt+C + + + + + + + Qt::TabFocus + + + About Qt + + + + + + :/icons/qtlogo.png + + + + + + + Qt::Vertical + + + + 8 + 8 + + + + + + + + 1 + + + false + + + true + + + true + + + + + + + :/icons/qjackctl.png + + + Qt::AlignCenter + + + false + + + 2 + + + + + + + + AboutTextView + AboutQtButton + ClosePushButton + + + + + + diff -Nru qjackctl-0.3.4/src/qjackctlAbout.h qjackctl-0.3.6/src/qjackctlAbout.h --- qjackctl-0.3.4/src/qjackctlAbout.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAbout.h 2010-01-01 21:31:42.000000000 +0000 @@ -0,0 +1,42 @@ +// qjackctlAbout.h +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlAbout_h +#define __qjackctlAbout_h + +#include "config.h" + +#define QJACKCTL_TITLE PACKAGE_NAME +#define QJACKCTL_VERSION PACKAGE_VERSION + +#define QJACKCTL_SUBTITLE0 "JACK" +#define QJACKCTL_SUBTITLE1 QJACKCTL_SUBTITLE0 " Audio Connection Kit" +#define QJACKCTL_SUBTITLE2 "Qt GUI Interface" + +#define QJACKCTL_SUBTITLE QJACKCTL_SUBTITLE1 " - " QJACKCTL_SUBTITLE2 +#define QJACKCTL_WEBSITE "http://qjackctl.sourceforge.net" +#define QJACKCTL_COPYRIGHT "Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved." + +#define QJACKCTL_DOMAIN "rncbc.org" + +#endif // __qjackctlAbout_h + +// end of qjackctlAbout.h diff -Nru qjackctl-0.3.4/src/qjackctlAlsaConnect.cpp qjackctl-0.3.6/src/qjackctlAlsaConnect.cpp --- qjackctl-0.3.4/src/qjackctlAlsaConnect.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAlsaConnect.cpp 2009-09-28 23:10:04.000000000 +0100 @@ -0,0 +1,445 @@ +// qjackctlAlsaConnect.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAlsaConnect.h" + +#include + + +//---------------------------------------------------------------------- +// class qjackctlAlsaPort -- Alsa port list item. +// + +// Constructor. +qjackctlAlsaPort::qjackctlAlsaPort ( qjackctlAlsaClient *pClient, + const QString& sPortName, int iAlsaPort ) + : qjackctlPortItem(pClient, /* QString::number(iAlsaPort) + ":" + */ sPortName) +{ + m_iAlsaPort = iAlsaPort; + + qjackctlAlsaConnect *pAlsaConnect + = static_cast ( + ((pClient->clientList())->listView())->binding()); + + if (pAlsaConnect) { + if (pClient->isReadable()) { + QTreeWidgetItem::setIcon(0, + QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_PORTO))); + } else { + QTreeWidgetItem::setIcon(0, + QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_PORTI))); + } + } +} + +// Default destructor. +qjackctlAlsaPort::~qjackctlAlsaPort (void) +{ +} + + +// Alsa handles accessors. +int qjackctlAlsaPort::alsaClient (void) const +{ + return (static_cast (client()))->alsaClient(); +} + +int qjackctlAlsaPort::alsaPort (void) const +{ + return m_iAlsaPort; +} + + +//---------------------------------------------------------------------- +// class qjackctlAlsaClient -- Alsa client list item. +// + +// Constructor. +qjackctlAlsaClient::qjackctlAlsaClient ( qjackctlAlsaClientList *pClientList, + const QString& sClientName, int iAlsaClient ) + : qjackctlClientItem(pClientList, /* QString::number(iAlsaClient) + ":" + */ sClientName) +{ + m_iAlsaClient = iAlsaClient; + + qjackctlAlsaConnect *pAlsaConnect + = static_cast ( + (pClientList->listView())->binding()); + + if (pAlsaConnect) { + if (pClientList->isReadable()) { + QTreeWidgetItem::setIcon(0, + QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_CLIENTO))); + } else { + QTreeWidgetItem::setIcon(0, + QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_CLIENTI))); + } + } +} + +// Default destructor. +qjackctlAlsaClient::~qjackctlAlsaClient (void) +{ +} + + +// Jack client accessor. +int qjackctlAlsaClient::alsaClient (void) const +{ + return m_iAlsaClient; +} + + +// Derived port finder. +qjackctlAlsaPort *qjackctlAlsaClient::findPort ( int iAlsaPort ) +{ + QListIterator iter(ports()); + while (iter.hasNext()) { + qjackctlAlsaPort *pPort + = static_cast (iter.next()); + if (iAlsaPort == pPort->alsaPort()) + return pPort; + } + + return NULL; +} + + +//---------------------------------------------------------------------- +// qjackctlAlsaClientList -- Jack client list. +// + +// Constructor. +qjackctlAlsaClientList::qjackctlAlsaClientList ( + qjackctlClientListView *pListView, + snd_seq_t *pAlsaSeq, bool bReadable ) + : qjackctlClientList(pListView, bReadable) +{ + m_pAlsaSeq = pAlsaSeq; +} + +// Default destructor. +qjackctlAlsaClientList::~qjackctlAlsaClientList (void) +{ +} + + +// Alsa sequencer accessor. +snd_seq_t *qjackctlAlsaClientList::alsaSeq (void) const +{ + return m_pAlsaSeq; +} + + +// Client finder by id. +qjackctlAlsaClient *qjackctlAlsaClientList::findClient ( int iAlsaClient ) +{ + QListIterator iter(clients()); + while (iter.hasNext()) { + qjackctlAlsaClient *pClient + = static_cast (iter.next()); + if (iAlsaClient == pClient->alsaClient()) + return pClient; + } + + return NULL; +} + + +// Client port finder by id. +qjackctlAlsaPort *qjackctlAlsaClientList::findClientPort ( int iAlsaClient, + int iAlsaPort ) +{ + qjackctlAlsaClient *pClient = findClient(iAlsaClient); + if (pClient == NULL) + return NULL; + + return pClient->findPort(iAlsaPort); +} + + +// Client:port refreshner. +int qjackctlAlsaClientList::updateClientPorts (void) +{ + if (m_pAlsaSeq == NULL) + return 0; + + int iDirtyCount = 0; + + markClientPorts(0); + +#ifdef CONFIG_ALSA_SEQ + + unsigned int uiAlsaFlags; + if (isReadable()) + uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; + else + uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; + + snd_seq_client_info_t *pClientInfo; + snd_seq_port_info_t *pPortInfo; + + snd_seq_client_info_alloca(&pClientInfo); + snd_seq_port_info_alloca(&pPortInfo); + snd_seq_client_info_set_client(pClientInfo, -1); + + while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { + + int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); + if (iAlsaClient > 0) { + qjackctlAlsaClient *pClient = findClient(iAlsaClient); + snd_seq_port_info_set_client(pPortInfo, iAlsaClient); + snd_seq_port_info_set_port(pPortInfo, -1); + while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { + unsigned int uiPortCapability + = snd_seq_port_info_get_capability(pPortInfo); + if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && + ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { + QString sClientName = QString::number(iAlsaClient) + ':'; + sClientName += QString::fromUtf8( + snd_seq_client_info_get_name(pClientInfo)); + qjackctlAlsaPort *pPort = 0; + int iAlsaPort = snd_seq_port_info_get_port(pPortInfo); + if (pClient == 0) { + pClient = new qjackctlAlsaClient(this, + sClientName, iAlsaClient); + iDirtyCount++; + } else { + pPort = pClient->findPort(iAlsaPort); + if (sClientName != pClient->clientName()) { + pClient->setClientName(sClientName); + iDirtyCount++; + } + } + if (pClient) { + QString sPortName = QString::number(iAlsaPort) + ':'; + sPortName += QString::fromUtf8( + snd_seq_port_info_get_name(pPortInfo)); + if (pPort == 0) { + pPort = new qjackctlAlsaPort(pClient, + sPortName, iAlsaPort); + iDirtyCount++; + } else if (sPortName != pPort->portName()) { + pPort->setPortName(sPortName); + iDirtyCount++; + } + } + if (pPort) + pPort->markClientPort(1); + } + } + } + } + +#endif // CONFIG_ALSA_SEQ + + iDirtyCount += cleanClientPorts(0); + + return iDirtyCount; +} + + +//---------------------------------------------------------------------- +// qjackctlAlsaConnect -- Output-to-Input client/ports connection object. +// + +// Constructor. +qjackctlAlsaConnect::qjackctlAlsaConnect ( + qjackctlConnectView *pConnectView, snd_seq_t *pAlsaSeq ) + : qjackctlConnect(pConnectView) +{ + createIconPixmaps(); + + setOClientList(new qjackctlAlsaClientList( + connectView()->OListView(), pAlsaSeq, true)); + setIClientList(new qjackctlAlsaClientList( + connectView()->IListView(), pAlsaSeq, false)); + + m_pAlsaSeq = pAlsaSeq; +} + +// Default destructor. +qjackctlAlsaConnect::~qjackctlAlsaConnect (void) +{ + deleteIconPixmaps(); +} + + +// Common pixmap accessor (static). +const QPixmap& qjackctlAlsaConnect::pixmap ( int iPixmap ) const +{ + return *m_apPixmaps[iPixmap]; +} + + +// Local pixmap-set janitor methods. +void qjackctlAlsaConnect::createIconPixmaps (void) +{ + m_apPixmaps[QJACKCTL_ALSA_CLIENTI] = createIconPixmap("mclienti"); + m_apPixmaps[QJACKCTL_ALSA_CLIENTO] = createIconPixmap("mcliento"); + m_apPixmaps[QJACKCTL_ALSA_PORTI] = createIconPixmap("mporti"); + m_apPixmaps[QJACKCTL_ALSA_PORTO] = createIconPixmap("mporto"); +} + +void qjackctlAlsaConnect::deleteIconPixmaps (void) +{ + for (int i = 0; i < QJACKCTL_ALSA_PIXMAPS; i++) { + if (m_apPixmaps[i]) + delete m_apPixmaps[i]; + m_apPixmaps[i] = NULL; + } +} + + +// Alsa sequencer accessor. +snd_seq_t *qjackctlAlsaConnect::alsaSeq (void) const +{ + return m_pAlsaSeq; +} + + +// Connection primitive. +bool qjackctlAlsaConnect::connectPorts ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + qjackctlAlsaPort *pOAlsa = static_cast (pOPort); + qjackctlAlsaPort *pIAlsa = static_cast (pIPort); + + snd_seq_port_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_port_subscribe_alloca(&pAlsaSubs); + + seq_addr.client = pOAlsa->alsaClient(); + seq_addr.port = pOAlsa->alsaPort(); + snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); + + seq_addr.client = pIAlsa->alsaClient(); + seq_addr.port = pIAlsa->alsaPort(); + snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); + + return (snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs) >= 0); + +#else + + return false; + +#endif // CONFIG_ALSA_SEQ +} + + +// Disconnection primitive. +bool qjackctlAlsaConnect::disconnectPorts ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + qjackctlAlsaPort *pOAlsa = static_cast (pOPort); + qjackctlAlsaPort *pIAlsa = static_cast (pIPort); + + snd_seq_port_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_port_subscribe_alloca(&pAlsaSubs); + + seq_addr.client = pOAlsa->alsaClient(); + seq_addr.port = pOAlsa->alsaPort(); + snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); + + seq_addr.client = pIAlsa->alsaClient(); + seq_addr.port = pIAlsa->alsaPort(); + snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); + + return (snd_seq_unsubscribe_port(m_pAlsaSeq, pAlsaSubs) >= 0); + +#else + + return false; + +#endif // CONFIG_ALSA_SEQ +} + + +// Update port connection references. +void qjackctlAlsaConnect::updateConnections (void) +{ +#ifdef CONFIG_ALSA_SEQ + + snd_seq_query_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_query_subscribe_alloca(&pAlsaSubs); + + // Proper type casts. + qjackctlAlsaClientList *pOClientList + = static_cast (OClientList()); + qjackctlAlsaClientList *pIClientList + = static_cast (IClientList()); + + // For each output client item... + QListIterator oclient(pOClientList->clients()); + while (oclient.hasNext()) { + qjackctlClientItem *pOClient = oclient.next(); + // For each output port item... + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + // Are there already any connections? + if (pOPort->connects().count() > 0) + continue; + // Hava a proper type cast. + qjackctlAlsaPort *pOAlsa + = static_cast (pOPort); + // Get port connections... + snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_READ); + snd_seq_query_subscribe_set_index(pAlsaSubs, 0); + seq_addr.client = pOAlsa->alsaClient(); + seq_addr.port = pOAlsa->alsaPort(); + snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); + while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { + seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); + qjackctlPortItem *pIPort + = pIClientList->findClientPort( + seq_addr.client, seq_addr.port); + if (pIPort) { + pOPort->addConnect(pIPort); + pIPort->addConnect(pOPort); + } + snd_seq_query_subscribe_set_index(pAlsaSubs, + snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); + } + } + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Update icon size implementation. +void qjackctlAlsaConnect::updateIconPixmaps (void) +{ + deleteIconPixmaps(); + createIconPixmaps(); +} + + +// end of qjackctlAlsaConnect.cpp diff -Nru qjackctl-0.3.4/src/qjackctlAlsaConnect.h qjackctl-0.3.6/src/qjackctlAlsaConnect.h --- qjackctl-0.3.4/src/qjackctlAlsaConnect.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlAlsaConnect.h 2009-09-28 23:10:04.000000000 +0100 @@ -0,0 +1,170 @@ +// qjackctlAlsaConnect.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlAlsaConnect_h +#define __qjackctlAlsaConnect_h + +#include "qjackctlAbout.h" +#include "qjackctlConnect.h" + +#ifdef CONFIG_ALSA_SEQ +#include +#else +typedef void snd_seq_t; +#endif + +// Forward declarations. +class qjackctlAlsaPort; +class qjackctlAlsaClient; +class qjackctlAlsaClientList; +class qjackctlAlsaConnect; + +// Pixmap-set array indexes. +#define QJACKCTL_ALSA_CLIENTO 0 // Output client item pixmap. +#define QJACKCTL_ALSA_CLIENTI 1 // Input client item pixmap. +#define QJACKCTL_ALSA_PORTO 2 // Output port pixmap. +#define QJACKCTL_ALSA_PORTI 3 // Input port pixmap. +#define QJACKCTL_ALSA_PIXMAPS 4 // Number of pixmaps in local array. + + +// Jack port list item. +class qjackctlAlsaPort : public qjackctlPortItem +{ +public: + + // Constructor. + qjackctlAlsaPort(qjackctlAlsaClient *pClient, + const QString& sPortName, int iAlsaPort); + // Default destructor. + ~qjackctlAlsaPort(); + + // Jack handles accessors. + int alsaClient() const; + int alsaPort() const; + +private: + + // Instance variables. + int m_iAlsaPort; +}; + + +// Jack client list item. +class qjackctlAlsaClient : public qjackctlClientItem +{ +public: + + // Constructor. + qjackctlAlsaClient(qjackctlAlsaClientList *pClientList, + const QString& sClientName, int iAlsaClient); + // Default destructor. + ~qjackctlAlsaClient(); + + // Jack client accessors. + int alsaClient() const; + + // Port finder by id. + qjackctlAlsaPort *findPort(int iAlsaPort); + +private: + + // Instance variables. + int m_iAlsaClient; +}; + + +// Jack client list. +class qjackctlAlsaClientList : public qjackctlClientList +{ +public: + + // Constructor. + qjackctlAlsaClientList(qjackctlClientListView *pListView, + snd_seq_t *pAlsaSeq, bool bReadable); + // Default destructor. + ~qjackctlAlsaClientList(); + + // Alsa sequencer accessor. + snd_seq_t *alsaSeq() const; + + // Client finder by id. + qjackctlAlsaClient *findClient(int iAlsaClient); + // Client port finder by id. + qjackctlAlsaPort *findClientPort(int iAlsaClient, int iAlsaPort); + + // Client:port refreshner (return newest item count). + int updateClientPorts(); + +private: + + // Instance variables. + snd_seq_t *m_pAlsaSeq; +}; + + +//---------------------------------------------------------------------------- +// qjackctlAlsaConnect -- Connections model integrated object. + +class qjackctlAlsaConnect : public qjackctlConnect +{ +public: + + // Constructor. + qjackctlAlsaConnect(qjackctlConnectView *pConnectView, + snd_seq_t *pAlsaSeq); + // Default destructor. + ~qjackctlAlsaConnect(); + + // Alsa sequencer accessor. + snd_seq_t *alsaSeq() const; + + // Common pixmap accessor. + const QPixmap& pixmap(int iPixmap) const; + +protected: + + // Virtual Connect/Disconnection primitives. + bool connectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + bool disconnectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + + // Update port connection references. + void updateConnections(); + + // Update icon size implementation. + void updateIconPixmaps(); + +private: + + // Local pixmap-set janitor methods. + void createIconPixmaps(); + void deleteIconPixmaps(); + + // Instance variables. + snd_seq_t *m_pAlsaSeq; + + // Local pixmap-set array. + QPixmap *m_apPixmaps[QJACKCTL_ALSA_PIXMAPS]; +}; + + +#endif // __qjackctlAlsaConnect_h + +// end of qjackctlAlsaConnect.h diff -Nru qjackctl-0.3.4/src/qjackctlConnectAlias.cpp qjackctl-0.3.6/src/qjackctlConnectAlias.cpp --- qjackctl-0.3.4/src/qjackctlConnectAlias.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnectAlias.cpp 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,275 @@ +// qjackctlConnectAlias.cpp +// +/**************************************************************************** + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlConnectAlias.h" + +#include + + +//---------------------------------------------------------------------- +// class qjackctlClientAlias -- Client item alias map. + +// Constructor. +qjackctlClientAlias::qjackctlClientAlias ( const QString& sClientName, + const QString& sClientAlias ) +{ + if (sClientAlias.isEmpty()) { + m_rxClientName.setPattern(escapeRegExpDigits(sClientName)); + m_sClientAlias = sClientName; + } else { + m_rxClientName.setPattern(sClientName); + m_sClientAlias = sClientAlias; + } +} + +// Default destructor. +qjackctlClientAlias::~qjackctlClientAlias (void) +{ + m_ports.clear(); +} + + +// Client name method. +QString qjackctlClientAlias::clientName (void) const +{ + return m_rxClientName.pattern(); +} + + +// Client name matcher. +bool qjackctlClientAlias::matchClientName ( const QString& sClientName ) +{ + return m_rxClientName.exactMatch(sClientName); +} + + +// Client aliasing methods. +const QString& qjackctlClientAlias::clientAlias (void) const +{ + return m_sClientAlias; +} + +void qjackctlClientAlias::setClientAlias ( const QString& sClientAlias ) +{ + m_sClientAlias = sClientAlias; +} + + +// Port aliasing methods. +QString qjackctlClientAlias::portAlias ( const QString& sPortName ) const +{ + QString sPortAlias = m_ports[sPortName]; + if (sPortAlias.isEmpty()) + sPortAlias = sPortName; + return sPortAlias; +} + +void qjackctlClientAlias::setPortAlias ( const QString& sPortName, + const QString& sPortAlias ) +{ + m_ports[sPortName] = sPortAlias; +} + + +// Save client/port aliases definitions. +void qjackctlClientAlias::saveSettings ( QSettings& settings, + const QString& sClientKey ) +{ + settings.beginGroup(sClientKey); + settings.setValue("/Name", m_rxClientName.pattern()); + settings.setValue("/Alias", m_sClientAlias); + int iPort = 0; + QMap::ConstIterator iter = m_ports.begin(); + while (iter != m_ports.end()) { + settings.beginGroup("/Port" + QString::number(++iPort)); + settings.setValue("/Name", iter.key()); + settings.setValue("/Alias", iter.value()); + settings.endGroup(); + ++iter; + } + settings.endGroup(); +} + + +// Escape and format a string as a regular expresion. +QString qjackctlClientAlias::escapeRegExpDigits ( const QString& s, + int iThreshold ) +{ + QString sDigits; + QString sResult; + QString sEscape = QRegExp::escape(s); + int iDigits = 0; + + for (int i = 0; i < sEscape.length(); i++) { + const QChar& ch = sEscape.at(i); + if (ch.isDigit()) { + if (iDigits < iThreshold) + sDigits += ch; + else + sDigits = "[0-9]+"; + iDigits++; + } else { + if (iDigits > 0) { + sResult += sDigits; + sDigits = QString::null; + iDigits = 0; + } + sResult += ch; + } + } + + if (iDigits > 0) + sResult += sDigits; + + return sResult; +} + + +// Need for generid sort. +bool qjackctlClientAlias::operator< ( const qjackctlClientAlias& other ) +{ + return (m_sClientAlias < other.clientAlias()); +} + + +//---------------------------------------------------------------------- +// class qjackctlConnectAlias -- Client list alias map. + +// Constructor. +qjackctlConnectAlias::qjackctlConnectAlias (void) +{ +} + +// Default destructor. +qjackctlConnectAlias::~qjackctlConnectAlias (void) +{ + qDeleteAll(*this); + clear(); +} + + +// Client finders. +qjackctlClientAlias *qjackctlConnectAlias::findClientName ( + const QString& sClientName ) +{ + QListIterator iter(*this); + while (iter.hasNext()) { + qjackctlClientAlias *pClient = iter.next(); + if (pClient->matchClientName(sClientName)) + return pClient; + } + + return NULL; +} + +// Client aliasing methods. +void qjackctlConnectAlias::setClientAlias ( const QString& sClientName, + const QString& sClientAlias ) +{ + qjackctlClientAlias *pClient = findClientName(sClientName); + if (pClient == NULL) { + pClient = new qjackctlClientAlias(sClientName); + append(pClient); + } + pClient->setClientAlias(sClientAlias); +} + +QString qjackctlConnectAlias::clientAlias ( const QString& sClientName ) +{ + qjackctlClientAlias *pClient = findClientName(sClientName); + if (pClient == NULL) + return sClientName; + + return pClient->clientAlias(); +} + + +// Client/port aliasing methods. +void qjackctlConnectAlias::setPortAlias ( const QString& sClientName, + const QString& sPortName, const QString& sPortAlias ) +{ + qjackctlClientAlias *pClient = findClientName(sClientName); + if (pClient == NULL) { + pClient = new qjackctlClientAlias(sClientName); + append(pClient); + } + pClient->setPortAlias(sPortName, sPortAlias); +} + +QString qjackctlConnectAlias::portAlias ( const QString& sClientName, + const QString& sPortName ) +{ + qjackctlClientAlias *pClient = findClientName(sClientName); + if (pClient == NULL) + return sPortName; + + return pClient->portAlias(sPortName); +} + + +// Load/save aliases definitions. +void qjackctlConnectAlias::loadSettings ( QSettings& settings, + const QString& sAliasesKey ) +{ + clear(); + + settings.beginGroup(sAliasesKey); + QStringListIterator iter(settings.childGroups()); + while (iter.hasNext()) { + QString sClientKey = iter.next(); + QString sClientName = settings.value(sClientKey + "/Name").toString(); + QString sClientAlias = settings.value(sClientKey + "/Alias").toString(); + if (!sClientName.isEmpty() && !sClientAlias.isEmpty()) { + qjackctlClientAlias *pClient = + new qjackctlClientAlias(sClientName, sClientAlias); + append(pClient); + settings.beginGroup(sClientKey); + QStringListIterator it(settings.childGroups()); + while (it.hasNext()) { + QString sPortKey = it.next(); + QString sPortName = settings.value(sPortKey + "/Name").toString(); + QString sPortAlias = settings.value(sPortKey + "/Alias").toString(); + if (!sPortName.isEmpty() && !sPortAlias.isEmpty()) + pClient->setPortAlias(sPortName, sPortAlias); + } + settings.endGroup(); + } + } + settings.endGroup(); +} + +void qjackctlConnectAlias::saveSettings ( QSettings& settings, + const QString& sAliasesKey ) +{ + qSort(*this); + + settings.beginGroup(sAliasesKey); + int iClient = 0; + QListIterator iter(*this); + while (iter.hasNext()) { + (iter.next())->saveSettings(settings, + "Client" + QString::number(++iClient)); + } + settings.endGroup(); +} + + +// end of qjackctlConnectAlias.cpp diff -Nru qjackctl-0.3.4/src/qjackctlConnectAlias.h qjackctl-0.3.6/src/qjackctlConnectAlias.h --- qjackctl-0.3.4/src/qjackctlConnectAlias.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnectAlias.h 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,112 @@ +// qjackctlConnectAlias.h +// +/**************************************************************************** + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlConnectAlias_h +#define __qjackctlConnectAlias_h + +#include +#include +#include + + +// Client item alias map. +class qjackctlClientAlias +{ +public: + + // Constructor. + qjackctlClientAlias (const QString& sClientName, + const QString& sClientAlias = QString::null); + + // Default destructor. + ~qjackctlClientAlias(); + + // Client name accessor. + QString clientName() const; + + // Client name matcher. + bool matchClientName(const QString& sClientName); + + // Client aliasing methods. + const QString& clientAlias() const; + void setClientAlias(const QString& sClientAlias); + + // Port aliasing methods. + QString portAlias (const QString& sPortName) const; + void setPortAlias (const QString& sPortName, + const QString& sPortAlias); + + // Save client/port aliases definitions. + void saveSettings(QSettings& settings, const QString& sClientKey); + + // Need for generid sort. + bool operator< (const qjackctlClientAlias& other); + + // Escape and format a string as a regular expresion. + static QString escapeRegExpDigits(const QString& s, int iThreshold = 3); + +private: + + // Client name regexp. + QRegExp m_rxClientName; + // Client alias. + QString m_sClientAlias; + + // Port aliases map. + QMap m_ports; +}; + + +// Client list alias map. +class qjackctlConnectAlias : public QList +{ +public: + + // Constructor. + qjackctlConnectAlias (); + // Default destructor. + ~qjackctlConnectAlias (); + + // Client aliasing methods. + QString clientAlias (const QString& sClientName); + void setClientAlias (const QString& sClientName, + const QString& sClientAlias); + + // Port aliasing methods. + QString portAlias (const QString& sClientName, + const QString& sPortName); + void setPortAlias (const QString& sClientName, + const QString& sPortName, const QString& sPortAlias); + + // Load/save aliases definitions. + void loadSettings(QSettings& settings, const QString& sAliasesKey); + void saveSettings(QSettings& settings, const QString& sAliasesKey); + +private: + + // Client item finder. + qjackctlClientAlias *findClientName (const QString& sClientName); +}; + + +#endif // __qjackctlConnectAlias_h + +// end of qjackctlConnectAlias.h diff -Nru qjackctl-0.3.4/src/qjackctlConnect.cpp qjackctl-0.3.6/src/qjackctlConnect.cpp --- qjackctl-0.3.4/src/qjackctlConnect.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnect.cpp 2009-02-19 10:28:56.000000000 +0000 @@ -0,0 +1,1877 @@ +// qjackctlConnect.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlConnect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//---------------------------------------------------------------------- +// class qjackctlPortItem -- Port list item. +// + +// Constructor. +qjackctlPortItem::qjackctlPortItem ( qjackctlClientItem *pClient, + const QString& sPortName ) + : QTreeWidgetItem(pClient, QJACKCTL_PORTITEM) +{ + m_pClient = pClient; + m_sPortName = sPortName; + m_iPortMark = 0; + m_bHilite = false; + + m_pClient->ports().append(this); + + // Check aliasing... + qjackctlConnectAlias *pAliases + = ((pClient->clientList())->listView())->aliases(); + if (pAliases) { + QTreeWidgetItem::setText(0, + pAliases->portAlias(pClient->clientName(), sPortName)); + if (((pClient->clientList())->listView())->renameEnabled()) { + QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() + | Qt::ItemIsEditable); + } + } else { + QTreeWidgetItem::setText(0, sPortName); + } +} + +// Default destructor. +qjackctlPortItem::~qjackctlPortItem (void) +{ + int iPort = m_pClient->ports().indexOf(this); + if (iPort >= 0) + m_pClient->ports().removeAt(iPort); + + QListIterator iter(m_connects); + while (iter.hasNext()) + (iter.next())->removeConnect(this); + + m_connects.clear(); +} + + +// Instance accessors. +void qjackctlPortItem::setPortName ( const QString& sPortName ) +{ + QTreeWidgetItem::setText(0, sPortName); + + m_sPortName = sPortName; +} + +const QString& qjackctlPortItem::clientName (void) const +{ + return m_pClient->clientName(); +} + +const QString& qjackctlPortItem::portName (void) const +{ + return m_sPortName; +} + + +// Complete client:port name helper. +QString qjackctlPortItem::clientPortName (void) const +{ + return m_pClient->clientName() + ':' + m_sPortName; +} + + +// Connect client item accessor. +qjackctlClientItem *qjackctlPortItem::client (void) const +{ + return m_pClient; +} + + +// Client:port set housekeeping marker. +void qjackctlPortItem::markPort ( int iMark ) +{ + setHilite(false); + m_iPortMark = iMark; + if (iMark > 0) + m_connects.clear(); +} + +void qjackctlPortItem::markClientPort ( int iMark ) +{ + markPort(iMark); + + m_pClient->markClient(iMark); +} + +int qjackctlPortItem::portMark (void) const +{ + return m_iPortMark; +} + + +// Connected port list primitives. +void qjackctlPortItem::addConnect ( qjackctlPortItem *pPort ) +{ + m_connects.append(pPort); +} + +void qjackctlPortItem::removeConnect ( qjackctlPortItem *pPort ) +{ + pPort->setHilite(false); + + int iPort = m_connects.indexOf(pPort); + if (iPort >= 0) + m_connects.removeAt(iPort); +} + + +// Connected port finder. +qjackctlPortItem *qjackctlPortItem::findConnect ( const QString& sClientPortName ) +{ + QListIterator iter(m_connects); + while (iter.hasNext()) { + qjackctlPortItem *pPort = iter.next(); + if (sClientPortName == pPort->clientPortName()) + return pPort; + } + + return NULL; +} + +qjackctlPortItem *qjackctlPortItem::findConnectPtr ( qjackctlPortItem *pPortPtr ) +{ + QListIterator iter(m_connects); + while (iter.hasNext()) { + qjackctlPortItem *pPort = iter.next(); + if (pPortPtr == pPort) + return pPort; + } + + return NULL; +} + + +// Connection cache list accessor. +const QList& qjackctlPortItem::connects (void) const +{ + return m_connects; +} + + +// Connectiopn highlight methods. +bool qjackctlPortItem::isHilite (void) const +{ + return m_bHilite; +} + +void qjackctlPortItem::setHilite ( bool bHilite ) +{ + // Update the port highlightning if changed... + if ((m_bHilite && !bHilite) || (!m_bHilite && bHilite)) { + m_bHilite = bHilite; + // Propagate this to the parent... + m_pClient->setHilite(bHilite); + } + + // Set the new color. + const QPalette& pal = QTreeWidgetItem::treeWidget()->palette(); + QTreeWidgetItem::setTextColor(0, m_bHilite + ? (pal.base().color().value() < 0x7f ? Qt::cyan : Qt::blue) + : pal.text().color()); +} + + +// Proxy sort override method. +// - Natural decimal sorting comparator. +bool qjackctlPortItem::operator< ( const QTreeWidgetItem& other ) const +{ + return qjackctlClientList::lessThan(*this, other); +} + + +//---------------------------------------------------------------------- +// class qjackctlClientItem -- Jack client list item. +// + +// Constructor. +qjackctlClientItem::qjackctlClientItem ( qjackctlClientList *pClientList, + const QString& sClientName ) + : QTreeWidgetItem(pClientList->listView(), QJACKCTL_CLIENTITEM) +{ + m_pClientList = pClientList; + m_sClientName = sClientName; + m_iClientMark = 0; + m_iHilite = 0; + + m_pClientList->clients().append(this); + + // Check aliasing... + qjackctlConnectAlias *pAliases + = (pClientList->listView())->aliases(); + if (pAliases) { + QTreeWidgetItem::setText(0, + pAliases->clientAlias(sClientName)); + if ((pClientList->listView())->renameEnabled()) { + QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() + | Qt::ItemIsEditable); + } + } else { + QTreeWidgetItem::setText(0, sClientName); + } +} + +// Default destructor. +qjackctlClientItem::~qjackctlClientItem (void) +{ + qDeleteAll(m_ports); + m_ports.clear(); + + int iClient = m_pClientList->clients().indexOf(this); + if (iClient >= 0) + m_pClientList->clients().removeAt(iClient); +} + + +// Port finder. +qjackctlPortItem *qjackctlClientItem::findPort (const QString& sPortName) +{ + QListIterator iter(m_ports); + while (iter.hasNext()) { + qjackctlPortItem *pPort = iter.next(); + if (sPortName == pPort->portName()) + return pPort; + } + + return NULL; +} + + +// Client list accessor. +qjackctlClientList *qjackctlClientItem::clientList (void) const +{ + return m_pClientList; +} + + +// Port list accessor. +QList& qjackctlClientItem::ports (void) +{ + return m_ports; +} + + +// Instance accessors. +void qjackctlClientItem::setClientName ( const QString& sClientName ) +{ + QTreeWidgetItem::setText(0, sClientName); + + m_sClientName = sClientName; +} + +const QString& qjackctlClientItem::clientName (void) const +{ + return m_sClientName; +} + + +// Readable flag client accessor. +bool qjackctlClientItem::isReadable (void) const +{ + return m_pClientList->isReadable(); +} + + +// Client:port set housekeeping marker. +void qjackctlClientItem::markClient ( int iMark ) +{ + setHilite(false); + m_iClientMark = iMark; +} + +void qjackctlClientItem::markClientPorts ( int iMark ) +{ + markClient(iMark); + + QListIterator iter(m_ports); + while (iter.hasNext()) + (iter.next())->markPort(iMark); +} + +int qjackctlClientItem::cleanClientPorts ( int iMark ) +{ + int iDirtyCount = 0; + + QMutableListIterator iter(m_ports); + while (iter.hasNext()) { + qjackctlPortItem *pPort = iter.next(); + if (pPort->portMark() == iMark) { + iter.remove(); + delete pPort; + iDirtyCount++; + } + } + + return iDirtyCount; +} + +int qjackctlClientItem::clientMark (void) const +{ + return m_iClientMark; +} + + +// Connectiopn highlight methods. +bool qjackctlClientItem::isHilite (void) const +{ + return (m_iHilite > 0); +} + +void qjackctlClientItem::setHilite ( bool bHilite ) +{ + if (bHilite) + m_iHilite++; + else + if (m_iHilite > 0) + m_iHilite--; + + // Set the new color. + const QPalette& pal = QTreeWidgetItem::treeWidget()->palette(); + QTreeWidgetItem::setTextColor(0, m_iHilite > 0 + ? (pal.base().color().value() < 0x7f ? Qt::darkCyan : Qt::darkBlue) + : pal.text().color()); +} + + +// Socket item openness status. +void qjackctlClientItem::setOpen ( bool bOpen ) +{ +#if QT_VERSION >= 0x040201 + QTreeWidgetItem::setExpanded(bOpen); +#else + QTreeWidgetItem::treeWidget()->setItemExpanded(this, bOpen); +#endif +} + + +bool qjackctlClientItem::isOpen (void) const +{ +#if QT_VERSION >= 0x040201 + return QTreeWidgetItem::isExpanded(); +#else + return QTreeWidgetItem::treeWidget()->isItemExpanded(this); +#endif +} + + +// Proxy sort override method. +// - Natural decimal sorting comparator. +bool qjackctlClientItem::operator< ( const QTreeWidgetItem& other ) const +{ + return qjackctlClientList::lessThan(*this, other); +} + + +//---------------------------------------------------------------------- +// qjackctlClientList -- Client list. +// + +// Constructor. +qjackctlClientList::qjackctlClientList ( + qjackctlClientListView *pListView, bool bReadable ) +{ + m_pListView = pListView; + m_bReadable = bReadable; + + m_pHiliteItem = 0; +} + +// Default destructor. +qjackctlClientList::~qjackctlClientList (void) +{ + qDeleteAll(m_clients); + m_clients.clear(); +} + + +// Client finder. +qjackctlClientItem *qjackctlClientList::findClient ( + const QString& sClientName ) +{ + QListIterator iter(m_clients); + while (iter.hasNext()) { + qjackctlClientItem *pClient = iter.next(); + if (sClientName == pClient->clientName()) + return pClient; + } + + return NULL; +} + +// Client:port finder. +qjackctlPortItem *qjackctlClientList::findClientPort ( + const QString& sClientPort ) +{ + qjackctlPortItem *pPort = 0; + int iColon = sClientPort.indexOf(':'); + if (iColon >= 0) { + qjackctlClientItem *pClient = findClient(sClientPort.left(iColon)); + if (pClient) { + pPort = pClient->findPort( + sClientPort.right(sClientPort.length() - iColon - 1)); + } + } + return pPort; +} + + +// Client list accessor. +QList& qjackctlClientList::clients (void) +{ + return m_clients; +} + + +// List view accessor. +qjackctlClientListView *qjackctlClientList::listView (void) const +{ + return m_pListView; +} + + +// Readable flag client accessor. +bool qjackctlClientList::isReadable (void) const +{ + return m_bReadable; +} + + +// Client:port set housekeeping marker. +void qjackctlClientList::markClientPorts ( int iMark ) +{ + m_pHiliteItem = 0; + + QListIterator iter(m_clients); + while (iter.hasNext()) + (iter.next())->markClientPorts(iMark); +} + +int qjackctlClientList::cleanClientPorts ( int iMark ) +{ + int iDirtyCount = 0; + + QMutableListIterator iter(m_clients); + while (iter.hasNext()) { + qjackctlClientItem *pClient = iter.next(); + if (pClient->clientMark() == iMark) { + iter.remove(); + delete pClient; + iDirtyCount++; + } else { + iDirtyCount += pClient->cleanClientPorts(iMark); + } + } + + return iDirtyCount; +} + +// Client:port hilite update stabilization. +void qjackctlClientList::hiliteClientPorts (void) +{ + qjackctlClientItem *pClient; + qjackctlPortItem *pPort; + + QTreeWidgetItem *pItem = m_pListView->currentItem(); + + // Dehilite the previous selected items. + if (m_pHiliteItem && pItem != m_pHiliteItem) { + if (m_pHiliteItem->type() == QJACKCTL_CLIENTITEM) { + pClient = static_cast (m_pHiliteItem); + QListIterator iter(pClient->ports()); + while (iter.hasNext()) { + pPort = iter.next(); + QListIterator it(pPort->connects()); + while (it.hasNext()) + (it.next())->setHilite(false); + } + } else { + pPort = static_cast (m_pHiliteItem); + QListIterator it(pPort->connects()); + while (it.hasNext()) + (it.next())->setHilite(false); + } + } + + // Hilite the now current selected items. + if (pItem) { + if (pItem->type() == QJACKCTL_CLIENTITEM) { + pClient = static_cast (pItem); + QListIterator iter(pClient->ports()); + while (iter.hasNext()) { + pPort = iter.next(); + QListIterator it(pPort->connects()); + while (it.hasNext()) + (it.next())->setHilite(true); + } + } else { + pPort = static_cast (pItem); + QListIterator it(pPort->connects()); + while (it.hasNext()) + (it.next())->setHilite(true); + } + } + + // Do remember this one, ever. + m_pHiliteItem = pItem; +} + + +// Natural decimal sorting comparator. +bool qjackctlClientList::lessThan ( + const QTreeWidgetItem& i1, const QTreeWidgetItem& i2 ) +{ + const QString& s1 = i1.text(0); + const QString& s2 = i2.text(0); + + int ich1, ich2; + + int cch1 = s1.length(); + int cch2 = s2.length(); + + for (ich1 = ich2 = 0; ich1 < cch1 && ich2 < cch2; ich1++, ich2++) { + + // Skip (white)spaces... + while (s1.at(ich1).isSpace()) + ich1++; + while (s2.at(ich2).isSpace()) + ich2++; + + // Normalize (to uppercase) the next characters... + QChar ch1 = s1.at(ich1).toUpper(); + QChar ch2 = s2.at(ich2).toUpper(); + + if (ch1.isDigit() && ch2.isDigit()) { + // Find the whole length numbers... + int iDigits1 = ich1++; + while (ich1 < cch1 && s1.at(ich1).isDigit()) + ich1++; + int iDigits2 = ich2++; + while (ich2 < cch2 && s2.at(ich2).isDigit()) + ich2++; + // Compare as natural decimal-numbers... + int n1 = s1.mid(iDigits1, ich1 - iDigits1).toInt(); + int n2 = s2.mid(iDigits2, ich2 - iDigits2).toInt(); + if (n1 != n2) + return (n1 < n2); + // Never go out of bounds... + if (ich1 >= cch1 || ich1 >= cch2) + break; + // Go on with this next char... + ch1 = s1.at(ich1).toUpper(); + ch2 = s2.at(ich2).toUpper(); + } + + // Compare this char... + if (ch1 != ch2) + return (ch1 < ch2); + } + + // Probable exact match. + return false; +} + + +// Do proper contents refresh/update. +void qjackctlClientList::refresh (void) +{ + QHeaderView *pHeader = m_pListView->header(); + m_pListView->sortItems( + pHeader->sortIndicatorSection(), + pHeader->sortIndicatorOrder()); +} + + +//---------------------------------------------------------------------------- +// qjackctlClientListView -- Client list view, supporting drag-n-drop. + +// Constructor. +qjackctlClientListView::qjackctlClientListView ( + qjackctlConnectView *pConnectView, bool bReadable ) + : QTreeWidget(pConnectView) +{ + m_pConnectView = pConnectView; + + m_pAutoOpenTimer = 0; + m_iAutoOpenTimeout = 0; + + m_pDragItem = NULL; + m_pDragItem = NULL; + + m_pAliases = NULL; + m_bRenameEnabled = false; + + QHeaderView *pHeader = QTreeWidget::header(); +// pHeader->setResizeMode(QHeaderView::Custom); + pHeader->setDefaultAlignment(Qt::AlignLeft); +// pHeader->setDefaultSectionSize(120); + pHeader->setMovable(false); + pHeader->setClickable(true); + pHeader->setSortIndicatorShown(true); + pHeader->setStretchLastSection(true); + + QTreeWidget::setRootIsDecorated(true); + QTreeWidget::setUniformRowHeights(true); +// QTreeWidget::setDragEnabled(true); + QTreeWidget::setAcceptDrops(true); + QTreeWidget::setDropIndicatorShown(true); + QTreeWidget::setAutoScroll(true); + QTreeWidget::setSelectionMode(QAbstractItemView::SingleSelection); + QTreeWidget::setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + QTreeWidget::setSortingEnabled(true); + QTreeWidget::setMinimumWidth(120); + QTreeWidget::setColumnCount(1); + + QString sText; + if (bReadable) + sText = tr("Readable Clients / Output Ports"); + else + sText = tr("Writable Clients / Input Ports"); + QTreeWidget::headerItem()->setText(0, sText); + QTreeWidget::sortItems(0, Qt::AscendingOrder); + QTreeWidget::setToolTip(sText); + + // Trap for help/tool-tips events. + QTreeWidget::viewport()->installEventFilter(this); + + QObject::connect(QTreeWidget::itemDelegate(), + SIGNAL(commitData(QWidget*)), + SLOT(renamedSlot())); + + setAutoOpenTimeout(800); +} + +// Default destructor. +qjackctlClientListView::~qjackctlClientListView (void) +{ + setAutoOpenTimeout(0); +} + + +// Binding indirect accessor. +qjackctlConnect *qjackctlClientListView::binding() const +{ + return m_pConnectView->binding(); +} + + +// Auto-open timeout method. +void qjackctlClientListView::setAutoOpenTimeout ( int iAutoOpenTimeout ) +{ + m_iAutoOpenTimeout = iAutoOpenTimeout; + + if (m_pAutoOpenTimer) + delete m_pAutoOpenTimer; + m_pAutoOpenTimer = NULL; + + if (m_iAutoOpenTimeout > 0) { + m_pAutoOpenTimer = new QTimer(this); + QObject::connect(m_pAutoOpenTimer, + SIGNAL(timeout()), + SLOT(timeoutSlot())); + } +} + + +// Auto-open timeout accessor. +int qjackctlClientListView::autoOpenTimeout (void) const +{ + return m_iAutoOpenTimeout; +} + + +// Aliasing support methods. +void qjackctlClientListView::setAliases ( qjackctlConnectAlias *pAliases, bool bRenameEnabled ) +{ + m_pAliases = pAliases; + m_bRenameEnabled = bRenameEnabled; + + // For each client item, if any. + int iItemCount = QTreeWidget::topLevelItemCount(); + for (int iItem = 0; iItem < iItemCount; ++iItem) { + QTreeWidgetItem *pItem = QTreeWidget::topLevelItem(iItem); + if (pItem->type() != QJACKCTL_CLIENTITEM) + continue; + qjackctlClientItem *pClientItem + = static_cast (pItem); + if (pClientItem == NULL) + continue; + if (m_pAliases) { + pClientItem->setText(0, + m_pAliases->clientAlias(pClientItem->clientName())); + pClientItem->setFlags( + pClientItem->flags() | Qt::ItemIsEditable); + } else { + pClientItem->setText(0, pClientItem->clientName()); + pClientItem->setFlags( + pClientItem->flags() & ~Qt::ItemIsEditable); + } + // For each port item... + int iChildCount = pClientItem->childCount(); + for (int iChild = 0; iChild < iChildCount; ++iChild) { + QTreeWidgetItem *pChildItem = pClientItem->child(iChild); + if (pChildItem->type() != QJACKCTL_PORTITEM) + continue; + qjackctlPortItem *pPortItem + = static_cast (pChildItem); + if (pPortItem == NULL) + continue; + if (m_pAliases) { + pPortItem->setText(0, m_pAliases->portAlias( + pPortItem->clientName(), pPortItem->portName())); + pPortItem->setFlags( + pClientItem->flags() | Qt::ItemIsEditable); + } else { + pPortItem->setText(0, pPortItem->portName()); + pPortItem->setFlags( + pPortItem->flags() & ~Qt::ItemIsEditable); + } + } + } +} + +qjackctlConnectAlias *qjackctlClientListView::aliases (void) const +{ + return m_pAliases; +} + +bool qjackctlClientListView::renameEnabled (void) const +{ + return m_bRenameEnabled; +} + + +// In-place aliasing slot. +void qjackctlClientListView::startRenameSlot (void) +{ + QTreeWidgetItem *pItem = QTreeWidget::currentItem(); + if (pItem) + QTreeWidget::editItem(pItem, 0); +} + + +// In-place aliasing slot. +void qjackctlClientListView::renamedSlot (void) +{ + if (m_pAliases == NULL) + return; + + QTreeWidgetItem *pItem = QTreeWidget::currentItem(); + if (pItem == NULL) + return; + + const QString& sText = pItem->text(0); + if (pItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pClientItem + = static_cast (pItem); + m_pAliases->setClientAlias( + pClientItem->clientName(), sText); + if (sText.isEmpty()) + pClientItem->setText(0, pClientItem->clientName()); + } else { + qjackctlPortItem *pPortItem + = static_cast (pItem); + m_pAliases->setPortAlias( + pPortItem->clientName(), pPortItem->portName(), sText); + if (sText.isEmpty()) + pPortItem->setText(0, pPortItem->portName()); + } + m_pConnectView->setDirty(true); +} + + +// Auto-open timer slot. +void qjackctlClientListView::timeoutSlot (void) +{ + if (m_pAutoOpenTimer) { + m_pAutoOpenTimer->stop(); + if (m_pDropItem && m_pDropItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pClientItem + = static_cast (m_pDropItem); + if (pClientItem && !pClientItem->isOpen()) + pClientItem->setOpen(true); + } + } +} + + +// Trap for help/tool-tip events. +bool qjackctlClientListView::eventFilter ( QObject *pObject, QEvent *pEvent ) +{ + QWidget *pViewport = QTreeWidget::viewport(); + if (static_cast (pObject) == pViewport + && pEvent->type() == QEvent::ToolTip) { + QHelpEvent *pHelpEvent = static_cast (pEvent); + if (pHelpEvent) { + QTreeWidgetItem *pItem = QTreeWidget::itemAt(pHelpEvent->pos()); + if (pItem && pItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pClientItem + = static_cast (pItem); + if (pClientItem) { + QToolTip::showText(pHelpEvent->globalPos(), + pClientItem->clientName(), pViewport); + return true; + } + } + else + if (pItem && pItem->type() == QJACKCTL_PORTITEM) { + qjackctlPortItem *pPortItem + = static_cast (pItem); + if (pPortItem) { + QToolTip::showText(pHelpEvent->globalPos(), + pPortItem->portName(), pViewport); + return true; + } + } + } + } + + // Not handled here. + return QTreeWidget::eventFilter(pObject, pEvent); +} + + +// Drag-n-drop stuff. +QTreeWidgetItem *qjackctlClientListView::dragDropItem ( const QPoint& pos ) +{ + QTreeWidgetItem *pItem = QTreeWidget::itemAt(pos); + if (pItem) { + if (m_pDropItem != pItem) { + QTreeWidget::setCurrentItem(pItem); + m_pDropItem = pItem; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->start(m_iAutoOpenTimeout); + qjackctlConnect *pConnect = m_pConnectView->binding(); + if ((pItem->flags() & Qt::ItemIsDropEnabled) == 0 + || pConnect == NULL || !pConnect->canConnectSelected()) + pItem = NULL; + } + } else { + m_pDropItem = NULL; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->stop(); + } + + return pItem; +} + +void qjackctlClientListView::dragEnterEvent ( QDragEnterEvent *pDragEnterEvent ) +{ + if (pDragEnterEvent->source() != this && + pDragEnterEvent->mimeData()->hasText() && + dragDropItem(pDragEnterEvent->pos())) { + pDragEnterEvent->accept(); + } else { + pDragEnterEvent->ignore(); + } +} + + +void qjackctlClientListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent ) +{ + if (pDragMoveEvent->source() != this && + pDragMoveEvent->mimeData()->hasText() && + dragDropItem(pDragMoveEvent->pos())) { + pDragMoveEvent->accept(); + } else { + pDragMoveEvent->ignore(); + } +} + + +void qjackctlClientListView::dragLeaveEvent ( QDragLeaveEvent * ) +{ + m_pDropItem = 0; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->stop(); +} + + +void qjackctlClientListView::dropEvent( QDropEvent *pDropEvent ) +{ + if (pDropEvent->source() != this && + pDropEvent->mimeData()->hasText() && + dragDropItem(pDropEvent->pos())) { + const QString sText = pDropEvent->mimeData()->text(); + qjackctlConnect *pConnect = m_pConnectView->binding(); + if (!sText.isEmpty() && pConnect) + pConnect->connectSelected(); + } + + dragLeaveEvent(0); +} + + +// Handle mouse events for drag-and-drop stuff. +void qjackctlClientListView::mousePressEvent ( QMouseEvent *pMouseEvent ) +{ + QTreeWidget::mousePressEvent(pMouseEvent); + + if (pMouseEvent->button() == Qt::LeftButton) { + m_posDrag = pMouseEvent->pos(); + m_pDragItem = QTreeWidget::itemAt(m_posDrag); + } +} + + +void qjackctlClientListView::mouseMoveEvent ( QMouseEvent *pMouseEvent ) +{ + QTreeWidget::mouseMoveEvent(pMouseEvent); + + if ((pMouseEvent->buttons() & Qt::LeftButton) && m_pDragItem + && ((pMouseEvent->pos() - m_posDrag).manhattanLength() + >= QApplication::startDragDistance())) { + // We'll start dragging something alright... + QMimeData *pMimeData = new QMimeData(); + pMimeData->setText(m_pDragItem->text(0)); + QDrag *pDrag = new QDrag(this); + pDrag->setMimeData(pMimeData); + pDrag->setPixmap(m_pDragItem->icon(0).pixmap(16)); + pDrag->setHotSpot(QPoint(-4, -12)); + pDrag->start(Qt::LinkAction); + // We've dragged and maybe dropped it by now... + m_pDragItem = NULL; + } +} + + +// Context menu request event handler. +void qjackctlClientListView::contextMenuEvent ( QContextMenuEvent *pContextMenuEvent ) +{ + qjackctlConnect *pConnect = m_pConnectView->binding(); + if (pConnect == 0) + return; + + QMenu menu(this); + QAction *pAction; + + pAction = menu.addAction(QIcon(":/icons/connect1.png"), + tr("&Connect"), pConnect, SLOT(connectSelected()), + tr("Alt+C", "Connect")); + pAction->setEnabled(pConnect->canConnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), + tr("&Disconnect"), pConnect, SLOT(disconnectSelected()), + tr("Alt+D", "Disconnect")); + pAction->setEnabled(pConnect->canDisconnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), + tr("Disconnect &All"), pConnect, SLOT(disconnectAll()), + tr("Alt+A", "Disconect All")); + pAction->setEnabled(pConnect->canDisconnectAll()); + if (m_bRenameEnabled) { + menu.addSeparator(); + pAction = menu.addAction(QIcon(":/icons/edit1.png"), + tr("Re&name"), this, SLOT(startRenameSlot()), + tr("Alt+N", "Rename")); + QTreeWidgetItem *pItem = QTreeWidget::currentItem(); + pAction->setEnabled(pItem && (pItem->flags() & Qt::ItemIsEditable)); + } + menu.addSeparator(); + pAction = menu.addAction(QIcon(":/icons/refresh1.png"), + tr("&Refresh"), pConnect, SLOT(refresh()), + tr("Alt+R", "Refresh")); + + menu.exec(pContextMenuEvent->globalPos()); +} + + + +//---------------------------------------------------------------------- +// qjackctlConnectorView -- Jack port connector widget. +// + +// Constructor. +qjackctlConnectorView::qjackctlConnectorView ( + qjackctlConnectView *pConnectView ) + : QWidget(pConnectView) +{ + m_pConnectView = pConnectView; + + QWidget::setMinimumWidth(20); +// QWidget::setMaximumWidth(120); + QWidget::setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); +} + +// Default destructor. +qjackctlConnectorView::~qjackctlConnectorView (void) +{ +} + + +// Legal client/port item position helper. +int qjackctlConnectorView::itemY ( QTreeWidgetItem *pItem ) const +{ + QRect rect; + QTreeWidget *pList = pItem->treeWidget(); + QTreeWidgetItem *pParent = pItem->parent(); + qjackctlClientItem *pClientItem = NULL; + if (pParent && pParent->type() == QJACKCTL_CLIENTITEM) + pClientItem = static_cast (pParent); + if (pClientItem && !pClientItem->isOpen()) { + rect = pList->visualItemRect(pClientItem); + } else { + rect = pList->visualItemRect(pItem); + } + return rect.top() + rect.height() / 2; +} + + +// Draw visible port connection relation lines +void qjackctlConnectorView::drawConnectionLine ( QPainter *pPainter, + int x1, int y1, int x2, int y2, int h1, int h2 ) +{ + // Account for list view headers. + y1 += h1; + y2 += h2; + + // Invisible output ports don't get a connecting dot. + if (y1 > h1) + pPainter->drawLine(x1, y1, x1 + 4, y1); + + // How do we'll draw it? + if (m_pConnectView->isBezierLines()) { + // Setup control points + QPolygon spline(4); + int cp = int(float(x2 - x1 - 8) * 0.4f); + spline.putPoints(0, 4, + x1 + 4, y1, x1 + 4 + cp, y1, + x2 - 4 - cp, y2, x2 - 4, y2); + // The connection line, it self. + QPainterPath path; + path.moveTo(spline.at(0)); + path.cubicTo(spline.at(1), spline.at(2), spline.at(3)); + pPainter->strokePath(path, pPainter->pen()); + } + else pPainter->drawLine(x1 + 4, y1, x2 - 4, y2); + + // Invisible input ports don't get a connecting dot. + if (y2 > h2) + pPainter->drawLine(x2 - 4, y2, x2, y2); +} + + +// Draw visible port connection relation arrows. +void qjackctlConnectorView::paintEvent ( QPaintEvent * ) +{ + if (m_pConnectView == NULL) + return; + if (m_pConnectView->OListView() == NULL || + m_pConnectView->IListView() == NULL) + return; + + qjackctlClientListView *pOListView = m_pConnectView->OListView(); + qjackctlClientListView *pIListView = m_pConnectView->IListView(); + + int yc = QWidget::pos().y(); + int yo = pOListView->pos().y(); + int yi = pIListView->pos().y(); + + QPainter painter(this); + int x1, y1, h1; + int x2, y2, h2; + int i, rgb[3] = { 0x33, 0x66, 0x99 }; + + // Inline adaptive to draker background themes... + if (QWidget::palette().window().color().value() < 0x7f) + for (i = 0; i < 3; ++i) rgb[i] += 0x33; + + // Initialize color changer. + i = 0; + // Almost constants. + x1 = 0; + x2 = QWidget::width(); + h1 = (pOListView->header())->sizeHint().height(); + h2 = (pIListView->header())->sizeHint().height(); + // For each output client item... + int iItemCount = pOListView->topLevelItemCount(); + for (int iItem = 0; iItem < iItemCount; ++iItem) { + QTreeWidgetItem *pItem = pOListView->topLevelItem(iItem); + if (pItem->type() != QJACKCTL_CLIENTITEM) + continue; + qjackctlClientItem *pOClient + = static_cast (pItem); + if (pOClient == NULL) + continue; + // Set new connector color. + ++i; + painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); + // For each port item + int iChildCount = pOClient->childCount(); + for (int iChild = 0; iChild < iChildCount; ++iChild) { + QTreeWidgetItem *pChild = pOClient->child(iChild); + if (pChild->type() != QJACKCTL_PORTITEM) + continue; + qjackctlPortItem *pOPort + = static_cast (pChild); + if (pOPort) { + // Get starting connector arrow coordinates. + y1 = itemY(pOPort) + (yo - yc); + // Get port connections... + QListIterator iter(pOPort->connects()); + while (iter.hasNext()) { + qjackctlPortItem *pIPort = iter.next(); + // Obviously, should be a connection + // from pOPort to pIPort items: + y2 = itemY(pIPort) + (yi - yc); + drawConnectionLine(&painter, x1, y1, x2, y2, h1, h2); + } + } + } + } +} + + +// Context menu request event handler. +void qjackctlConnectorView::contextMenuEvent ( + QContextMenuEvent *pContextMenuEvent ) +{ + qjackctlConnect *pConnect = m_pConnectView->binding(); + if (pConnect == 0) + return; + + QMenu menu(this); + QAction *pAction; + + pAction = menu.addAction(QIcon(":/icons/connect1.png"), + tr("&Connect"), pConnect, SLOT(connectSelected()), + tr("Alt+C", "Connect")); + pAction->setEnabled(pConnect->canConnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), + tr("&Disconnect"), pConnect, SLOT(disconnectSelected()), + tr("Alt+D", "Disconnect")); + pAction->setEnabled(pConnect->canDisconnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), + tr("Disconnect &All"), pConnect, SLOT(disconnectAll()), + tr("Alt+A", "Disconect All")); + pAction->setEnabled(pConnect->canDisconnectAll()); + + menu.addSeparator(); + pAction = menu.addAction(QIcon(":/icons/refresh1.png"), + tr("&Refresh"), pConnect, SLOT(refresh()), + tr("Alt+R", "Refresh")); + + menu.exec(pContextMenuEvent->globalPos()); +} + + +// Widget event slots... +void qjackctlConnectorView::contentsChanged (void) +{ + QWidget::update(); +} + + +//---------------------------------------------------------------------------- +// qjackctlConnectView -- Integrated connections view widget. + +// Constructor. +qjackctlConnectView::qjackctlConnectView ( QWidget *pParent ) + : QSplitter(Qt::Horizontal, pParent) +{ + m_pOListView = new qjackctlClientListView(this, true); + m_pConnectorView = new qjackctlConnectorView(this); + m_pIListView = new qjackctlClientListView(this, false); + + m_pConnect = NULL; + + m_bBezierLines = false; + m_iIconSize = 0; + + QObject::connect(m_pOListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pOListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pOListView->verticalScrollBar(), SIGNAL(valueChanged(int)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pOListView->header(), SIGNAL(sectionClicked(int)), + m_pConnectorView, SLOT(contentsChanged())); + + QObject::connect(m_pIListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pIListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pIListView->verticalScrollBar(), SIGNAL(valueChanged(int)), + m_pConnectorView, SLOT(contentsChanged())); + QObject::connect(m_pIListView->header(), SIGNAL(sectionClicked(int)), + m_pConnectorView, SLOT(contentsChanged())); + + m_bDirty = false; +} + + +// Default destructor. +qjackctlConnectView::~qjackctlConnectView (void) +{ +} + + +// Connect binding methods. +void qjackctlConnectView::setBinding ( qjackctlConnect *pConnect ) +{ + m_pConnect = pConnect; +} + +qjackctlConnect *qjackctlConnectView::binding (void) const +{ + return m_pConnect; +} + + +// Connect client list accessors. +qjackctlClientList *qjackctlConnectView::OClientList (void) const +{ + if (m_pConnect) + return m_pConnect->OClientList(); + else + return NULL; +} + +qjackctlClientList *qjackctlConnectView::IClientList (void) const +{ + if (m_pConnect) + return m_pConnect->OClientList(); + else + return NULL; +} + + +// Connector line style accessors. +void qjackctlConnectView::setBezierLines ( bool bBezierLines ) +{ + m_bBezierLines = bBezierLines; +} + +bool qjackctlConnectView::isBezierLines (void) const +{ + return m_bBezierLines; +} + + +// Common icon size methods. +void qjackctlConnectView::setIconSize ( int iIconSize ) +{ + // Update only if changed. + if (iIconSize == m_iIconSize) + return; + + // Go for it... + m_iIconSize = iIconSize; + + // Update item sizes properly... + int px = (16 << m_iIconSize); + const QSize iconsize(px, px); + m_pOListView->setIconSize(iconsize); + m_pIListView->setIconSize(iconsize); + + // Call binding descendant implementation, + // and do a complete content reset... + if (m_pConnect) + m_pConnect->updateContents(true); +} + +int qjackctlConnectView::iconSize (void) const +{ + return m_iIconSize; +} + + +// Dirty flag methods. +void qjackctlConnectView::setDirty ( bool bDirty ) +{ + m_bDirty = bDirty; + if (bDirty) + emit contentsChanged(); +} + +bool qjackctlConnectView::isDirty (void) const +{ + return m_bDirty; +} + + +//---------------------------------------------------------------------- +// qjackctlConnect -- Output-to-Input client/ports connection object. +// + +// Constructor. +qjackctlConnect::qjackctlConnect ( qjackctlConnectView *pConnectView ) +{ + m_pConnectView = pConnectView; + + m_pOClientList = NULL; + m_pIClientList = NULL; + + m_iMutex = 0; + + m_pConnectView->setBinding(this); +} + +// Default destructor. +qjackctlConnect::~qjackctlConnect (void) +{ + // Force end of works here. + m_iMutex++; + + m_pConnectView->setBinding(NULL); + + if (m_pOClientList) + delete m_pOClientList; + if (m_pIClientList) + delete m_pIClientList; + + m_pOClientList = NULL; + m_pIClientList = NULL; + + m_pConnectView->ConnectorView()->update(); +} + + +// These must be accessed by the descendant constructor. +qjackctlConnectView *qjackctlConnect::connectView (void) const +{ + return m_pConnectView; +} + +void qjackctlConnect::setOClientList ( qjackctlClientList *pOClientList ) +{ + m_pOClientList = pOClientList; +} + +void qjackctlConnect::setIClientList ( qjackctlClientList *pIClientList ) +{ + m_pIClientList = pIClientList; +} + + +// Connection primitive. +bool qjackctlConnect::connectPortsEx ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + if (pOPort->findConnectPtr(pIPort) != NULL) + return false; + + emit connecting(pOPort, pIPort); + + if (!connectPorts(pOPort, pIPort)) + return false; + + pOPort->addConnect(pIPort); + pIPort->addConnect(pOPort); + return true; +} + +// Disconnection primitive. +bool qjackctlConnect::disconnectPortsEx ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + if (pOPort->findConnectPtr(pIPort) == NULL) + return false; + + emit disconnecting(pOPort, pIPort); + + if (!disconnectPorts(pOPort, pIPort)) + return false; + + pOPort->removeConnect(pIPort); + pIPort->removeConnect(pOPort); + return true; +} + + +// Test if selected ports are connectable. +bool qjackctlConnect::canConnectSelected (void) +{ + bool bResult = false; + + if (startMutex()) { + bResult = canConnectSelectedEx(); + endMutex(); + } + + return bResult; +} + +bool qjackctlConnect::canConnectSelectedEx (void) +{ + // Take this opportunity to highlight any current selections. + m_pOClientList->hiliteClientPorts(); + m_pIClientList->hiliteClientPorts(); + + // Now with our predicate work... + QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + if (pOItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pOClient + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // Each-to-each connections... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + QListIterator iport(pIClient->ports()); + while (oport.hasNext() && iport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + qjackctlPortItem *pIPort = iport.next(); + if (pOPort->findConnectPtr(pIPort) == NULL) + return true; + } + } else { + // Many(all)-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + if (pOPort->findConnectPtr(pIPort) == NULL) + return true; + } + } + } else { + qjackctlPortItem *pOPort + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // One-to-many(all) connection... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator iport(pIClient->ports()); + while (iport.hasNext()) { + qjackctlPortItem *pIPort = iport.next(); + if (pOPort->findConnectPtr(pIPort) == NULL) + return true; + } + } else { + // One-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + return (pOPort->findConnectPtr(pIPort) == NULL); + } + } + + return false; +} + + +// Connect current selected ports. +bool qjackctlConnect::connectSelected (void) +{ + bool bResult = false; + + if (startMutex()) { + bResult = connectSelectedEx(); + endMutex(); + } + + m_pConnectView->ConnectorView()->update(); + + if (bResult) + emit connectChanged(); + + return bResult; +} + +bool qjackctlConnect::connectSelectedEx (void) +{ + QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + if (pOItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pOClient + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // Each-to-each connections... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + QListIterator iport(pIClient->ports()); + while (oport.hasNext() && iport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + qjackctlPortItem *pIPort = iport.next(); + connectPortsEx(pOPort, pIPort); + } + } else { + // Many(all)-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + connectPortsEx(pOPort, pIPort); + } + } + } else { + qjackctlPortItem *pOPort + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // One-to-many(all) connection... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator iport(pIClient->ports()); + while (iport.hasNext()) { + qjackctlPortItem *pIPort = iport.next(); + connectPortsEx(pOPort, pIPort); + } + } else { + // One-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + connectPortsEx(pOPort, pIPort); + } + } + + return true; +} + + +// Test if selected ports are disconnectable. +bool qjackctlConnect::canDisconnectSelected (void) +{ + bool bResult = false; + + if (startMutex()) { + bResult = canDisconnectSelectedEx(); + endMutex(); + } + + return bResult; +} + +bool qjackctlConnect::canDisconnectSelectedEx (void) +{ + QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); + if (!pOItem) + return false; + + QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); + if (!pIItem) + return false; + + if (pOItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pOClient + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // Each-to-each connections... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + QListIterator iport(pIClient->ports()); + while (oport.hasNext() && iport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + qjackctlPortItem *pIPort = iport.next(); + if (pOPort->findConnectPtr(pIPort) != NULL) + return true; + } + } else { + // Many(all)-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + if (pOPort->findConnectPtr(pIPort) != NULL) + return true; + } + } + } else { + qjackctlPortItem *pOPort + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // One-to-many(all) connection... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator iport(pIClient->ports()); + while (iport.hasNext()) { + qjackctlPortItem *pIPort = iport.next(); + if (pOPort->findConnectPtr(pIPort) != NULL) + return true; + } + } else { + // One-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + return (pOPort->findConnectPtr(pIPort) != NULL); + } + } + + return false; +} + + +// Disconnect current selected ports. +bool qjackctlConnect::disconnectSelected (void) +{ + bool bResult = false; + + if (startMutex()) { + bResult = disconnectSelectedEx(); + endMutex(); + } + + m_pConnectView->ConnectorView()->update(); + + if (bResult) + emit connectChanged(); + + return bResult; +} + +bool qjackctlConnect::disconnectSelectedEx (void) +{ + QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + if (pOItem->type() == QJACKCTL_CLIENTITEM) { + qjackctlClientItem *pOClient + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // Each-to-each connections... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + QListIterator iport(pIClient->ports()); + while (oport.hasNext() && iport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + qjackctlPortItem *pIPort = iport.next(); + disconnectPortsEx(pOPort, pIPort); + } + } else { + // Many(all)-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + disconnectPortsEx(pOPort, pIPort); + } + } + } else { + qjackctlPortItem *pOPort + = static_cast (pOItem); + if (pIItem->type() == QJACKCTL_CLIENTITEM) { + // One-to-many(all) connection... + qjackctlClientItem *pIClient + = static_cast (pIItem); + QListIterator iport(pIClient->ports()); + while (iport.hasNext()) { + qjackctlPortItem *pIPort = iport.next(); + disconnectPortsEx(pOPort, pIPort); + } + } else { + // One-to-one connection... + qjackctlPortItem *pIPort + = static_cast (pIItem); + disconnectPortsEx(pOPort, pIPort); + } + } + + return true; +} + + +// Test if any port is disconnectable. +bool qjackctlConnect::canDisconnectAll (void) +{ + bool bResult = false; + + if (startMutex()) { + bResult = canDisconnectAllEx(); + endMutex(); + } + + return bResult; +} + +bool qjackctlConnect::canDisconnectAllEx (void) +{ + QListIterator iter(m_pOClientList->clients()); + while (iter.hasNext()) { + qjackctlClientItem *pOClient = iter.next(); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + if (pOPort->connects().count() > 0) + return true; + } + } + return false; +} + + +// Disconnect all ports. +bool qjackctlConnect::disconnectAll (void) +{ + if (QMessageBox::warning(m_pConnectView, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("This will suspend sound processing\n" + "from all client applications.\n\nAre you sure?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + return false; + } + + bool bResult = false; + + if (startMutex()) { + bResult = disconnectAllEx(); + endMutex(); + } + + m_pConnectView->ConnectorView()->update(); + + if (bResult) + emit connectChanged(); + + return bResult; +} + +bool qjackctlConnect::disconnectAllEx (void) +{ + QListIterator iter(m_pOClientList->clients()); + while (iter.hasNext()) { + qjackctlClientItem *pOClient = iter.next(); + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + QListIterator iport(pOPort->connects()); + while (iport.hasNext()) { + qjackctlPortItem *pIPort = iport.next(); + disconnectPortsEx(pOPort, pIPort); + } + } + } + return true; +} + + +// Complete/incremental contents rebuilder; check dirty status if incremental. +void qjackctlConnect::updateContents ( bool bClear ) +{ + int iDirtyCount = 0; + + if (startMutex()) { + // Do we do a complete rebuild? + if (bClear) { + (m_pOClientList->listView())->clear(); + (m_pIClientList->listView())->clear(); + updateIconPixmaps(); + } + // Add (newer) client:ports and respective connections... + if (m_pOClientList->updateClientPorts() > 0) { + m_pOClientList->refresh(); + iDirtyCount++; + } + if (m_pIClientList->updateClientPorts() > 0) { + m_pIClientList->refresh(); + iDirtyCount++; + } + updateConnections(); + endMutex(); + } + + (m_pConnectView->ConnectorView())->update(); + + if (!bClear && iDirtyCount > 0) + emit connectChanged(); +} + + +// Incremental contents rebuilder; check dirty status. +void qjackctlConnect::refresh (void) +{ + updateContents(false); +} + + +// Dunno. But this may avoid some conflicts. +bool qjackctlConnect::startMutex (void) +{ + bool bMutex = (m_iMutex == 0); + if (bMutex) + m_iMutex++; + return bMutex; +} + +void qjackctlConnect::endMutex (void) +{ + if (m_iMutex > 0) + m_iMutex--; +} + + +// Connect client list accessors. +qjackctlClientList *qjackctlConnect::OClientList (void) const +{ + return m_pOClientList; +} + +qjackctlClientList *qjackctlConnect::IClientList (void) const +{ + return m_pIClientList; +} + + +// Common pixmap factory-method. +QPixmap *qjackctlConnect::createIconPixmap ( const QString& sIconName ) +{ + QString sName = sIconName; + int iSize = m_pConnectView->iconSize() * 32; + + if (iSize > 0) + sName += QString("_%1x%2").arg(iSize).arg(iSize); + + return new QPixmap(":/icons/" + sName + ".png"); +} + + +// end of qjackctlConnect.cpp diff -Nru qjackctl-0.3.4/src/qjackctlConnect.h qjackctl-0.3.6/src/qjackctlConnect.h --- qjackctl-0.3.4/src/qjackctlConnect.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnect.h 2009-02-19 10:28:56.000000000 +0000 @@ -0,0 +1,508 @@ +// qjackctlConnect.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlConnect_h +#define __qjackctlConnect_h + +#include "qjackctlConnectAlias.h" + +#include +#include + + +// QListViewItem::rtti return values. +#define QJACKCTL_CLIENTITEM 1001 +#define QJACKCTL_PORTITEM 1002 + + +// Forward declarations. +class qjackctlPortItem; +class qjackctlClientItem; +class qjackctlClientList; +class qjackctlClientListView; +class qjackctlConnectorView; +class qjackctlConnectView; +class qjackctlConnect; + + +// Port list item. +class qjackctlPortItem : public QTreeWidgetItem +{ +public: + + // Constructor. + qjackctlPortItem(qjackctlClientItem *pClient, const QString& sPortName); + // Default destructor. + ~qjackctlPortItem(); + + // Instance accessors. + void setPortName(const QString& sPortName); + const QString& clientName() const; + const QString& portName() const; + + // Complete client:port name helper. + QString clientPortName() const; + + // Connections client item accessor. + qjackctlClientItem *client() const; + + // Client port cleanup marker. + void markPort(int iMark); + void markClientPort(int iMark); + + int portMark() const; + + // Connected port list primitives. + void addConnect(qjackctlPortItem *pPort); + void removeConnect(qjackctlPortItem *pPort); + + // Connected port finders. + qjackctlPortItem *findConnect(const QString& sClientPortName); + qjackctlPortItem *findConnectPtr(qjackctlPortItem *pPortPtr); + + // Connection list accessor. + const QList& connects() const; + + // Connectiopn highlight methods. + bool isHilite() const; + void setHilite (bool bHilite); + + // Proxy sort override method. + // - Natural decimal sorting comparator. + bool operator< (const QTreeWidgetItem& other) const; + +private: + + // Instance variables. + qjackctlClientItem *m_pClient; + + QString m_sPortName; + int m_iPortMark; + bool m_bHilite; + + // Connection cache list. + QList m_connects; +}; + + +// Client list item. +class qjackctlClientItem : public QTreeWidgetItem +{ +public: + + // Constructor. + qjackctlClientItem(qjackctlClientList *pClientList, + const QString& sClientName); + // Default destructor. + ~qjackctlClientItem(); + + // Port list primitive methods. + void addPort(qjackctlPortItem *pPort); + void removePort(qjackctlPortItem *pPort); + + // Port finder. + qjackctlPortItem *findPort(const QString& sPortName); + + // Instance accessors. + void setClientName(const QString& sClientName); + const QString& clientName() const; + + // Readable flag accessor. + bool isReadable() const; + + // Client list accessor. + qjackctlClientList *clientList() const; + + // Port list accessor. + QList& ports(); + + // Client port cleanup marker. + void markClient(int iMark); + void markClientPorts(int iMark); + int cleanClientPorts(int iMark); + int clientMark() const; + + // Connectiopn highlight methods. + bool isHilite() const; + void setHilite (bool bHilite); + + // Client item openness status. + void setOpen(bool bOpen); + bool isOpen() const; + + // Proxy sort override method. + // - Natural decimal sorting comparator. + bool operator< (const QTreeWidgetItem& other) const; + +private: + + // Instance variables. + qjackctlClientList *m_pClientList; + + QString m_sClientName; + int m_iClientMark; + int m_iHilite; + + QList m_ports; +}; + + +// Jack client list. +class qjackctlClientList : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlClientList(qjackctlClientListView *pListView, bool bReadable); + // Default destructor. + ~qjackctlClientList(); + + // Client list primitive methods. + void addClient(qjackctlClientItem *pClient); + void removeClient(qjackctlClientItem *pClient); + + // Client finder. + qjackctlClientItem *findClient(const QString& sClientName); + // Client:port finder. + qjackctlPortItem *findClientPort(const QString& sClientPort); + + // List view accessor. + qjackctlClientListView *listView() const; + + // Readable flag accessor. + bool isReadable() const; + + // Client list accessor. + QList& clients(); + + // Client ports cleanup marker. + void markClientPorts(int iMark); + int cleanClientPorts(int iMark); + + // Client:port refreshner (return newest item count). + virtual int updateClientPorts() = 0; + + // Client:port hilite update stabilization. + void hiliteClientPorts (void); + + // Do proper contents refresh/update. + void refresh(); + + // Natural decimal sorting comparator. + static bool lessThan(const QTreeWidgetItem& i1, const QTreeWidgetItem& i2); + +private: + + // Instance variables. + qjackctlClientListView *m_pListView; + bool m_bReadable; + + QList m_clients; + + QTreeWidgetItem *m_pHiliteItem; +}; + + +//---------------------------------------------------------------------------- +// qjackctlClientListView -- Client list view, supporting drag-n-drop. + +class qjackctlClientListView : public QTreeWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlClientListView(qjackctlConnectView *pConnectView, bool bReadable); + // Default destructor. + ~qjackctlClientListView(); + + // Auto-open timer methods. + void setAutoOpenTimeout(int iAutoOpenTimeout); + int autoOpenTimeout() const; + + // Aliasing support methods. + void setAliases(qjackctlConnectAlias *pAliases, bool bRenameEnabled); + qjackctlConnectAlias *aliases() const; + bool renameEnabled() const; + + // Binding indirect accessor. + qjackctlConnect *binding() const; + +protected slots: + + // In-place aliasing slots. + void startRenameSlot(); + void renamedSlot(); + // Auto-open timeout slot. + void timeoutSlot(); + +protected: + + // Trap for help/tool-tip events. + bool eventFilter(QObject *pObject, QEvent *pEvent); + + // Drag-n-drop stuff. + QTreeWidgetItem *dragDropItem(const QPoint& pos); + + // Drag-n-drop stuff -- reimplemented virtual methods. + void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); + void dragMoveEvent(QDragMoveEvent *pDragMoveEvent); + void dragLeaveEvent(QDragLeaveEvent *); + void dropEvent(QDropEvent *pDropEvent); + + // Handle mouse events for drag-and-drop stuff. + void mousePressEvent(QMouseEvent *pMouseEvent); + void mouseMoveEvent(QMouseEvent *pMouseEvent); + + // Context menu request event handler. + void contextMenuEvent(QContextMenuEvent *); + +private: + + // Bindings. + qjackctlConnectView *m_pConnectView; + + // Auto-open timer. + int m_iAutoOpenTimeout; + QTimer *m_pAutoOpenTimer; + + // Items we'll eventually drop something. + QTreeWidgetItem *m_pDragItem; + QTreeWidgetItem *m_pDropItem; + // The point from where drag started. + QPoint m_posDrag; + + // Aliasing support. + qjackctlConnectAlias *m_pAliases; + bool m_bRenameEnabled; +}; + + +//---------------------------------------------------------------------------- +// qjackctlConnectorView -- Jack port connector widget. + +class qjackctlConnectorView : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlConnectorView(qjackctlConnectView *pConnectView); + // Default destructor. + ~qjackctlConnectorView(); + +public slots: + + // Useful slots (should this be protected?). + void contentsChanged(); + +protected: + + // Draw visible port connection relation arrows. + void paintEvent(QPaintEvent *); + + // Context menu request event handler. + virtual void contextMenuEvent(QContextMenuEvent *); + +private: + + // Legal client/port item position helper. + int itemY(QTreeWidgetItem *pItem) const; + + // Drawing methods. + void drawConnectionLine(QPainter *pPainter, + int x1, int y1, int x2, int y2, int h1, int h2); + + // Local instance variables. + qjackctlConnectView *m_pConnectView; +}; + + +//---------------------------------------------------------------------------- +// qjackctlConnectView -- Connections view integrated widget. + +class qjackctlConnectView : public QSplitter +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlConnectView(QWidget *pParent = 0); + // Default destructor. + ~qjackctlConnectView(); + + // Widget accesors. + qjackctlClientListView *OListView() const + { return m_pOListView; } + qjackctlClientListView *IListView() const + { return m_pIListView; } + qjackctlConnectorView *ConnectorView() const + { return m_pConnectorView; } + + // Connections object binding methods. + void setBinding(qjackctlConnect *pConnect); + qjackctlConnect *binding() const; + + // Client list accessors. + qjackctlClientList *OClientList() const; + qjackctlClientList *IClientList() const; + + // Connector line style accessors. + void setBezierLines(bool bBezierLines); + bool isBezierLines() const; + + // Common icon size pixmap accessors. + void setIconSize (int iIconSize); + int iconSize (void) const; + + // Dirty flag accessors. + void setDirty (bool bDirty); + bool isDirty() const; + +signals: + + // Contents change signal. + void contentsChanged(); + +private: + + // Child controls. + qjackctlClientListView *m_pOListView; + qjackctlClientListView *m_pIListView; + qjackctlConnectorView *m_pConnectorView; + + // The main binding object. + qjackctlConnect *m_pConnect; + + // How we'll draw connector lines. + bool m_bBezierLines; + + // How large will be those icons. + // 0 = 16x16 (default), 1 = 32x32, 2 = 64x64. + int m_iIconSize; + + // The obnoxious dirty flag. + bool m_bDirty; +}; + + +//---------------------------------------------------------------------------- +// qjackctlConnect -- Connections model integrated object. + +class qjackctlConnect : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlConnect(qjackctlConnectView *pConnectView); + // Default destructor. + ~qjackctlConnect(); + + // Explicit connection tests. + bool canConnectSelected(); + bool canDisconnectSelected(); + bool canDisconnectAll(); + + // Client list accessors. + qjackctlClientList *OClientList() const; + qjackctlClientList *IClientList() const; + +public slots: + + // Incremental contents refreshner; check dirty status. + void refresh(); + + // Explicit connection slots. + bool connectSelected(); + bool disconnectSelected(); + bool disconnectAll(); + + // Complete/incremental contents rebuilder; check dirty status if incremental. + void updateContents(bool bClear); + +signals: + + // Connection change signal. + void connectChanged(); + + // Pre-notification of (dis)connection. + void connecting(qjackctlPortItem *, qjackctlPortItem *); + void disconnecting(qjackctlPortItem *, qjackctlPortItem *); + +protected: + + // Connect/Disconnection primitives. + virtual bool connectPorts( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort) = 0; + virtual bool disconnectPorts( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort) = 0; + + // Update port connection references. + virtual void updateConnections() = 0; + + // These must be accessed by the descendant constructor. + qjackctlConnectView *connectView() const; + void setOClientList(qjackctlClientList *pOClientList); + void setIClientList(qjackctlClientList *pIClientList); + + // Common pixmap factory helper-method. + QPixmap *createIconPixmap (const QString& sIconName); + + // Update icon size implementation. + virtual void updateIconPixmaps() = 0; + +private: + + // Dunno. But this may avoid some conflicts. + bool startMutex(); + void endMutex(); + + // Connection methods (unguarded). + bool canConnectSelectedEx(); + bool canDisconnectSelectedEx(); + bool canDisconnectAllEx(); + bool connectSelectedEx(); + bool disconnectSelectedEx(); + bool disconnectAllEx(); + + // Connect/Disconnection local primitives. + bool connectPortsEx(qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + bool disconnectPortsEx(qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + + // Instance variables. + qjackctlConnectView *m_pConnectView; + // These must be created on the descendant constructor. + qjackctlClientList *m_pOClientList; + qjackctlClientList *m_pIClientList; + int m_iMutex; +}; + + +#endif // __qjackctlConnect_h + +// end of qjackctlConnect.h diff -Nru qjackctl-0.3.4/src/qjackctlConnectionsForm.cpp qjackctl-0.3.6/src/qjackctlConnectionsForm.cpp --- qjackctl-0.3.4/src/qjackctlConnectionsForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnectionsForm.cpp 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,751 @@ +// qjackctlConnectionsForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlConnectionsForm.h" + +#include "qjackctlSetup.h" + +#include "qjackctlMainForm.h" +#include "qjackctlPatchbay.h" + +#include + +#include +#include + + +//---------------------------------------------------------------------------- +// qjackctlConnectionsForm -- UI wrapper form. + +// Constructor. +qjackctlConnectionsForm::qjackctlConnectionsForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QWidget(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + m_pJackClient = NULL; + m_pAudioConnect = NULL; + m_pMidiConnect = NULL; + + m_pAlsaSeq = NULL; + m_pAlsaConnect = NULL; + + m_pSetup = NULL; + + // UI connections... + + QObject::connect(m_ui.AudioConnectPushButton, + SIGNAL(clicked()), + SLOT(audioConnectSelected())); + QObject::connect(m_ui.AudioDisconnectPushButton, + SIGNAL(clicked()), + SLOT(audioDisconnectSelected())); + QObject::connect(m_ui.AudioDisconnectAllPushButton, + SIGNAL(clicked()), + SLOT(audioDisconnectAll())); + QObject::connect(m_ui.AudioRefreshPushButton, + SIGNAL(clicked()), + SLOT(audioRefresh())); + + QObject::connect(m_ui.MidiConnectPushButton, + SIGNAL(clicked()), + SLOT(midiConnectSelected())); + QObject::connect(m_ui.MidiDisconnectPushButton, + SIGNAL(clicked()), + SLOT(midiDisconnectSelected())); + QObject::connect(m_ui.MidiDisconnectAllPushButton, + SIGNAL(clicked()), + SLOT(midiDisconnectAll())); + QObject::connect(m_ui.MidiRefreshPushButton, + SIGNAL(clicked()), + SLOT(midiRefresh())); + + QObject::connect(m_ui.AlsaConnectPushButton, + SIGNAL(clicked()), + SLOT(alsaConnectSelected())); + QObject::connect(m_ui.AlsaDisconnectPushButton, + SIGNAL(clicked()), + SLOT(alsaDisconnectSelected())); + QObject::connect(m_ui.AlsaDisconnectAllPushButton, + SIGNAL(clicked()), + SLOT(alsaDisconnectAll())); + QObject::connect(m_ui.AlsaRefreshPushButton, + SIGNAL(clicked()), + SLOT(alsaRefresh())); + + // Connect it to some UI feedback slots. + QObject::connect(m_ui.AudioConnectView->OListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(audioStabilize())); + QObject::connect(m_ui.AudioConnectView->IListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(audioStabilize())); + QObject::connect(m_ui.MidiConnectView->OListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(midiStabilize())); + QObject::connect(m_ui.MidiConnectView->IListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(midiStabilize())); + QObject::connect(m_ui.AlsaConnectView->OListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(alsaStabilize())); + QObject::connect(m_ui.AlsaConnectView->IListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(alsaStabilize())); + + // Dirty dispatcher (refresh deferral). + QObject::connect(m_ui.AudioConnectView, + SIGNAL(contentsChanged()), + SLOT(audioRefresh())); + QObject::connect(m_ui.MidiConnectView, + SIGNAL(contentsChanged()), + SLOT(midiRefresh())); + QObject::connect(m_ui.AlsaConnectView, + SIGNAL(contentsChanged()), + SLOT(alsaRefresh())); + +#ifndef CONFIG_JACK_MIDI + m_ui.ConnectionsTabWidget->setTabEnabled(1, false); +#endif +#ifndef CONFIG_ALSA_SEQ +// m_ui.ConnectionsTabWidget->setTabEnabled(2, false); + m_ui.ConnectionsTabWidget->removeTab(2); +#endif +} + + +// Destructor. +qjackctlConnectionsForm::~qjackctlConnectionsForm (void) +{ + // Destroy our connections view... + setJackClient(NULL); + setAlsaSeq(NULL); +} + + +// Notify our parent that we're emerging. +void qjackctlConnectionsForm::showEvent ( QShowEvent *pShowEvent ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); + + audioRefresh(); + midiRefresh(); + + alsaRefresh(); + + QWidget::showEvent(pShowEvent); +} + +// Notify our parent that we're closing. +void qjackctlConnectionsForm::hideEvent ( QHideEvent *pHideEvent ) +{ + QWidget::hideEvent(pHideEvent); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + +// Just about to notify main-window that we're closing. +void qjackctlConnectionsForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) +{ + QWidget::hide(); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + + +// Set reference to global options, mostly needed for the +// initial sizes of the main splitter views and those +// client/port aliasing feature. +void qjackctlConnectionsForm::setup ( qjackctlSetup *pSetup ) +{ + m_pSetup = pSetup; + + // Load some splitter sizes... + if (m_pSetup) { + QList sizes; + sizes.append(180); + sizes.append(60); + sizes.append(180); + m_pSetup->loadSplitterSizes(m_ui.AudioConnectView, sizes); + m_pSetup->loadSplitterSizes(m_ui.MidiConnectView, sizes); + m_pSetup->loadSplitterSizes(m_ui.AlsaConnectView, sizes); +#ifdef CONFIG_ALSA_SEQ + if (!m_pSetup->bAlsaSeqEnabled) { + // m_ui.ConnectionsTabWidget->setTabEnabled(2, false); + m_ui.ConnectionsTabWidget->removeTab(2); + } +#endif + } + + // Update initial client/port aliases... + updateAliases(); +} + + +// Connector view accessors. +qjackctlConnectView *qjackctlConnectionsForm::audioConnectView (void) const +{ + return m_ui.AudioConnectView; +} + +qjackctlConnectView *qjackctlConnectionsForm::midiConnectView (void) const +{ + return m_ui.MidiConnectView; +} + +qjackctlConnectView *qjackctlConnectionsForm::alsaConnectView (void) const +{ + return m_ui.AlsaConnectView; +} + + +// Window close event handlers. +bool qjackctlConnectionsForm::queryClose (void) +{ + bool bQueryClose = true; + + if (m_pSetup + && (m_ui.AudioConnectView->isDirty() || + m_ui.MidiConnectView->isDirty() || + m_ui.AlsaConnectView->isDirty())) { + switch (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("The preset aliases have been changed:\n\n" + "\"%1\"\n\nDo you want to save the changes?") + .arg(m_sPreset), + QMessageBox::Save | + QMessageBox::Discard | + QMessageBox::Cancel)) { + case QMessageBox::Save: + saveAliases(); + // Fall thru.... + case QMessageBox::Discard: + break; + default: // Cancel. + bQueryClose = false; + } + } + + // Save some splitter sizes... + if (m_pSetup && bQueryClose) { + m_pSetup->saveSplitterSizes(m_ui.AudioConnectView); + m_pSetup->saveSplitterSizes(m_ui.MidiConnectView); + m_pSetup->saveSplitterSizes(m_ui.AlsaConnectView); + } + + return bQueryClose; +} + + +// Load aliases from current preset. +bool qjackctlConnectionsForm::loadAliases (void) +{ + bool bResult = false; + + if (m_pSetup && queryClose()) { + m_sPreset = m_pSetup->sDefPreset; + bResult = m_pSetup->loadAliases(m_sPreset); + if (bResult) { + m_ui.AudioConnectView->setDirty(false); + m_ui.MidiConnectView->setDirty(false); + m_ui.AlsaConnectView->setDirty(false); + } + } + + return bResult; +} + + +// Save aliases to current preset. +bool qjackctlConnectionsForm::saveAliases (void) +{ + bool bResult = false; + + if (m_pSetup) { + bResult = m_pSetup->saveAliases(m_sPreset); + if (bResult) { + m_ui.AudioConnectView->setDirty(false); + m_ui.MidiConnectView->setDirty(false); + m_ui.AlsaConnectView->setDirty(false); + } + } + + return bResult; +} + + +// Connections view font accessors. +QFont qjackctlConnectionsForm::connectionsFont (void) const +{ + // Elect one list view to retrieve current font. + return m_ui.AudioConnectView->OListView()->font(); +} + +void qjackctlConnectionsForm::setConnectionsFont ( const QFont & font ) +{ + // Set fonts of all listviews... + m_ui.AudioConnectView->OListView()->setFont(font); + m_ui.AudioConnectView->IListView()->setFont(font); + m_ui.MidiConnectView->OListView()->setFont(font); + m_ui.MidiConnectView->IListView()->setFont(font); + m_ui.AlsaConnectView->OListView()->setFont(font); + m_ui.AlsaConnectView->IListView()->setFont(font); +} + + +// Connections view icon size accessor. +void qjackctlConnectionsForm::setConnectionsIconSize ( int iIconSize ) +{ + // Set icon sizes of all views... + m_ui.AudioConnectView->setIconSize(iIconSize); + m_ui.MidiConnectView->setIconSize(iIconSize); + m_ui.AlsaConnectView->setIconSize(iIconSize); +} + + +// (Un)Bind a JACK client to this form. +void qjackctlConnectionsForm::setJackClient ( jack_client_t *pJackClient ) +{ + m_pJackClient = pJackClient; + + if (pJackClient == NULL) { + if (m_pAudioConnect) { + delete m_pAudioConnect; + m_pAudioConnect = NULL; + } + if (m_pMidiConnect) { + delete m_pMidiConnect; + m_pMidiConnect = NULL; + } + } + + if (pJackClient) { + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (m_pAudioConnect == NULL && pMainForm) { + m_pAudioConnect = new qjackctlJackConnect( + m_ui.AudioConnectView, pJackClient, QJACKCTL_JACK_AUDIO); + QObject::connect(m_pAudioConnect, SIGNAL(connectChanged()), + pMainForm, SLOT(jackConnectChanged())); + QObject::connect(m_pAudioConnect, + SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), + SLOT(audioDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); + } + if (m_pMidiConnect == NULL && pMainForm) { + m_pMidiConnect = new qjackctlJackConnect( + m_ui.MidiConnectView, pJackClient, QJACKCTL_JACK_MIDI); + QObject::connect(m_pMidiConnect, SIGNAL(connectChanged()), + pMainForm, SLOT(jackConnectChanged())); + QObject::connect(m_pMidiConnect, + SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), + SLOT(midiDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); + } + } + + stabilizeAudio(pJackClient != NULL); + stabilizeMidi(pJackClient != NULL); +} + + +// (Un)Bind a ALSA sequencer descriptor to this form. +void qjackctlConnectionsForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) +{ + m_pAlsaSeq = pAlsaSeq; + + if (pAlsaSeq == NULL && m_pAlsaConnect) { + delete m_pAlsaConnect; + m_pAlsaConnect = NULL; + } + + if (pAlsaSeq && m_pAlsaConnect == NULL) { + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + m_pAlsaConnect = new qjackctlAlsaConnect(m_ui.AlsaConnectView, pAlsaSeq); + if (pMainForm) { + QObject::connect(m_pAlsaConnect, SIGNAL(connectChanged()), + pMainForm, SLOT(alsaConnectChanged())); + QObject::connect(m_pAlsaConnect, + SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), + SLOT(alsaDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); + } + } + + stabilizeAlsa(pAlsaSeq != NULL); +} + + +// Check if there's JACK audio connections. +bool qjackctlConnectionsForm::isAudioConnected (void) const +{ + bool bIsAudioConnected = false; + + if (m_pAudioConnect) + bIsAudioConnected = m_pAudioConnect->canDisconnectAll(); + + return bIsAudioConnected; +} + + +// Connect current selected JACK audio ports. +void qjackctlConnectionsForm::audioConnectSelected (void) +{ + if (m_pAudioConnect) { + if (m_pAudioConnect->connectSelected()) + refreshAudio(false); + } +} + + +// Disconnect current selected JACK audio ports. +void qjackctlConnectionsForm::audioDisconnectSelected (void) +{ + if (m_pAudioConnect) { + if (m_pAudioConnect->disconnectSelected()) + refreshAudio(false); + } +} + + +// Disconnect all connected JACK audio ports. +void qjackctlConnectionsForm::audioDisconnectAll (void) +{ + if (m_pAudioConnect) { + if (m_pAudioConnect->disconnectAll()) + refreshAudio(false); + } +} + + +// JACK audio ports disconnecting. +void qjackctlConnectionsForm::audioDisconnecting ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_JACK_AUDIO); +} + + +// Refresh JACK audio form by notifying the parent form. +void qjackctlConnectionsForm::audioRefresh (void) +{ + refreshAudio(false); +} + + +// A JACK audio helper stabilization slot. +void qjackctlConnectionsForm::audioStabilize (void) +{ + stabilizeAudio(true); +} + + +// Connect current selected JACK MIDI ports. +void qjackctlConnectionsForm::midiConnectSelected (void) +{ + if (m_pMidiConnect) { + if (m_pMidiConnect->connectSelected()) + refreshMidi(false); + } +} + + +// Check if there's JACK MIDI connections. +bool qjackctlConnectionsForm::isMidiConnected (void) const +{ + bool bIsMidiConnected = false; + + if (m_pMidiConnect) + bIsMidiConnected = m_pMidiConnect->canDisconnectAll(); + + return bIsMidiConnected; +} + + +// Disconnect current selected JACK MIDI ports. +void qjackctlConnectionsForm::midiDisconnectSelected (void) +{ + if (m_pMidiConnect) { + if (m_pMidiConnect->disconnectSelected()) + refreshMidi(false); + } +} + + +// Disconnect all connected JACK MIDI ports. +void qjackctlConnectionsForm::midiDisconnectAll (void) +{ + if (m_pMidiConnect) { + if (m_pMidiConnect->disconnectAll()) + refreshMidi(false); + } +} + + +// JACK MIDI ports disconnecting. +void qjackctlConnectionsForm::midiDisconnecting ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_JACK_MIDI); +} + + +// Refresh JACK MIDI form by notifying the parent form. +void qjackctlConnectionsForm::midiRefresh (void) +{ + refreshMidi(false); +} + + +// A JACK MIDI helper stabilization slot. +void qjackctlConnectionsForm::midiStabilize (void) +{ + stabilizeMidi(true); +} + + +// Check if there's ALSA MIDI connections. +bool qjackctlConnectionsForm::isAlsaConnected (void) const +{ + bool bIsConnected = false; + + if (m_pAlsaConnect) + bIsConnected = m_pAlsaConnect->canDisconnectAll(); + + return bIsConnected; +} + + +// Connect current selected ALSA MIDI ports. +void qjackctlConnectionsForm::alsaConnectSelected (void) +{ + if (m_pAlsaConnect) { + if (m_pAlsaConnect->connectSelected()) + refreshAlsa(false); + } +} + + +// Disconnect current selected ALSA MIDI ports. +void qjackctlConnectionsForm::alsaDisconnectSelected (void) +{ + if (m_pAlsaConnect) { + if (m_pAlsaConnect->disconnectSelected()) + refreshAlsa(false); + } +} + + +// Disconnect all connected ALSA MIDI ports. +void qjackctlConnectionsForm::alsaDisconnectAll (void) +{ + if (m_pAlsaConnect) { + if (m_pAlsaConnect->disconnectAll()) + refreshAlsa(false); + } +} + + +// ALSA MIDI ports disconnecting. +void qjackctlConnectionsForm::alsaDisconnecting ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_ALSA_MIDI); +} + + +// Refresh complete form by notifying the parent form. +void qjackctlConnectionsForm::alsaRefresh (void) +{ + refreshAlsa(false); +} + + +// A helper stabilization slot. +void qjackctlConnectionsForm::alsaStabilize (void) +{ + stabilizeAlsa(true); +} + + +// Either rebuild all connections now +// or notify main form for doing that later. +void qjackctlConnectionsForm::refreshAudio ( bool bEnabled ) +{ + if (m_pAudioConnect == NULL) + return; + + if (bEnabled) { + m_pAudioConnect->refresh(); + stabilizeAudio(true); + } else { + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->refreshJackConnections(); + } +} + +void qjackctlConnectionsForm::refreshMidi ( bool bEnabled ) +{ + if (m_pMidiConnect == NULL) + return; + + if (bEnabled) { + m_pMidiConnect->refresh(); + stabilizeMidi(true); + } else { + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->refreshJackConnections(); + } +} + +void qjackctlConnectionsForm::refreshAlsa ( bool bEnabled ) +{ + if (m_pAlsaConnect == NULL) + return; + + if (bEnabled) { + m_pAlsaConnect->refresh(); + stabilizeAlsa(true); + } else { + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->refreshAlsaConnections(); + } +} + + +// Proper enablement of connections command controls. +void qjackctlConnectionsForm::stabilizeAudio ( bool bEnabled ) +{ + if (m_pAudioConnect && bEnabled) { + m_ui.AudioConnectPushButton->setEnabled( + m_pAudioConnect->canConnectSelected()); + m_ui.AudioDisconnectPushButton->setEnabled( + m_pAudioConnect->canDisconnectSelected()); + m_ui.AudioDisconnectAllPushButton->setEnabled( + m_pAudioConnect->canDisconnectAll()); + m_ui.AudioRefreshPushButton->setEnabled(true); + } else { + m_ui.AudioConnectPushButton->setEnabled(false); + m_ui.AudioDisconnectPushButton->setEnabled(false); + m_ui.AudioDisconnectAllPushButton->setEnabled(false); + m_ui.AudioRefreshPushButton->setEnabled(false); + } +} + +void qjackctlConnectionsForm::stabilizeMidi ( bool bEnabled ) +{ + if (m_pMidiConnect && bEnabled) { + m_ui.MidiConnectPushButton->setEnabled( + m_pMidiConnect->canConnectSelected()); + m_ui.MidiDisconnectPushButton->setEnabled( + m_pMidiConnect->canDisconnectSelected()); + m_ui.MidiDisconnectAllPushButton->setEnabled( + m_pMidiConnect->canDisconnectAll()); + m_ui.MidiRefreshPushButton->setEnabled(true); + } else { + m_ui.MidiConnectPushButton->setEnabled(false); + m_ui.MidiDisconnectPushButton->setEnabled(false); + m_ui.MidiDisconnectAllPushButton->setEnabled(false); + m_ui.MidiRefreshPushButton->setEnabled(false); + } +} + +void qjackctlConnectionsForm::stabilizeAlsa ( bool bEnabled ) +{ + if (m_pAlsaConnect && bEnabled) { + m_ui.AlsaConnectPushButton->setEnabled(m_pAlsaConnect->canConnectSelected()); + m_ui.AlsaDisconnectPushButton->setEnabled(m_pAlsaConnect->canDisconnectSelected()); + m_ui.AlsaDisconnectAllPushButton->setEnabled(m_pAlsaConnect->canDisconnectAll()); + m_ui.AlsaRefreshPushButton->setEnabled(true); + } else { + m_ui.AlsaConnectPushButton->setEnabled(false); + m_ui.AlsaDisconnectPushButton->setEnabled(false); + m_ui.AlsaDisconnectAllPushButton->setEnabled(false); + m_ui.AlsaRefreshPushButton->setEnabled(false); + } +} + + +// Client/port aliasing feature update. +void qjackctlConnectionsForm::updateAliases (void) +{ + // Set alias maps for all listviews... + if (m_pSetup && m_pSetup->bAliasesEnabled) { + bool bRenameEnabled = m_pSetup->bAliasesEditing; + m_ui.AudioConnectView->OListView()->setAliases( + &(m_pSetup->aliasAudioOutputs), bRenameEnabled); + m_ui.AudioConnectView->IListView()->setAliases( + &(m_pSetup->aliasAudioInputs), bRenameEnabled); + m_ui.MidiConnectView->OListView()->setAliases( + &(m_pSetup->aliasMidiOutputs), bRenameEnabled); + m_ui.MidiConnectView->IListView()->setAliases( + &(m_pSetup->aliasMidiInputs), bRenameEnabled); + m_ui.AlsaConnectView->OListView()->setAliases( + &(m_pSetup->aliasAlsaOutputs), bRenameEnabled); + m_ui.AlsaConnectView->IListView()->setAliases( + &(m_pSetup->aliasAlsaInputs), bRenameEnabled); + } else { + m_ui.AudioConnectView->OListView()->setAliases(NULL, false); + m_ui.AudioConnectView->IListView()->setAliases(NULL, false); + m_ui.MidiConnectView->OListView()->setAliases(NULL, false); + m_ui.MidiConnectView->IListView()->setAliases(NULL, false); + m_ui.AlsaConnectView->OListView()->setAliases(NULL, false); + m_ui.AlsaConnectView->IListView()->setAliases(NULL, false); + } +} + + +// Keyboard event handler. +void qjackctlConnectionsForm::keyPressEvent ( QKeyEvent *pKeyEvent ) +{ +#ifdef CONFIG_DEBUG_0 + qDebug("qjackctlConnectionsForm::keyPressEvent(%d)", pKeyEvent->key()); +#endif + int iKey = pKeyEvent->key(); + switch (iKey) { + case Qt::Key_Escape: + close(); + break; + default: + QWidget::keyPressEvent(pKeyEvent); + break; + } + + // Make sure we've get focus back... + QWidget::setFocus(); +} + + +// end of qjackctlConnectionsForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlConnectionsForm.h qjackctl-0.3.6/src/qjackctlConnectionsForm.h --- qjackctl-0.3.4/src/qjackctlConnectionsForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnectionsForm.h 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,134 @@ +// qjackctlConnectionsForm.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlConnectionsForm_h +#define __qjackctlConnectionsForm_h + +#include "ui_qjackctlConnectionsForm.h" + +#include "qjackctlJackConnect.h" +#include "qjackctlAlsaConnect.h" + +// Forward declarations. +class qjackctlSetup; + + +//---------------------------------------------------------------------------- +// qjackctlConnectionsForm -- UI wrapper form. + +class qjackctlConnectionsForm : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlConnectionsForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlConnectionsForm(); + + void setup(qjackctlSetup *pSetup); + + qjackctlConnectView *audioConnectView() const; + qjackctlConnectView *midiConnectView() const; + qjackctlConnectView *alsaConnectView() const; + + bool queryClose(); + + QFont connectionsFont() const; + void setConnectionsFont(const QFont& font); + + void setConnectionsIconSize(int iIconSize); + + void setJackClient(jack_client_t * pJackClient); + void setAlsaSeq(snd_seq_t * pAlsaSeq); + + bool isAudioConnected() const; + bool isMidiConnected() const; + bool isAlsaConnected() const; + + void refreshAudio(bool bEnabled); + void refreshMidi(bool bEnabled); + void refreshAlsa(bool bEnabled); + + void stabilizeAudio(bool bEnabled); + void stabilizeMidi(bool bEnabled); + void stabilizeAlsa(bool bEnabled); + + void setupAliases(qjackctlSetup *pSetup); + void updateAliases(); + bool loadAliases(); + bool saveAliases(); + +public slots: + + void audioConnectSelected(); + void audioDisconnectSelected(); + void audioDisconnectAll(); + void audioRefresh(); + void audioStabilize(); + + void midiConnectSelected(); + void midiDisconnectSelected(); + void midiDisconnectAll(); + void midiRefresh(); + void midiStabilize(); + + void alsaConnectSelected(); + void alsaDisconnectSelected(); + void alsaDisconnectAll(); + void alsaRefresh(); + void alsaStabilize(); + +protected slots: + + void audioDisconnecting(qjackctlPortItem *, qjackctlPortItem *); + void midiDisconnecting(qjackctlPortItem *, qjackctlPortItem *); + void alsaDisconnecting(qjackctlPortItem *, qjackctlPortItem *); + +protected: + + void showEvent(QShowEvent *); + void hideEvent(QHideEvent *); + void closeEvent(QCloseEvent *); + + void keyPressEvent(QKeyEvent *); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlConnectionsForm m_ui; + + // Instance variables. + jack_client_t *m_pJackClient; + snd_seq_t *m_pAlsaSeq; + qjackctlJackConnect *m_pAudioConnect; + qjackctlJackConnect *m_pMidiConnect; + qjackctlAlsaConnect *m_pAlsaConnect; + qjackctlSetup *m_pSetup; + QString m_sPreset; +}; + + +#endif // __qjackctlConnectionsForm_h + + +// end of qjackctlConnectionsForm.h diff -Nru qjackctl-0.3.4/src/qjackctlConnectionsForm.ui qjackctl-0.3.6/src/qjackctlConnectionsForm.ui --- qjackctl-0.3.4/src/qjackctlConnectionsForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlConnectionsForm.ui 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,449 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlConnectionsForm + + + + 0 + 0 + 407 + 250 + + + + + 1 + 1 + 0 + 0 + + + + + + + Connections - JACK Audio Connection Kit + + + :/icons/connections1.png + + + + 4 + + + 4 + + + + + 0 + + + + Audio + + + + 4 + + + 4 + + + + + + 7 + 7 + 0 + 0 + + + + Qt::TabFocus + + + + + + + 4 + + + 4 + + + + + Connect currently selected ports + + + &Connect + + + :/icons/connect1.png + + + Alt+C + + + + + + + Disconnect currently selected ports + + + &Disconnect + + + :/icons/disconnect1.png + + + Alt+D + + + + + + + Disconnect all currently connected ports + + + Disconnect &All + + + :/icons/disconnectall1.png + + + Alt+A + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 87 + 8 + + + + + + + + Refresh current connections view + + + &Refresh + + + :/icons/refresh1.png + + + Alt+R + + + + + + + + + + MIDI + + + + 4 + + + 4 + + + + + + 7 + 7 + 0 + 0 + + + + Qt::TabFocus + + + + + + + 4 + + + 4 + + + + + Connect currently selected ports + + + &Connect + + + :/icons/connect1.png + + + Alt+C + + + + + + + Disconnect currently selected ports + + + &Disconnect + + + :/icons/disconnect1.png + + + Alt+D + + + + + + + Disconnect all currently connected ports + + + Disconnect &All + + + :/icons/disconnectall1.png + + + Alt+A + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 87 + 8 + + + + + + + + Refresh current connections view + + + &Refresh + + + :/icons/refresh1.png + + + Alt+R + + + + + + + + + + ALSA + + + + 4 + + + 4 + + + + + + 7 + 7 + 0 + 0 + + + + Qt::TabFocus + + + + + + + 4 + + + 4 + + + + + Connect currently selected ports + + + &Connect + + + :/icons/connect1.png + + + Alt+C + + + + + + + Disconnect currently selected ports + + + &Disconnect + + + :/icons/disconnect1.png + + + Alt+D + + + + + + + Disconnect all currently connected ports + + + Disconnect &All + + + :/icons/disconnectall1.png + + + Alt+A + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 87 + 8 + + + + + + + + Refresh current connections view + + + &Refresh + + + :/icons/refresh1.png + + + Alt+R + + + + + + + + + + + + + + + qjackctlConnectView + QWidget +
qjackctlConnect.h
+
+
+ + ConnectionsTabWidget + AudioConnectView + AudioConnectPushButton + AudioDisconnectPushButton + AudioDisconnectAllPushButton + AudioRefreshPushButton + MidiConnectView + MidiConnectPushButton + MidiDisconnectPushButton + MidiDisconnectAllPushButton + MidiRefreshPushButton + AlsaConnectView + AlsaConnectPushButton + AlsaDisconnectPushButton + AlsaDisconnectAllPushButton + AlsaRefreshPushButton + + + + + +
diff -Nru qjackctl-0.3.4/src/qjackctlJackConnect.cpp qjackctl-0.3.6/src/qjackctlJackConnect.cpp --- qjackctl-0.3.4/src/qjackctlJackConnect.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlJackConnect.cpp 2009-09-28 23:10:04.000000000 +0100 @@ -0,0 +1,436 @@ +// qjackctlJackConnect.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlJackConnect.h" + +#include + + +//---------------------------------------------------------------------- +// class qjackctlJackPort -- Jack port list item. +// + +// Constructor. +qjackctlJackPort::qjackctlJackPort ( qjackctlJackClient *pClient, + const QString& sPortName, jack_port_t *pJackPort ) + : qjackctlPortItem(pClient, sPortName) +{ + m_pJackPort = pJackPort; + + qjackctlJackConnect *pJackConnect + = static_cast ( + ((pClient->clientList())->listView())->binding()); + + if (pJackConnect) { + unsigned long ulPortFlags = jack_port_flags(m_pJackPort); + if (ulPortFlags & JackPortIsInput) { + if (ulPortFlags & JackPortIsTerminal) { + QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( + ulPortFlags & JackPortIsPhysical + ? QJACKCTL_JACK_PORTPTI : QJACKCTL_JACK_PORTLTI))); + } else { + QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( + ulPortFlags & JackPortIsPhysical + ? QJACKCTL_JACK_PORTPNI : QJACKCTL_JACK_PORTLNI))); + } + } else if (ulPortFlags & JackPortIsOutput) { + if (ulPortFlags & JackPortIsTerminal) { + QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( + ulPortFlags & JackPortIsPhysical + ? QJACKCTL_JACK_PORTPTO : QJACKCTL_JACK_PORTLTO))); + } else { + QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( + ulPortFlags & JackPortIsPhysical + ? QJACKCTL_JACK_PORTPNO : QJACKCTL_JACK_PORTLNO))); + } + } + } +} + +// Default destructor. +qjackctlJackPort::~qjackctlJackPort (void) +{ +} + + +// Jack handles accessors. +jack_client_t *qjackctlJackPort::jackClient (void) const +{ + return ((qjackctlJackClient *) client())->jackClient(); +} + +jack_port_t *qjackctlJackPort::jackPort (void) const +{ + return m_pJackPort; +} + + +//---------------------------------------------------------------------- +// class qjackctlJackClient -- Jack client list item. +// + +// Constructor. +qjackctlJackClient::qjackctlJackClient ( qjackctlJackClientList *pClientList, + const QString& sClientName ) + : qjackctlClientItem(pClientList, sClientName) +{ + qjackctlJackConnect *pJackConnect + = static_cast ( + (pClientList->listView())->binding()); + + if (pJackConnect) { + if (pClientList->isReadable()) { + QTreeWidgetItem::setIcon(0, + QIcon(pJackConnect->pixmap(QJACKCTL_JACK_CLIENTO))); + } else { + QTreeWidgetItem::setIcon(0, + QIcon(pJackConnect->pixmap(QJACKCTL_JACK_CLIENTI))); + } + } +} + +// Default destructor. +qjackctlJackClient::~qjackctlJackClient (void) +{ +} + + +// Jack client accessor. +jack_client_t *qjackctlJackClient::jackClient (void) const +{ + return ((qjackctlJackClientList *) clientList())->jackClient(); +} + + +// Jack port lookup. +qjackctlJackPort *qjackctlJackClient::findJackPort ( jack_port_t *pJackPort ) +{ + QListIterator iter(ports()); + while (iter.hasNext()) { + qjackctlJackPort *pPort + = static_cast (iter.next()); + if (pPort && pPort->jackPort() == pJackPort) + return pPort; + } + + return NULL; +} + + +//---------------------------------------------------------------------- +// qjackctlJackClientList -- Jack client list. +// + +// Constructor. +qjackctlJackClientList::qjackctlJackClientList ( + qjackctlClientListView *pListView, + jack_client_t *pJackClient, bool bReadable ) + : qjackctlClientList(pListView, bReadable) +{ + m_pJackClient = pJackClient; +} + +// Default destructor. +qjackctlJackClientList::~qjackctlJackClientList (void) +{ +} + + +// Jack client accessor. +jack_client_t *qjackctlJackClientList::jackClient (void) const +{ + return m_pJackClient; +} + + +// Jack port lookup. +qjackctlJackPort *qjackctlJackClientList::findJackClientPort ( jack_port_t *pJackPort ) +{ + QListIterator iter(clients()); + while (iter.hasNext()) { + qjackctlJackClient *pClient + = static_cast (iter.next()); + if (pClient) { + qjackctlJackPort *pPort = pClient->findJackPort(pJackPort); + if (pPort) + return pPort; + } + } + + return NULL; +} + + +// Client:port refreshner. +int qjackctlJackClientList::updateClientPorts (void) +{ + if (m_pJackClient == 0) + return 0; + + qjackctlJackConnect *pJackConnect + = static_cast (listView()->binding()); + if (pJackConnect == 0) + return 0; + + const char *pszJackType = JACK_DEFAULT_AUDIO_TYPE; +#ifdef CONFIG_JACK_MIDI + if (pJackConnect->jackType() == QJACKCTL_JACK_MIDI) + pszJackType = JACK_DEFAULT_MIDI_TYPE; +#endif + + char *aliases[2]; + if (g_iJackClientPortAlias > 0) { + unsigned short alias_size = jack_port_name_size() + 1; + aliases[0] = new char [alias_size]; + aliases[1] = new char [alias_size]; + } + + int iDirtyCount = 0; + + markClientPorts(0); + + const char **ppszClientPorts = jack_get_ports(m_pJackClient, 0, + pszJackType, isReadable() ? JackPortIsOutput : JackPortIsInput); + if (ppszClientPorts) { + int iClientPort = 0; + while (ppszClientPorts[iClientPort]) { + QString sClientPort = QString::fromUtf8(ppszClientPorts[iClientPort]); + qjackctlJackClient *pClient = 0; + qjackctlJackPort *pPort = 0; + jack_port_t *pJackPort = jack_port_by_name(m_pJackClient, + ppszClientPorts[iClientPort]); + #ifdef CONFIG_JACK_PORT_ALIASES + if (g_iJackClientPortAlias > 0 && + jack_port_get_aliases(pJackPort, aliases) >= g_iJackClientPortAlias) + sClientPort = QString::fromUtf8(aliases[g_iJackClientPortAlias - 1]); + #endif + int iColon = sClientPort.indexOf(':'); + if (pJackPort && iColon >= 0) { + QString sClientName = sClientPort.left(iColon); + QString sPortName = sClientPort.right(sClientPort.length() - iColon - 1); + pClient = static_cast (findClient(sClientName)); + if (pClient) + pPort = static_cast (pClient->findPort(sPortName)); + if (pClient == 0) { + pClient = new qjackctlJackClient(this, sClientName); + iDirtyCount++; + } + if (pClient && pPort == 0) { + pPort = new qjackctlJackPort(pClient, sPortName, pJackPort); + iDirtyCount++; + } + if (pPort) + pPort->markClientPort(1); + } + iClientPort++; + } + ::free(ppszClientPorts); + } + + iDirtyCount += cleanClientPorts(0); + + if (g_iJackClientPortAlias > 0) { + delete [] aliases[0]; + delete [] aliases[1]; + } + + return iDirtyCount; +} + + +// Jack client port aliases mode. +int qjackctlJackClientList::g_iJackClientPortAlias = 0; + +void qjackctlJackClientList::setJackClientPortAlias ( int iJackClientPortAlias ) +{ + g_iJackClientPortAlias = iJackClientPortAlias; +} + +int qjackctlJackClientList::jackClientPortAlias (void) +{ + return g_iJackClientPortAlias; +} + + +//---------------------------------------------------------------------- +// qjackctlJackConnect -- Output-to-Input client/ports connection object. +// + +// Constructor. +qjackctlJackConnect::qjackctlJackConnect ( qjackctlConnectView *pConnectView, + jack_client_t *pJackClient, int iJackType ) + : qjackctlConnect(pConnectView) +{ + m_iJackType = iJackType; + + createIconPixmaps(); + + setOClientList(new qjackctlJackClientList( + connectView()->OListView(), pJackClient, true)); + setIClientList(new qjackctlJackClientList( + connectView()->IListView(), pJackClient, false)); +} + +// Default destructor. +qjackctlJackConnect::~qjackctlJackConnect (void) +{ + deleteIconPixmaps(); +} + + +// Connection type accessors. +int qjackctlJackConnect::jackType (void) const +{ + return m_iJackType; +} + + +// Local pixmap-set janitor methods. +void qjackctlJackConnect::createIconPixmaps (void) +{ + switch (m_iJackType) { + case QJACKCTL_JACK_MIDI: + m_apPixmaps[QJACKCTL_JACK_CLIENTI] = createIconPixmap("mclienti"); + m_apPixmaps[QJACKCTL_JACK_CLIENTO] = createIconPixmap("mcliento"); + m_apPixmaps[QJACKCTL_JACK_PORTPTI] = createIconPixmap("mporti"); + m_apPixmaps[QJACKCTL_JACK_PORTPTO] = createIconPixmap("mporto"); + m_apPixmaps[QJACKCTL_JACK_PORTPNI] = createIconPixmap("mporti"); + m_apPixmaps[QJACKCTL_JACK_PORTPNO] = createIconPixmap("mporto"); + m_apPixmaps[QJACKCTL_JACK_PORTLTI] = createIconPixmap("mporti"); + m_apPixmaps[QJACKCTL_JACK_PORTLTO] = createIconPixmap("mporto"); + m_apPixmaps[QJACKCTL_JACK_PORTLNI] = createIconPixmap("mporti"); + m_apPixmaps[QJACKCTL_JACK_PORTLNO] = createIconPixmap("mporto"); + break; + case QJACKCTL_JACK_AUDIO: + default: + m_apPixmaps[QJACKCTL_JACK_CLIENTI] = createIconPixmap("aclienti"); + m_apPixmaps[QJACKCTL_JACK_CLIENTO] = createIconPixmap("acliento"); + m_apPixmaps[QJACKCTL_JACK_PORTPTI] = createIconPixmap("aportpti"); + m_apPixmaps[QJACKCTL_JACK_PORTPTO] = createIconPixmap("aportpto"); + m_apPixmaps[QJACKCTL_JACK_PORTPNI] = createIconPixmap("aportpni"); + m_apPixmaps[QJACKCTL_JACK_PORTPNO] = createIconPixmap("aportpno"); + m_apPixmaps[QJACKCTL_JACK_PORTLTI] = createIconPixmap("aportlti"); + m_apPixmaps[QJACKCTL_JACK_PORTLTO] = createIconPixmap("aportlto"); + m_apPixmaps[QJACKCTL_JACK_PORTLNI] = createIconPixmap("aportlni"); + m_apPixmaps[QJACKCTL_JACK_PORTLNO] = createIconPixmap("aportlno"); + break; + } +} + +void qjackctlJackConnect::deleteIconPixmaps (void) +{ + for (int i = 0; i < QJACKCTL_JACK_PIXMAPS; i++) { + if (m_apPixmaps[i]) + delete m_apPixmaps[i]; + m_apPixmaps[i] = NULL; + } +} + + +// Common pixmap accessor (static). +const QPixmap& qjackctlJackConnect::pixmap ( int iPixmap ) const +{ + return *m_apPixmaps[iPixmap]; +} + + +// Connection primitive. +bool qjackctlJackConnect::connectPorts ( qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + qjackctlJackPort *pOJack = static_cast (pOPort); + qjackctlJackPort *pIJack = static_cast (pIPort); + + return (jack_connect(pOJack->jackClient(), + pOJack->clientPortName().toUtf8().constData(), + pIJack->clientPortName().toUtf8().constData()) == 0); +} + + +// Disconnection primitive. +bool qjackctlJackConnect::disconnectPorts ( qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) +{ + qjackctlJackPort *pOJack = static_cast (pOPort); + qjackctlJackPort *pIJack = static_cast (pIPort); + + return (jack_disconnect(pOJack->jackClient(), + pOJack->clientPortName().toUtf8().constData(), + pIJack->clientPortName().toUtf8().constData()) == 0); +} + + +// Update port connection references. +void qjackctlJackConnect::updateConnections (void) +{ + qjackctlJackClientList *pIClientList + = static_cast (IClientList()); + if (pIClientList == NULL) + return; + + // For each output client item... + QListIterator oclient(OClientList()->clients()); + while (oclient.hasNext()) { + qjackctlClientItem *pOClient = oclient.next(); + // For each output port item... + QListIterator oport(pOClient->ports()); + while (oport.hasNext()) { + qjackctlPortItem *pOPort = oport.next(); + // Are there already any connections? + if (pOPort->connects().count() > 0) + continue; + // Hava a proper type cast. + qjackctlJackPort *pOJack + = static_cast (pOPort); + // Get port connections... + const char **ppszClientPorts + = jack_port_get_all_connections( + pOJack->jackClient(), pOJack->jackPort()); + if (ppszClientPorts) { + // Now, for each input client port... + int iClientPort = 0; + while (ppszClientPorts[iClientPort]) { + jack_port_t *pJackPort = jack_port_by_name(pOJack->jackClient(), + ppszClientPorts[iClientPort]); + if (pJackPort) { + qjackctlPortItem *pIPort + = pIClientList->findJackClientPort(pJackPort); + if (pIPort) { + pOPort->addConnect(pIPort); + pIPort->addConnect(pOPort); + } + } + iClientPort++; + } + ::free(ppszClientPorts); + } + } + } +} + + +// Update icon size implementation. +void qjackctlJackConnect::updateIconPixmaps (void) +{ + deleteIconPixmaps(); + createIconPixmaps(); +} + + +// end of qjackctlJackConnect.cpp diff -Nru qjackctl-0.3.4/src/qjackctlJackConnect.h qjackctl-0.3.6/src/qjackctlJackConnect.h --- qjackctl-0.3.4/src/qjackctlJackConnect.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlJackConnect.h 2009-09-28 23:10:04.000000000 +0100 @@ -0,0 +1,175 @@ +// qjackctlJackConnect.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlJackConnect_h +#define __qjackctlJackConnect_h + +#include "qjackctlAbout.h" +#include "qjackctlConnect.h" + +#include + +// Forward declarations. +class qjackctlJackPort; +class qjackctlJackClient; +class qjackctlJackClientList; +class qjackctlJackConnect; + +// Connection port type. +#define QJACKCTL_JACK_AUDIO 0 +#define QJACKCTL_JACK_MIDI 1 + +// Pixmap-set array indexes/types. +#define QJACKCTL_JACK_CLIENTI 0 // Input client item pixmap. +#define QJACKCTL_JACK_CLIENTO 1 // Output client item pixmap. +#define QJACKCTL_JACK_PORTPTI 2 // Physcal Terminal Input port pixmap. +#define QJACKCTL_JACK_PORTPTO 3 // Physical Terminal Output port pixmap. +#define QJACKCTL_JACK_PORTPNI 4 // Physical Non-terminal Input port pixmap. +#define QJACKCTL_JACK_PORTPNO 5 // Physical Non-terminal Output port pixmap. +#define QJACKCTL_JACK_PORTLTI 6 // Logical Terminal Input port pixmap. +#define QJACKCTL_JACK_PORTLTO 7 // Logical Terminal Output port pixmap. +#define QJACKCTL_JACK_PORTLNI 8 // Logical Non-terminal Input port pixmap. +#define QJACKCTL_JACK_PORTLNO 9 // Logical Non-terminal Output port pixmap. +#define QJACKCTL_JACK_PIXMAPS 10 // Number of pixmaps in array. + + +// Jack port list item. +class qjackctlJackPort : public qjackctlPortItem +{ +public: + + // Constructor. + qjackctlJackPort(qjackctlJackClient *pClient, + const QString& sPortName, jack_port_t *pJackPort); + // Default destructor. + ~qjackctlJackPort(); + + // Jack handles accessors. + jack_client_t *jackClient() const; + jack_port_t *jackPort() const; + +private: + + // Instance variables. + jack_port_t *m_pJackPort; +}; + + +// Jack client list item. +class qjackctlJackClient : public qjackctlClientItem +{ +public: + + // Constructor. + qjackctlJackClient(qjackctlJackClientList *pClientList, + const QString& sClientName); + // Default destructor. + ~qjackctlJackClient(); + + // Jack client accessors. + jack_client_t *jackClient() const; + + // Jack port lookup. + qjackctlJackPort *findJackPort(jack_port_t *pJackPort); +}; + + +// Jack client list. +class qjackctlJackClientList : public qjackctlClientList +{ +public: + + // Constructor. + qjackctlJackClientList(qjackctlClientListView *pListView, jack_client_t *pJackClient, bool bReadable); + // Default destructor. + ~qjackctlJackClientList(); + + // Jack client accessors. + jack_client_t *jackClient() const; + + // Jack port lookup. + qjackctlJackPort *findJackClientPort(jack_port_t *pJackPort); + + // Client:port refreshner (return newest item count). + int updateClientPorts(); + + // Jack client port aliases mode. + static void setJackClientPortAlias(int iJackClientPortAlias); + static int jackClientPortAlias(); + +private: + + // Instance variables. + jack_client_t *m_pJackClient; + + // Jack client port aliases mode. + static int g_iJackClientPortAlias; +}; + + +//---------------------------------------------------------------------------- +// qjackctlJackConnect -- Connections model integrated object. + +class qjackctlJackConnect : public qjackctlConnect +{ +public: + + // Constructor. + qjackctlJackConnect(qjackctlConnectView *pConnectView, + jack_client_t *pJackClient, int iJackType); + // Default destructor. + ~qjackctlJackConnect(); + + // Connection type accessors. + int jackType() const; + + // Common pixmap accessor. + const QPixmap& pixmap (int iPixmap) const; + +protected: + + // Virtual Connect/Disconnection primitives. + bool connectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + bool disconnectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); + + // Update port connection references. + void updateConnections(); + + // Update icon size implementation. + void updateIconPixmaps(); + +private: + + // Local pixmap-set janitor methods. + void createIconPixmaps(); + void deleteIconPixmaps(); + + // Local variables. + int m_iJackType; + + // Local pixmap-set array. + QPixmap *m_apPixmaps[QJACKCTL_JACK_PIXMAPS]; +}; + + +#endif // __qjackctlJackConnect_h + +// end of qjackctlJackConnect.h diff -Nru qjackctl-0.3.4/src/qjackctlMainForm.cpp qjackctl-0.3.6/src/qjackctlMainForm.cpp --- qjackctl-0.3.4/src/qjackctlMainForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMainForm.cpp 2010-02-13 17:01:34.000000000 +0000 @@ -0,0 +1,3665 @@ +// qjackctlMainForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlMainForm.h" + +#include "qjackctlStatus.h" + +#include "qjackctlPatchbay.h" +#include "qjackctlPatchbayFile.h" + +#include "qjackctlMessagesForm.h" +#include "qjackctlStatusForm.h" +#include "qjackctlConnectionsForm.h" +#include "qjackctlPatchbayForm.h" +#include "qjackctlSetupForm.h" +#include "qjackctlAboutForm.h" +#include "qjackctlSystemTray.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#if QT_VERSION < 0x040500 +namespace Qt { +const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); +#if QT_VERSION < 0x040200 +const WindowFlags CustomizeWindowHint = WindowFlags(0x02000000); +#endif +} +#endif + + +#ifdef CONFIG_DBUS +#include +#include +#endif + +#ifdef CONFIG_JACK_STATISTICS +#include +#endif + +// Timer constant stuff. +#define QJACKCTL_TIMER_MSECS 200 + +// Status refresh cycle (~2 secs) +#define QJACKCTL_STATUS_CYCLE 10 + +// Server display enumerated states. +#define QJACKCTL_INACTIVE 0 +#define QJACKCTL_ACTIVATING 1 +#define QJACKCTL_ACTIVE 2 +#define QJACKCTL_STARTING 3 +#define QJACKCTL_STARTED 4 +#define QJACKCTL_STOPPING 5 +#define QJACKCTL_STOPPED 6 + +#if defined(WIN32) +#include +#undef HAVE_POLL_H +#undef HAVE_SIGNAL_H +#else +#include +// Notification pipes descriptors +#define QJACKCTL_FDNIL -1 +#define QJACKCTL_FDREAD 0 +#define QJACKCTL_FDWRITE 1 +static int g_fdStdout[2] = { QJACKCTL_FDNIL, QJACKCTL_FDNIL }; +#endif + +#ifdef HAVE_POLL_H +#include +#endif + +#ifdef HAVE_SIGNAL_H +#include +#endif + + +// Custom event types. +#define QJACKCTL_PORT_EVENT QEvent::Type(QEvent::User + 1) +#define QJACKCTL_XRUN_EVENT QEvent::Type(QEvent::User + 2) +#define QJACKCTL_BUFF_EVENT QEvent::Type(QEvent::User + 3) +#define QJACKCTL_SHUT_EVENT QEvent::Type(QEvent::User + 4) +#define QJACKCTL_EXIT_EVENT QEvent::Type(QEvent::User + 5) + +#ifdef CONFIG_DBUS +#define QJACKCTL_LINE_EVENT QEvent::Type(QEvent::User + 6) +#endif + + +//---------------------------------------------------------------------------- +// qjackctl -- Static callback posters. + +// To have clue about current buffer size (in frames). +static jack_nframes_t g_nframes = 0; + +static QProcess::ProcessError g_error = QProcess::UnknownError; + +// Jack port registration callback funtion, called +// whenever a jack port is registered or unregistered. +static void qjackctl_port_registration_callback ( jack_port_id_t, int, void * ) +{ + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_PORT_EVENT)); +} + + +// Jack graph order callback function, called +// whenever the processing graph is reordered. +static int qjackctl_graph_order_callback ( void * ) +{ + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_PORT_EVENT)); + + return 0; +} + + +// Jack XRUN callback function, called +// whenever there is a xrun. +static int qjackctl_xrun_callback ( void * ) +{ + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_XRUN_EVENT)); + + return 0; +} + +// Jack buffer size function, called +// whenever the server changes buffer size. +static int qjackctl_buffer_size_callback ( jack_nframes_t nframes, void * ) +{ + // Update our global static variable. + g_nframes = nframes; + + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_BUFF_EVENT)); + + return 0; +} + + +// Jack shutdown function, called +// whenever the server terminates this client. +static void qjackctl_on_shutdown ( void * ) +{ + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_SHUT_EVENT)); +} + + +// Jack process exit function, called +// whenever the server terminates abnormally. +static void qjackctl_on_error ( QProcess::ProcessError error ) +{ + g_error = error; + + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new QEvent(QJACKCTL_EXIT_EVENT)); +} + + +#ifdef CONFIG_DBUS + +//---------------------------------------------------------------------- +// class qjackctlDBusLogWatcher -- Simple D-BUS log watcher thread. +// + +class qjackctlDBusLogWatcher : public QThread +{ +public: + + // Constructor. + qjackctlDBusLogWatcher(const QString& sFilename) : QThread(), + m_sFilename(sFilename), m_bRunState(false) {} + + // Destructor. + ~qjackctlDBusLogWatcher() + { if (isRunning()) do { m_bRunState = false; } while (!wait(1000)); } + + // Custom log event. + class LineEvent : public QEvent + { + public: + // Constructor. + LineEvent(QEvent::Type eType, const QString& sLine) + : QEvent(eType), m_sLine(sLine) {} + // Accessor. + const QString& line() const + { return m_sLine; } + private: + // Custom event data. + QString m_sLine; + }; + +protected: + + // The main thread executive. + void run() + { + QFile file(m_sFilename); + + m_bRunState = true; + + while (m_bRunState) { + if (file.isOpen()) { + char achBuffer[1024]; + while (file.readLine(achBuffer, sizeof(achBuffer)) > 0) { + QApplication::postEvent( + qjackctlMainForm::getInstance(), + new LineEvent(QJACKCTL_LINE_EVENT, achBuffer)); + } + if (file.size() == file.pos() && + file.error() == QFile::NoError) { + msleep(1000); + } else { + file.close(); + } + } + else + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + file.seek(file.size()); + } + else msleep(1000); + } + } + +private: + + // The log filename to watch. + QString m_sFilename; + + // Whether the thread is logically running. + volatile bool m_bRunState; +}; + +#endif // CONFIG_DBUS + + +//---------------------------------------------------------------------------- +// qjackctlMainForm -- UI wrapper form. + +// Kind of singleton reference. +qjackctlMainForm *qjackctlMainForm::g_pMainForm = NULL; + +// Constructor. +qjackctlMainForm::qjackctlMainForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QWidget(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + // Pseudo-singleton reference setup. + g_pMainForm = this; + + m_pSetup = NULL; + + m_iServerState = QJACKCTL_INACTIVE; + + m_pJack = NULL; + m_pJackClient = NULL; + m_bJackDetach = false; + m_bJackShutdown = false; + m_pAlsaSeq = NULL; +#ifdef CONFIG_DBUS + m_pDBusControl = NULL; + m_pDBusConfig = NULL; + m_pDBusLogWatcher = NULL; + m_bDBusStarted = false; +#endif + m_iStartDelay = 0; + m_iTimerDelay = 0; + m_iTimerRefresh = 0; + m_iJackRefresh = 0; + m_iAlsaRefresh = 0; + m_iJackDirty = 0; + m_iAlsaDirty = 0; + + m_iStatusRefresh = 0; + m_iStatusBlink = 0; + + m_iPatchbayRefresh = 0; + + m_pStdoutNotifier = NULL; + + m_pAlsaNotifier = NULL; + + // All forms are to be created later on setup. + m_pMessagesForm = NULL; + m_pStatusForm = NULL; + m_pConnectionsForm = NULL; + m_pPatchbayForm = NULL; + + // Patchbay rack can be readily created. + m_pPatchbayRack = new qjackctlPatchbayRack(); + + // The eventual system tray widget. + m_pSystemTray = NULL; + + // We're not quitting so early :) + m_bQuitForce = false; + + // Transport skip accelerate factor. + m_fSkipAccel = 1.0; + + // Whether we've Qt::Tool flag (from bKeepOnTop), + // this is actually the main last application window... + QWidget::setAttribute(Qt::WA_QuitOnClose); + +#ifdef HAVE_SIGNAL_H + // Set to ignore any fatal "Broken pipe" signals. + signal(SIGPIPE, SIG_IGN); +#endif + +#if 0 + // FIXME: Iterate for every child text label... + m_ui.StatusDisplayFrame->setAutoFillBackground(true); + QList labels = m_ui.StatusDisplayFrame->findChildren (); + QListIterator iter(labels); + while (iter.hasNext()) + iter.next()->setAutoFillBackground(false); +#endif + + // UI connections... + + QObject::connect(m_ui.StartToolButton, + SIGNAL(clicked()), + SLOT(startJack())); + QObject::connect(m_ui.StopToolButton, + SIGNAL(clicked()), + SLOT(stopJack())); + QObject::connect(m_ui.MessagesToolButton, + SIGNAL(clicked()), + SLOT(toggleMessagesForm())); + QObject::connect(m_ui.StatusToolButton, + SIGNAL(clicked()), + SLOT(toggleStatusForm())); + QObject::connect(m_ui.ConnectionsToolButton, + SIGNAL(clicked()), + SLOT(toggleConnectionsForm())); + QObject::connect(m_ui.PatchbayToolButton, + SIGNAL(clicked()), + SLOT(togglePatchbayForm())); + + QObject::connect(m_ui.QuitToolButton, + SIGNAL(clicked()), + SLOT(quitMainForm())); + QObject::connect(m_ui.SetupToolButton, + SIGNAL(clicked()), + SLOT(showSetupForm())); + QObject::connect(m_ui.AboutToolButton, + SIGNAL(clicked()), + SLOT(showAboutForm())); + + QObject::connect(m_ui.RewindToolButton, + SIGNAL(clicked()), + SLOT(transportRewind())); + QObject::connect(m_ui.BackwardToolButton, + SIGNAL(clicked()), + SLOT(transportBackward())); + QObject::connect(m_ui.PlayToolButton, + SIGNAL(toggled(bool)), + SLOT(transportPlay(bool))); + QObject::connect(m_ui.PauseToolButton, + SIGNAL(clicked()), + SLOT(transportStop())); + QObject::connect(m_ui.ForwardToolButton, + SIGNAL(clicked()), + SLOT(transportForward())); +} + + +// Destructor. +qjackctlMainForm::~qjackctlMainForm (void) +{ + // Stop server, if not already... + stopJackServer(); + +#ifdef CONFIG_DBUS + if (m_pDBusLogWatcher) + delete m_pDBusLogWatcher; + if (m_pDBusConfig) + delete m_pDBusConfig; + if (m_pDBusControl) + delete m_pDBusControl; + m_pDBusControl = NULL; + m_pDBusConfig = NULL; + m_pDBusLogWatcher = NULL; + m_bDBusStarted = false; +#endif + + // Terminate local ALSA sequencer interface. + if (m_pAlsaNotifier) + delete m_pAlsaNotifier; +#ifdef CONFIG_ALSA_SEQ + if (m_pAlsaSeq) + snd_seq_close(m_pAlsaSeq); +#endif + m_pAlsaNotifier = NULL; + m_pAlsaSeq = NULL; + + // Finally drop any popup widgets around... + if (m_pMessagesForm) + delete m_pMessagesForm; + if (m_pStatusForm) + delete m_pStatusForm; + if (m_pConnectionsForm) + delete m_pConnectionsForm; + if (m_pPatchbayForm) + delete m_pPatchbayForm; + + // Quit off system tray widget. + if (m_pSystemTray) + delete m_pSystemTray; + + // Patchbay rack is also dead. + if (m_pPatchbayRack) + delete m_pPatchbayRack; + + // Pseudo-singleton reference shut-down. + g_pMainForm = NULL; +} + + + +// Kind of singleton reference. +qjackctlMainForm *qjackctlMainForm::getInstance (void) +{ + return g_pMainForm; +} + + +// Make and set a proper setup step. +bool qjackctlMainForm::setup ( qjackctlSetup *pSetup ) +{ + // Finally, fix settings descriptor + // and stabilize the form. + m_pSetup = pSetup; + + // To avoid any background flickering, + // we'll hide the main display. + m_ui.StatusDisplayFrame->hide(); + updateButtons(); + + // What style do we create these forms? + QWidget *pParent = NULL; + Qt::WindowFlags wflags = Qt::Window + | Qt::CustomizeWindowHint + | Qt::WindowTitleHint + | Qt::WindowSystemMenuHint + | Qt::WindowMinMaxButtonsHint + | Qt::WindowCloseButtonHint; + if (m_pSetup->bKeepOnTop) { + pParent = this; + wflags |= Qt::Tool; + } + // All forms are to be created right now. + m_pMessagesForm = new qjackctlMessagesForm (pParent, wflags); + m_pStatusForm = new qjackctlStatusForm (pParent, wflags); + m_pConnectionsForm = new qjackctlConnectionsForm (pParent, wflags); + m_pPatchbayForm = new qjackctlPatchbayForm (pParent, wflags); + // Setup appropriately... + m_pMessagesForm->setLogging(m_pSetup->bMessagesLog, m_pSetup->sMessagesLogPath); + m_pConnectionsForm->setup(m_pSetup); + m_pPatchbayForm->setup(m_pSetup); + + // Set the patchbay cable connection notification signal/slot. + QObject::connect(m_pPatchbayRack, SIGNAL(cableConnected(const QString&, const QString&, unsigned int)), + this, SLOT(cableConnectSlot(const QString&, const QString&, unsigned int))); + + // Try to restore old window positioning and appearence. + m_pSetup->loadWidgetGeometry(this, m_pSetup->bStartMinimized); + + // Make it final show... + m_ui.StatusDisplayFrame->show(); + + // Set other defaults... + updateDisplayEffect(); + updateTimeDisplayFonts(); + updateTimeDisplayToolTips(); + updateTimeFormat(); + updateMessagesFont(); + updateMessagesLimit(); + updateConnectionsFont(); + updateConnectionsIconSize(); + updateJackClientPortAlias(); + updateBezierLines(); + updateActivePatchbay(); + updateSystemTray(); + + // And for the whole widget gallore... + m_pSetup->loadWidgetGeometry(m_pMessagesForm); + m_pSetup->loadWidgetGeometry(m_pStatusForm); + m_pSetup->loadWidgetGeometry(m_pConnectionsForm); + m_pSetup->loadWidgetGeometry(m_pPatchbayForm); + + // Initial XRUN statistics reset. + resetXrunStats(); + + // Check if we can redirect our own stdout/stderr... +#if !defined(WIN32) + if (m_pSetup->bStdoutCapture && ::pipe(g_fdStdout) == 0) { + ::dup2(g_fdStdout[QJACKCTL_FDWRITE], STDOUT_FILENO); + ::dup2(g_fdStdout[QJACKCTL_FDWRITE], STDERR_FILENO); + m_pStdoutNotifier = new QSocketNotifier(g_fdStdout[QJACKCTL_FDREAD], QSocketNotifier::Read, this); + QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), this, SLOT(stdoutNotifySlot(int))); + } +#endif +#ifdef CONFIG_ALSA_SEQ + if (m_pSetup->bAlsaSeqEnabled) { + // Start our ALSA sequencer interface. + if (snd_seq_open(&m_pAlsaSeq, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) + m_pAlsaSeq = NULL; + if (m_pAlsaSeq) { + snd_seq_port_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + struct pollfd pfd[1]; + int iPort = snd_seq_create_simple_port( + m_pAlsaSeq, "qjackctl", + SND_SEQ_PORT_CAP_WRITE + | SND_SEQ_PORT_CAP_SUBS_WRITE + | SND_SEQ_PORT_CAP_NO_EXPORT, + SND_SEQ_PORT_TYPE_APPLICATION + ); + if (iPort >= 0) { + snd_seq_port_subscribe_alloca(&pAlsaSubs); + seq_addr.client = SND_SEQ_CLIENT_SYSTEM; + seq_addr.port = SND_SEQ_PORT_SYSTEM_ANNOUNCE; + snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); + seq_addr.client = snd_seq_client_id(m_pAlsaSeq); + seq_addr.port = iPort; + snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); + snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs); + snd_seq_poll_descriptors(m_pAlsaSeq, pfd, 1, POLLIN); + m_pAlsaNotifier + = new QSocketNotifier(pfd[0].fd, QSocketNotifier::Read); + QObject::connect(m_pAlsaNotifier, + SIGNAL(activated(int)), + SLOT(alsaNotifySlot(int))); + } + } + // Could we start without it? + if (m_pAlsaSeq) { + // Rather obvious setup. + if (m_pConnectionsForm) + m_pConnectionsForm->setAlsaSeq(m_pAlsaSeq); + if (m_pPatchbayForm) + m_pPatchbayForm->setAlsaSeq(m_pAlsaSeq); + } else { + appendMessagesError( + tr("Could not open ALSA sequencer as a client.\n\n" + "ALSA MIDI patchbay will be not available.")); + } + } +#endif +#ifdef CONFIG_DBUS + // Register D-Bus service... + if (m_pSetup->bDBusEnabled) { + const QString s; // Just an empty string. + const QString sDBusName("org.rncbc.qjackctl"); + QDBusConnection dbus = QDBusConnection::systemBus(); + dbus.connect(s, s, sDBusName, "start", + this, SLOT(startJack())); + dbus.connect(s, s, sDBusName, "stop", + this, SLOT(stopJack())); + dbus.connect(s, s, sDBusName, "main", + this, SLOT(toggleMainForm())); + dbus.connect(s, s, sDBusName, "messages", + this, SLOT(toggleMessagesForm())); + dbus.connect(s, s, sDBusName, "status", + this, SLOT(toggleStatusForm())); + dbus.connect(s, s, sDBusName, "reset", + this, SLOT(resetXrunStats())); + dbus.connect(s, s, sDBusName, "connections", + this, SLOT(toggleConnectionsForm())); + dbus.connect(s, s, sDBusName, "patchbay", + this, SLOT(togglePatchbayForm())); + dbus.connect(s, s, sDBusName, "rewind", + this, SLOT(transportRewind())); + dbus.connect(s, s, sDBusName, "backward", + this, SLOT(transportBackward())); + dbus.connect(s, s, sDBusName, "play", + this, SLOT(transportStart())); + dbus.connect(s, s, sDBusName, "pause", + this, SLOT(transportStop())); + dbus.connect(s, s, sDBusName, "forward", + this, SLOT(transportForward())); + dbus.connect(s, s, sDBusName, "setup", + this, SLOT(showSetupForm())); + dbus.connect(s, s, sDBusName, "about", + this, SLOT(showAboutForm())); + // Detect whether jackdbus is avaliable... + QDBusConnection dbusc = QDBusConnection::sessionBus(); + m_pDBusControl = new QDBusInterface( + "org.jackaudio.service", // Service + "/org/jackaudio/Controller", // Path + "org.jackaudio.JackControl", // Interface + dbusc); // Connection + QDBusMessage dbusm = m_pDBusControl->call("IsStarted"); + if (dbusm.type() == QDBusMessage::ReplyMessage) { + // Yes, jackdbus is available and/or already started + // -- use jackdbus control interface... + appendMessages(tr("D-BUS: Service is available (%1 aka jackdbus).") + .arg(m_pDBusControl->service())); + // Parse reply (should be boolean) + m_bDBusStarted = dbusm.arguments().first().toBool(); + // Register server start/stop notification slots... + dbusc.connect( + m_pDBusControl->service(), + m_pDBusControl->path(), + m_pDBusControl->interface(), + "ServerStarted", this, + SLOT(jackStarted())); + dbusc.connect( + m_pDBusControl->service(), + m_pDBusControl->path(), + m_pDBusControl->interface(), + "ServerStopped", this, + SLOT(jackFinished())); + // -- use jackdbus configure interface... + m_pDBusConfig = new QDBusInterface( + m_pDBusControl->service(), // Service + m_pDBusControl->path(), // Path + "org.jackaudio.Configure", // Interface + m_pDBusControl->connection()); // Connection + // Start our log watcher thread... + m_pDBusLogWatcher = new qjackctlDBusLogWatcher( + QDir::homePath() + "/.log/jack/jackdbus.log"); + m_pDBusLogWatcher->start(); + // Ready now. + } else { + // No, jackdbus is not available, not started + // or not even installed -- use classic jackd, BAU... + appendMessages(tr("D-BUS: Service not available (%1 aka jackdbus).") + .arg(m_pDBusControl->service())); + // Destroy tentative jackdbus interface. + delete m_pDBusControl; + m_pDBusControl = NULL; + } + } +#endif + + // Load patchbay form recent paths... + if (m_pPatchbayForm) { + m_pPatchbayForm->setRecentPatchbays(m_pSetup->patchbays); + if (!m_pSetup->sPatchbayPath.isEmpty()) + m_pPatchbayForm->loadPatchbayFile(m_pSetup->sPatchbayPath); + m_pPatchbayForm->updateRecentPatchbays(); + m_pPatchbayForm->stabilizeForm(); + } + + // Try to find if we can start in detached mode (client-only) + // just in case there's a JACK server already running. + startJackClient(true); + // Final startup stabilization... + stabilizeForm(); + jackCleanup(); + + // Look for immediate server startup?... + if (m_pSetup->bStartJack || !m_pSetup->sCmdLine.isEmpty()) + startJack(); + + // Register the first timer slot. + QTimer::singleShot(QJACKCTL_TIMER_MSECS, this, SLOT(timerSlot())); + + // We're ready to go... + return true; +} + + +// Window close event handlers. +bool qjackctlMainForm::queryClose (void) +{ + bool bQueryClose = true; + +#ifdef CONFIG_SYSTEM_TRAY + // If we're not quitting explicitly and there's an + // active system tray icon, then just hide ourselves. + if (!m_bQuitForce && isVisible() + && m_pSetup->bSystemTray && m_pSystemTray) { + m_pSetup->saveWidgetGeometry(this); + const QString& sTitle = tr("Information") + " - " QJACKCTL_SUBTITLE1; + const QString& sText + = tr("The program will keep running in the system tray.\n\n" + "To terminate the program, please choose \"Quit\"\n" + "in the context menu of the system tray icon."); + #ifdef QJACKCTL_QT4_SYSTEM_TRAY + #if QT_VERSION >= 0x040300 + if (QSystemTrayIcon::supportsMessages()) { + m_pSystemTray->showMessage( + sTitle, sText, QSystemTrayIcon::Information); + } + else + #endif + #endif + QMessageBox::information(this, sTitle, sText); + hide(); + bQueryClose = false; + } +#endif + + // Check if JACK daemon is currently running... + if (bQueryClose && m_pJack && m_pJack->state() == QProcess::Running + && (m_pSetup->bQueryClose || m_pSetup->bQueryShutdown)) { + bQueryClose = (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("JACK is currently running.\n\n" + "Do you want to terminate the JACK audio server?"), + QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); + } + + // Try to save current aliases default settings. + if (bQueryClose && m_pConnectionsForm) + bQueryClose = m_pConnectionsForm->queryClose(); + + // Try to save current patchbay default settings. + if (bQueryClose && m_pPatchbayForm) { + bQueryClose = m_pPatchbayForm->queryClose(); + if (bQueryClose && !m_pPatchbayForm->patchbayPath().isEmpty()) + m_pSetup->sPatchbayPath = m_pPatchbayForm->patchbayPath(); + } + + // Some windows default fonts are here on demand too. + if (bQueryClose && m_pMessagesForm) + m_pSetup->sMessagesFont = m_pMessagesForm->messagesFont().toString(); + + // Try to save current positioning. + if (bQueryClose) { + m_pSetup->saveWidgetGeometry(m_pMessagesForm); + m_pSetup->saveWidgetGeometry(m_pStatusForm); + m_pSetup->saveWidgetGeometry(m_pConnectionsForm); + m_pSetup->saveWidgetGeometry(m_pPatchbayForm); + m_pSetup->saveWidgetGeometry(this); + // Close popup widgets. + if (m_pMessagesForm) + m_pMessagesForm->close(); + if (m_pStatusForm) + m_pStatusForm->close(); + if (m_pConnectionsForm) + m_pConnectionsForm->close(); + if (m_pPatchbayForm) + m_pPatchbayForm->close(); + // And the system tray icon too. + if (m_pSystemTray) + m_pSystemTray->close(); + // Stop any service out there... + stopJackServer(); + } + +#ifdef CONFIG_SYSTEM_TRAY + // Whether we're really quitting. + m_bQuitForce = bQueryClose; +#endif + + return bQueryClose; +} + + +void qjackctlMainForm::closeEvent ( QCloseEvent *pCloseEvent ) +{ + // Let's be sure about that... + if (queryClose()) { + pCloseEvent->accept(); + QApplication::quit(); + } else { + pCloseEvent->ignore(); + } +} + + +void qjackctlMainForm::customEvent ( QEvent *pEvent ) +{ + switch (pEvent->type()) { + case QJACKCTL_PORT_EVENT: + portNotifyEvent(); + break; + case QJACKCTL_XRUN_EVENT: + xrunNotifyEvent(); + break; + case QJACKCTL_BUFF_EVENT: + buffNotifyEvent(); + break; + case QJACKCTL_SHUT_EVENT: + shutNotifyEvent(); + break; + case QJACKCTL_EXIT_EVENT: + exitNotifyEvent(); + break; +#ifdef CONFIG_DBUS + case QJACKCTL_LINE_EVENT: + appendStdoutBuffer( + static_cast (pEvent)->line()); + break; +#endif + default: + QWidget::customEvent(pEvent); + break; + } +} + + +// Common exit status text formatter... +QString qjackctlMainForm::formatExitStatus ( int iExitStatus ) const +{ + QString sTemp = " "; + + if (iExitStatus == 0) + sTemp += tr("successfully"); + else + sTemp += tr("with exit status=%1").arg(iExitStatus); + + return sTemp + "."; +} + + +// Common shell script executive, with placeholder substitution... +void qjackctlMainForm::shellExecute ( const QString& sShellCommand, const QString& sStartMessage, const QString& sStopMessage ) +{ + QString sTemp = sShellCommand; + + sTemp.replace("%P", m_pSetup->sDefPreset); + + sTemp.replace("%s", m_preset.sServer); + sTemp.replace("%d", m_preset.sDriver); + sTemp.replace("%i", m_preset.sInterface); + sTemp.replace("%r", QString::number(m_preset.iSampleRate)); + sTemp.replace("%p", QString::number(m_preset.iFrames)); + sTemp.replace("%n", QString::number(m_preset.iPeriods)); + + appendMessages(sStartMessage); + appendMessagesColor(sTemp.trimmed(), "#990099"); + stabilize(QJACKCTL_TIMER_MSECS); + + // Execute and set exit status message... + sTemp = sStopMessage + formatExitStatus( + ::system(sTemp.toUtf8().constData())); + + // Wait a litle bit before continue... + stabilize(QJACKCTL_TIMER_MSECS); + // Final log message... + appendMessages(sTemp); +} + + +// Start jack audio server... +void qjackctlMainForm::startJack (void) +{ + // If can't be already a client, are we? + if (m_pJackClient) + return; + + // Is the server process instance still here? + if (m_pJack) { + if (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Could not start JACK.\n\n" + "Maybe JACK audio server is already started."), + QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { + m_pJack->terminate(); + m_pJack->kill(); + } + return; + } + + // Stabilize emerging server state... + QPalette pal; + pal.setColor(QPalette::Foreground, Qt::yellow); + m_ui.ServerStateTextLabel->setPalette(pal); + m_ui.StartToolButton->setEnabled(false); + updateServerState(QJACKCTL_ACTIVATING); + + // Reset our timer counters... + m_iStartDelay = 0; + m_iTimerDelay = 0; + m_iJackRefresh = 0; + + // If we ain't to be the server master, maybe we'll start + // detached as client only (jackd server already running?) + if (startJackClient(true)) { + m_ui.StopToolButton->setEnabled(true); + return; + } + + // Now we're sure it ain't detached. + updateServerState(QJACKCTL_STARTING); + m_bJackShutdown = false; + m_bJackDetach = false; + + // Load primary/default server preset... + if (!m_pSetup->loadPreset(m_preset, m_pSetup->sDefPreset)) { + appendMessagesError(tr("Could not load preset \"%1\".\n\nRetrying with default.").arg(m_pSetup->sDefPreset)); + m_pSetup->sDefPreset = m_pSetup->sDefPresetName; + if (!m_pSetup->loadPreset(m_preset, m_pSetup->sDefPreset)) { + appendMessagesError(tr("Could not load default preset.\n\nSorry.")); + jackCleanup(); + return; + } + } + + // Do we have any startup script?... + if (m_pSetup->bStartupScript + && !m_pSetup->sStartupScriptShell.isEmpty()) { + shellExecute(m_pSetup->sStartupScriptShell, + tr("Startup script..."), + tr("Startup script terminated")); + } + + // Split the server path into arguments... + QStringList args = m_preset.sServer.split(' '); + // Look for the executable in the search path; + // this enforces the server command to be an + // executable absolute path whenever possible. + QString sCommand = args[0]; + QFileInfo fi(sCommand); + if (fi.isRelative()) { +#if defined(WIN32) + const char chPathSep = ';'; + if (fi.suffix().isEmpty()) + sCommand += ".exe"; +#else + const char chPathSep = ':'; +#endif + const QString sPath = ::getenv("PATH"); + QStringList paths = sPath.split(chPathSep); + QStringListIterator iter(paths); + while (iter.hasNext()) { + const QString& sDirectory = iter.next(); + fi.setFile(QDir(sDirectory), sCommand); + if (fi.isExecutable()) { + sCommand = fi.filePath(); + break; + } + } + } + // Now that we got a command, remove it from args list... + args.removeAt(0); + + // Build process arguments... + bool bDummy = (m_preset.sDriver == "dummy"); + bool bSun = (m_preset.sDriver == "sun"); + bool bOss = (m_preset.sDriver == "oss"); + bool bAlsa = (m_preset.sDriver == "alsa"); + bool bPortaudio = (m_preset.sDriver == "portaudio"); + bool bCoreaudio = (m_preset.sDriver == "coreaudio"); + bool bFreebob = (m_preset.sDriver == "freebob"); + bool bFirewire = (m_preset.sDriver == "firewire"); + bool bNet = (m_preset.sDriver == "net" || m_preset.sDriver == "netone"); + + if (!m_pSetup->sServerName.isEmpty()) + args.append("-n" + m_pSetup->sServerName); + if (m_preset.bVerbose) + args.append("-v"); + if (m_preset.bRealtime) { + // args.append("-R"); + if (m_preset.iPriority > 0 && !bCoreaudio) + args.append("-P" + QString::number(m_preset.iPriority)); + } + else args.append("-r"); + if (m_preset.iPortMax > 0 && m_preset.iPortMax != 256) + args.append("-p" + QString::number(m_preset.iPortMax)); + if (m_preset.iTimeout > 0 && m_preset.iTimeout != 500) + args.append("-t" + QString::number(m_preset.iTimeout)); + if (m_preset.bNoMemLock) + args.append("-m"); + else if (m_preset.bUnlockMem) + args.append("-u"); + args.append("-d" + m_preset.sDriver); + if (bAlsa && (m_preset.iAudio != QJACKCTL_DUPLEX || + m_preset.sInDevice.isEmpty() || m_preset.sOutDevice.isEmpty())) { + QString sInterface = m_preset.sInterface; + if (sInterface.isEmpty()) + sInterface = "hw:0"; + args.append("-d" + sInterface); + } + if (bPortaudio && m_preset.iChan > 0) + args.append("-c" + QString::number(m_preset.iChan)); + if ((bCoreaudio || bFreebob || bFirewire) && !m_preset.sInterface.isEmpty()) + args.append("-d" + m_preset.sInterface); + if (m_preset.iSampleRate > 0 && !bNet) + args.append("-r" + QString::number(m_preset.iSampleRate)); + if (m_preset.iFrames > 0 && !bNet) + args.append("-p" + QString::number(m_preset.iFrames)); + if (bAlsa || bSun || bOss || bFreebob || bFirewire) { + if (m_preset.iPeriods > 0) + args.append("-n" + QString::number(m_preset.iPeriods)); + } + if (bAlsa) { + switch (m_preset.iAudio) { + case QJACKCTL_DUPLEX: + if (!m_preset.sInDevice.isEmpty() || !m_preset.sOutDevice.isEmpty()) + args.append("-D"); + if (!m_preset.sInDevice.isEmpty()) + args.append("-C" + m_preset.sInDevice); + if (!m_preset.sOutDevice.isEmpty()) + args.append("-P" + m_preset.sOutDevice); + break; + case QJACKCTL_CAPTURE: + args.append("-C" + m_preset.sInDevice); + break; + case QJACKCTL_PLAYBACK: + args.append("-P" + m_preset.sOutDevice); + break; + } + if (m_preset.bSoftMode) + args.append("-s"); + if (m_preset.bMonitor) + args.append("-m"); + if (m_preset.bShorts) + args.append("-S"); + if (m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK) + args.append("-i" + QString::number(m_preset.iInChannels)); + if (m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE) + args.append("-o" + QString::number(m_preset.iOutChannels)); +#ifdef CONFIG_JACK_MIDI + if (!m_preset.sMidiDriver.isEmpty()) + args.append("-X" + m_preset.sMidiDriver); +#endif + } + else if (bOss || bSun) { + if (m_preset.bIgnoreHW) + args.append("-b"); + if (m_preset.iWordLength > 0) + args.append("-w" + QString::number(m_preset.iWordLength)); + if (!m_preset.sInDevice.isEmpty() && m_preset.iAudio != QJACKCTL_PLAYBACK) + args.append("-C" + m_preset.sInDevice); + if (!m_preset.sOutDevice.isEmpty() && m_preset.iAudio != QJACKCTL_CAPTURE) + args.append("-P" + m_preset.sOutDevice); + if (m_preset.iAudio == QJACKCTL_PLAYBACK) + args.append("-i0"); + else if (m_preset.iInChannels > 0) + args.append("-i" + QString::number(m_preset.iInChannels)); + if (m_preset.iAudio == QJACKCTL_CAPTURE) + args.append("-o0"); + else if (m_preset.iOutChannels > 0) + args.append("-o" + QString::number(m_preset.iOutChannels)); + } + else if (bCoreaudio || bPortaudio || bFirewire || bNet) { + if (m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK) + args.append("-i" + QString::number(m_preset.iInChannels)); + if (m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE) + args.append("-o" + QString::number(m_preset.iOutChannels)); + } + else if (bFreebob) { + switch (m_preset.iAudio) { + case QJACKCTL_DUPLEX: + args.append("-D"); + break; + case QJACKCTL_CAPTURE: + args.append("-C"); + args.append("-o0"); + break; + case QJACKCTL_PLAYBACK: + args.append("-P"); + args.append("-i0"); + break; + } + } + if (bDummy && m_preset.iWait > 0 && m_preset.iWait != 21333) + args.append("-w" + QString::number(m_preset.iWait)); + if (bAlsa || bPortaudio) { + switch (m_preset.iDither) { + case 0: + // args.append("-z-"); + break; + case 1: + args.append("-zr"); + break; + case 2: + args.append("-zs"); + break; + case 3: + args.append("-zt"); + break; + } + } + if (bAlsa) { + if (m_preset.bHWMon) + args.append("-H"); + if (m_preset.bHWMeter) + args.append("-M"); + } + if (bAlsa || bSun || bOss || bCoreaudio || bPortaudio || bFreebob) { + if (m_preset.iInLatency > 0) + args.append("-I" + QString::number(m_preset.iInLatency)); + if (m_preset.iOutLatency > 0) + args.append("-O" + QString::number(m_preset.iOutLatency)); + } + + // This is emulated jackd command line, for future reference purposes... + m_sJackCmdLine = sCommand + ' ' + args.join(" ").trimmed(); + +#ifdef CONFIG_DBUS + + // Jack D-BUS server backend startup method... + if (m_pDBusControl) { + + // Jack D-BUS server backend configuration... + setDBusParameters(); + + QDBusMessage dbusm = m_pDBusControl->call("StartServer"); + if (dbusm.type() == QDBusMessage::ReplyMessage) { + appendMessages( + tr("D-BUS: JACK server is starting...")); + } else { + appendMessagesError( + tr("D-BUS: JACK server could not be started.\n\nSorry")); + } + + // Delay our control client... + startJackClientDelay(); + + } else { + +#endif // !CONFIG_DBUS + + // Jack classic server backend startup process... + m_pJack = new QProcess(this); + + // Setup stdout/stderr capture... + if (m_pSetup->bStdoutCapture) { + #if QT_VERSION >= 0x040200 + m_pJack->setProcessChannelMode(QProcess::ForwardedChannels); + #endif + QObject::connect(m_pJack, + SIGNAL(readyReadStandardOutput()), + SLOT(readStdout())); + QObject::connect(m_pJack, + SIGNAL(readyReadStandardError()), + SLOT(readStdout())); + } + + // The unforgiveable signal communication... + QObject::connect(m_pJack, + SIGNAL(started()), + SLOT(jackStarted())); + QObject::connect(m_pJack, + SIGNAL(error(QProcess::ProcessError)), + SLOT(jackError(QProcess::ProcessError))); + QObject::connect(m_pJack, + SIGNAL(finished(int, QProcess::ExitStatus)), + SLOT(jackFinished())); + + appendMessages(tr("JACK is starting...")); + appendMessagesColor(m_sJackCmdLine, "#990099"); + + #if defined(WIN32) + const QString& sCurrentDir = QFileInfo(sCommand).dir().absolutePath(); + m_pJack->setWorkingDirectory(sCurrentDir); + // QDir::setCurrent(sCurrentDir); + #endif + + // Go jack, go... + m_pJack->start(sCommand, args); + +#ifdef CONFIG_DBUS + } +#endif +} + + +// Stop jack audio server... +void qjackctlMainForm::stopJack (void) +{ + // Check if we're allowed to stop (shutdown)... + if (m_pSetup->bQueryShutdown && m_pConnectionsForm + && (m_pConnectionsForm->isAudioConnected() || + m_pConnectionsForm->isMidiConnected()) + && QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Some client audio applications\n" + "are still active and connected.\n\n" + "Do you want to stop the JACK audio server?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + return; + } + + // Stop the server unconditionally. + stopJackServer(); +} + + +// Stop jack audio server... +void qjackctlMainForm::stopJackServer (void) +{ + // Clear timer counters... + m_iStartDelay = 0; + m_iTimerDelay = 0; + m_iJackRefresh = 0; + + // Stop client code. + stopJackClient(); + + // And try to stop server. +#ifdef CONFIG_DBUS + if ((m_pJack && m_pJack->state() == QProcess::Running) + || (m_pDBusControl && m_bDBusStarted)) { +#else + if (m_pJack && m_pJack->state() == QProcess::Running) { +#endif + updateServerState(QJACKCTL_STOPPING); + // Do we have any pre-shutdown script?... + if (m_pSetup->bShutdownScript + && !m_pSetup->sShutdownScriptShell.isEmpty()) { + shellExecute(m_pSetup->sShutdownScriptShell, + tr("Shutdown script..."), + tr("Shutdown script terminated")); + } + // Now it's the time to real try stopping the server daemon... + if (!m_bJackShutdown) { + // Jack classic server backend... + if (m_pJack) { + appendMessages(tr("JACK is stopping...")); + #if defined(WIN32) + // Try harder... + m_pJack->kill(); + #else + // Try softly... + m_pJack->terminate(); + #endif + } + #ifdef CONFIG_DBUS + // Jack D-BUS server backend... + if (m_pDBusControl) { + QDBusMessage dbusm = m_pDBusControl->call("StopServer"); + if (dbusm.type() == QDBusMessage::ReplyMessage) { + appendMessages( + tr("D-BUS: JACK server is stopping...")); + } else { + appendMessagesError( + tr("D-BUS: JACK server could not be stopped.\n\nSorry")); + } + } + #endif + // Give it some time to terminate gracefully and stabilize... + stabilize(QJACKCTL_TIMER_MSECS); + // Keep on, if not exiting for good. + return; + } + } + + // If we have a post-shutdown script enabled it must be called, + // despite we've not started the server before... + if (m_bJackDetach && m_pSetup->bPostShutdownScript + && !m_pSetup->sPostShutdownScriptShell.isEmpty()) { + shellExecute(m_pSetup->sPostShutdownScriptShell, + tr("Post-shutdown script..."), + tr("Post-shutdown script terminated")); + } + + // Do final processing anyway. + jackCleanup(); +} + + +// Stdout handler... +void qjackctlMainForm::readStdout (void) +{ + appendStdoutBuffer(m_pJack->readAllStandardOutput()); +} + + +// Stdout buffer handler -- now splitted by complete new-lines... +void qjackctlMainForm::appendStdoutBuffer ( const QString& s ) +{ + m_sStdoutBuffer.append(s); + + int iLength = m_sStdoutBuffer.lastIndexOf('\n') + 1; + if (iLength > 0) { + QString sTemp = m_sStdoutBuffer.left(iLength); + m_sStdoutBuffer.remove(0, iLength); + QStringListIterator iter(sTemp.split('\n')); + while (iter.hasNext()) { + sTemp = iter.next(); + if (!sTemp.isEmpty()) + appendMessagesText(detectXrun(sTemp)); + } + } +} + + +// Stdout flusher -- show up any unfinished line... +void qjackctlMainForm::flushStdoutBuffer (void) +{ + if (!m_sStdoutBuffer.isEmpty()) { + appendMessagesText(detectXrun(m_sStdoutBuffer)); + m_sStdoutBuffer.truncate(0); + } +} + + +// Jack audio server startup. +void qjackctlMainForm::jackStarted (void) +{ + // Show startup results... + if (m_pJack) { + appendMessages(tr("JACK was started with PID=%1.") + .arg(long(m_pJack->pid()))); + } + +#ifdef CONFIG_DBUS + // Special for D-BUS control.... + if (m_pDBusControl) { + m_bDBusStarted = true; + appendMessages(tr("D-BUS: JACK server was started (%1 aka jackdbus).") + .arg(m_pDBusControl->service())); + } +#endif + + // Delay our control client... + startJackClientDelay(); +} + + +// Jack audio server got an error. +void qjackctlMainForm::jackError ( QProcess::ProcessError error ) +{ + qjackctl_on_error(error); +} + + +// Jack audio server finish. +void qjackctlMainForm::jackFinished (void) +{ + // Force client code cleanup. + if (!m_bJackShutdown) + jackCleanup(); +} + + +// Jack audio server cleanup. +void qjackctlMainForm::jackCleanup (void) +{ + // Force client code cleanup. + if (!m_bJackDetach) + stopJackClient(); + + // Flush anything that maybe pending... + flushStdoutBuffer(); + bool bPostShutdown = false; + + if (m_pJack) { + if (m_pJack->state() != QProcess::NotRunning) { + appendMessages(tr("JACK is being forced...")); + // Force final server shutdown... + m_pJack->kill(); + // Give it some time to terminate gracefully and stabilize... + stabilize(QJACKCTL_TIMER_MSECS); + } + // Force final server shutdown... + appendMessages(tr("JACK was stopped") + + formatExitStatus(m_pJack->exitCode())); + // Destroy it. + delete m_pJack; + m_pJack = NULL; + // Flag we need a post-shutdown script... + bPostShutdown = true; + } + +#ifdef CONFIG_DBUS + // Special for D-BUS control.... + if (m_pDBusControl && m_bDBusStarted) { + m_bDBusStarted = false; + appendMessages(tr("D-BUS: JACK server was stopped (%1 aka jackdbus).") + .arg(m_pDBusControl->service())); + // Flag we need a post-shutdown script... + bPostShutdown = true; + } +#endif + + // Do we have any post-shutdown script?... + // (this will be always called, despite we've started the server or not) + if (bPostShutdown && m_pSetup->bPostShutdownScript + && !m_pSetup->sPostShutdownScriptShell.isEmpty()) { + shellExecute(m_pSetup->sPostShutdownScriptShell, + tr("Post-shutdown script..."), + tr("Post-shutdown script terminated")); + } + + // Stabilize final server state... + QPalette pal; + pal.setColor(QPalette::Foreground, + m_pJackClient == NULL ? Qt::darkYellow : Qt::yellow); + m_ui.ServerStateTextLabel->setPalette(pal); + m_ui.StartToolButton->setEnabled(m_pJackClient == NULL); + m_ui.StopToolButton->setEnabled(m_pJackClient != NULL); + m_ui.RewindToolButton->setEnabled(false); + m_ui.BackwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setEnabled(false); + m_ui.PauseToolButton->setEnabled(false); + m_ui.ForwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setChecked(false); + int iServerState; + if (m_bJackDetach) + iServerState = (m_pJackClient ? QJACKCTL_ACTIVE : QJACKCTL_INACTIVE); + else + iServerState = QJACKCTL_STOPPED; + updateServerState(iServerState); +} + + +// XRUN detection routine. +QString& qjackctlMainForm::detectXrun ( QString& s ) +{ + if (m_iXrunSkips > 1) + return s; + QRegExp rx(m_pSetup->sXrunRegex); + int iPos = rx.indexIn(s); + if (iPos >= 0) { + s.insert(iPos + rx.matchedLength(), ""); + s.insert(iPos, ""); +#ifndef CONFIG_JACK_XRUN_DELAY + m_tXrunLast.restart(); + updateXrunStats(rx.cap(1).toFloat()); + refreshXrunStats(); +#endif + } + return s; +} + + +// Update the XRUN last delay and immediate statistical values (in msecs). +void qjackctlMainForm::updateXrunStats ( float fXrunLast ) +{ + if (m_iXrunStats > 0 || !m_pSetup->bXrunIgnoreFirst) { + m_fXrunLast = fXrunLast; + m_fXrunTotal += m_fXrunLast; + if (m_fXrunLast < m_fXrunMin || m_iXrunCount == 0) + m_fXrunMin = m_fXrunLast; + if (m_fXrunLast > m_fXrunMax || m_iXrunCount == 0) + m_fXrunMax = m_fXrunLast; + m_iXrunCount++; + // refreshXrunStats(); + } + m_iXrunStats++; +} + + +// Own stdout/stderr socket notifier slot. +void qjackctlMainForm::stdoutNotifySlot ( int fd ) +{ + char achBuffer[1024]; + int cchBuffer = ::read(fd, achBuffer, sizeof(achBuffer) - 1); + if (cchBuffer > 0) { + achBuffer[cchBuffer] = (char) 0; + appendStdoutBuffer(achBuffer); + } +} + + +// Messages output methods. +void qjackctlMainForm::appendMessages( const QString& s ) +{ + if (m_pMessagesForm) + m_pMessagesForm->appendMessages(s); +} + +void qjackctlMainForm::appendMessagesColor( const QString& s, const QString& c ) +{ + if (m_pMessagesForm) + m_pMessagesForm->appendMessagesColor(s, c); +} + +void qjackctlMainForm::appendMessagesText( const QString& s ) +{ + if (m_pMessagesForm) + m_pMessagesForm->appendMessagesText(s); +} + +void qjackctlMainForm::appendMessagesError( const QString& s ) +{ + if (m_pMessagesForm) + m_pMessagesForm->show(); + + appendMessagesColor(s.simplified(), "#ff0000"); + + const QString& sTitle = tr("Error") + " - " QJACKCTL_SUBTITLE1; +#ifdef CONFIG_SYSTEM_TRAY +#ifdef QJACKCTL_QT4_SYSTEM_TRAY +#if QT_VERSION >= 0x040300 + if (m_pSetup->bSystemTray && m_pSystemTray + && QSystemTrayIcon::supportsMessages()) { + m_pSystemTray->showMessage(sTitle, s, QSystemTrayIcon::Critical); + } + else +#endif +#endif +#endif + QMessageBox::critical(this, sTitle, s, QMessageBox::Cancel); +} + + +// Force update of the messages font. +void qjackctlMainForm::updateMessagesFont (void) +{ + if (m_pSetup == NULL) + return; + + if (m_pMessagesForm && !m_pSetup->sMessagesFont.isEmpty()) { + QFont font; + if (font.fromString(m_pSetup->sMessagesFont)) + m_pMessagesForm->setMessagesFont(font); + } +} + + +// Update messages window line limit. +void qjackctlMainForm::updateMessagesLimit (void) +{ + if (m_pSetup == NULL) + return; + + if (m_pMessagesForm) { + if (m_pSetup->bMessagesLimit) + m_pMessagesForm->setMessagesLimit(m_pSetup->iMessagesLimitLines); + else + m_pMessagesForm->setMessagesLimit(-1); + } +} + + +// Force update of the connections font. +void qjackctlMainForm::updateConnectionsFont (void) +{ + if (m_pSetup == NULL) + return; + + if (m_pConnectionsForm && !m_pSetup->sConnectionsFont.isEmpty()) { + QFont font; + if (font.fromString(m_pSetup->sConnectionsFont)) + m_pConnectionsForm->setConnectionsFont(font); + } +} + + +// Update of the connections view icon size. +void qjackctlMainForm::updateConnectionsIconSize (void) +{ + if (m_pSetup == NULL) + return; + + if (m_pConnectionsForm) + m_pConnectionsForm->setConnectionsIconSize(m_pSetup->iConnectionsIconSize); +} + + +// Update of JACK client/port alias display mode. +void qjackctlMainForm::updateJackClientPortAlias (void) +{ + if (m_pSetup == NULL) + return; + + qjackctlJackClientList::setJackClientPortAlias(m_pSetup->iJackClientPortAlias); + + refreshJackConnections(); +} + + +// Update the connection and patchbay line style. +void qjackctlMainForm::updateBezierLines (void) +{ + if (m_pSetup == NULL) + return; + + if (m_pConnectionsForm) { + m_pConnectionsForm->audioConnectView()->setBezierLines(m_pSetup->bBezierLines); + m_pConnectionsForm->midiConnectView()->setBezierLines(m_pSetup->bBezierLines); + m_pConnectionsForm->alsaConnectView()->setBezierLines(m_pSetup->bBezierLines); + m_pConnectionsForm->audioConnectView()->ConnectorView()->update(); + m_pConnectionsForm->midiConnectView()->ConnectorView()->update(); + m_pConnectionsForm->alsaConnectView()->ConnectorView()->update(); + } + + if (m_pPatchbayForm) { + m_pPatchbayForm->patchbayView()->setBezierLines(m_pSetup->bBezierLines); + m_pPatchbayForm->patchbayView()->PatchworkView()->update(); + } +} + + +// Update main display background effect. +void qjackctlMainForm::updateDisplayEffect (void) +{ + if (m_pSetup == NULL) + return; + + // Set the main background... + QPalette pal; + if (m_pSetup->bDisplayEffect) { + QPixmap pm(":/icons/displaybg1.png"); + pal.setBrush(QPalette::Background, QBrush(pm)); + } else { + pal.setColor(QPalette::Background, Qt::black); + } + m_ui.StatusDisplayFrame->setPalette(pal); +} + + +// Force update of big time display related fonts. +void qjackctlMainForm::updateTimeDisplayFonts (void) +{ + QFont font; + if (!m_pSetup->sDisplayFont1.isEmpty() && font.fromString(m_pSetup->sDisplayFont1)) + m_ui.TimeDisplayTextLabel->setFont(font); + if (!m_pSetup->sDisplayFont2.isEmpty() && font.fromString(m_pSetup->sDisplayFont2)) { + m_ui.ServerStateTextLabel->setFont(font); + m_ui.ServerModeTextLabel->setFont(font); + m_ui.DspLoadTextLabel->setFont(font); + m_ui.SampleRateTextLabel->setFont(font); + m_ui.XrunCountTextLabel->setFont(font); + m_ui.TransportStateTextLabel->setFont(font); + m_ui.TransportBPMTextLabel->setFont(font); + font.setBold(true); + m_ui.TransportTimeTextLabel->setFont(font); + } +} + + +// Force update of big time display related tooltips. +void qjackctlMainForm::updateTimeDisplayToolTips (void) +{ + QString sTimeDisplay = tr("Transport BBT (bar:beat.ticks)"); + QString sTransportTime = tr("Transport time code"); + + switch (m_pSetup->iTimeDisplay) { + case DISPLAY_TRANSPORT_TIME: + { + QString sTemp = sTimeDisplay; + sTimeDisplay = sTransportTime; + sTransportTime = sTemp; + break; + } + case DISPLAY_RESET_TIME: + sTimeDisplay = tr("Elapsed time since last reset"); + break; + case DISPLAY_XRUN_TIME: + sTimeDisplay = tr("Elapsed time since last XRUN"); + break; + } + + m_ui.TimeDisplayTextLabel->setToolTip(sTimeDisplay); + m_ui.TransportTimeTextLabel->setToolTip(sTransportTime); +} + + +// Force update of time format dependant stuff. +void qjackctlMainForm::updateTimeFormat (void) +{ + // Time dashes format helper. + m_sTimeDashes = "--:--:--"; + switch (m_pSetup->iTimeFormat) { + case 1: // Tenths of second. + m_sTimeDashes += ".-"; + break; + case 2: // Hundredths of second. + m_sTimeDashes += ".--"; + break; + case 3: // Raw milliseconds + m_sTimeDashes += ".---"; + break; + } +} + + +// Update the connections client/port aliases. +void qjackctlMainForm::updateAliases (void) +{ + if (m_pConnectionsForm) + m_pConnectionsForm->updateAliases(); +} + + +// Update the main form buttons display. +void qjackctlMainForm::updateButtons (void) +{ + updateTitleStatus(); + + if (m_pSetup->bLeftButtons) { + m_ui.StartToolButton->show(); + m_ui.StopToolButton->show(); + m_ui.MessagesToolButton->show(); + m_ui.StatusToolButton->show(); + m_ui.ConnectionsToolButton->show(); + m_ui.PatchbayToolButton->show(); + } else { + m_ui.StartToolButton->hide(); + m_ui.StopToolButton->hide(); + m_ui.MessagesToolButton->hide(); + m_ui.StatusToolButton->hide(); + m_ui.ConnectionsToolButton->hide(); + m_ui.PatchbayToolButton->hide(); + } + + if (m_pSetup->bRightButtons) { + m_ui.QuitToolButton->show(); + m_ui.SetupToolButton->show(); + } else { + m_ui.QuitToolButton->hide(); + m_ui.SetupToolButton->hide(); + } + + if (m_pSetup->bRightButtons && + (m_pSetup->bLeftButtons || m_pSetup->bTransportButtons)) { + m_ui.AboutToolButton->show(); + } else { + m_ui.AboutToolButton->hide(); + } + + if (m_pSetup->bLeftButtons || m_pSetup->bTransportButtons) { + m_ui.RewindToolButton->show(); + m_ui.BackwardToolButton->show(); + m_ui.PlayToolButton->show(); + m_ui.PauseToolButton->show(); + m_ui.ForwardToolButton->show(); + } else { + m_ui.RewindToolButton->hide(); + m_ui.BackwardToolButton->hide(); + m_ui.PlayToolButton->hide(); + m_ui.PauseToolButton->hide(); + m_ui.ForwardToolButton->hide(); + } + + Qt::ToolButtonStyle toolButtonStyle = (m_pSetup->bTextLabels + ? Qt::ToolButtonTextBesideIcon : Qt::ToolButtonIconOnly); + m_ui.StartToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.StopToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.MessagesToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.StatusToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.ConnectionsToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.PatchbayToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.QuitToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.SetupToolButton->setToolButtonStyle(toolButtonStyle); + m_ui.AboutToolButton->setToolButtonStyle(toolButtonStyle); + + adjustSize(); +} + + +// Force update of active patchbay definition profile, if applicable. +bool qjackctlMainForm::isActivePatchbay ( const QString& sPatchbayPath ) const +{ + bool bActive = false; + + if (m_pSetup && m_pSetup->bActivePatchbay && !m_pSetup->sActivePatchbayPath.isEmpty()) + bActive = (m_pSetup->sActivePatchbayPath == sPatchbayPath); + + return bActive; +} + + +// Force update of active patchbay definition profile, if applicable. +void qjackctlMainForm::updateActivePatchbay (void) +{ + if (m_pSetup == NULL) + return; + + // Time to load the active patchbay rack profiler? + if (m_pSetup->bActivePatchbay && !m_pSetup->sActivePatchbayPath.isEmpty()) { + if (!qjackctlPatchbayFile::load(m_pPatchbayRack, m_pSetup->sActivePatchbayPath)) { + appendMessagesError(tr("Could not load active patchbay definition.\n\nDisabled.")); + m_pSetup->bActivePatchbay = false; + } else { + appendMessages(tr("Patchbay activated.")); + // If we're up and running, make it dirty :) + if (m_pJackClient) + m_iJackDirty++; + if (m_pAlsaSeq) + m_iAlsaDirty++; + } + } // We're sure there's no active patchbay... + else appendMessages(tr("Patchbay deactivated.")); + + // Should refresh anyway. + m_iPatchbayRefresh++; +} + +// Toggle active patchbay setting. +void qjackctlMainForm::setActivePatchbay ( const QString& sPatchbayPath ) +{ + if (m_pSetup == NULL) + return; + + if (sPatchbayPath.isEmpty()) { + m_pSetup->bActivePatchbay = false; + } else { + m_pSetup->bActivePatchbay = true; + m_pSetup->sActivePatchbayPath = sPatchbayPath; + } + + updateActivePatchbay(); +} + + +// Reset the MRU patchbay list. +void qjackctlMainForm::setRecentPatchbays ( const QStringList& patchbays ) +{ + m_pSetup->patchbays = patchbays; +} + + +// Stabilize current form toggle buttons that may be astray. +void qjackctlMainForm::stabilizeForm (void) +{ + m_ui.MessagesToolButton->setChecked( + m_pMessagesForm && m_pMessagesForm->isVisible()); + m_ui.StatusToolButton->setChecked( + m_pStatusForm && m_pStatusForm->isVisible()); + m_ui.ConnectionsToolButton->setChecked( + m_pConnectionsForm && m_pConnectionsForm->isVisible()); + m_ui.PatchbayToolButton->setChecked( + m_pPatchbayForm && m_pPatchbayForm->isVisible()); +} + + +// Stabilize current business over the application event loop. +void qjackctlMainForm::stabilize ( int msecs ) +{ + QTime t; + t.start(); + while (t.elapsed() < msecs) + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); +} + + +// Reset XRUN cache items. +void qjackctlMainForm::resetXrunStats (void) +{ + m_tResetLast = QTime::currentTime(); + + m_iXrunStats = 0; + m_iXrunCount = 0; + m_fXrunTotal = 0.0f; + m_fXrunMin = 0.0f; + m_fXrunMax = 0.0f; + m_fXrunLast = 0.0f; + + m_tXrunLast.setHMS(0, 0, 0); + + m_iXrunCallbacks = 0; + m_iXrunSkips = 0; + +#ifdef CONFIG_JACK_MAX_DELAY + if (m_pJackClient) + jack_reset_max_delayed_usecs(m_pJackClient); +#endif + + refreshXrunStats(); + + appendMessages(tr("Statistics reset.")); + + // Make sure all status(es) will be updated ASAP. + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; +} + + +// Update the XRUN count/callbacks item. +void qjackctlMainForm::updateXrunCount (void) +{ + // We'll change XRUN status colors here! + QColor color = (m_pJackClient ? Qt::green : Qt::darkGreen); + if ((m_iXrunCount + m_iXrunCallbacks) > 0) { + if (m_iXrunCallbacks > 0) + color = (m_pJackClient ? Qt::red : Qt::darkRed); + else + color = (m_pJackClient ? Qt::yellow : Qt::darkYellow); + // Change the system tray icon background color! + if (m_pSystemTray) + m_pSystemTray->setBackground(color); + } // Reset the system tray icon background! + else if (m_pSystemTray) + m_pSystemTray->setBackground(Qt::transparent); + + QPalette pal; + pal.setColor(QPalette::Foreground, color); + m_ui.XrunCountTextLabel->setPalette(pal); + + QString sText = QString::number(m_iXrunCount); + sText += " ("; + sText += QString::number(m_iXrunCallbacks); + sText += ")"; + updateStatusItem(STATUS_XRUN_COUNT, sText); +} + +// Convert whole elapsed seconds to hh:mm:ss time format. +QString qjackctlMainForm::formatTime ( float secs ) const +{ + unsigned int hh, mm, ss; + + hh = mm = ss = 0; + if (secs >= 3600.0f) { + hh = (unsigned int) (secs / 3600.0f); + secs -= (float) hh * 3600.0f; + } + if (secs >= 60.0f) { + mm = (unsigned int) (secs / 60.0f); + secs -= (float) mm * 60.0f; + } + if (secs >= 0.0) { + ss = (unsigned int) secs; + secs -= (float) ss; + } + + QString sTemp; + switch (m_pSetup->iTimeFormat) { + case 1: // Tenths of second. + sTemp.sprintf("%02u:%02u:%02u.%u", hh, mm, ss, + (unsigned int) (secs * 10.0f)); + break; + case 2: // Hundredths of second. + sTemp.sprintf("%02u:%02u:%02u.%02u", hh, mm, ss, + (unsigned int) (secs * 100.0f)); + break; + case 3: // Raw milliseconds + sTemp.sprintf("%02u:%02u:%02u.%03u", hh, mm, ss, + (unsigned int) (secs * 1000.0f)); + break; + default: // No second decimation. + sTemp.sprintf("%02u:%02u:%02u", hh, mm, ss); + break; + } + + return sTemp; +} + + +// Update the XRUN last/elapsed time item. +QString qjackctlMainForm::formatElapsedTime ( int iStatusItem, + const QTime& t, bool bElapsed ) const +{ + QString sTemp = m_sTimeDashes; + QString sText; + + // Compute and format elapsed time. + if (t.isNull()) { + sText = sTemp; + } else { + sText = t.toString(); + if (m_pJackClient) { + float secs = float(t.elapsed()) / 1000.0f; + if (bElapsed && secs > 0) { + sTemp = formatTime(secs); + sText += " (" + sTemp + ")"; + } + } + } + + // Display elapsed time as big time? + if ((iStatusItem == STATUS_RESET_TIME + && m_pSetup->iTimeDisplay == DISPLAY_RESET_TIME) || + (iStatusItem == STATUS_XRUN_TIME + && m_pSetup->iTimeDisplay == DISPLAY_XRUN_TIME)) { + m_ui.TimeDisplayTextLabel->setText(sTemp); + } + + return sText; +} + + +// Update the XRUN last/elapsed time item. +void qjackctlMainForm::updateElapsedTimes (void) +{ + // Display time remaining on start delay... + if (m_iTimerDelay < m_iStartDelay) + m_ui.TimeDisplayTextLabel->setText(formatTime( + float(m_iStartDelay - m_iTimerDelay) / 1000.0f)); + else { + updateStatusItem(STATUS_RESET_TIME, + formatElapsedTime(STATUS_RESET_TIME, + m_tResetLast, true)); + updateStatusItem(STATUS_XRUN_TIME, + formatElapsedTime(STATUS_XRUN_TIME, + m_tXrunLast, ((m_iXrunCount + m_iXrunCallbacks) > 0))); + } +} + + +// Update the XRUN list view items. +void qjackctlMainForm::refreshXrunStats (void) +{ + updateXrunCount(); + + if (m_fXrunTotal < 0.001f) { + QString n = "--"; + updateStatusItem(STATUS_XRUN_TOTAL, n); + updateStatusItem(STATUS_XRUN_MIN, n); + updateStatusItem(STATUS_XRUN_MAX, n); + updateStatusItem(STATUS_XRUN_AVG, n); + updateStatusItem(STATUS_XRUN_LAST, n); + } else { + float fXrunAverage = 0.0f; + if (m_iXrunCount > 0) + fXrunAverage = (m_fXrunTotal / m_iXrunCount); + QString s = " " + tr("msec"); + updateStatusItem(STATUS_XRUN_TOTAL, QString::number(m_fXrunTotal) + s); + updateStatusItem(STATUS_XRUN_MIN, QString::number(m_fXrunMin) + s); + updateStatusItem(STATUS_XRUN_MAX, QString::number(m_fXrunMax) + s); + updateStatusItem(STATUS_XRUN_AVG, QString::number(fXrunAverage) + s); + updateStatusItem(STATUS_XRUN_LAST, QString::number(m_fXrunLast) + s); + } + + updateElapsedTimes(); +} + + +// Jack socket notifier port/graph callback funtion. +void qjackctlMainForm::portNotifyEvent (void) +{ + // Log some message here, if new. + if (m_iJackRefresh == 0) + appendMessagesColor(tr("JACK connection graph change."), "#cc9966"); + // Do what has to be done. + refreshJackConnections(); + // We'll be dirty too... + m_iJackDirty++; +} + + +// Jack socket notifier XRUN callback funtion. +void qjackctlMainForm::xrunNotifyEvent (void) +{ + // Just increment callback counter. + m_iXrunCallbacks++; + + // Skip this one? Maybe we're under some kind of storm... + m_iXrunSkips++; + + // Report rate must be under one second... + if (m_tXrunLast.restart() < 1000) + return; + +#ifdef CONFIG_JACK_XRUN_DELAY + // We have an official XRUN delay value (convert usecs to msecs)... + updateXrunStats(0.001f * jack_get_xrun_delayed_usecs(m_pJackClient)); +#endif + + // Just log this single event... + appendMessagesColor(tr("XRUN callback (%1).") + .arg(m_iXrunCallbacks), "#cc66cc"); +} + + +// Jack buffer size notifier callback funtion. +void qjackctlMainForm::buffNotifyEvent (void) +{ + // Don't need to nothing, it was handled on qjackctl_buffer_size_callback; + // just log this event as routine. + appendMessagesColor(tr("Buffer size change (%1).") + .arg((int) g_nframes), "#996633"); +} + + +// Jack socket notifier callback funtion. +void qjackctlMainForm::shutNotifyEvent (void) +{ + // Log this event. + appendMessagesColor(tr("Shutdown notification."), "#cc6666"); + // SHUTDOWN: JACK client handle is not valid anymore... + m_bJackShutdown = true; + m_pJackClient = NULL; + // Do what has to be done. + stopJackServer(); + // We're not detached anymore, anyway. + m_bJackDetach = false; +} + + +// Process error slot +void qjackctlMainForm::exitNotifyEvent (void) +{ + // Poor-mans read, copy, update (RCU) + QProcess::ProcessError error = g_error; + g_error = QProcess::UnknownError; + + switch (error) { + case QProcess::FailedToStart: + appendMessagesError(tr("Could not start JACK.\n\nSorry.")); + jackFinished(); + break; + case QProcess::Crashed: + appendMessagesColor(tr("JACK has crashed."), "#cc3366"); + break; + case QProcess::Timedout: + appendMessagesColor(tr("JACK timed out."), "#cc3366"); + break; + case QProcess::WriteError: + appendMessagesColor(tr("JACK write error."), "#cc3366"); + break; + case QProcess::ReadError: + appendMessagesColor(tr("JACK read error."), "#cc3366"); + break; + case QProcess::UnknownError: + default: + appendMessagesColor(tr("Unknown JACK error (%d).") + .arg(int(error)), "#990099"); + break; + } +} + + +// ALSA announce slot. +void qjackctlMainForm::alsaNotifySlot ( int /*fd*/ ) +{ +#ifdef CONFIG_ALSA_SEQ + snd_seq_event_t *pAlsaEvent; + snd_seq_event_input(m_pAlsaSeq, &pAlsaEvent); + snd_seq_free_event(pAlsaEvent); +#endif + // Log some message here, if new. + if (m_iAlsaRefresh == 0) + appendMessagesColor(tr("ALSA connection graph change."), "#66cc99"); + // Do what has to be done. + refreshAlsaConnections(); + // We'll be dirty too... + m_iAlsaDirty++; +} + + +// Timer callback funtion. +void qjackctlMainForm::timerSlot (void) +{ + // Is it the first shot on server start after a few delay? + if (m_iTimerDelay < m_iStartDelay) { + m_iTimerDelay += QJACKCTL_TIMER_MSECS; + if (m_iTimerDelay >= m_iStartDelay) { + // If we cannot start it now, maybe a lil'mo'later ;) + if (!startJackClient(false)) { + m_iStartDelay += m_iTimerDelay; + m_iTimerDelay = 0; + } + } + } + + // Is the connection patchbay dirty enough? + if (m_pConnectionsForm) { + const QString sEllipsis = "..."; + // Are we about to enforce an audio connections persistence profile? + if (m_iJackDirty > 0) { + m_iJackDirty = 0; + if (m_pSetup->bActivePatchbay) { + appendMessagesColor( + tr("JACK active patchbay scan") + sEllipsis, "#6699cc"); + m_pPatchbayRack->connectJackScan(m_pJackClient); + } + refreshJackConnections(); + } + // Or is it from the MIDI field? + if (m_iAlsaDirty > 0) { + m_iAlsaDirty = 0; + if (m_pSetup->bActivePatchbay) { + appendMessagesColor( + tr("ALSA active patchbay scan") + sEllipsis, "#99cc66"); + m_pPatchbayRack->connectAlsaScan(m_pAlsaSeq); + } + refreshAlsaConnections(); + } +#ifdef CONFIG_AUTO_REFRESH + // Shall we refresh connections now and then? + if (m_pSetup->bAutoRefresh) { + m_iTimerRefresh += QJACKCTL_TIMER_MSECS; + if (m_iTimerRefresh >= (m_pSetup->iTimeRefresh * 1000)) { + m_iTimerRefresh = 0; + refreshConnections(); + } + } +#endif + // Are we about to refresh it, really? + if (m_iJackRefresh > 0) { + m_iJackRefresh = 0; + m_pConnectionsForm->refreshAudio(true); + m_pConnectionsForm->refreshMidi(true); + } + if (m_iAlsaRefresh > 0) { + m_iAlsaRefresh = 0; + m_pConnectionsForm->refreshAlsa(true); + } + } + + // Is the patchbay dirty enough? + if (m_pPatchbayForm && m_iPatchbayRefresh > 0) { + m_iPatchbayRefresh = 0; + m_pPatchbayForm->refreshForm(); + } + + // Update some statistical fields, directly. + refreshStatus(); + + // Register the next timer slot. + QTimer::singleShot(QJACKCTL_TIMER_MSECS, this, SLOT(timerSlot())); +} + + +// JACK connection notification slot. +void qjackctlMainForm::jackConnectChanged (void) +{ + // Just shake the audio connections status quo. + if (++m_iJackDirty == 1) + appendMessagesColor(tr("JACK connection change."), "#9999cc"); +} + + +// ALSA connection notification slot. +void qjackctlMainForm::alsaConnectChanged (void) +{ + // Just shake the MIDI connections status quo. + if (++m_iAlsaDirty == 1) + appendMessagesColor(tr("ALSA connection change."), "#cccc99"); +} + + +// Cable connection notification slot. +void qjackctlMainForm::cableConnectSlot ( + const QString& sOutputPort, const QString& sInputPort, + unsigned int ulCableFlags ) +{ + QString sText = QFileInfo(m_pSetup->sActivePatchbayPath).baseName() + ": "; + QString sColor; + + sText += sOutputPort; + sText += " -> "; + sText += sInputPort; + sText += " "; + + switch (ulCableFlags) { + case QJACKCTL_CABLE_CHECKED: + sText += tr("checked"); + sColor = "#99cccc"; + break; + case QJACKCTL_CABLE_CONNECTED: + sText += tr("connected"); + sColor = "#669999"; + break; + case QJACKCTL_CABLE_DISCONNECTED: + sText += tr("disconnected"); + sColor = "#cc9999"; + break; + case QJACKCTL_CABLE_FAILED: + default: + sText += tr("failed"); + sColor = "#cc6699"; + break; + } + + appendMessagesColor(sText + '.', sColor); +} + + +// Patchbay (dis)connection slot. +void qjackctlMainForm::queryDisconnect ( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort, int iSocketType ) +{ + if (m_pSetup->bActivePatchbay) { + qjackctlPatchbayCable *pCable = m_pPatchbayRack->findCable( + pOPort->clientName(), pOPort->portName(), + pIPort->clientName(), pIPort->portName(), iSocketType); + if (pCable && QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("A patchbay definition is currently active,\n" + "which is probable to redo this connection:\n\n" + "%1 -> %2\n\n" + "Do you want to remove the patchbay connection?") + .arg(pCable->outputSocket()->name()) + .arg(pCable->inputSocket()->name()), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + m_pPatchbayRack->removeCable(pCable); + if (m_pPatchbayForm + && isActivePatchbay(m_pPatchbayForm->patchbayPath())) + m_pPatchbayForm->loadPatchbayRack(m_pPatchbayRack); + } + } +} + + +// Delay jack control client start... +void qjackctlMainForm::startJackClientDelay (void) +{ + // Sloppy boy fix: may the serve be stopped, just in case + // the client will nerver make it... + m_ui.StopToolButton->setEnabled(true); + + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + m_iStatusBlink = 0; + + // Reset (yet again) the timer counters... + m_iStartDelay = 1 + (m_preset.iStartDelay * 1000); + m_iTimerDelay = 0; + m_iJackRefresh = 0; +} + + +// Start our jack audio control client... +bool qjackctlMainForm::startJackClient ( bool bDetach ) +{ + // If can't be already started, are we? + if (m_pJackClient) + return true; + + // Have it a setup? + if (m_pSetup == NULL) + return false; + + // Time to (re)load current preset aliases? + if (m_pConnectionsForm && !m_pConnectionsForm->loadAliases()) + return false; + + // Make sure all status(es) will be updated ASAP. + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + m_iStatusBlink = 0; + + // Are we about to start detached? + if (bDetach) { + // To fool timed client initialization delay. + m_iTimerDelay += (m_iStartDelay + 1); + // Refresh status (with dashes?) + refreshStatus(); + } + + // Create the jack client handle, using a distinct identifier (PID?) + const char *pszClientName = "qjackctl"; + jack_status_t status = JackFailure; + if (m_pSetup->sServerName.isEmpty()) { + m_pJackClient = jack_client_open(pszClientName, + JackNoStartServer, &status); + } else { + m_pJackClient = jack_client_open(pszClientName, + jack_options_t(JackNoStartServer | JackServerName), &status, + m_pSetup->sServerName.toUtf8().constData()); + } + + if (m_pJackClient == NULL) { + if (!bDetach) { + QStringList errs; + if (status & JackFailure) + errs << tr("Overall operation failed."); + if (status & JackInvalidOption) + errs << tr("Invalid or unsupported option."); + if (status & JackNameNotUnique) + errs << tr("Client name not unique."); + if (status & JackServerStarted) + errs << tr("Server is started."); + if (status & JackServerFailed) + errs << tr("Unable to connect to server."); + if (status & JackServerError) + errs << tr("Server communication error."); + if (status & JackNoSuchClient) + errs << tr("Client does not exist."); + if (status & JackLoadFailure) + errs << tr("Unable to load internal client."); + if (status & JackInitFailure) + errs << tr("Unable to initialize client."); + if (status & JackShmFailure) + errs << tr("Unable to access shared memory."); + if (status & JackVersionError) + errs << tr("Client protocol version mismatch."); + appendMessagesError( + tr("Could not connect to JACK server as client.\n" + "- %1\nPlease check the messages window for more info.") + .arg(errs.join("\n- "))); + } + return false; + } + + // Set notification callbacks. + jack_set_graph_order_callback(m_pJackClient, + qjackctl_graph_order_callback, this); + jack_set_port_registration_callback(m_pJackClient, + qjackctl_port_registration_callback, this); + jack_set_xrun_callback(m_pJackClient, + qjackctl_xrun_callback, this); + jack_set_buffer_size_callback(m_pJackClient, + qjackctl_buffer_size_callback, this); + jack_on_shutdown(m_pJackClient, + qjackctl_on_shutdown, this); + + // First knowledge about buffer size. + g_nframes = jack_get_buffer_size(m_pJackClient); + + // Reconstruct our connections patchbay... + if (m_pConnectionsForm) + m_pConnectionsForm->setJackClient(m_pJackClient); + if (m_pPatchbayForm) + m_pPatchbayForm->setJackClient(m_pJackClient); + + // Save server configuration file. + if (m_pSetup->bServerConfig && !m_sJackCmdLine.isEmpty()) { + QString sJackCmdLine = m_sJackCmdLine; + if (m_pSetup->bServerConfigTemp) { + int iPos = sJackCmdLine.indexOf(' '); + if (iPos > 0) + sJackCmdLine = sJackCmdLine.insert(iPos, " -T"); + } + QString sFilename = ::getenv("HOME"); + sFilename += '/' + m_pSetup->sServerConfigName; + QFile file(sFilename); + if (file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + QTextStream(&file) << sJackCmdLine << endl; + file.close(); + appendMessagesColor( + tr("Server configuration saved to \"%1\".") + .arg(sFilename), "#999933"); + } + } + + // Do not forget to reset XRUN stats variables. + if (!bDetach) + resetXrunStats(); + else // We'll flag that we've been detached! + m_bJackDetach = true; + + // Activate us as a client... + jack_activate(m_pJackClient); + + // Remember to schedule an initial connection refreshment. + refreshConnections(); + + // All displays are highlighted from now on. + QPalette pal; + pal.setColor(QPalette::Foreground, Qt::yellow); + m_ui.ServerStateTextLabel->setPalette(pal); + m_ui.DspLoadTextLabel->setPalette(pal); + m_ui.ServerModeTextLabel->setPalette(pal); + pal.setColor(QPalette::Foreground, Qt::darkYellow); + m_ui.SampleRateTextLabel->setPalette(pal); + pal.setColor(QPalette::Foreground, Qt::green); + m_ui.TimeDisplayTextLabel->setPalette(pal); + m_ui.TransportStateTextLabel->setPalette(pal); + m_ui.TransportBPMTextLabel->setPalette(pal); + m_ui.TransportTimeTextLabel->setPalette(pal); + + // Whether we've started detached, just change active status. + updateServerState(m_bJackDetach ? QJACKCTL_ACTIVE : QJACKCTL_STARTED); + m_ui.StopToolButton->setEnabled(true); + + // Log success here. + appendMessages(tr("Client activated.")); + + // Do we have any post-startup scripting?... + // (only if we're not a detached client) + if (!bDetach && !m_bJackDetach) { + if (m_pSetup->bPostStartupScript + && !m_pSetup->sPostStartupScriptShell.isEmpty()) { + shellExecute(m_pSetup->sPostStartupScriptShell, + tr("Post-startup script..."), + tr("Post-startup script terminated")); + } + } + + // Have we an initial command-line to start away? + if (!m_pSetup->sCmdLine.isEmpty()) { + // Run it dettached... + shellExecute(m_pSetup->sCmdLine, + tr("Command line argument..."), + tr("Command line argument started")); + // And reset it forever more... + m_pSetup->sCmdLine = QString::null; + } + + // OK, we're at it! + return true; +} + + +// Stop jack audio client... +void qjackctlMainForm::stopJackClient (void) +{ + // Clear out the connections and patchbays... + if (m_pConnectionsForm) + m_pConnectionsForm->setJackClient(NULL); + if (m_pPatchbayForm) + m_pPatchbayForm->setJackClient(NULL); + + // Deactivate and close us as a client... + if (m_pJackClient) { + jack_deactivate(m_pJackClient); + jack_client_close(m_pJackClient); + m_pJackClient = NULL; + // Log deactivation here. + appendMessages(tr("Client deactivated.")); + } + + // Reset command-line configuration info. + m_sJackCmdLine = QString::null; + + // Displays are dimmed again. + QPalette pal; + pal.setColor(QPalette::Foreground, Qt::darkYellow); + m_ui.ServerModeTextLabel->setPalette(pal); + m_ui.DspLoadTextLabel->setPalette(pal); + m_ui.SampleRateTextLabel->setPalette(pal); + pal.setColor(QPalette::Foreground, Qt::darkGreen); + m_ui.TimeDisplayTextLabel->setPalette(pal); + m_ui.TransportStateTextLabel->setPalette(pal); + m_ui.TransportBPMTextLabel->setPalette(pal); + m_ui.TransportTimeTextLabel->setPalette(pal); + + // Refresh jack client statistics explicitly. + refreshXrunStats(); +} + + +// Rebuild all patchbay items. +void qjackctlMainForm::refreshConnections (void) +{ + refreshJackConnections(); + refreshAlsaConnections(); +} + +void qjackctlMainForm::refreshJackConnections (void) +{ + // Hack this as for a while. + if (m_pConnectionsForm && m_iJackRefresh == 0) { + m_pConnectionsForm->stabilizeAudio(false); + m_pConnectionsForm->stabilizeMidi(false); + } + + // Just increment our intentions; it will be deferred + // to be executed just on timer slot processing... + m_iJackRefresh++; +} + +void qjackctlMainForm::refreshAlsaConnections (void) +{ + // Hack this as for a while. + if (m_pConnectionsForm && m_iAlsaRefresh == 0) + m_pConnectionsForm->stabilizeAlsa(false); + + // Just increment our intentions; it will be deferred + // to be executed just on timer slot processing... + m_iAlsaRefresh++; +} + + +void qjackctlMainForm::refreshPatchbay (void) +{ + // Just increment our intentions; it will be deferred + // to be executed just on timer slot processing... + m_iPatchbayRefresh++; +} + + +// Main form visibility requester slot. +void qjackctlMainForm::toggleMainForm (void) +{ + m_pSetup->saveWidgetGeometry(this); + if (isVisible()) { + if (m_pSetup->bSystemTray && m_pSystemTray) { + // Hide away from sight. + hide(); + } else { + // Minimize (iconify) normally. + showMinimized(); + } + } else { + show(); + raise(); + activateWindow(); + } +} + + +// Message log form requester slot. +void qjackctlMainForm::toggleMessagesForm (void) +{ + if (m_pMessagesForm) { + m_pSetup->saveWidgetGeometry(m_pMessagesForm); + if (m_pMessagesForm->isVisible()) { + m_pMessagesForm->hide(); + } else { + m_pMessagesForm->show(); + m_pMessagesForm->raise(); + m_pMessagesForm->activateWindow(); + } + } +} + + +// Status form requester slot. +void qjackctlMainForm::toggleStatusForm (void) +{ + if (m_pStatusForm) { + m_pSetup->saveWidgetGeometry(m_pStatusForm); + if (m_pStatusForm->isVisible()) { + m_pStatusForm->hide(); + } else { + m_pStatusForm->show(); + m_pStatusForm->raise(); + m_pStatusForm->activateWindow(); + } + } +} + + +// Connections form requester slot. +void qjackctlMainForm::toggleConnectionsForm (void) +{ + if (m_pConnectionsForm) { + m_pSetup->saveWidgetGeometry(m_pConnectionsForm); + m_pConnectionsForm->setJackClient(m_pJackClient); + m_pConnectionsForm->setAlsaSeq(m_pAlsaSeq); + if (m_pConnectionsForm->isVisible()) { + m_pConnectionsForm->hide(); + } else { + m_pConnectionsForm->show(); + m_pConnectionsForm->raise(); + m_pConnectionsForm->activateWindow(); + } + } +} + + +// Patchbay form requester slot. +void qjackctlMainForm::togglePatchbayForm (void) +{ + if (m_pPatchbayForm) { + m_pSetup->saveWidgetGeometry(m_pPatchbayForm); + m_pPatchbayForm->setJackClient(m_pJackClient); + m_pPatchbayForm->setAlsaSeq(m_pAlsaSeq); + if (m_pPatchbayForm->isVisible()) { + m_pPatchbayForm->hide(); + } else { + m_pPatchbayForm->show(); + m_pPatchbayForm->raise(); + m_pPatchbayForm->activateWindow(); + } + } +} + + +// Setup dialog requester slot. +void qjackctlMainForm::showSetupForm (void) +{ + qjackctlSetupForm *pSetupForm = new qjackctlSetupForm(this); + if (pSetupForm) { + // Check out some initial nullities(tm)... + if (m_pSetup->sMessagesFont.isEmpty() && m_pMessagesForm) + m_pSetup->sMessagesFont = m_pMessagesForm->messagesFont().toString(); + if (m_pSetup->sDisplayFont1.isEmpty()) + m_pSetup->sDisplayFont1 = m_ui.TimeDisplayTextLabel->font().toString(); + if (m_pSetup->sDisplayFont2.isEmpty()) + m_pSetup->sDisplayFont2 = m_ui.ServerStateTextLabel->font().toString(); + if (m_pSetup->sConnectionsFont.isEmpty() && m_pConnectionsForm) + m_pSetup->sConnectionsFont = m_pConnectionsForm->connectionsFont().toString(); + // To track down deferred or immediate changes. + bool bOldMessagesLog = m_pSetup->bMessagesLog; + QString sOldMessagesLogPath = m_pSetup->sMessagesLogPath; + QString sOldMessagesFont = m_pSetup->sMessagesFont; + QString sOldDisplayFont1 = m_pSetup->sDisplayFont1; + QString sOldDisplayFont2 = m_pSetup->sDisplayFont2; + QString sOldConnectionsFont = m_pSetup->sConnectionsFont; + int iOldConnectionsIconSize = m_pSetup->iConnectionsIconSize; + int iOldJackClientPortAlias = m_pSetup->iJackClientPortAlias; + int iOldTimeDisplay = m_pSetup->iTimeDisplay; + int iOldTimeFormat = m_pSetup->iTimeFormat; + bool bOldDisplayEffect = m_pSetup->bDisplayEffect; + bool bOldActivePatchbay = m_pSetup->bActivePatchbay; + QString sOldActivePatchbayPath = m_pSetup->sActivePatchbayPath; + bool bOldStdoutCapture = m_pSetup->bStdoutCapture; + bool bOldKeepOnTop = m_pSetup->bKeepOnTop; + bool bOldSystemTray = m_pSetup->bSystemTray; + bool bOldDelayedSetup = m_pSetup->bDelayedSetup; + int bOldMessagesLimit = m_pSetup->bMessagesLimit; + int iOldMessagesLimitLines = m_pSetup->iMessagesLimitLines; + bool bOldBezierLines = m_pSetup->bBezierLines; + bool bOldAlsaSeqEnabled = m_pSetup->bAlsaSeqEnabled; + bool bOldDBusEnabled = m_pSetup->bDBusEnabled; + bool bOldAliasesEnabled = m_pSetup->bAliasesEnabled; + bool bOldAliasesEditing = m_pSetup->bAliasesEditing; + bool bOldLeftButtons = m_pSetup->bLeftButtons; + bool bOldRightButtons = m_pSetup->bRightButtons; + bool bOldTransportButtons = m_pSetup->bTransportButtons; + bool bOldTextLabels = m_pSetup->bTextLabels; + int iOldBaseFontSize = m_pSetup->iBaseFontSize; + // Load the current setup settings. + pSetupForm->setup(m_pSetup); + // Show the setup dialog... + if (pSetupForm->exec()) { + // Check wheather something immediate has changed. + if (( bOldMessagesLog && !m_pSetup->bMessagesLog) || + (!bOldMessagesLog && m_pSetup->bMessagesLog) || + (sOldMessagesLogPath != m_pSetup->sMessagesLogPath)) + m_pMessagesForm->setLogging( + m_pSetup->bMessagesLog, m_pSetup->sMessagesLogPath); + if (( bOldBezierLines && !m_pSetup->bBezierLines) || + (!bOldBezierLines && m_pSetup->bBezierLines)) + updateBezierLines(); + if (( bOldDisplayEffect && !m_pSetup->bDisplayEffect) || + (!bOldDisplayEffect && m_pSetup->bDisplayEffect)) + updateDisplayEffect(); + if (iOldJackClientPortAlias != m_pSetup->iJackClientPortAlias) + updateJackClientPortAlias(); + if (iOldConnectionsIconSize != m_pSetup->iConnectionsIconSize) + updateConnectionsIconSize(); + if (sOldConnectionsFont != m_pSetup->sConnectionsFont) + updateConnectionsFont(); + if (sOldMessagesFont != m_pSetup->sMessagesFont) + updateMessagesFont(); + if (( bOldMessagesLimit && !m_pSetup->bMessagesLimit) || + (!bOldMessagesLimit && m_pSetup->bMessagesLimit) || + (iOldMessagesLimitLines != m_pSetup->iMessagesLimitLines)) + updateMessagesLimit(); + if (sOldDisplayFont1 != m_pSetup->sDisplayFont1 || + sOldDisplayFont2 != m_pSetup->sDisplayFont2) + updateTimeDisplayFonts(); + if (iOldTimeDisplay |= m_pSetup->iTimeDisplay) + updateTimeDisplayToolTips(); + if (iOldTimeFormat |= m_pSetup->iTimeFormat) + updateTimeFormat(); + if ((!bOldActivePatchbay && m_pSetup->bActivePatchbay) || + (sOldActivePatchbayPath != m_pSetup->sActivePatchbayPath)) + updateActivePatchbay(); + if (( bOldSystemTray && !m_pSetup->bSystemTray) || + (!bOldSystemTray && m_pSetup->bSystemTray)) + updateSystemTray(); + if (( bOldAliasesEnabled && !m_pSetup->bAliasesEnabled) || + (!bOldAliasesEnabled && m_pSetup->bAliasesEnabled) || + ( bOldAliasesEditing && !m_pSetup->bAliasesEditing) || + (!bOldAliasesEditing && m_pSetup->bAliasesEditing)) + updateAliases(); + if (( bOldLeftButtons && !m_pSetup->bLeftButtons) || + (!bOldLeftButtons && m_pSetup->bLeftButtons) || + ( bOldRightButtons && !m_pSetup->bRightButtons) || + (!bOldRightButtons && m_pSetup->bRightButtons) || + ( bOldTransportButtons && !m_pSetup->bTransportButtons) || + (!bOldTransportButtons && m_pSetup->bTransportButtons) || + ( bOldTextLabels && !m_pSetup->bTextLabels) || + (!bOldTextLabels && m_pSetup->bTextLabels)) + updateButtons(); + // Warn if something will be only effective on next run. + if (( bOldStdoutCapture && !m_pSetup->bStdoutCapture) || + (!bOldStdoutCapture && m_pSetup->bStdoutCapture) || + ( bOldKeepOnTop && !m_pSetup->bKeepOnTop) || + (!bOldKeepOnTop && m_pSetup->bKeepOnTop) || + ( bOldDelayedSetup && !m_pSetup->bDelayedSetup) || + (!bOldDelayedSetup && m_pSetup->bDelayedSetup) || + ( bOldAlsaSeqEnabled && !m_pSetup->bAlsaSeqEnabled) || + (!bOldAlsaSeqEnabled && m_pSetup->bAlsaSeqEnabled) || + ( bOldDBusEnabled && !m_pSetup->bDBusEnabled) || + (!bOldDBusEnabled && m_pSetup->bDBusEnabled) || + (iOldBaseFontSize != m_pSetup->iBaseFontSize)) + showDirtySetupWarning(); + // If server is currently running, warn user... + showDirtySettingsWarning(); + } + delete pSetupForm; + } +} + + +// About dialog requester slot. +void qjackctlMainForm::showAboutForm (void) +{ + qjackctlAboutForm(this).exec(); +} + + +// Transport rewind. +void qjackctlMainForm::transportRewind (void) +{ +#ifdef CONFIG_JACK_TRANSPORT + if (m_pJackClient) { + jack_transport_locate(m_pJackClient, 0); + // Log this here. + appendMessages(tr("Transport rewind.")); + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + } +#endif +} + +// Transport backward. +void qjackctlMainForm::transportBackward (void) +{ +#ifdef CONFIG_JACK_TRANSPORT + if (m_pJackClient) { + jack_position_t tpos; + jack_transport_query(m_pJackClient, &tpos); + float rate = float(tpos.frame_rate); + float tloc = ((float(tpos.frame) / rate) - m_fSkipAccel) * rate; + if (tloc < 0.0f) tloc = 0.0f; + jack_transport_locate(m_pJackClient, (jack_nframes_t) tloc); + // Log this here (if on initial toggle). + if (m_fSkipAccel < 1.1f) + appendMessages(tr("Transport backward.")); + // Take care of backward acceleration... + if (m_ui.BackwardToolButton->isDown() && m_fSkipAccel < 60.0) + m_fSkipAccel *= 1.1f; + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + } +#endif +} + +// Transport toggle (start/stop) +void qjackctlMainForm::transportPlay ( bool bOn ) +{ + if (bOn) + transportStart(); + else + transportStop(); +} + +// Transport start (play) +void qjackctlMainForm::transportStart (void) +{ +#ifdef CONFIG_JACK_TRANSPORT + if (m_pJackClient) { + jack_transport_start(m_pJackClient); + updateStatusItem(STATUS_TRANSPORT_STATE, tr("Starting")); + // Log this here. + appendMessages(tr("Transport start.")); + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + } +#endif +} + +// Transport stop (pause). +void qjackctlMainForm::transportStop (void) +{ +#ifdef CONFIG_JACK_TRANSPORT + if (m_pJackClient) { + jack_transport_stop(m_pJackClient); + updateStatusItem(STATUS_TRANSPORT_STATE, tr("Stopping")); + // Log this here. + appendMessages(tr("Transport stop.")); + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + } +#endif +} + +// Transport forward. +void qjackctlMainForm::transportForward (void) +{ +#ifdef CONFIG_JACK_TRANSPORT + if (m_pJackClient) { + jack_position_t tpos; + jack_transport_query(m_pJackClient, &tpos); + float rate = float(tpos.frame_rate); + float tloc = ((float(tpos.frame) / rate) + m_fSkipAccel) * rate; + if (tloc < 0.0f) tloc = 0.0f; + jack_transport_locate(m_pJackClient, (jack_nframes_t) tloc); + // Log this here. + if (m_fSkipAccel < 1.1f) + appendMessages(tr("Transport forward.")); + // Take care of forward acceleration... + if (m_ui.ForwardToolButton->isDown() && m_fSkipAccel < 60.0f) + m_fSkipAccel *= 1.1f; + // Make sure all status(es) will be updated ASAP... + m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; + } +#endif +} + + +// Almost-complete running status refresher. +void qjackctlMainForm::refreshStatus (void) +{ + const QString n = "--"; + const QString b = "--:--.----"; + const QString sStopped = tr("Stopped"); + + m_iStatusRefresh++; + + if (m_pJackClient) { + const QString s = " "; +#ifdef CONFIG_JACK_TRANSPORT + QString sText = n; + jack_position_t tpos; + jack_transport_state_t tstate = jack_transport_query(m_pJackClient, &tpos); + bool bPlaying = (tstate == JackTransportRolling || tstate == JackTransportLooping); + // Transport timecode position. + // if (bPlaying) + updateStatusItem(STATUS_TRANSPORT_TIME, + formatTime(float(tpos.frame) / float(tpos.frame_rate))); + // else + // updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); + // Transport barcode position (bar:beat.tick) + if (tpos.valid & JackPositionBBT) { + updateStatusItem(STATUS_TRANSPORT_BBT, + QString().sprintf("%u:%u.%04u", tpos.bar, tpos.beat, tpos.tick)); + updateStatusItem(STATUS_TRANSPORT_BPM, + QString::number(tpos.beats_per_minute)); + } else { + updateStatusItem(STATUS_TRANSPORT_BBT, b); + updateStatusItem(STATUS_TRANSPORT_BPM, n); + } +#endif // !CONFIG_JACK_TRANSPORT + // Less frequent status items update... + if (m_iStatusRefresh >= QJACKCTL_STATUS_CYCLE) { + m_iStatusRefresh = 0; + float fDspLoad = jack_cpu_load(m_pJackClient); + if (m_pSystemTray) + m_pSystemTray->setToolTip( + tr("%1 (%2%)").arg(windowTitle()).arg(fDspLoad, 0, 'g', 3)); + updateStatusItem(STATUS_DSP_LOAD, + tr("%1 %").arg(fDspLoad, 0, 'g', 3)); + updateStatusItem(STATUS_SAMPLE_RATE, + tr("%1 Hz").arg(jack_get_sample_rate(m_pJackClient))); + updateStatusItem(STATUS_BUFFER_SIZE, + tr("%1 frames").arg(g_nframes)); + // Blink server mode indicator?... + if (m_pSetup && m_pSetup->bDisplayBlink) { + QPalette pal; + pal.setColor(QPalette::Foreground, + (++m_iStatusBlink % 2) ? Qt::darkYellow: Qt::yellow); + m_ui.ServerModeTextLabel->setPalette(pal); + } +#ifdef CONFIG_JACK_REALTIME + bool bRealtime = jack_is_realtime(m_pJackClient); + updateStatusItem(STATUS_REALTIME, + (bRealtime ? tr("Yes") : tr("No"))); + m_ui.ServerModeTextLabel->setText(bRealtime ? tr("RT") : n); +#else + updateStatusItem(STATUS_REALTIME, n); + m_ui.ServerModeTextLabel->setText(n); +#endif // !CONFIG_JACK_REALTIME +#ifdef CONFIG_JACK_TRANSPORT + switch (tstate) { + case JackTransportStarting: + sText = tr("Starting"); + break; + case JackTransportRolling: + sText = tr("Rolling"); + break; + case JackTransportLooping: + sText = tr("Looping"); + break; + case JackTransportStopped: + default: + sText = sStopped; + break; + } + updateStatusItem(STATUS_TRANSPORT_STATE, sText); + m_ui.RewindToolButton->setEnabled(tpos.frame > 0); + m_ui.BackwardToolButton->setEnabled(tpos.frame > 0); + m_ui.PlayToolButton->setEnabled(true); + m_ui.PauseToolButton->setEnabled(bPlaying); + m_ui.ForwardToolButton->setEnabled(true); + m_ui.PlayToolButton->setChecked(bPlaying); + if (!m_ui.BackwardToolButton->isDown() && + !m_ui.ForwardToolButton->isDown()) + m_fSkipAccel = 1.0; +#else + updateStatusItem(STATUS_TRANSPORT_STATE, n); + m_ui.RewindToolButton->setEnabled(false); + m_ui.BackwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setEnabled(false); + m_ui.PauseToolButton->setEnabled(false); + m_ui.ForwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setChecked(false); + updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); + updateStatusItem(STATUS_TRANSPORT_BBT, b); + updateStatusItem(STATUS_TRANSPORT_BPM, n); +#endif // !CONFIG_JACK_TRANSPORT +#ifdef CONFIG_JACK_MAX_DELAY + updateStatusItem(STATUS_MAX_DELAY, tr("%1 msec") + .arg(0.001f * jack_get_max_delayed_usecs(m_pJackClient))); +#endif + // Check if we're have some XRUNs to report... + if (m_iXrunSkips > 0) { + // Maybe we've skipped some... + if (m_iXrunSkips > 1) { + appendMessagesColor(tr("XRUN callback (%1 skipped).") + .arg(m_iXrunSkips - 1), "#cc99cc"); + } + // Reset skip count. + m_iXrunSkips = 0; + // Highlight the (new) status... + refreshXrunStats(); + } + } + } // No need to update often if we're just idle... + else if (m_iStatusRefresh >= QJACKCTL_STATUS_CYCLE) { + m_iStatusRefresh = 0; + updateStatusItem(STATUS_DSP_LOAD, n); + updateStatusItem(STATUS_SAMPLE_RATE, n); + updateStatusItem(STATUS_BUFFER_SIZE, n); + updateStatusItem(STATUS_REALTIME, n); + m_ui.ServerModeTextLabel->setText(n); + updateStatusItem(STATUS_TRANSPORT_STATE, n); + updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); + updateStatusItem(STATUS_TRANSPORT_BBT, b); + updateStatusItem(STATUS_TRANSPORT_BPM, n); + m_ui.RewindToolButton->setEnabled(false); + m_ui.BackwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setEnabled(false); + m_ui.PauseToolButton->setEnabled(false); + m_ui.ForwardToolButton->setEnabled(false); + m_ui.PlayToolButton->setChecked(false); + } + + // Elapsed times should be rigorous... + updateElapsedTimes(); +} + + +// Status item updater. +void qjackctlMainForm::updateStatusItem( int iStatusItem, const QString& sText ) +{ + switch (iStatusItem) { + case STATUS_SERVER_STATE: + m_ui.ServerStateTextLabel->setText(sText); + break; + case STATUS_DSP_LOAD: + m_ui.DspLoadTextLabel->setText(sText); + break; + case STATUS_SAMPLE_RATE: + m_ui.SampleRateTextLabel->setText(sText); + break; + case STATUS_XRUN_COUNT: + m_ui.XrunCountTextLabel->setText(sText); + break; + case STATUS_TRANSPORT_STATE: + m_ui.TransportStateTextLabel->setText(sText); + break; + case STATUS_TRANSPORT_TIME: + if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_TIME) + m_ui.TimeDisplayTextLabel->setText(sText); + else + m_ui.TransportTimeTextLabel->setText(sText); + break; + case STATUS_TRANSPORT_BBT: + if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_BBT) + m_ui.TimeDisplayTextLabel->setText(sText); + else + if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_TIME) + m_ui.TransportTimeTextLabel->setText(sText); + break; + case STATUS_TRANSPORT_BPM: + m_ui.TransportBPMTextLabel->setText(sText); + break; + } + + if (m_pStatusForm) + m_pStatusForm->updateStatusItem(iStatusItem, sText); +} + + +// Main window caption title and system tray icon and tooltip update. +void qjackctlMainForm::updateTitleStatus (void) +{ + QString sTitle; + + if (!m_pSetup->bLeftButtons || + !m_pSetup->bRightButtons || + !m_pSetup->bTextLabels) { + sTitle = QJACKCTL_SUBTITLE0; + } else { + sTitle = QJACKCTL_SUBTITLE1; + } + + sTitle += " [" + m_pSetup->sDefPreset + "] "; + + QString sState; + QString sDots = "."; + const QString s = ".."; + switch (m_iServerState) { + case QJACKCTL_STARTING: + sState = tr("Starting"); + sDots += s; + break; + case QJACKCTL_STARTED: + sState = tr("Started"); + break; + case QJACKCTL_STOPPING: + sState = tr("Stopping"); + sDots += s; + break; + case QJACKCTL_STOPPED: + sState = tr("Stopped"); + break; + case QJACKCTL_ACTIVE: + sState = tr("Active"); + break; + case QJACKCTL_ACTIVATING: + sState = tr("Activating"); + sDots += s; + break; + case QJACKCTL_INACTIVE: + default: + sState = tr("Inactive"); + break; + } + sTitle += sState + sDots; + setWindowTitle(sTitle); + + updateStatusItem(STATUS_SERVER_STATE, sState); + + if (m_pSystemTray) { + switch (m_iServerState) { + case QJACKCTL_STARTING: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstarting1.png")); + break; + case QJACKCTL_STARTED: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstarted1.png")); + break; + case QJACKCTL_STOPPING: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstopping1.png")); + break; + case QJACKCTL_STOPPED: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstopped1.png")); + break; + case QJACKCTL_ACTIVE: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xactive1.png")); + break; + case QJACKCTL_ACTIVATING: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xactivating1.png")); + break; + case QJACKCTL_INACTIVE: + default: + m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xinactive1.png")); + break; + } + m_pSystemTray->setToolTip(sTitle); + } + + sTitle = m_pSetup->sServerName; + if (sTitle.isEmpty()) + sTitle = ::getenv("JACK_DEFAULT_SERVER"); + if (sTitle.isEmpty()) + sTitle = m_pSetup->sDefPresetName; + updateStatusItem(STATUS_SERVER_NAME, sTitle); +} + + +// Main server state status update helper. +void qjackctlMainForm::updateServerState ( int iServerState ) +{ + // Just set the new server state. + m_iServerState = iServerState; + + // Now's time to update main window + // caption title and status immediately. + updateTitleStatus(); +} + + +// System tray master switcher. +void qjackctlMainForm::updateSystemTray (void) +{ +#ifdef CONFIG_SYSTEM_TRAY + if (!m_pSetup->bSystemTray && m_pSystemTray) { + // Strange enough, this would close the application too. + // m_pSystemTray->close(); + delete m_pSystemTray; + m_pSystemTray = NULL; + } + if (m_pSetup->bSystemTray && m_pSystemTray == NULL) { + m_pSystemTray = new qjackctlSystemTray(this); + QObject::connect(m_pSystemTray, + SIGNAL(clicked()), + SLOT(toggleMainForm())); + QObject::connect(m_pSystemTray, + SIGNAL(middleClicked()), + SLOT(resetXrunStats())); + QObject::connect(m_pSystemTray, + SIGNAL(contextMenuRequested(const QPoint &)), + SLOT(systemTrayContextMenu(const QPoint &))); + m_pSystemTray->show(); + } else { + // Make sure the main widget is visible. + show(); + raise(); + activateWindow(); + } +#endif +} + + +// System tray context menu request slot. +void qjackctlMainForm::systemTrayContextMenu ( const QPoint& pos ) +{ + QMenu menu(this); + QAction *pAction; + + QString sHideMinimize = (m_pSetup->bSystemTray && m_pSystemTray + ? tr("&Hide") : tr("Mi&nimize")); + QString sShowRestore = (m_pSetup->bSystemTray && m_pSystemTray + ? tr("S&how") : tr("Rest&ore")); + + pAction = menu.addAction(isVisible() + ? sHideMinimize : sShowRestore, this, SLOT(toggleMainForm())); + menu.addSeparator(); + + if (m_pJackClient == NULL) { + pAction = menu.addAction(QIcon(":/icons/start1.png"), + tr("&Start"), this, SLOT(startJack())); + } else { + pAction = menu.addAction(QIcon(":/icons/stop1.png"), + tr("&Stop"), this, SLOT(stopJack())); + } + pAction = menu.addAction(QIcon(":/icons/reset1.png"), + tr("&Reset"), m_pStatusForm, SLOT(resetXrunStats())); +// pAction->setEnabled(m_pJackClient != NULL); + menu.addSeparator(); + + // Construct the actual presets menu, + // overriding the last one, if any... + QMenu *pPresetsMenu = menu.addMenu(tr("&Presets")); + // Assume QStringList iteration follows item index order (0,1,2...) + int iPreset = 0; + QStringListIterator iter(m_pSetup->presets); + while (iter.hasNext()) { + const QString& sPreset = iter.next(); + pAction = pPresetsMenu->addAction(sPreset); + pAction->setCheckable(true); + pAction->setChecked(sPreset == m_pSetup->sDefPreset); + pAction->setData(iPreset); + iPreset++; + } + // Default preset always present, and has invalid index parameter (-1)... + if (iPreset > 0) + pPresetsMenu->addSeparator(); + pAction = pPresetsMenu->addAction(m_pSetup->sDefPresetName); + pAction->setCheckable(true); + pAction->setChecked(m_pSetup->sDefPresetName == m_pSetup->sDefPreset); + pAction->setData(-1); + QObject::connect(pPresetsMenu, + SIGNAL(triggered(QAction*)), + SLOT(activatePresetsMenu(QAction*))); + menu.addSeparator(); + + pAction = menu.addAction(QIcon(":/icons/messages1.png"), + tr("&Messages"), this, SLOT(toggleMessagesForm())); + pAction->setCheckable(true); + pAction->setChecked(m_pMessagesForm && m_pMessagesForm->isVisible()); + pAction = menu.addAction(QIcon(":/icons/status1.png"), + tr("St&atus"), this, SLOT(toggleStatusForm())); + pAction->setCheckable(true); + pAction->setChecked(m_pStatusForm && m_pStatusForm->isVisible()); + pAction = menu.addAction(QIcon(":/icons/connections1.png"), + tr("&Connections"), this, SLOT(toggleConnectionsForm())); + pAction->setCheckable(true); + pAction->setChecked(m_pConnectionsForm && m_pConnectionsForm->isVisible()); + pAction = menu.addAction(QIcon(":/icons/patchbay1.png"), + tr("Patch&bay"), this, SLOT(togglePatchbayForm())); + pAction->setCheckable(true); + pAction->setChecked(m_pPatchbayForm && m_pPatchbayForm->isVisible()); + menu.addSeparator(); + + QMenu *pTransportMenu = menu.addMenu(tr("&Transport")); + pAction = pTransportMenu->addAction(QIcon(":/icons/rewind1.png"), + tr("&Rewind"), this, SLOT(transportRewind())); + pAction->setEnabled(m_ui.RewindToolButton->isEnabled()); +// pAction = pTransportMenu->addAction(QIcon(":/icons/backward1.png"), +// tr("&Backward"), this, SLOT(transportBackward())); +// pAction->setEnabled(m_ui.BackwardToolButton->isEnabled()); + pAction = pTransportMenu->addAction(QIcon(":/icons/play1.png"), + tr("&Play"), this, SLOT(transportStart())); + pAction->setEnabled(!m_ui.PlayToolButton->isChecked()); + pAction = pTransportMenu->addAction(QIcon(":/icons/pause1.png"), + tr("Pa&use"), this, SLOT(transportStop())); + pAction->setEnabled(m_ui.PauseToolButton->isEnabled()); +// pAction = pTransportMenu->addAction(QIcon(":/icons/forward1.png"), +// tr("&Forward"), this, SLOT(transportForward())); +// pAction->setEnabled(m_ui.ForwardToolButton->isEnabled()); + menu.addSeparator(); + + pAction = menu.addAction(QIcon(":/icons/setup1.png"), + tr("S&etup..."), this, SLOT(showSetupForm())); + + if (!m_pSetup->bRightButtons || !m_pSetup->bTransportButtons) { + pAction = menu.addAction(QIcon(":/icons/about1.png"), + tr("Ab&out..."), this, SLOT(showAboutForm())); + } + menu.addSeparator(); + + pAction = menu.addAction(QIcon(":/icons/quit1.png"), + tr("&Quit"), this, SLOT(quitMainForm())); + + menu.exec(pos); +} + + +// Server settings change warning. +void qjackctlMainForm::showDirtySettingsWarning (void) +{ + // If client service is currently running, + // prompt the effective warning... + if (m_pJackClient) { + const QString& sTitle + = tr("Warning") + " - " QJACKCTL_SUBTITLE1; + const QString& sText + = tr("Server settings will be only effective after\n" + "restarting the JACK audio server."); + #ifdef CONFIG_SYSTEM_TRAY + #ifdef QJACKCTL_QT4_SYSTEM_TRAY + #if QT_VERSION >= 0x040300 + if (m_pSetup->bSystemTray && m_pSystemTray + && QSystemTrayIcon::supportsMessages()) { + m_pSystemTray->showMessage(sTitle, sText, QSystemTrayIcon::Warning); + } + else + #endif + #endif + #endif + QMessageBox::warning(this, sTitle, sText); + } // Otherwise, it will be just as convenient to update status... + else updateTitleStatus(); +} + + +// Setup otions change warning. +void qjackctlMainForm::showDirtySetupWarning (void) +{ + const QString& sTitle + = tr("Information") + " - " QJACKCTL_SUBTITLE1; + const QString& sText + = tr("Some settings will be only effective\n" + "the next time you start this program."); +#ifdef CONFIG_SYSTEM_TRAY +#ifdef QJACKCTL_QT4_SYSTEM_TRAY +#if QT_VERSION >= 0x040300 + if (m_pSetup->bSystemTray && m_pSystemTray + && QSystemTrayIcon::supportsMessages()) { + m_pSystemTray->showMessage(sTitle, sText, QSystemTrayIcon::Information); + } + else +#endif +#endif +#endif + QMessageBox::information(this, sTitle, sText); +} + + +// Select the current default preset name from context menu. +void qjackctlMainForm::activatePresetsMenu ( QAction *pAction ) +{ + if (m_pConnectionsForm && !m_pConnectionsForm->queryClose()) + return; + + int iPreset = pAction->data().toInt(); + if (iPreset >= 0 && iPreset < m_pSetup->presets.count()) + m_pSetup->sDefPreset = m_pSetup->presets[iPreset]; + else + m_pSetup->sDefPreset = m_pSetup->sDefPresetName; + + showDirtySettingsWarning(); +} + + +// Close main form slot. +void qjackctlMainForm::quitMainForm (void) +{ +#ifdef CONFIG_SYSTEM_TRAY + // Flag that we're quitting explicitly. + m_bQuitForce = true; +#endif + // And then, do the closing dance. + close(); +} + + +// Context menu event handler. +void qjackctlMainForm::contextMenuEvent ( QContextMenuEvent *pEvent ) +{ + // We'll just show up the usual system tray menu. + systemTrayContextMenu(pEvent->globalPos()); +} + + +void qjackctlMainForm::mousePressEvent(QMouseEvent *pMouseEvent) +{ + if (pMouseEvent->button() == Qt::MidButton && + m_ui.StatusDisplayFrame->geometry().contains(pMouseEvent->pos())) { + resetXrunStats(); + } +} + + +#ifdef CONFIG_DBUS + #include + +// D-BUS: Set/reset parameter values from current selected preset options. +void qjackctlMainForm::setDBusParameters (void) +{ + // Set configuration parameters... + bool bDummy = (m_preset.sDriver == "dummy"); + bool bSun = (m_preset.sDriver == "sun"); + bool bOss = (m_preset.sDriver == "oss"); + bool bAlsa = (m_preset.sDriver == "alsa"); + bool bPortaudio = (m_preset.sDriver == "portaudio"); + bool bCoreaudio = (m_preset.sDriver == "coreaudio"); + bool bFreebob = (m_preset.sDriver == "freebob"); + bool bFirewire = (m_preset.sDriver == "firewire"); + bool bNet = (m_preset.sDriver == "net" || m_preset.sDriver == "netone"); + setDBusEngineParameter("name", + m_pSetup->sServerName, + !m_pSetup->sServerName.isEmpty()); + setDBusEngineParameter("verbose", m_preset.bVerbose); + setDBusEngineParameter("realtime", m_preset.bRealtime); + setDBusEngineParameter("realtime-priority", + m_preset.iPriority, + m_preset.bRealtime && m_preset.iPriority > 0); +// setDBusEngineParameter("port-max", +// m_preset.iPortMax, +// m_preset.iPortMax > 0); + setDBusEngineParameter("client-timeout", + m_preset.iTimeout, + m_preset.iTimeout > 0); +// setDBusEngineParameter("no-memlock", m_preset.bNoMemLock); +// setDBusEngineParameter("unlock-mem", +// m_preset.bUnlockMem, +// !m_preset.bNoMemLock); + setDBusEngineParameter("driver", m_preset.sDriver); + if (bAlsa && (m_preset.iAudio != QJACKCTL_DUPLEX || + m_preset.sInDevice.isEmpty() || m_preset.sOutDevice.isEmpty())) { + QString sInterface = m_preset.sInterface; + if (sInterface.isEmpty()) + sInterface = "hw:0"; + setDBusDriverParameter("device", sInterface); + } + if (bPortaudio) { + setDBusDriverParameter("channel", + (unsigned int) m_preset.iChan, + m_preset.iChan > 0); + } + if (bCoreaudio || bFreebob || bFirewire) { + setDBusDriverParameter("device", + m_preset.sInterface, + !m_preset.sInterface.isEmpty()); + } + if (!bNet) { + setDBusDriverParameter("rate", + (unsigned int) m_preset.iSampleRate, + m_preset.iSampleRate > 0); + setDBusDriverParameter("period", + (unsigned int) m_preset.iFrames, + m_preset.iFrames > 0); + } + if (bAlsa || bSun || bOss || bFreebob || bFirewire) { + setDBusDriverParameter("nperiods", + (unsigned int) m_preset.iPeriods, + m_preset.iPeriods > 0); + } + if (bAlsa) { + setDBusDriverParameter("duplex", + bool(m_preset.iAudio == QJACKCTL_DUPLEX)); + setDBusDriverParameter("capture", + m_preset.sInDevice, + !m_preset.sInDevice.isEmpty() && m_preset.iAudio != QJACKCTL_PLAYBACK); + setDBusDriverParameter("playback", + m_preset.sOutDevice, + !m_preset.sOutDevice.isEmpty() && m_preset.iAudio != QJACKCTL_CAPTURE); + setDBusDriverParameter("softmode", m_preset.bSoftMode); + setDBusDriverParameter("monitor", m_preset.bMonitor); + setDBusDriverParameter("shorts", m_preset.bShorts); + setDBusDriverParameter("inchannels", + (unsigned int) m_preset.iInChannels, + m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK); + setDBusDriverParameter("outchannels", + (unsigned int) m_preset.iOutChannels, + m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE); +#ifdef CONFIG_JACK_MIDI + setDBusDriverParameter("midi-driver", + m_preset.sMidiDriver, + !m_preset.sMidiDriver.isEmpty()); +#endif + } + else if (bOss || bSun) { + setDBusDriverParameter("ignorehw", m_preset.bIgnoreHW); + setDBusDriverParameter("wordlength", + (unsigned int) m_preset.iWordLength, + m_preset.iWordLength > 0); + setDBusDriverParameter("capture", + m_preset.sInDevice, + !m_preset.sInDevice.isEmpty() && m_preset.iAudio != QJACKCTL_PLAYBACK); + setDBusDriverParameter("playback", + m_preset.sOutDevice, + !m_preset.sOutDevice.isEmpty() && m_preset.iAudio != QJACKCTL_CAPTURE); + setDBusDriverParameter("inchannels", + (unsigned int) m_preset.iInChannels, + m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK); + setDBusDriverParameter("outchannels", + (unsigned int) m_preset.iOutChannels, + m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE); + } + else if (bCoreaudio || bPortaudio || bFirewire || bNet) { + setDBusDriverParameter("inchannels", + (unsigned int) m_preset.iInChannels, + m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK); + setDBusDriverParameter("outchannels", + (unsigned int) m_preset.iOutChannels, + m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE); + } + else if (bFreebob) { + setDBusDriverParameter("duplex", + bool(m_preset.iAudio == QJACKCTL_DUPLEX)); + resetDBusDriverParameter("capture"); + resetDBusDriverParameter("playback"); + resetDBusDriverParameter("outchannels"); + resetDBusDriverParameter("inchannels"); + } + if (bDummy) { + setDBusDriverParameter("wait", + (unsigned int) m_preset.iWait, + m_preset.iWait > 0); + } + if (bAlsa || bPortaudio) { + unsigned char dither = 0; + switch (m_preset.iDither) { + case 0: dither = 'n'; break; + case 1: dither = 'r'; break; + case 2: dither = 's'; break; + case 3: dither = 't'; break; } + setDBusDriverParameter("dither", + QVariant::fromValue(dither), + dither > 0); + } + if (bAlsa) { + setDBusDriverParameter("hwmon", m_preset.bHWMon); + setDBusDriverParameter("hwmeter", m_preset.bHWMeter); + } + if (bAlsa || bSun || bOss || bCoreaudio || bPortaudio || bFreebob) { + setDBusDriverParameter("input-latency", + (unsigned int) m_preset.iInLatency, + m_preset.iInLatency > 0); + setDBusDriverParameter("output-latency", + (unsigned int) m_preset.iOutLatency, + m_preset.iOutLatency > 0); + } +} + + + +// D-BUS: Set parameter values (with reset option). +bool qjackctlMainForm::setDBusEngineParameter ( + const QString& param, const QVariant& value, bool bSet ) +{ + return setDBusParameter(QStringList() << "engine" << param, value, bSet); +} + +bool qjackctlMainForm::setDBusDriverParameter ( + const QString& param, const QVariant& value, bool bSet ) +{ + return setDBusParameter(QStringList() << "driver" << param, value, bSet); +} + +bool qjackctlMainForm::setDBusParameter ( + const QStringList& path, const QVariant& value, bool bSet ) +{ + if (m_pDBusConfig == NULL) + return false; + + if (!bSet) return resetDBusParameter(path); // Reset option. + + QDBusMessage dbusm = m_pDBusConfig->call( + "SetParameterValue", path, QVariant::fromValue(QDBusVariant(value))); + + if (dbusm.type() == QDBusMessage::ErrorMessage) { + appendMessagesError( + tr("D-BUS: SetParameterValue('%1', '%2'):\n\n" + "%3.\n(%4)").arg(path.join(":")).arg(value.toString()) + .arg(dbusm.errorMessage()) + .arg(dbusm.errorName())); + return false; + } + + return true; +} + + +// D-BUS: Reset parameter (to default) values. +bool qjackctlMainForm::resetDBusEngineParameter ( const QString& param ) +{ + return resetDBusParameter(QStringList() << "engine" << param); +} + +bool qjackctlMainForm::resetDBusDriverParameter ( const QString& param ) +{ + return resetDBusParameter(QStringList() << "driver" << param); +} + +bool qjackctlMainForm::resetDBusParameter ( const QStringList& path ) +{ + if (m_pDBusConfig == NULL) + return false; + + QDBusMessage dbusm = m_pDBusConfig->call("ResetParameterValue", path); + + if (dbusm.type() == QDBusMessage::ErrorMessage) { + appendMessagesError( + tr("D-BUS: ResetParameterValue('%1'):\n\n" + "%2.\n(%3)").arg(path.join(":")) + .arg(dbusm.errorMessage()) + .arg(dbusm.errorName())); + return false; + } + + return true; +} + + +// D-BUS: Get parameter values. +QVariant qjackctlMainForm::getDBusEngineParameter ( const QString& param ) +{ + return getDBusParameter(QStringList() << "engine" << param); +} + +QVariant qjackctlMainForm::getDBusDriverParameter ( const QString& param ) +{ + return getDBusParameter(QStringList() << "driver" << param); +} + +QVariant qjackctlMainForm::getDBusParameter ( const QStringList& path ) +{ + if (m_pDBusConfig == NULL) + return QVariant(); + + QDBusMessage dbusm = m_pDBusConfig->call("GetParameterValue", path); + + if (dbusm.type() == QDBusMessage::ErrorMessage) { + appendMessagesError( + tr("D-BUS: GetParameterValue('%1'):\n\n" + "%2.\n(%3)").arg(path.join(":")) + .arg(dbusm.errorMessage()) + .arg(dbusm.errorName())); + return QVariant(); + } + + return dbusm.arguments().at(2); +} + +#endif // CONFIG_DBUS + + +// end of qjackctlMainForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlMainForm.h qjackctl-0.3.6/src/qjackctlMainForm.h --- qjackctl-0.3.4/src/qjackctlMainForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMainForm.h 2010-01-07 18:33:24.000000000 +0000 @@ -0,0 +1,310 @@ +// qjackctlMainForm.h +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlMainForm_h +#define __qjackctlMainForm_h + +#include "ui_qjackctlMainForm.h" + +#include "qjackctlSetup.h" + +#include +#include + +#include + +#ifdef CONFIG_ALSA_SEQ +#include +#else +typedef void snd_seq_t; +#endif + + +// Forward declarations. +class qjackctlSetup; +class qjackctlMessagesForm; +class qjackctlStatusForm; +class qjackctlConnectionsForm; +class qjackctlPatchbayForm; +class qjackctlPatchbayRack; +class qjackctlSystemTray; +class qjackctlPortItem; + +class QSocketNotifier; + +#ifdef CONFIG_DBUS +class QDBusInterface; +class qjackctlDBusLogWatcher; +#endif + + +//---------------------------------------------------------------------------- +// qjackctlMainForm -- UI wrapper form. + +class qjackctlMainForm : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlMainForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlMainForm(); + + static qjackctlMainForm *getInstance(); + + bool setup(qjackctlSetup * pSetup); + + bool isActivePatchbay(const QString& sPatchbayPath) const; + void updateActivePatchbay(); + void setActivePatchbay(const QString& sPatchbayPath); + void setRecentPatchbays(const QStringList& patchbays); + + void stabilizeForm(); + + void stabilize(int msecs); + + void refreshXrunStats(); + + void refreshJackConnections(); + void refreshAlsaConnections(); + + void refreshPatchbay(); + + void queryDisconnect( + qjackctlPortItem *pOPort, qjackctlPortItem *pIPort, int iSocketType); + +public slots: + + void startJack(); + void stopJack(); + + void readStdout(); + void appendStdoutBuffer(const QString&); + void flushStdoutBuffer(); + + void jackStarted(); + void jackError(QProcess::ProcessError); + void jackFinished(); + void jackCleanup(); + + void stdoutNotifySlot(int); + void alsaNotifySlot(int); + + void timerSlot(); + + void jackConnectChanged(); + void alsaConnectChanged(); + + void cableConnectSlot(const QString&, const QString&, unsigned int); + + void toggleMainForm(); + void toggleMessagesForm(); + void toggleStatusForm(); + void toggleConnectionsForm(); + void togglePatchbayForm(); + + void showSetupForm(); + void showAboutForm(); + + void transportRewind(); + void transportBackward(); + void transportPlay(bool); + void transportStart(); + void transportStop(); + void transportForward(); + + void systemTrayContextMenu(const QPoint&); + void activatePresetsMenu(QAction *); + + void resetXrunStats(); + + void quitMainForm(); + +protected: + + bool queryClose(); + + void closeEvent(QCloseEvent * pCloseEvent); + void customEvent(QEvent *pEvent); + + QString formatExitStatus(int iExitStatus) const; + + void shellExecute(const QString& sShellCommand, + const QString& sStartMessage, const QString& sStopMessage); + + void stopJackServer(); + + QString& detectXrun(QString& s); + void updateXrunStats(float fXrunLast); + + void appendMessages(const QString& s); + void appendMessagesColor(const QString& s, const QString& c); + void appendMessagesText(const QString& s); + void appendMessagesError(const QString& s); + + void updateMessagesFont(); + void updateMessagesLimit(); + void updateConnectionsFont(); + void updateConnectionsIconSize(); + void updateJackClientPortAlias(); + void updateBezierLines(); + void updateDisplayEffect(); + void updateTimeDisplayFonts(); + void updateTimeDisplayToolTips(); + void updateTimeFormat(); + void updateAliases(); + void updateButtons(); + + void updateXrunCount(); + + QString formatTime(float secs) const; + QString formatElapsedTime(int iStatusItem, const QTime& t, bool bElapsed) const; + void updateElapsedTimes(); + + void portNotifyEvent(); + void xrunNotifyEvent(); + void buffNotifyEvent(); + void shutNotifyEvent(); + void exitNotifyEvent(); + + void startJackClientDelay(); + bool startJackClient(bool bDetach); + void stopJackClient(); + + void refreshConnections(); + void refreshStatus(); + + void updateStatusItem(int iStatusItem, const QString& sText); + void updateTitleStatus(); + void updateServerState(int iState); + void updateSystemTray(); + + void showDirtySettingsWarning(); + void showDirtySetupWarning(); + + void contextMenuEvent(QContextMenuEvent *); + void mousePressEvent(QMouseEvent *pMouseEvent); + +#ifdef CONFIG_DBUS + + // D-BUS: Set/reset parameter values + // from current selected preset options. + void setDBusParameters(); + + // D-BUS: Set parameter values (with reset option). + bool setDBusEngineParameter( + const QString& param, const QVariant& value, bool bSet = true); + bool setDBusDriverParameter( + const QString& param, const QVariant& value, bool bSet = true); + bool setDBusParameter( + const QStringList& path, const QVariant& value, bool bSet = true); + + // D-BUS: Reset parameter (to default) values. + bool resetDBusEngineParameter(const QString& param); + bool resetDBusDriverParameter(const QString& param); + bool resetDBusParameter(const QStringList& path); + + // D-BUS: Set parameter values. + QVariant getDBusEngineParameter(const QString& param); + QVariant getDBusDriverParameter(const QString& param); + QVariant getDBusParameter(const QStringList& path); + +#endif + +private: + + // The Qt-designer UI struct... + Ui::qjackctlMainForm m_ui; + + // Instance variables. + qjackctlSetup *m_pSetup; + + QProcess *m_pJack; + + int m_iServerState; + + jack_client_t *m_pJackClient; + bool m_bJackDetach; + bool m_bJackShutdown; + + snd_seq_t *m_pAlsaSeq; + +#ifdef CONFIG_DBUS + QDBusInterface *m_pDBusControl; + QDBusInterface *m_pDBusConfig; + qjackctlDBusLogWatcher *m_pDBusLogWatcher; + bool m_bDBusStarted; +#endif + + int m_iStartDelay; + int m_iTimerDelay; + int m_iTimerRefresh; + int m_iJackRefresh; + int m_iAlsaRefresh; + int m_iJackDirty; + int m_iAlsaDirty; + int m_iStatusBlink; + int m_iStatusRefresh; + int m_iPatchbayRefresh; + + QSocketNotifier *m_pStdoutNotifier; + QSocketNotifier *m_pAlsaNotifier; + + int m_iXrunCallbacks; + int m_iXrunSkips; + int m_iXrunStats; + int m_iXrunCount; + float m_fXrunTotal; + float m_fXrunMax; + float m_fXrunMin; + float m_fXrunLast; + QTime m_tXrunLast; + QTime m_tResetLast; + + qjackctlMessagesForm *m_pMessagesForm; + qjackctlStatusForm *m_pStatusForm; + qjackctlConnectionsForm *m_pConnectionsForm; + qjackctlPatchbayForm *m_pPatchbayForm; + + qjackctlPatchbayRack *m_pPatchbayRack; + + qjackctlSystemTray *m_pSystemTray; + + qjackctlPreset m_preset; + + QString m_sStdoutBuffer; + QString m_sTimeDashes; + QString m_sJackCmdLine; + + bool m_bQuitForce; + float m_fSkipAccel; + + // Kind-of singleton reference. + static qjackctlMainForm *g_pMainForm; +}; + + +#endif // __qjackctlMainForm_h + + +// end of qjackctlMainForm.h diff -Nru qjackctl-0.3.4/src/qjackctlMainForm.ui qjackctl-0.3.6/src/qjackctlMainForm.ui --- qjackctl-0.3.4/src/qjackctlMainForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMainForm.ui 2010-01-01 21:31:42.000000000 +0000 @@ -0,0 +1,824 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlMainForm + + + + 0 + 0 + 427 + 100 + + + + + 1 + 1 + 0 + 0 + + + + + + + QjackCtl + + + :/icons/qjackctl.png + + + + 4 + + + 4 + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Quit processing and exit + + + &Quit + + + :/icons/quit1.png + + + Alt+Q + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Start the JACK server + + + &Start + + + :/icons/start1.png + + + Alt+S + + + false + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Stop the JACK server + + + S&top + + + :/icons/stop1.png + + + Alt+T + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show/hide the extended status window + + + St&atus + + + :/icons/status1.png + + + Alt+A + + + true + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show information about this application + + + Ab&out... + + + :/icons/about1.png + + + Alt+O + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show settings and options dialog + + + S&etup... + + + :/icons/setup1.png + + + Alt+E + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show/hide the messages log window + + + &Messages + + + :/icons/messages1.png + + + Alt+M + + + true + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show/hide the patchbay editor window + + + &Patchbay + + + :/icons/patchbay1.png + + + Alt+P + + + true + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 28 + 28 + + + + + 32767 + 28 + + + + Qt::TabFocus + + + Show/hide the actual connections patchbay window + + + &Connect + + + :/icons/connections1.png + + + Alt+C + + + true + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 7 + 7 + 0 + 0 + + + + + 260 + 80 + + + + true + + + QFrame::Panel + + + QFrame::Sunken + + + + 2 + + + 0 + + + + + + 50 + 0 + + + + + + + JACK server state + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + 2 + + + + + + + + 20 + 0 + + + + + + + JACK server mode + + + Qt::AlignCenter + + + false + + + + + + + + 40 + 0 + + + + + + + DSP Load + + + Qt::AlignCenter + + + false + + + + + + + + 50 + 0 + + + + + + + Sample rate + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 30 + 0 + + + + XRUN Count (notifications) + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + 2 + + + + + + + + 130 + 0 + + + + + 12 + 75 + true + + + + Time display + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 50 + 0 + + + + + + + Transport state + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + false + + + 2 + + + + + + + + 30 + 0 + + + + + + + Transport BPM + + + Qt::AlignCenter + + + false + + + + + + + + 80 + 0 + + + + + 75 + true + + + + Transport time + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + + + + 28 + 28 + + + + + 48 + 28 + + + + Qt::TabFocus + + + Backward transport + + + &Backward + + + :/icons/backward1.png + + + Alt+B + + + true + + + + + + + + 28 + 28 + + + + + 48 + 28 + + + + Qt::TabFocus + + + Forward transport + + + &Forward + + + :/icons/forward1.png + + + Alt+F + + + true + + + + + + + + 28 + 28 + + + + + 48 + 28 + + + + Qt::TabFocus + + + Rewind transport + + + &Rewind + + + :/icons/rewind1.png + + + Alt+R + + + + + + + + 1 + 1 + 0 + 0 + + + + + 28 + 28 + + + + + 48 + 28 + + + + Qt::TabFocus + + + Stop transport rolling + + + Pa&use + + + :/icons/pause1.png + + + Shift+Space + + + + + + + + 28 + 28 + + + + + 48 + 28 + + + + Qt::TabFocus + + + Start transport rolling + + + &Play + + + :/icons/play1.png + + + Space + + + true + + + + + + + + StartToolButton + StopToolButton + QuitToolButton + MessagesToolButton + StatusToolButton + SetupToolButton + ConnectionsToolButton + PatchbayToolButton + RewindToolButton + BackwardToolButton + PlayToolButton + PauseToolButton + ForwardToolButton + AboutToolButton + + + + + + diff -Nru qjackctl-0.3.4/src/qjackctlMessagesForm.cpp qjackctl-0.3.6/src/qjackctlMessagesForm.cpp --- qjackctl-0.3.4/src/qjackctlMessagesForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMessagesForm.cpp 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,230 @@ +// qjackctlMessagesForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlMessagesForm.h" + +#include "qjackctlMainForm.h" + +#include +#include +#include +#include +#include + +#include +#include + + +// The maximum number of message lines. +#define QJACKCTL_MESSAGES_MAXLINES 1000 + + +//---------------------------------------------------------------------------- +// qjackctlMessagesForm -- UI wrapper form. + +// Constructor. +qjackctlMessagesForm::qjackctlMessagesForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QWidget(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + +// m_ui.MessagesTextView->setTextFormat(Qt::LogText); + + // Initialize default message limit. + m_iMessagesLines = 0; + setMessagesLimit(QJACKCTL_MESSAGES_MAXLINES); + + m_pMessagesLog = NULL; +} + + +// Destructor. +qjackctlMessagesForm::~qjackctlMessagesForm (void) +{ + setLogging(false); +} + + +// Notify our parent that we're emerging. +void qjackctlMessagesForm::showEvent ( QShowEvent *pShowEvent ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); + + QWidget::showEvent(pShowEvent); +} + +// Notify our parent that we're closing. +void qjackctlMessagesForm::hideEvent ( QHideEvent *pHideEvent ) +{ + QWidget::hideEvent(pHideEvent); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + +// Just about to notify main-window that we're closing. +void qjackctlMessagesForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) +{ + QWidget::hide(); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + + +// Messages view font accessors. +QFont qjackctlMessagesForm::messagesFont (void) const +{ + return m_ui.MessagesTextView->font(); +} + +void qjackctlMessagesForm::setMessagesFont ( const QFont & font ) +{ + m_ui.MessagesTextView->setFont(font); +} + + +// Messages line limit accessors. +int qjackctlMessagesForm::messagesLimit (void) const +{ + return m_iMessagesLimit; +} + +void qjackctlMessagesForm::setMessagesLimit ( int iMessagesLimit ) +{ + m_iMessagesLimit = iMessagesLimit; + m_iMessagesHigh = iMessagesLimit + (iMessagesLimit / 3); + +// m_ui.MessagesTextView->setMaxLogLines(iMessagesLimit); +} + + +// Messages logging stuff. +bool qjackctlMessagesForm::isLogging (void) const +{ + return (m_pMessagesLog != NULL); +} + +void qjackctlMessagesForm::setLogging ( bool bEnabled, const QString& sFilename ) +{ + if (m_pMessagesLog) { + appendMessages(tr("Logging stopped --- %1 ---") + .arg(QDateTime::currentDateTime().toString())); + m_pMessagesLog->close(); + delete m_pMessagesLog; + m_pMessagesLog = NULL; + } + + if (bEnabled) { + m_pMessagesLog = new QFile(sFilename); + if (m_pMessagesLog->open(QIODevice::Text | QIODevice::Append)) { + appendMessages(tr("Logging started --- %1 ---") + .arg(QDateTime::currentDateTime().toString())); + } else { + delete m_pMessagesLog; + m_pMessagesLog = NULL; + } + } +} + + +// Messages log output method. +void qjackctlMessagesForm::appendMessagesLog ( const QString& s ) +{ + if (m_pMessagesLog) { + QTextStream(m_pMessagesLog) << s << endl; + m_pMessagesLog->flush(); + } +} + +// Messages widget output method. +void qjackctlMessagesForm::appendMessagesLine ( const QString& s ) +{ + // Check for message line limit... + if (m_iMessagesLines > m_iMessagesHigh) { + m_ui.MessagesTextView->setUpdatesEnabled(false); + QTextCursor textCursor(m_ui.MessagesTextView->document()->begin()); + while (m_iMessagesLines > m_iMessagesLimit) { + // Move cursor extending selection + // from start to next line-block... + textCursor.movePosition( + QTextCursor::NextBlock, QTextCursor::KeepAnchor); + m_iMessagesLines--; + } + // Remove the excessive line-blocks... + textCursor.removeSelectedText(); + m_ui.MessagesTextView->setUpdatesEnabled(true); + } + + m_ui.MessagesTextView->append(s); + m_iMessagesLines++; +} + + +void qjackctlMessagesForm::appendMessages ( const QString& s ) +{ + appendMessagesColor(s, "#999999"); +} + +void qjackctlMessagesForm::appendMessagesColor ( const QString& s, const QString& c ) +{ + QString sText = QTime::currentTime().toString("hh:mm:ss.zzz") + ' ' + s; + + appendMessagesLine("" + sText + ""); + appendMessagesLog(sText); +} + +void qjackctlMessagesForm::appendMessagesText ( const QString& s ) +{ + appendMessagesLine(s); + appendMessagesLog(s); +} + + +// Keyboard event handler. +void qjackctlMessagesForm::keyPressEvent ( QKeyEvent *pKeyEvent ) +{ +#ifdef CONFIG_DEBUG_0 + qDebug("qjackctlMessagesForm::keyPressEvent(%d)", pKeyEvent->key()); +#endif + int iKey = pKeyEvent->key(); + switch (iKey) { + case Qt::Key_Escape: + close(); + break; + default: + QWidget::keyPressEvent(pKeyEvent); + break; + } + + // Make sure we've get focus back... + QWidget::setFocus(); +} + + +// end of qjackctlMessagesForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlMessagesForm.h qjackctl-0.3.6/src/qjackctlMessagesForm.h --- qjackctl-0.3.4/src/qjackctlMessagesForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMessagesForm.h 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,87 @@ +// qjackctlMessagesForm.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlMessagesForm_h +#define __qjackctlMessagesForm_h + +#include "ui_qjackctlMessagesForm.h" + +// Forward declarations. +class QFile; + + +//---------------------------------------------------------------------------- +// qjackctlMessagesForm -- UI wrapper form. + +class qjackctlMessagesForm : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlMessagesForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlMessagesForm(); + + QFont messagesFont() const; + void setMessagesFont(const QFont& font); + + int messagesLimit() const; + void setMessagesLimit(int iLimit); + + bool isLogging() const; + void setLogging(bool bEnabled, const QString& sFilename = QString()); + + void appendMessages(const QString& s); + void appendMessagesColor(const QString& s, const QString& c); + void appendMessagesText(const QString& s); + +protected: + + void appendMessagesLine(const QString& s); + void appendMessagesLog(const QString& s); + + void showEvent(QShowEvent *); + void hideEvent(QHideEvent *); + void closeEvent(QCloseEvent *); + + void keyPressEvent(QKeyEvent *); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlMessagesForm m_ui; + + // Instance variables. + int m_iMessagesLines; + int m_iMessagesLimit; + int m_iMessagesHigh; + + // Logging stuff. + QFile *m_pMessagesLog; +}; + + +#endif // __qjackctlMessagesForm_h + + +// end of qjackctlMessagesForm.h diff -Nru qjackctl-0.3.4/src/qjackctlMessagesForm.ui qjackctl-0.3.6/src/qjackctlMessagesForm.ui --- qjackctl-0.3.4/src/qjackctlMessagesForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlMessagesForm.ui 2008-05-14 15:36:48.000000000 +0100 @@ -0,0 +1,78 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlMessagesForm + + + + 0 + 0 + 520 + 240 + + + + + 0 + 0 + + + + + + + Messages - JACK Audio Connection Kit + + + :/icons/messages1.png + + + + + + + 320 + 80 + + + + Messages output log + + + QTextEdit::NoWrap + + + true + + + false + + + + + + + + MessagesTextView + + + + diff -Nru qjackctl-0.3.4/src/qjackctlPatchbay.cpp qjackctl-0.3.6/src/qjackctlPatchbay.cpp --- qjackctl-0.3.4/src/qjackctlPatchbay.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbay.cpp 2009-09-17 09:10:07.000000000 +0100 @@ -0,0 +1,1970 @@ +// qjackctlPatchbay.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlPatchbay.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +// Interactivity socket form. +#include "qjackctlSocketForm.h" + +// External patchbay loader. +#include "qjackctlPatchbayFile.h" + + +//---------------------------------------------------------------------- +// class qjackctlPlugItem -- Socket plug list item. +// + +// Constructor. +qjackctlPlugItem::qjackctlPlugItem ( qjackctlSocketItem *pSocket, + const QString& sPlugName, qjackctlPlugItem *pPlugAfter ) + : QTreeWidgetItem(pSocket, pPlugAfter, QJACKCTL_PLUGITEM) +{ + QTreeWidgetItem::setText(0, sPlugName); + + m_pSocket = pSocket; + m_sPlugName = sPlugName; + + m_pSocket->plugs().append(this); + + int iPixmap; + if (pSocket->socketType() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) + iPixmap = QJACKCTL_XPM_AUDIO_PLUG; + else + iPixmap = QJACKCTL_XPM_MIDI_PLUG; + QTreeWidgetItem::setIcon(0, QIcon(pSocket->pixmap(iPixmap))); + + QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() + & ~Qt::ItemIsSelectable); +} + +// Default destructor. +qjackctlPlugItem::~qjackctlPlugItem (void) +{ + int iPlug = m_pSocket->plugs().indexOf(this); + if (iPlug >= 0) + m_pSocket->plugs().removeAt(iPlug); +} + + +// Instance accessors. +const QString& qjackctlPlugItem::socketName (void) const +{ + return m_pSocket->socketName(); +} + +const QString& qjackctlPlugItem::plugName (void) const +{ + return m_sPlugName; +} + + +// Patchbay socket item accessor. +qjackctlSocketItem *qjackctlPlugItem::socket (void) const +{ + return m_pSocket; +} + + +//---------------------------------------------------------------------- +// class qjackctlSocketItem -- Jack client list item. +// + +// Constructor. +qjackctlSocketItem::qjackctlSocketItem ( qjackctlSocketList *pSocketList, + const QString& sSocketName, const QString& sClientName, + int iSocketType, qjackctlSocketItem *pSocketAfter ) + : QTreeWidgetItem(pSocketList->listView(), pSocketAfter, QJACKCTL_SOCKETITEM) +{ + QTreeWidgetItem::setText(0, sSocketName); + + m_pSocketList = pSocketList; + m_sSocketName = sSocketName; + m_sClientName = sClientName; + m_iSocketType = iSocketType; + m_bExclusive = false; + m_sSocketForward.clear(); + + m_pSocketList->sockets().append(this); + + updatePixmap(); +} + +// Default destructor. +qjackctlSocketItem::~qjackctlSocketItem (void) +{ + QListIterator iter(m_connects); + while (iter.hasNext()) + (iter.next())->removeConnect(this); + + m_connects.clear(); + m_plugs.clear(); + + int iSocket = m_pSocketList->sockets().indexOf(this); + if (iSocket >= 0) + m_pSocketList->sockets().removeAt(iSocket); +} + + +// Instance accessors. +const QString& qjackctlSocketItem::socketName (void) const +{ + return m_sSocketName; +} + +const QString& qjackctlSocketItem::clientName (void) const +{ + return m_sClientName; +} + +int qjackctlSocketItem::socketType (void) const +{ + return m_iSocketType; +} + +bool qjackctlSocketItem::isExclusive (void) const +{ + return m_bExclusive; +} + +const QString& qjackctlSocketItem::forward (void) const +{ + return m_sSocketForward; +} + + +void qjackctlSocketItem::setSocketName ( const QString& sSocketName ) +{ + m_sSocketName = sSocketName; +} + +void qjackctlSocketItem::setClientName ( const QString& sClientName ) +{ + m_sClientName = sClientName; +} + +void qjackctlSocketItem::setSocketType ( int iSocketType ) +{ + m_iSocketType = iSocketType; +} + +void qjackctlSocketItem::setExclusive ( bool bExclusive ) +{ + m_bExclusive = bExclusive; +} + +void qjackctlSocketItem::setForward ( const QString& sSocketForward ) +{ + m_sSocketForward = sSocketForward; +} + + +// Socket flags accessor. +bool qjackctlSocketItem::isReadable (void) const +{ + return m_pSocketList->isReadable(); +} + + +// Plug finder. +qjackctlPlugItem *qjackctlSocketItem::findPlug ( const QString& sPlugName ) +{ + QListIterator iter(m_plugs); + while (iter.hasNext()) { + qjackctlPlugItem *pPlug = iter.next(); + if (sPlugName == pPlug->plugName()) + return pPlug; + } + + return NULL; +} + + +// Plug list accessor. +QList& qjackctlSocketItem::plugs (void) +{ + return m_plugs; +} + + +// Connected socket list primitives. +void qjackctlSocketItem::addConnect( qjackctlSocketItem *pSocket ) +{ + m_connects.append(pSocket); +} + +void qjackctlSocketItem::removeConnect( qjackctlSocketItem *pSocket ) +{ + int iSocket = m_connects.indexOf(pSocket); + if (iSocket >= 0) + m_connects.removeAt(iSocket); +} + + + +// Connected socket finder. +qjackctlSocketItem *qjackctlSocketItem::findConnectPtr ( + qjackctlSocketItem *pSocketPtr ) +{ + QListIterator iter(m_connects); + while (iter.hasNext()) { + qjackctlSocketItem *pSocket = iter.next(); + if (pSocketPtr == pSocket) + return pSocket; + } + + return NULL; +} + + +// Connection cache list accessor. +const QList& qjackctlSocketItem::connects (void) const +{ + return m_connects; +} + + +// Plug list cleaner. +void qjackctlSocketItem::clear (void) +{ + qDeleteAll(m_plugs); + m_plugs.clear(); +} + + +// Socket item pixmap peeker. +const QPixmap& qjackctlSocketItem::pixmap ( int iPixmap ) const +{ + return m_pSocketList->pixmap(iPixmap); +} + + +// Update pixmap to its proper context. +void qjackctlSocketItem::updatePixmap (void) +{ + int iPixmap; + if (m_iSocketType == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { + iPixmap = (m_bExclusive + ? QJACKCTL_XPM_AUDIO_SOCKET_X + : QJACKCTL_XPM_AUDIO_SOCKET); + } else { + iPixmap = (m_bExclusive + ? QJACKCTL_XPM_MIDI_SOCKET_X + : QJACKCTL_XPM_MIDI_SOCKET); + } + QTreeWidgetItem::setIcon(0, QIcon(pixmap(iPixmap))); +} + + +// Socket item openness status. +void qjackctlSocketItem::setOpen ( bool bOpen ) +{ +#if QT_VERSION >= 0x040201 + QTreeWidgetItem::setExpanded(bOpen); +#else + QTreeWidgetItem::treeWidget()->setItemExpanded(this, bOpen); +#endif +} + + +bool qjackctlSocketItem::isOpen (void) const +{ +#if QT_VERSION >= 0x040201 + return QTreeWidgetItem::isExpanded(); +#else + return QTreeWidgetItem::treeWidget()->isItemExpanded(this); +#endif +} + + +//---------------------------------------------------------------------- +// qjackctlSocketList -- Jack client list. +// + +// Constructor. +qjackctlSocketList::qjackctlSocketList ( + qjackctlSocketListView *pListView, bool bReadable ) +{ + QPixmap pmXSocket1(":/icons/xsocket1.png"); + + m_pListView = pListView; + m_bReadable = bReadable; + m_pJackClient = NULL; + m_pAlsaSeq = NULL; + + if (bReadable) { + m_sSocketCaption = tr("Output"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET] = new QPixmap(":/icons/asocketo.png"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET], pmXSocket1); + m_apPixmaps[QJACKCTL_XPM_AUDIO_CLIENT] = new QPixmap(":/icons/acliento.png"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_PLUG] = new QPixmap(":/icons/aportlno.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET] = new QPixmap(":/icons/msocketo.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET], pmXSocket1); + m_apPixmaps[QJACKCTL_XPM_MIDI_CLIENT] = new QPixmap(":/icons/mcliento.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_PLUG] = new QPixmap(":/icons/mporto.png"); + } else { + m_sSocketCaption = tr("Input"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET] = new QPixmap(":/icons/asocketi.png"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET], pmXSocket1); + m_apPixmaps[QJACKCTL_XPM_AUDIO_CLIENT] = new QPixmap(":/icons/aclienti.png"); + m_apPixmaps[QJACKCTL_XPM_AUDIO_PLUG] = new QPixmap(":/icons/aportlni.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET] = new QPixmap(":/icons/msocketi.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET], pmXSocket1); + m_apPixmaps[QJACKCTL_XPM_MIDI_CLIENT] = new QPixmap(":/icons/mclienti.png"); + m_apPixmaps[QJACKCTL_XPM_MIDI_PLUG] = new QPixmap(":/icons/mporti.png"); + } + + if (!m_sSocketCaption.isEmpty()) + m_sSocketCaption += ' '; + m_sSocketCaption += tr("Socket"); +} + +// Default destructor. +qjackctlSocketList::~qjackctlSocketList (void) +{ + clear(); + + for (int iPixmap = 0; iPixmap < QJACKCTL_XPM_PIXMAPS; iPixmap++) + delete m_apPixmaps[iPixmap]; +} + + +// Client finder. +qjackctlSocketItem *qjackctlSocketList::findSocket ( + const QString& sSocketName, int iSocketType ) +{ + QListIterator iter(m_sockets); + while (iter.hasNext()) { + qjackctlSocketItem *pSocket = iter.next(); + if (sSocketName == pSocket->socketName() && + iSocketType == pSocket->socketType()) + return pSocket; + } + + return NULL; +} + + +// Socket list accessor. +QList& qjackctlSocketList::sockets (void) +{ + return m_sockets; +} + + +// List view accessor. +qjackctlSocketListView *qjackctlSocketList::listView (void) const +{ + return m_pListView; +} + + +// Socket flags accessor. +bool qjackctlSocketList::isReadable (void) const +{ + return m_bReadable; +} + + +// Socket caption titler. +const QString& qjackctlSocketList::socketCaption (void) const +{ + return m_sSocketCaption; +} + + +// JACK client accessors. +void qjackctlSocketList::setJackClient ( jack_client_t *pJackClient ) +{ + m_pJackClient = pJackClient; +} + +jack_client_t *qjackctlSocketList::jackClient (void) const +{ + return m_pJackClient; +} + + +// ALSA sequencer accessors. +void qjackctlSocketList::setAlsaSeq ( snd_seq_t *pAlsaSeq ) +{ + m_pAlsaSeq = pAlsaSeq; +} + +snd_seq_t *qjackctlSocketList::alsaSeq (void) const +{ + return m_pAlsaSeq; +} + + +// Socket list cleaner. +void qjackctlSocketList::clear (void) +{ + qDeleteAll(m_sockets); + m_sockets.clear(); +} + + +// Socket list pixmap peeker. +const QPixmap& qjackctlSocketList::pixmap ( int iPixmap ) const +{ + return *m_apPixmaps[iPixmap]; +} + + +// Merge two pixmaps with union of respective masks. +QPixmap *qjackctlSocketList::createPixmapMerge ( + const QPixmap& xpmDst, const QPixmap& xpmSrc ) +{ + QPixmap *pXpmMerge = new QPixmap(xpmDst); + if (pXpmMerge) { + QBitmap bmMask = xpmDst.mask(); + QPainter(&bmMask).drawPixmap(0, 0, xpmSrc.mask()); + pXpmMerge->setMask(bmMask); + QPainter(pXpmMerge).drawPixmap(0, 0, xpmSrc); + } + return pXpmMerge; +} + + +// Return currently selected socket item. +qjackctlSocketItem *qjackctlSocketList::selectedSocketItem (void) const +{ + qjackctlSocketItem *pSocketItem = NULL; + + QTreeWidgetItem *pItem = m_pListView->currentItem(); + if (pItem) { + if (pItem->type() == QJACKCTL_PLUGITEM) { + pSocketItem = static_cast (pItem->parent()); + } else { + pSocketItem = static_cast (pItem); + } + } + + return pSocketItem; +} + + +// Add a new socket item, using interactive form. +bool qjackctlSocketList::addSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketForm socketForm(m_pListView); + socketForm.setWindowTitle(tr(" - %1").arg(m_sSocketCaption)); + socketForm.setSocketCaption(m_sSocketCaption); + socketForm.setPixmaps(m_apPixmaps); + socketForm.setSocketList(this); + socketForm.setJackClient(m_pJackClient); + socketForm.setAlsaSeq(m_pAlsaSeq); + qjackctlPatchbaySocket socket(m_sSocketCaption + + ' ' + QString::number(m_sockets.count() + 1), + QString::null, QJACKCTL_SOCKETTYPE_JACK_AUDIO); + socketForm.load(&socket); + if (socketForm.exec()) { + socketForm.save(&socket); + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + // m_pListView->setUpdatesEnabled(false); + if (pSocketItem) +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(false); +#else + m_pListView->setItemSelected(pSocketItem, false); +#endif + pSocketItem = new qjackctlSocketItem(this, socket.name(), + socket.clientName(), socket.type(), pSocketItem); + if (pSocketItem) { + pSocketItem->setExclusive(socket.isExclusive()); + pSocketItem->setForward(socket.forward()); + qjackctlPlugItem *pPlugItem = NULL; + QStringListIterator iter(socket.pluglist()); + while (iter.hasNext()) { + pPlugItem = new qjackctlPlugItem( + pSocketItem, iter.next(), pPlugItem); + } + bResult = true; + } +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(true); +#else + m_pListView->setItemSelected(pSocketItem, true); +#endif + m_pListView->setCurrentItem(pSocketItem); + // m_pListView->setUpdatesEnabled(true); + // m_pListView->update(); + m_pListView->setDirty(true); + } + + return bResult; +} + + +// Remove (delete) currently selected socket item. +bool qjackctlSocketList::removeSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + if (QMessageBox::warning(m_pListView, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("%1 about to be removed:\n\n" + "\"%2\"\n\nAre you sure?") + .arg(m_sSocketCaption) + .arg(pSocketItem->socketName()), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + delete pSocketItem; + bResult = true; + m_pListView->setDirty(true); + } + } + + return bResult; +} + + +// View or change the properties of currently selected socket item. +bool qjackctlSocketList::editSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + qjackctlSocketForm socketForm(m_pListView); + socketForm.setWindowTitle(pSocketItem->socketName() + + " - " + m_sSocketCaption); + socketForm.setSocketCaption(m_sSocketCaption); + socketForm.setPixmaps(m_apPixmaps); + socketForm.setSocketList(this); + socketForm.setJackClient(m_pJackClient); + socketForm.setAlsaSeq(m_pAlsaSeq); + qjackctlPatchbaySocket socket(pSocketItem->socketName(), + pSocketItem->clientName(), pSocketItem->socketType()); + socket.setExclusive(pSocketItem->isExclusive()); + socket.setForward(pSocketItem->forward()); + QListIterator iter(pSocketItem->plugs()); + while (iter.hasNext()) + socket.pluglist().append((iter.next())->plugName()); + socketForm.load(&socket); + socketForm.setConnectCount(pSocketItem->connects().count()); + if (socketForm.exec()) { + socketForm.save(&socket); + // m_pListView->setUpdatesEnabled(false); + pSocketItem->clear(); + pSocketItem->setText(0, socket.name()); + pSocketItem->setSocketName(socket.name()); + pSocketItem->setClientName(socket.clientName()); + pSocketItem->setSocketType(socket.type()); + pSocketItem->setExclusive(socket.isExclusive()); + pSocketItem->setForward(socket.forward()); + pSocketItem->updatePixmap(); + qjackctlPlugItem *pPlugItem = NULL; + QStringListIterator iter(socket.pluglist()); + while (iter.hasNext()) { + pPlugItem = new qjackctlPlugItem( + pSocketItem, iter.next(), pPlugItem); + } +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(true); +#else + m_pListView->setItemSelected(pSocketItem, true); +#endif + m_pListView->setCurrentItem(pSocketItem); + // m_pListView->setUpdatesEnabled(true); + // m_pListView->triggerUpdate(); + m_pListView->setDirty(true); + bResult = true; + } + } + + return bResult; +} + + +// Duplicate and change the properties of currently selected socket item. +bool qjackctlSocketList::copySocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + qjackctlSocketForm socketForm(m_pListView); + // Find a new distinguishable socket name, please. + QString sSocketName; + QString sSkel = pSocketItem->socketName(); + sSkel.remove(QRegExp("[0-9]+$")).append("%1"); + int iSocketType = pSocketItem->socketType(); + int iSocketNo = 1; + do { sSocketName = sSkel.arg(++iSocketNo); } + while (findSocket(sSocketName, iSocketType)); + // Show up as a new socket... + socketForm.setWindowTitle(tr("%1 - %2") + .arg(pSocketItem->socketName()).arg(m_sSocketCaption)); + socketForm.setSocketCaption(m_sSocketCaption); + socketForm.setPixmaps(m_apPixmaps); + socketForm.setSocketList(this); + socketForm.setJackClient(m_pJackClient); + socketForm.setAlsaSeq(m_pAlsaSeq); + qjackctlPatchbaySocket socket(sSocketName, + pSocketItem->clientName(), iSocketType); + if (pSocketItem->isExclusive()) + socket.setExclusive(true); + QListIterator iter(pSocketItem->plugs()); + while (iter.hasNext()) + socket.pluglist().append((iter.next())->plugName()); + socketForm.load(&socket); + if (socketForm.exec()) { + socketForm.save(&socket); + pSocketItem = new qjackctlSocketItem(this, socket.name(), + socket.clientName(), socket.type(), pSocketItem); + if (pSocketItem) { + pSocketItem->setExclusive(socket.isExclusive()); + pSocketItem->setForward(socket.forward()); + qjackctlPlugItem *pPlugItem = NULL; + QStringListIterator iter(socket.pluglist()); + while (iter.hasNext()) { + pPlugItem = new qjackctlPlugItem( + pSocketItem, iter.next(), pPlugItem); + } + bResult = true; + } +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(true); +#else + m_pListView->setItemSelected(pSocketItem, true); +#endif + m_pListView->setCurrentItem(pSocketItem); + // m_pListView->setUpdatesEnabled(true); + // m_pListView->triggerUpdate(); + m_pListView->setDirty(true); + } + } + + return bResult; +} + + +// Toggle exclusive currently selected socket item. +bool qjackctlSocketList::exclusiveSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + pSocketItem->setExclusive(!pSocketItem->isExclusive()); + pSocketItem->updatePixmap(); + bResult = true; + m_pListView->setDirty(true); + } + + return bResult; +} + + +// Move current selected socket item up one position. +bool qjackctlSocketList::moveUpSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + int iItem = m_pListView->indexOfTopLevelItem(pSocketItem); + if (iItem > 0) { + QTreeWidgetItem *pItem = m_pListView->takeTopLevelItem(iItem); + if (pItem) { + m_pListView->insertTopLevelItem(iItem - 1, pItem); +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(true); +#else + m_pListView->setItemSelected(pSocketItem, true); +#endif + m_pListView->setCurrentItem(pSocketItem); + // m_pListView->setUpdatesEnabled(true); + // m_pListView->update(); + m_pListView->setDirty(true); + bResult = true; + } + } + } + + return bResult; +} + + +// Move current selected socket item down one position. +bool qjackctlSocketList::moveDownSocketItem (void) +{ + bool bResult = false; + + qjackctlSocketItem *pSocketItem = selectedSocketItem(); + if (pSocketItem) { + int iItem = m_pListView->indexOfTopLevelItem(pSocketItem); + int iItemCount = m_pListView->topLevelItemCount(); + if (iItem < iItemCount - 1) { + QTreeWidgetItem *pItem = m_pListView->takeTopLevelItem(iItem); + if (pItem) { + m_pListView->insertTopLevelItem(iItem + 1, pItem); +#if QT_VERSION >= 0x040200 + pSocketItem->setSelected(true); +#else + m_pListView->setItemSelected(pSocketItem, true); +#endif + m_pListView->setCurrentItem(pSocketItem); + // m_pListView->setUpdatesEnabled(true); + // m_pListView->update(); + m_pListView->setDirty(true); + bResult = true; + } + } + } + + return bResult; +} + + +//---------------------------------------------------------------------------- +// qjackctlSocketListView -- Socket list view, supporting drag-n-drop. + +// Constructor. +qjackctlSocketListView::qjackctlSocketListView ( + qjackctlPatchbayView *pPatchbayView, bool bReadable ) + : QTreeWidget(pPatchbayView) +{ + m_pPatchbayView = pPatchbayView; + m_bReadable = bReadable; + + m_pAutoOpenTimer = 0; + m_iAutoOpenTimeout = 0; + + m_pDragItem = NULL; + m_pDropItem = NULL; + + QHeaderView *pHeader = QTreeWidget::header(); +// pHeader->setResizeMode(QHeaderView::Custom); +// pHeader->setDefaultAlignment(Qt::AlignLeft); +// pHeader->setDefaultSectionSize(120); + pHeader->setMovable(false); +// pHeader->setClickable(true); +// pHeader->setSortIndicatorShown(true); + pHeader->setStretchLastSection(true); + + QTreeWidget::setRootIsDecorated(true); + QTreeWidget::setUniformRowHeights(true); +// QTreeWidget::setDragEnabled(true); + QTreeWidget::setAcceptDrops(true); + QTreeWidget::setDropIndicatorShown(true); + QTreeWidget::setAutoScroll(true); + QTreeWidget::setSelectionMode(QAbstractItemView::SingleSelection); + QTreeWidget::setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + QTreeWidget::setSortingEnabled(false); + QTreeWidget::setMinimumWidth(120); + QTreeWidget::setColumnCount(1); + + // Trap for help/tool-tips events. + QTreeWidget::viewport()->installEventFilter(this); + + QString sText; + if (m_bReadable) + sText = tr("Output Sockets / Plugs"); + else + sText = tr("Input Sockets / Plugs"); + QTreeWidget::headerItem()->setText(0, sText); + QTreeWidget::setToolTip(sText); + + setAutoOpenTimeout(800); +} + +// Default destructor. +qjackctlSocketListView::~qjackctlSocketListView (void) +{ + setAutoOpenTimeout(0); +} + + +// Patchbay view dirty flag accessors. +void qjackctlSocketListView::setDirty ( bool bDirty ) +{ + m_pPatchbayView->setDirty(bDirty); +} + +bool qjackctlSocketListView::dirty (void) const +{ + return m_pPatchbayView->dirty(); +} + + +// Auto-open timeout method. +void qjackctlSocketListView::setAutoOpenTimeout ( int iAutoOpenTimeout ) +{ + m_iAutoOpenTimeout = iAutoOpenTimeout; + + if (m_pAutoOpenTimer) + delete m_pAutoOpenTimer; + m_pAutoOpenTimer = NULL; + + if (m_iAutoOpenTimeout > 0) { + m_pAutoOpenTimer = new QTimer(this); + QObject::connect(m_pAutoOpenTimer, + SIGNAL(timeout()), + SLOT(timeoutSlot())); + } +} + + +// Auto-open timeout accessor. +int qjackctlSocketListView::autoOpenTimeout (void) const +{ + return m_iAutoOpenTimeout; +} + + +// Auto-open timer slot. +void qjackctlSocketListView::timeoutSlot (void) +{ + if (m_pAutoOpenTimer) { + m_pAutoOpenTimer->stop(); + if (m_pDropItem && m_pDropItem->type() == QJACKCTL_SOCKETITEM) { + qjackctlSocketItem *pSocketItem + = static_cast (m_pDropItem); + if (pSocketItem && !pSocketItem->isOpen()) + pSocketItem->setOpen(true); + } + } +} + + +// Trap for help/tool-tip events. +bool qjackctlSocketListView::eventFilter ( QObject *pObject, QEvent *pEvent ) +{ + QWidget *pViewport = QTreeWidget::viewport(); + if (static_cast (pObject) == pViewport + && pEvent->type() == QEvent::ToolTip) { + QHelpEvent *pHelpEvent = static_cast (pEvent); + if (pHelpEvent) { + QTreeWidgetItem *pItem = QTreeWidget::itemAt(pHelpEvent->pos()); + if (pItem && pItem->type() == QJACKCTL_SOCKETITEM) { + qjackctlSocketItem *pSocketItem + = static_cast (pItem); + if (pSocketItem) { + QToolTip::showText(pHelpEvent->globalPos(), + pSocketItem->clientName(), pViewport); + return true; + } + } + else + if (pItem && pItem->type() == QJACKCTL_PLUGITEM) { + qjackctlPlugItem *pPlugItem + = static_cast (pItem); + if (pPlugItem) { + QToolTip::showText(pHelpEvent->globalPos(), + pPlugItem->plugName(), pViewport); + return true; + } + } + } + } + + // Not handled here. + return QTreeWidget::eventFilter(pObject, pEvent); +} + + +// Drag-n-drop stuff. +QTreeWidgetItem *qjackctlSocketListView::dragDropItem ( const QPoint& pos ) +{ + QTreeWidgetItem *pItem = QTreeWidget::itemAt(pos); + if (pItem) { + if (m_pDropItem != pItem) { + QTreeWidget::setCurrentItem(pItem); + m_pDropItem = pItem; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->start(m_iAutoOpenTimeout); + qjackctlPatchbay *pPatchbay = m_pPatchbayView->binding(); + if ((pItem->flags() & Qt::ItemIsDropEnabled) == 0 + || pPatchbay == NULL || !pPatchbay->canConnectSelected()) + pItem = NULL; + } + } else { + m_pDropItem = NULL; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->stop(); + } + + return pItem; +} + +void qjackctlSocketListView::dragEnterEvent ( QDragEnterEvent *pDragEnterEvent ) +{ + if (pDragEnterEvent->source() != this && + pDragEnterEvent->mimeData()->hasText() && + dragDropItem(pDragEnterEvent->pos())) { + pDragEnterEvent->accept(); + } else { + pDragEnterEvent->ignore(); + } +} + + +void qjackctlSocketListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent ) +{ + if (pDragMoveEvent->source() != this && + pDragMoveEvent->mimeData()->hasText() && + dragDropItem(pDragMoveEvent->pos())) { + pDragMoveEvent->accept(); + } else { + pDragMoveEvent->ignore(); + } +} + + +void qjackctlSocketListView::dragLeaveEvent ( QDragLeaveEvent * ) +{ + m_pDropItem = 0; + if (m_pAutoOpenTimer) + m_pAutoOpenTimer->stop(); +} + + +void qjackctlSocketListView::dropEvent ( QDropEvent *pDropEvent ) +{ + if (pDropEvent->source() != this && + pDropEvent->mimeData()->hasText() && + dragDropItem(pDropEvent->pos())) { + const QString sText = pDropEvent->mimeData()->text(); + qjackctlPatchbay *pPatchbay = m_pPatchbayView->binding(); + if (!sText.isEmpty() && pPatchbay) + pPatchbay->connectSelected(); + } + + dragLeaveEvent(NULL); +} + + +// Handle mouse events for drag-and-drop stuff. +void qjackctlSocketListView::mousePressEvent ( QMouseEvent *pMouseEvent ) +{ + QTreeWidget::mousePressEvent(pMouseEvent); + + if (pMouseEvent->button() == Qt::LeftButton) { + m_posDrag = pMouseEvent->pos(); + m_pDragItem = QTreeWidget::itemAt(m_posDrag); + } +} + + +void qjackctlSocketListView::mouseMoveEvent ( QMouseEvent *pMouseEvent ) +{ + QTreeWidget::mouseMoveEvent(pMouseEvent); + + if ((pMouseEvent->buttons() & Qt::LeftButton) && m_pDragItem + && ((pMouseEvent->pos() - m_posDrag).manhattanLength() + >= QApplication::startDragDistance())) { + // We'll start dragging something alright... + QMimeData *pMimeData = new QMimeData(); + pMimeData->setText(m_pDragItem->text(0)); + QDrag *pDrag = new QDrag(this); + pDrag->setMimeData(pMimeData); + pDrag->setPixmap(m_pDragItem->icon(0).pixmap(16)); + pDrag->setHotSpot(QPoint(-4, -12)); + pDrag->start(Qt::LinkAction); + // We've dragged and maybe dropped it by now... + m_pDragItem = NULL; + } +} + + +// Context menu request event handler. +void qjackctlSocketListView::contextMenuEvent ( + QContextMenuEvent *pContextMenuEvent ) +{ + m_pPatchbayView->contextMenu( + pContextMenuEvent->globalPos(), + (m_bReadable + ? m_pPatchbayView->OSocketList() + : m_pPatchbayView->ISocketList()) + ); +} + + +//---------------------------------------------------------------------- +// qjackctlPatchworkView -- Socket connector widget. +// + +// Constructor. +qjackctlPatchworkView::qjackctlPatchworkView ( + qjackctlPatchbayView *pPatchbayView ) + : QWidget(pPatchbayView) +{ + m_pPatchbayView = pPatchbayView; + + QWidget::setMinimumWidth(20); +// QWidget::setMaximumWidth(120); + QWidget::setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); +} + +// Default destructor. +qjackctlPatchworkView::~qjackctlPatchworkView (void) +{ +} + + +// Legal socket item position helper. +int qjackctlPatchworkView::itemY ( QTreeWidgetItem *pItem ) const +{ + QRect rect; + QTreeWidget *pList = pItem->treeWidget(); + QTreeWidgetItem *pParent = pItem->parent(); + qjackctlSocketItem *pSocketItem = NULL; + if (pParent && pParent->type() == QJACKCTL_SOCKETITEM) + pSocketItem = static_cast (pParent); + if (pSocketItem && !pSocketItem->isOpen()) { + rect = pList->visualItemRect(pParent); + } else { + rect = pList->visualItemRect(pItem); + } + return rect.top() + rect.height() / 2; +} + + +// Draw visible socket connection relation lines +void qjackctlPatchworkView::drawConnectionLine ( QPainter *pPainter, + int x1, int y1, int x2, int y2, int h1, int h2 ) +{ + // Account for list view headers. + y1 += h1; + y2 += h2; + + // Invisible output plugs don't get a connecting dot. + if (y1 > h1) + pPainter->drawLine(x1, y1, x1 + 4, y1); + + // How do we'll draw it? + if (m_pPatchbayView->isBezierLines()) { + // Setup control points + QPolygon spline(4); + int cp = int(float(x2 - x1 - 8) * 0.4f); + spline.putPoints(0, 4, + x1 + 4, y1, x1 + 4 + cp, y1, + x2 - 4 - cp, y2, x2 - 4, y2); + // The connection line, it self. + QPainterPath path; + path.moveTo(spline.at(0)); + path.cubicTo(spline.at(1), spline.at(2), spline.at(3)); + pPainter->strokePath(path, pPainter->pen()); + } // Old style... + else pPainter->drawLine(x1 + 4, y1, x2 - 4, y2); + + // Invisible input plugs don't get a connecting dot. + if (y2 > h2) + pPainter->drawLine(x2 - 4, y2, x2, y2); +} + + +// Draw socket forwrading line (for input sockets / right pane only) +void qjackctlPatchworkView::drawForwardLine ( QPainter *pPainter, + int x, int dx, int y1, int y2, int h ) +{ + // Account for list view headers. + y1 += h; + y2 += h; + dx += 4; + + // Draw it... + if (y1 < y2) { + pPainter->drawLine(x - dx, y1 + 4, x, y1); + pPainter->drawLine(x - dx, y1 + 4, x - dx, y2 - 4); + pPainter->drawLine(x - dx, y2 - 4, x, y2); + // Down arrow... + pPainter->drawLine(x - dx, y2 - 8, x - dx - 2, y2 - 12); + pPainter->drawLine(x - dx, y2 - 8, x - dx + 2, y2 - 12); + } else { + pPainter->drawLine(x - dx, y1 - 4, x, y1); + pPainter->drawLine(x - dx, y1 - 4, x - dx, y2 + 4); + pPainter->drawLine(x - dx, y2 + 4, x, y2); + // Up arrow... + pPainter->drawLine(x - dx, y2 + 8, x - dx - 2, y2 + 12); + pPainter->drawLine(x - dx, y2 + 8, x - dx + 2, y2 + 12); + } +} + + +// Draw visible socket connection relation arrows. +void qjackctlPatchworkView::paintEvent ( QPaintEvent * ) +{ + if (m_pPatchbayView->OSocketList() == NULL || + m_pPatchbayView->ISocketList() == NULL) + return; + + QPainter painter(this); + int x1, y1, h1; + int x2, y2, h2; + int i, rgb[3] = { 0x99, 0x66, 0x33 }; + + // Inline adaptive to darker background themes... + if (QWidget::palette().window().color().value() < 0x7f) + for (i = 0; i < 3; ++i) rgb[i] += 0x33; + + // Initialize color changer. + i = 0; + // Almost constants. + x1 = 0; + x2 = width(); + h1 = ((m_pPatchbayView->OListView())->header())->sizeHint().height(); + h2 = ((m_pPatchbayView->IListView())->header())->sizeHint().height(); + // For each client item... + qjackctlSocketItem *pOSocket, *pISocket; + QListIterator osocket( + (m_pPatchbayView->OSocketList())->sockets()); + while (osocket.hasNext()) { + pOSocket = osocket.next(); + // Set new connector color. + ++i; + painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); + // Get starting connector arrow coordinates. + y1 = itemY(pOSocket); + // Get input socket connections... + QListIterator isocket(pOSocket->connects()); + while (isocket.hasNext()) { + pISocket = isocket.next(); + // Obviously, there is a connection from pOPlug to pIPlug items: + y2 = itemY(pISocket); + drawConnectionLine(&painter, x1, y1, x2, y2, h1, h2); + } + } + + // Look for forwarded inputs... + QList iforwards; + // Make a local copy of just the forwarding socket list, if any... + QListIterator isocket( + (m_pPatchbayView->ISocketList())->sockets()); + while (isocket.hasNext()) { + pISocket = isocket.next(); + // Check if its forwarded... + if (pISocket->forward().isEmpty()) + continue; + iforwards.append(pISocket); + } + // (Re)initialize color changer. + i = 0; + // Now traverse those for proper connection drawing... + int dx = 0; + QListIterator iter(iforwards); + while (iter.hasNext()) { + pISocket = iter.next(); + qjackctlSocketItem *pISocketForward + = m_pPatchbayView->ISocketList()->findSocket( + pISocket->forward(), pISocket->socketType()); + if (pISocketForward == NULL) + continue; + // Set new connector color. + ++i; + painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); + // Get starting connector arrow coordinates. + y1 = itemY(pISocketForward); + y2 = itemY(pISocket); + drawForwardLine(&painter, x2, dx, y1, y2, h2); + dx += 2; + } +} + + +// Context menu request event handler. +void qjackctlPatchworkView::contextMenuEvent ( + QContextMenuEvent *pContextMenuEvent ) +{ + m_pPatchbayView->contextMenu(pContextMenuEvent->globalPos(), NULL); +} + + +// Widget event slots... + +void qjackctlPatchworkView::contentsChanged (void) +{ + QWidget::update(); +} + + +//---------------------------------------------------------------------------- +// qjackctlPatchbayView -- Integrated patchbay widget. + +// Constructor. +qjackctlPatchbayView::qjackctlPatchbayView ( QWidget *pParent ) + : QSplitter(Qt::Horizontal, pParent) +{ + m_pOListView = new qjackctlSocketListView(this, true); + m_pPatchworkView = new qjackctlPatchworkView(this); + m_pIListView = new qjackctlSocketListView(this, false); + + m_pPatchbay = NULL; + + m_bBezierLines = false; + + QObject::connect(m_pOListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), + m_pPatchworkView, SLOT(contentsChanged())); + QObject::connect(m_pOListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), + m_pPatchworkView, SLOT(contentsChanged())); + QObject::connect(m_pOListView->verticalScrollBar(), SIGNAL(valueChanged(int)), + m_pPatchworkView, SLOT(contentsChanged())); +// QObject::connect(m_pOListView->header(), SIGNAL(sectionClicked(int)), +// m_pPatchworkView, SLOT(contentsChanged())); + + QObject::connect(m_pIListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), + m_pPatchworkView, SLOT(contentsChanged())); + QObject::connect(m_pIListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), + m_pPatchworkView, SLOT(contentsChanged())); + QObject::connect(m_pIListView->verticalScrollBar(), SIGNAL(valueChanged(int)), + m_pPatchworkView, SLOT(contentsChanged())); +// QObject::connect(m_pIListView->header(), SIGNAL(sectionClicked(int)), +// m_pPatchworkView, SLOT(contentsChanged())); + + m_bDirty = false; +} + + +// Default destructor. +qjackctlPatchbayView::~qjackctlPatchbayView (void) +{ +} + + +// Common context menu slot. +void qjackctlPatchbayView::contextMenu ( const QPoint& pos, + qjackctlSocketList *pSocketList ) +{ + qjackctlPatchbay *pPatchbay = binding(); + if (pPatchbay == NULL) + return; + + QMenu menu(this); + QAction *pAction; + + if (pSocketList) { + qjackctlSocketItem *pSocketItem = pSocketList->selectedSocketItem(); + bool bEnabled = (pSocketItem != NULL); + pAction = menu.addAction(QIcon(":/icons/add1.png"), + tr("Add..."), pSocketList, SLOT(addSocketItem())); + pAction = menu.addAction(QIcon(":/icons/edit1.png"), + tr("Edit..."), pSocketList, SLOT(editSocketItem())); + pAction->setEnabled(bEnabled); + pAction = menu.addAction(QIcon(":/icons/copy1.png"), + tr("Copy..."), pSocketList, SLOT(copySocketItem())); + pAction->setEnabled(bEnabled); + pAction = menu.addAction(QIcon(":/icons/remove1.png"), + tr("Remove"), pSocketList, SLOT(removeSocketItem())); + pAction->setEnabled(bEnabled); + menu.addSeparator(); + pAction = menu.addAction( + tr("Exclusive"), pSocketList, SLOT(exclusiveSocketItem())); + pAction->setCheckable(true); + pAction->setChecked(bEnabled && pSocketItem->isExclusive()); + pAction->setEnabled(bEnabled && (pSocketItem->connects().count() < 2)); + // Construct the forwarding menu, + // overriding the last one, if any... + QMenu *pForwardMenu = menu.addMenu(tr("Forward")); + // Assume sockets iteration follows item index order (0,1,2...) + // and remember that we only do this for input sockets... + int iIndex = 0; + if (pSocketItem && pSocketList == ISocketList()) { + QListIterator isocket(ISocketList()->sockets()); + while (isocket.hasNext()) { + qjackctlSocketItem *pISocket = isocket.next(); + // Must be of same type of target one... + int iSocketType = pISocket->socketType(); + if (iSocketType != pSocketItem->socketType()) + continue; + const QString& sSocketName = pISocket->socketName(); + if (pSocketItem->socketName() == sSocketName) + continue; + int iPixmap = 0; + switch (iSocketType) { + case QJACKCTL_SOCKETTYPE_JACK_AUDIO: + iPixmap = (pISocket->isExclusive() + ? QJACKCTL_XPM_AUDIO_SOCKET_X + : QJACKCTL_XPM_AUDIO_SOCKET); + break; + case QJACKCTL_SOCKETTYPE_JACK_MIDI: + case QJACKCTL_SOCKETTYPE_ALSA_MIDI: + iPixmap = (pISocket->isExclusive() + ? QJACKCTL_XPM_MIDI_SOCKET_X + : QJACKCTL_XPM_MIDI_SOCKET); + break; + } + pAction = pForwardMenu->addAction( + QIcon(ISocketList()->pixmap(iPixmap)), sSocketName); + pAction->setChecked(pSocketItem->forward() == sSocketName); + pAction->setData(iIndex); + iIndex++; + } + // Null forward always present, + // and has invalid index parameter (-1)... + if (iIndex > 0) + pForwardMenu->addSeparator(); + pAction = pForwardMenu->addAction(tr("(None)")); + pAction->setCheckable(true); + pAction->setChecked(pSocketItem->forward().isEmpty()); + pAction->setData(-1); + // We have something here... + QObject::connect(pForwardMenu, + SIGNAL(triggered(QAction*)), + SLOT(activateForwardMenu(QAction*))); + } + pForwardMenu->setEnabled(iIndex > 0); + menu.addSeparator(); + int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); + int iItemCount = (pSocketList->listView())->topLevelItemCount(); + pAction = menu.addAction(QIcon(":/icons/up1.png"), + tr("Move Up"), pSocketList, SLOT(moveUpSocketItem())); + pAction->setEnabled(bEnabled && iItem > 0); + pAction = menu.addAction(QIcon(":/icons/down1.png"), + tr("Move Down"), pSocketList, SLOT(moveDownSocketItem())); + pAction->setEnabled(bEnabled && iItem < iItemCount - 1); + menu.addSeparator(); + } + + pAction = menu.addAction(QIcon(":/icons/connect1.png"), + tr("&Connect"), pPatchbay, SLOT(connectSelected()), + tr("Alt+C", "Connect")); + pAction->setEnabled(pPatchbay->canConnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), + tr("&Disconnect"), pPatchbay, SLOT(disconnectSelected()), + tr("Alt+D", "Disconnect")); + pAction->setEnabled(pPatchbay->canDisconnectSelected()); + pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), + tr("Disconnect &All"), pPatchbay, SLOT(disconnectAll()), + tr("Alt+A", "Disconect All")); + pAction->setEnabled(pPatchbay->canDisconnectAll()); + + menu.addSeparator(); + pAction = menu.addAction(QIcon(":/icons/refresh1.png"), + tr("&Refresh"), pPatchbay, SLOT(refresh()), + tr("Alt+R", "Refresh")); + + menu.exec(pos); +} + + +// Select the forwarding socket name from context menu. +void qjackctlPatchbayView::activateForwardMenu ( QAction *pAction ) +{ + int iIndex = pAction->data().toInt(); + + // Get currently input socket (assume its nicely selected) + qjackctlSocketItem *pSocketItem = ISocketList()->selectedSocketItem(); + if (pSocketItem) { + // Check first for forward from nil... + if (iIndex < 0) { + pSocketItem->setForward(QString::null); + setDirty(true); + return; + } + // Hopefully, its a real socket about to be forwraded... + QListIterator isocket(ISocketList()->sockets()); + while (isocket.hasNext()) { + qjackctlSocketItem *pISocket = isocket.next(); + // Must be of same type of target one... + if (pISocket->socketType() != pSocketItem->socketType()) + continue; + const QString& sSocketName = pISocket->socketName(); + if (pSocketItem->socketName() == sSocketName) + continue; + if (iIndex == 0) { + pSocketItem->setForward(sSocketName); + setDirty(true); + break; + } + iIndex--; + } + } +} + + +// Patchbay binding methods. +void qjackctlPatchbayView::setBinding ( qjackctlPatchbay *pPatchbay ) +{ + m_pPatchbay = pPatchbay; +} + +qjackctlPatchbay *qjackctlPatchbayView::binding (void) const +{ + return m_pPatchbay; +} + + +// Patchbay client list accessors. +qjackctlSocketList *qjackctlPatchbayView::OSocketList (void) const +{ + if (m_pPatchbay) + return m_pPatchbay->OSocketList(); + else + return NULL; +} + +qjackctlSocketList *qjackctlPatchbayView::ISocketList (void) const +{ + if (m_pPatchbay) + return m_pPatchbay->ISocketList(); + else + return NULL; +} + + +// Patchwork line style accessors. +void qjackctlPatchbayView::setBezierLines ( bool bBezierLines ) +{ + m_bBezierLines = bBezierLines; +} + +bool qjackctlPatchbayView::isBezierLines (void) const +{ + return m_bBezierLines; +} + + +// Dirty flag methods. +void qjackctlPatchbayView::setDirty ( bool bDirty ) +{ + m_bDirty = bDirty; + if (bDirty) + emit contentsChanged(); +} + +bool qjackctlPatchbayView::dirty (void) const +{ + return m_bDirty; +} + + +//---------------------------------------------------------------------- +// qjackctlPatchbay -- Output-to-Input client/plugs connection object. +// + +// Constructor. +qjackctlPatchbay::qjackctlPatchbay ( qjackctlPatchbayView *pPatchbayView ) +{ + m_pPatchbayView = pPatchbayView; + + m_pOSocketList = new qjackctlSocketList(m_pPatchbayView->OListView(), true); + m_pISocketList = new qjackctlSocketList(m_pPatchbayView->IListView(), false); + + m_pPatchbayView->setBinding(this); +} + +// Default destructor. +qjackctlPatchbay::~qjackctlPatchbay (void) +{ + m_pPatchbayView->setBinding(NULL); + + delete m_pOSocketList; + m_pOSocketList = NULL; + + delete m_pISocketList; + m_pISocketList = NULL; + + (m_pPatchbayView->PatchworkView())->update(); +} + + +// Connection primitive. +void qjackctlPatchbay::connectSockets ( qjackctlSocketItem *pOSocket, + qjackctlSocketItem *pISocket ) +{ + if (pOSocket->findConnectPtr(pISocket) == NULL) { + pOSocket->addConnect(pISocket); + pISocket->addConnect(pOSocket); + } +} + +// Disconnection primitive. +void qjackctlPatchbay::disconnectSockets ( qjackctlSocketItem *pOSocket, + qjackctlSocketItem *pISocket ) +{ + if (pOSocket->findConnectPtr(pISocket) != NULL) { + pOSocket->removeConnect(pISocket); + pISocket->removeConnect(pOSocket); + } +} + + +// Test if selected plugs are connectable. +bool qjackctlPatchbay::canConnectSelected (void) +{ + QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + qjackctlSocketItem *pOSocket = NULL; + switch (pOItem->type()) { + case QJACKCTL_SOCKETITEM: + pOSocket = static_cast (pOItem); + break; + case QJACKCTL_PLUGITEM: + pOSocket = (static_cast (pOItem))->socket(); + break; + default: + return false; + } + + qjackctlSocketItem *pISocket = NULL; + switch (pIItem->type()) { + case QJACKCTL_SOCKETITEM: + pISocket = static_cast (pIItem); + break; + case QJACKCTL_PLUGITEM: + pISocket = (static_cast (pIItem))->socket(); + break; + default: + return false; + } + + // Sockets must be of the same type... + if (pOSocket->socketType() != pISocket->socketType()) + return false; + + // Exclusive sockets may not accept more than one cable. + if (pOSocket->isExclusive() && pOSocket->connects().count() > 0) + return false; + if (pISocket->isExclusive() && pISocket->connects().count() > 0) + return false; + + // One-to-one connection... + return (pOSocket->findConnectPtr(pISocket) == NULL); +} + + +// Connect current selected plugs. +bool qjackctlPatchbay::connectSelected (void) +{ + QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + qjackctlSocketItem *pOSocket = NULL; + switch (pOItem->type()) { + case QJACKCTL_SOCKETITEM: + pOSocket = static_cast (pOItem); + break; + case QJACKCTL_PLUGITEM: + pOSocket = (static_cast (pOItem))->socket(); + break; + default: + return false; + } + + qjackctlSocketItem *pISocket = NULL; + switch (pIItem->type()) { + case QJACKCTL_SOCKETITEM: + pISocket = static_cast (pIItem); + break; + case QJACKCTL_PLUGITEM: + pISocket = (static_cast (pIItem))->socket(); + break; + default: + return false; + } + + // Sockets must be of the same type... + if (pOSocket->socketType() != pISocket->socketType()) + return false; + + // Exclusive sockets may not accept more than one cable. + if (pOSocket->isExclusive() && pOSocket->connects().count() > 0) + return false; + if (pISocket->isExclusive() && pISocket->connects().count() > 0) + return false; + + // One-to-one connection... + connectSockets(pOSocket, pISocket); + + // Making one list dirty will take care of the rest... + m_pPatchbayView->setDirty(true); + + return true; +} + + +// Test if selected plugs are disconnectable. +bool qjackctlPatchbay::canDisconnectSelected (void) +{ + QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); + if (pOItem == NULL) + return false; + + QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); + if (pIItem == NULL) + return false; + + qjackctlSocketItem *pOSocket = NULL; + switch (pOItem->type()) { + case QJACKCTL_SOCKETITEM: + pOSocket = static_cast (pOItem); + break; + case QJACKCTL_PLUGITEM: + pOSocket = (static_cast (pOItem))->socket(); + break; + default: + return false; + } + + qjackctlSocketItem *pISocket = NULL; + switch (pIItem->type()) { + case QJACKCTL_SOCKETITEM: + pISocket = static_cast (pIItem); + break; + case QJACKCTL_PLUGITEM: + pISocket = (static_cast (pIItem))->socket(); + break; + default: + return false; + } + + // Sockets must be of the same type... + if (pOSocket->socketType() != pISocket->socketType()) + return false; + + return (pOSocket->findConnectPtr(pISocket) != 0); +} + + +// Disconnect current selected plugs. +bool qjackctlPatchbay::disconnectSelected (void) +{ + QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); + if (!pOItem) + return false; + + QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); + if (!pIItem) + return false; + + qjackctlSocketItem *pOSocket = NULL; + switch (pOItem->type()) { + case QJACKCTL_SOCKETITEM: + pOSocket = static_cast (pOItem); + break; + case QJACKCTL_PLUGITEM: + pOSocket = (static_cast (pOItem))->socket(); + break; + default: + return false; + } + + qjackctlSocketItem *pISocket = NULL; + switch (pIItem->type()) { + case QJACKCTL_SOCKETITEM: + pISocket = static_cast (pIItem); + break; + case QJACKCTL_PLUGITEM: + pISocket = (static_cast (pIItem))->socket(); + break; + default: + return false; + } + + // Sockets must be of the same type... + if (pOSocket->socketType() != pISocket->socketType()) + return false; + + // One-to-one disconnection... + disconnectSockets(pOSocket, pISocket); + + // Making one list dirty will take care of the rest... + m_pPatchbayView->setDirty(true); + + return true; +} + + +// Test if any plug is disconnectable. +bool qjackctlPatchbay::canDisconnectAll (void) +{ + QListIterator osocket(m_pOSocketList->sockets()); + while (osocket.hasNext()) { + qjackctlSocketItem *pOSocket = osocket.next(); + if (pOSocket->connects().count() > 0) + return true; + } + + return false; +} + + +// Disconnect all plugs. +bool qjackctlPatchbay::disconnectAll (void) +{ + if (QMessageBox::warning(m_pPatchbayView, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("This will disconnect all sockets.\n\n" + "Are you sure?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + return false; + } + + QListIterator osocket(m_pOSocketList->sockets()); + while (osocket.hasNext()) { + qjackctlSocketItem *pOSocket = osocket.next(); + QListIterator isocket(pOSocket->connects()); + while (isocket.hasNext()) + disconnectSockets(pOSocket, isocket.next()); + } + + // Making one list dirty will take care of the rest... + m_pPatchbayView->setDirty(true); + + return true; +} + + + +// Complete contents rebuilder. +void qjackctlPatchbay::refresh (void) +{ + (m_pOSocketList->listView())->update(); + (m_pISocketList->listView())->update(); + (m_pPatchbayView->PatchworkView())->update(); +} + + +// Complete contents clearer. +void qjackctlPatchbay::clear (void) +{ + // Clear socket lists. + m_pOSocketList->clear(); + m_pISocketList->clear(); + + // Reset dirty flag. + m_pPatchbayView->setDirty(false); + + // May refresh everything. + refresh(); +} + + +// Patchbay client list accessors. +qjackctlSocketList *qjackctlPatchbay::OSocketList (void) const +{ + return m_pOSocketList; +} + +qjackctlSocketList *qjackctlPatchbay::ISocketList (void) const +{ + return m_pISocketList; +} + + +// External rack transfer method: copy patchbay structure from master rack model. +void qjackctlPatchbay::loadRackSockets ( qjackctlSocketList *pSocketList, + QList& socketlist ) +{ + pSocketList->clear(); + qjackctlSocketItem *pSocketItem = NULL; + + QListIterator sockit(socketlist); + while (sockit.hasNext()) { + qjackctlPatchbaySocket *pSocket = sockit.next(); + pSocketItem = new qjackctlSocketItem(pSocketList, pSocket->name(), + pSocket->clientName(), pSocket->type(), pSocketItem); + if (pSocketItem) { + pSocketItem->setExclusive(pSocket->isExclusive()); + pSocketItem->setForward(pSocket->forward()); + pSocketItem->updatePixmap(); + qjackctlPlugItem *pPlugItem = NULL; + QStringListIterator iter(pSocket->pluglist()); + while (iter.hasNext()) { + pPlugItem = new qjackctlPlugItem( + pSocketItem, iter.next(), pPlugItem); + } + } + } +} + +void qjackctlPatchbay::loadRack ( qjackctlPatchbayRack *pPatchbayRack ) +{ + (m_pOSocketList->listView())->setUpdatesEnabled(false); + (m_pISocketList->listView())->setUpdatesEnabled(false); + + // Load ouput sockets. + loadRackSockets(m_pOSocketList, pPatchbayRack->osocketlist()); + + // Load input sockets. + loadRackSockets(m_pISocketList, pPatchbayRack->isocketlist()); + + // Now ready to load from cable model. + QListIterator iter(pPatchbayRack->cablelist()); + while (iter.hasNext()) { + qjackctlPatchbayCable *pCable = iter.next(); + // Get proper sockets... + qjackctlPatchbaySocket *pOSocket = pCable->outputSocket(); + qjackctlPatchbaySocket *pISocket = pCable->inputSocket(); + if (pOSocket && pISocket) { + qjackctlSocketItem *pOSocketItem + = m_pOSocketList->findSocket(pOSocket->name(), pOSocket->type()); + qjackctlSocketItem *pISocketItem + = m_pISocketList->findSocket(pISocket->name(), pISocket->type()); + if (pOSocketItem && pISocketItem) + connectSockets(pOSocketItem, pISocketItem); + } + } + + (m_pOSocketList->listView())->setUpdatesEnabled(true); + (m_pISocketList->listView())->setUpdatesEnabled(true); + + (m_pOSocketList->listView())->update(); + (m_pISocketList->listView())->update(); + (m_pPatchbayView->PatchworkView())->update(); + + // Reset dirty flag. + m_pPatchbayView->setDirty(false); +} + +// External rack transfer method: copy patchbay structure into master rack model. +void qjackctlPatchbay::saveRackSockets ( qjackctlSocketList *pSocketList, + QList& socketlist ) +{ + // Have QTreeWidget item order into account: + qjackctlSocketListView *pListView = pSocketList->listView(); + if (pListView == NULL) + return; + + socketlist.clear(); + + int iItemCount = pListView->topLevelItemCount(); + for (int iItem = 0; iItem < iItemCount; ++iItem) { + QTreeWidgetItem *pItem = pListView->topLevelItem(iItem); + if (pItem->type() != QJACKCTL_SOCKETITEM) + continue; + qjackctlSocketItem *pSocketItem + = static_cast (pItem); + if (pSocketItem == NULL) + continue; + qjackctlPatchbaySocket *pSocket + = new qjackctlPatchbaySocket(pSocketItem->socketName(), + pSocketItem->clientName(), pSocketItem->socketType()); + if (pSocket) { + pSocket->setExclusive(pSocketItem->isExclusive()); + pSocket->setForward(pSocketItem->forward()); + QListIterator iter(pSocketItem->plugs()); + while (iter.hasNext()) + pSocket->pluglist().append((iter.next())->plugName()); + socketlist.append(pSocket); + } + } +} + +void qjackctlPatchbay::saveRack ( qjackctlPatchbayRack *pPatchbayRack ) +{ + // Save ouput sockets. + saveRackSockets(m_pOSocketList, pPatchbayRack->osocketlist()); + + // Save input sockets. + saveRackSockets(m_pISocketList, pPatchbayRack->isocketlist()); + + // Now ready to save into cable model. + pPatchbayRack->cablelist().clear(); + + // Start from output sockets... + QListIterator osocket(m_pOSocketList->sockets()); + while (osocket.hasNext()) { + qjackctlSocketItem *pOSocketItem = osocket.next(); + // Then to input sockets... + QListIterator isocket(pOSocketItem->connects()); + while (isocket.hasNext()) { + qjackctlSocketItem *pISocketItem = isocket.next(); + // Now find proper racked sockets... + qjackctlPatchbaySocket *pOSocket = pPatchbayRack->findSocket( + pPatchbayRack->osocketlist(), pOSocketItem->socketName()); + qjackctlPatchbaySocket *pISocket = pPatchbayRack->findSocket( + pPatchbayRack->isocketlist(), pISocketItem->socketName()); + if (pOSocket && pISocket) { + pPatchbayRack->addCable( + new qjackctlPatchbayCable(pOSocket, pISocket)); + } + } + } + + // Reset dirty flag. + m_pPatchbayView->setDirty(false); +} + + +// JACK client property accessors. +void qjackctlPatchbay::setJackClient ( jack_client_t *pJackClient ) +{ + m_pOSocketList->setJackClient(pJackClient); + m_pISocketList->setJackClient(pJackClient); +} + +jack_client_t *qjackctlPatchbay::jackClient (void) const +{ + return m_pOSocketList->jackClient(); +} + +// ALSA sequencer property accessors. +void qjackctlPatchbay::setAlsaSeq ( snd_seq_t *pAlsaSeq ) +{ + m_pOSocketList->setAlsaSeq(pAlsaSeq); + m_pISocketList->setAlsaSeq(pAlsaSeq); +} + +snd_seq_t *qjackctlPatchbay::alsaSeq (void) const +{ + return m_pOSocketList->alsaSeq(); +} + + +// Connections snapshot. +void qjackctlPatchbay::connectionsSnapshot (void) +{ + qjackctlPatchbayRack rack; + rack.connectJackSnapshot(jackClient()); + rack.connectAlsaSnapshot(alsaSeq()); + loadRack(&rack); + + // Set dirty flag. + m_pPatchbayView->setDirty(true); +} + + +// end of qjackctlPatchbay.cpp diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayFile.cpp qjackctl-0.3.6/src/qjackctlPatchbayFile.cpp --- qjackctl-0.3.4/src/qjackctlPatchbayFile.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayFile.cpp 2008-04-27 17:43:18.000000000 +0100 @@ -0,0 +1,292 @@ +// qjackctlPatchbayFile.cpp +// +/**************************************************************************** + Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlPatchbayFile.h" + +#include +#include +#include + + +//---------------------------------------------------------------------- +// Specific patchbay socket list save (write) subroutine. +static void load_socketlist ( QList& socketlist, + QDomElement& eSockets ) +{ + for (QDomNode nSocket = eSockets.firstChild(); + !nSocket.isNull(); + nSocket = nSocket.nextSibling()) { + // Convert slot node to element... + QDomElement eSocket = nSocket.toElement(); + if (eSocket.isNull()) + continue; + if (eSocket.tagName() == "socket") { + QString sSocketName = eSocket.attribute("name"); + QString sClientName = eSocket.attribute("client"); + QString sSocketType = eSocket.attribute("type"); + QString sExclusive = eSocket.attribute("exclusive"); + QString sSocketForward = eSocket.attribute("forward"); + int iSocketType = QJACKCTL_SOCKETTYPE_JACK_AUDIO; + if (sSocketType == "midi" || sSocketType == "alsa-midi") + iSocketType = QJACKCTL_SOCKETTYPE_ALSA_MIDI; + else + if (sSocketType == "jack-midi") + iSocketType = QJACKCTL_SOCKETTYPE_JACK_MIDI; + bool bExclusive = (sExclusive == "on" || sExclusive == "yes" || sExclusive == "1"); + qjackctlPatchbaySocket *pSocket + = new qjackctlPatchbaySocket(sSocketName, sClientName, iSocketType); + if (pSocket) { + pSocket->setExclusive(bExclusive); + pSocket->setForward(sSocketForward); + // Now's time to handle pluglist... + for (QDomNode nPlug = eSocket.firstChild(); + !nPlug.isNull(); + nPlug = nPlug.nextSibling()) { + // Convert plug node to element... + QDomElement ePlug = nPlug.toElement(); + if (ePlug.isNull()) + continue; + if (ePlug.tagName() == "plug") + pSocket->addPlug(ePlug.text()); + } + socketlist.append(pSocket); + } + } + } +} + + +//---------------------------------------------------------------------- +// Specific patchbay socket list save (write) subroutine. +static void save_socketlist ( QList& socketlist, + QDomElement& eSockets, QDomDocument& doc ) +{ + QListIterator sockit(socketlist); + while (sockit.hasNext()) { + qjackctlPatchbaySocket *pSocket = sockit.next(); + QDomElement eSocket = doc.createElement("socket"); + eSocket.setAttribute("name", pSocket->name()); + eSocket.setAttribute("client", pSocket->clientName()); + QString sSocketType = "audio"; // FIXME: "jack-audio" + if (pSocket->type() == QJACKCTL_SOCKETTYPE_ALSA_MIDI) + sSocketType = "midi"; // FIXME: "alsa-midi" + else + if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) + sSocketType = "jack-midi"; + eSocket.setAttribute("type", sSocketType); + eSocket.setAttribute("exclusive", (pSocket->isExclusive() ? "on" : "off")); + if (!pSocket->forward().isEmpty()) + eSocket.setAttribute("forward", pSocket->forward()); + QDomElement ePlug; + QStringListIterator iter(pSocket->pluglist()); + while (iter.hasNext()) { + const QString& sPlug = iter.next(); + QDomElement ePlug = doc.createElement("plug"); + QDomText text = doc.createTextNode(sPlug); + ePlug.appendChild(text); + eSocket.appendChild(ePlug); + } + eSockets.appendChild(eSocket); + } +} + + +//---------------------------------------------------------------------- +// class qjackctlPatchbayFile -- Patchbay file helper implementation. +// + +// Specific patchbay load (read) method. +bool qjackctlPatchbayFile::load ( qjackctlPatchbayRack *pPatchbay, + const QString& sFilename ) +{ + // Open file... + QFile file(sFilename); + if (!file.open(QIODevice::ReadOnly)) + return false; + // Parse it a-la-DOM :-) + QDomDocument doc("patchbay"); + if (!doc.setContent(&file)) { + file.close(); + return false; + } + file.close(); + + // Now e're better reset any old patchbay settings. + pPatchbay->clear(); + + // Get root element. + QDomElement eDoc = doc.documentElement(); + + // Now parse for slots, sockets and cables... + for (QDomNode nRoot = eDoc.firstChild(); + !nRoot.isNull(); + nRoot = nRoot.nextSibling()) { + + // Convert node to element, if any. + QDomElement eRoot = nRoot.toElement(); + if (eRoot.isNull()) + continue; + + // Check for output-socket spec lists... + if (eRoot.tagName() == "output-sockets") + load_socketlist(pPatchbay->osocketlist(), eRoot); + else + // Check for input-socket spec lists... + if (eRoot.tagName() == "input-sockets") + load_socketlist(pPatchbay->isocketlist(), eRoot); + else + // Check for slots spec list... + if (eRoot.tagName() == "slots") { + for (QDomNode nSlot = eRoot.firstChild(); + !nSlot.isNull(); + nSlot = nSlot.nextSibling()) { + // Convert slot node to element... + QDomElement eSlot = nSlot.toElement(); + if (eSlot.isNull()) + continue; + if (eSlot.tagName() == "slot") { + QString sSlotName = eSlot.attribute("name"); + QString sSlotMode = eSlot.attribute("mode"); + int iSlotMode = QJACKCTL_SLOTMODE_OPEN; + if (sSlotMode == "half") + iSlotMode = QJACKCTL_SLOTMODE_HALF; + else if (sSlotMode == "full") + iSlotMode = QJACKCTL_SLOTMODE_FULL; + qjackctlPatchbaySlot *pSlot + = new qjackctlPatchbaySlot(sSlotName, iSlotMode); + pSlot->setOutputSocket( + pPatchbay->findSocket(pPatchbay->osocketlist(), + eSlot.attribute("output"))); + pSlot->setInputSocket( + pPatchbay->findSocket(pPatchbay->isocketlist(), + eSlot.attribute("input"))); + pPatchbay->addSlot(pSlot); + } + } + } + else + // Check for cable spec list... + if (eRoot.tagName() == "cables") { + for (QDomNode nCable = eRoot.firstChild(); + !nCable.isNull(); + nCable = nCable.nextSibling()) { + // Convert cable node to element... + QDomElement eCable = nCable.toElement(); + if (eCable.isNull()) + continue; + if (eCable.tagName() == "cable") { + qjackctlPatchbaySocket *pOutputSocket + = pPatchbay->findSocket(pPatchbay->osocketlist(), + eCable.attribute("output")); + qjackctlPatchbaySocket *pIntputSocket + = pPatchbay->findSocket(pPatchbay->isocketlist(), + eCable.attribute("input")); + if (pOutputSocket && pIntputSocket) { + pPatchbay->addCable( + new qjackctlPatchbayCable( + pOutputSocket, + pIntputSocket)); + } + } + } + } + } + + return true; +} + + +// Specific patchbay save (write) method. +bool qjackctlPatchbayFile::save ( qjackctlPatchbayRack *pPatchbay, + const QString& sFilename ) +{ + QFileInfo fi(sFilename); + + QDomDocument doc("patchbay"); + QDomElement eRoot = doc.createElement("patchbay"); + eRoot.setAttribute("name", fi.baseName()); + eRoot.setAttribute("version", QJACKCTL_VERSION); + doc.appendChild(eRoot); + + // Save output-sockets spec... + QDomElement eOutputSockets = doc.createElement("output-sockets"); + save_socketlist(pPatchbay->osocketlist(), eOutputSockets, doc); + eRoot.appendChild(eOutputSockets); + + // Save input-sockets spec... + QDomElement eInputSockets = doc.createElement("input-sockets"); + save_socketlist(pPatchbay->isocketlist(), eInputSockets, doc); + eRoot.appendChild(eInputSockets); + + // Save slots spec... + QDomElement eSlots = doc.createElement("slots"); + QListIterator slotit(pPatchbay->slotlist()); + while (slotit.hasNext()) { + qjackctlPatchbaySlot *pSlot = slotit.next(); + QDomElement eSlot = doc.createElement("slot"); + eSlot.setAttribute("name", pSlot->name()); + QString sSlotMode = "open"; + switch (pSlot->mode()) { + case QJACKCTL_SLOTMODE_HALF: + sSlotMode = "half"; + break; + case QJACKCTL_SLOTMODE_FULL: + sSlotMode = "full"; + break; + } + eSlot.setAttribute("mode", sSlotMode); + if (pSlot->outputSocket()) + eSlot.setAttribute("output", pSlot->outputSocket()->name()); + if (pSlot->inputSocket()) + eSlot.setAttribute("input", pSlot->inputSocket()->name()); + // Add this slot... + eSlots.appendChild(eSlot); + } + eRoot.appendChild(eSlots); + + // Save cables spec... + QDomElement eCables = doc.createElement("cables"); + QListIterator cablit(pPatchbay->cablelist()); + while (cablit.hasNext()) { + qjackctlPatchbayCable *pCable = cablit.next(); + if (pCable->outputSocket() && pCable->inputSocket()) { + QDomElement eCable = doc.createElement("cable"); + eCable.setAttribute("output", pCable->outputSocket()->name()); + eCable.setAttribute("input", pCable->inputSocket()->name()); + eCables.appendChild(eCable); + } + } + eRoot.appendChild(eCables); + + // Finally, we're ready to save to external file. + QFile file(sFilename); + if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) + return false; + QTextStream ts(&file); + ts << doc.toString() << endl; + file.close(); + + return true; +} + + +// qjackctlPatchbayFile.cpp diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayFile.h qjackctl-0.3.6/src/qjackctlPatchbayFile.h --- qjackctl-0.3.4/src/qjackctlPatchbayFile.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayFile.h 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,43 @@ +// qjackctlPatchbayFile.h +// +/**************************************************************************** + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlPatchbayFile_h +#define __qjackctlPatchbayFile_h + +#include "qjackctlPatchbayRack.h" + + +// Patchbay XML definition. +class qjackctlPatchbayFile +{ +public: + + // Simple patchbay I/O methods. + static bool load (qjackctlPatchbayRack *pPatchbay, + const QString& sFilename); + static bool save (qjackctlPatchbayRack *pPatchbay, + const QString& sFilename); +}; + + +#endif // __qjackctlPatchbayFile_h + +// qjackctlPatchbayFile.h diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayFile.txt qjackctl-0.3.6/src/qjackctlPatchbayFile.txt --- qjackctl-0.3.4/src/qjackctlPatchbayFile.txt 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayFile.txt 2008-04-27 17:43:18.000000000 +0100 @@ -0,0 +1,52 @@ +qjackctlPatchbayFile format specification +----------------------------------------- + + + + + + plug-name + . + . + . + + . + . + . + + + + plug-name + . + . + . + + . + . + . + +# +# +# . +# . +# . +# + + + . + . + . + + + + + patchbay-name := string-literal + patchbay-version := string-literal + socket-name := string-literal + socket-type := "audio" | "midi" | "jack-audio" | "jack-midi" | "alsa-midi" +# slot-name := string-literal +# slot-mode := "open" | "half" | "full" + client-name := string-regexp (JACK/ALSA client name) + plug-name := string-regexp (JACK/ALSA port name) + exclusive-flag := "on" | "off" | "yes" | "no" | "1" | "0" + diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayForm.cpp qjackctl-0.3.6/src/qjackctlPatchbayForm.cpp --- qjackctl-0.3.4/src/qjackctlPatchbayForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayForm.cpp 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,742 @@ +// qjackctlPatchbayForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlPatchbayForm.h" + +#include "qjackctlPatchbayFile.h" +#include "qjackctlSetup.h" + +#include "qjackctlMainForm.h" +#include "qjackctlSocketForm.h" + +#include +#include +#include +#include + +#include +#include + + +//---------------------------------------------------------------------------- +// qjackctlPatchbayForm -- UI wrapper form. + +// Constructor. +qjackctlPatchbayForm::qjackctlPatchbayForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QWidget(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + m_pSetup = NULL; + + // Create the patchbay view object. + m_pPatchbay = new qjackctlPatchbay(m_ui.PatchbayView); + m_iUntitled = 0; + + m_bActivePatchbay = false; + + m_iUpdate = 0; + + // UI connections... + + QObject::connect(m_ui.NewPatchbayPushButton, + SIGNAL(clicked()), + SLOT(newPatchbay())); + QObject::connect(m_ui.LoadPatchbayPushButton, + SIGNAL(clicked()), + SLOT(loadPatchbay())); + QObject::connect(m_ui.SavePatchbayPushButton, + SIGNAL(clicked()), + SLOT(savePatchbay())); + QObject::connect(m_ui.PatchbayComboBox, + SIGNAL(activated(int)), + SLOT(selectPatchbay(int))); + QObject::connect(m_ui.ActivatePatchbayPushButton, + SIGNAL(clicked()), + SLOT(toggleActivePatchbay())); + + QObject::connect(m_ui.OSocketAddPushButton, + SIGNAL(clicked()), + SLOT(addOSocket())); + QObject::connect(m_ui.OSocketEditPushButton, + SIGNAL(clicked()), + SLOT(editOSocket())); + QObject::connect(m_ui.OSocketCopyPushButton, + SIGNAL(clicked()), + SLOT(copyOSocket())); + QObject::connect(m_ui.OSocketRemovePushButton, + SIGNAL(clicked()), + SLOT(removeOSocket())); + QObject::connect(m_ui.OSocketMoveUpPushButton, + SIGNAL(clicked()), + SLOT(moveUpOSocket())); + QObject::connect(m_ui.OSocketMoveDownPushButton, + SIGNAL(clicked()), + SLOT(moveDownOSocket())); + + QObject::connect(m_ui.ISocketAddPushButton, + SIGNAL(clicked()), + SLOT(addISocket())); + QObject::connect(m_ui.ISocketEditPushButton, + SIGNAL(clicked()), + SLOT(editISocket())); + QObject::connect(m_ui.ISocketCopyPushButton, + SIGNAL(clicked()), + SLOT(copyISocket())); + QObject::connect(m_ui.ISocketRemovePushButton, + SIGNAL(clicked()), + SLOT(removeISocket())); + QObject::connect(m_ui.ISocketMoveUpPushButton, + SIGNAL(clicked()), + SLOT(moveUpISocket())); + QObject::connect(m_ui.ISocketMoveDownPushButton, + SIGNAL(clicked()), + SLOT(moveDownISocket())); + + QObject::connect(m_ui.ConnectPushButton, + SIGNAL(clicked()), + SLOT(connectSelected())); + QObject::connect(m_ui.DisconnectPushButton, + SIGNAL(clicked()), + SLOT(disconnectSelected())); + QObject::connect(m_ui.DisconnectAllPushButton, + SIGNAL(clicked()), + SLOT(disconnectAll())); + + QObject::connect(m_ui.RefreshPushButton, + SIGNAL(clicked()), + SLOT(refreshForm())); + + // Connect it to some UI feedback slot. + QObject::connect(m_ui.PatchbayView->OListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(stabilizeForm())); + QObject::connect(m_ui.PatchbayView->IListView(), + SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + SLOT(stabilizeForm())); + + // Dirty patchbay dispatcher (stabilization deferral). + QObject::connect(m_ui.PatchbayView, + SIGNAL(contentsChanged()), + SLOT(contentsChanged())); + + newPatchbayFile(false); + stabilizeForm(); +} + + +// Destructor. +qjackctlPatchbayForm::~qjackctlPatchbayForm (void) +{ + // May delete the patchbay view object. + delete m_pPatchbay; +} + + +// Notify our parent that we're emerging. +void qjackctlPatchbayForm::showEvent ( QShowEvent *pShowEvent ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); + + stabilizeForm(); + + QWidget::showEvent(pShowEvent); +} + +// Notify our parent that we're closing. +void qjackctlPatchbayForm::hideEvent ( QHideEvent *pHideEvent ) +{ + QWidget::hideEvent(pHideEvent); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + +// Just about to notify main-window that we're closing. +void qjackctlPatchbayForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) +{ + QWidget::hide(); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + + +// Set reference to global options, mostly needed for the +// initial sizes of the main splitter views... +void qjackctlPatchbayForm::setup ( qjackctlSetup *pSetup ) +{ + m_pSetup = pSetup; + + // Load main splitter sizes... + if (m_pSetup) { + QList sizes; + sizes.append(180); + sizes.append(60); + sizes.append(180); + m_pSetup->loadSplitterSizes(m_ui.PatchbayView, sizes); + } +} + + +// Patchbay view accessor. +qjackctlPatchbayView *qjackctlPatchbayForm::patchbayView (void) const +{ + return m_ui.PatchbayView; +} + + +// Window close event handlers. +bool qjackctlPatchbayForm::queryClose (void) +{ + bool bQueryClose = true; + + if (m_ui.PatchbayView->dirty()) { + switch (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("The patchbay definition has been changed:\n\n" + "\"%1\"\n\nDo you want to save the changes?") + .arg(m_sPatchbayName), + QMessageBox::Save | + QMessageBox::Discard | + QMessageBox::Cancel)) { + case QMessageBox::Save: + savePatchbay(); + // Fall thru.... + case QMessageBox::Discard: + break; + default: // Cancel. + bQueryClose = false; + } + } + + // Save main splitter sizes... + if (m_pSetup && bQueryClose) + m_pSetup->saveSplitterSizes(m_ui.PatchbayView); + + return bQueryClose; +} + + +// Contents change deferrer slot... +void qjackctlPatchbayForm::contentsChanged (void) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->refreshPatchbay(); +} + + +// Refresh complete form. +void qjackctlPatchbayForm::refreshForm ( void ) +{ + m_pPatchbay->refresh(); + stabilizeForm(); +} + + +// A helper stabilization slot. +void qjackctlPatchbayForm::stabilizeForm ( void ) +{ + m_ui.SavePatchbayPushButton->setEnabled(m_ui.PatchbayView->dirty()); + m_ui.ActivatePatchbayPushButton->setEnabled( + QFileInfo(m_sPatchbayPath).exists()); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + m_bActivePatchbay = (pMainForm + && pMainForm->isActivePatchbay(m_sPatchbayPath)); + m_ui.ActivatePatchbayPushButton->setChecked(m_bActivePatchbay); + + if (m_ui.PatchbayView->dirty()) { + m_ui.PatchbayComboBox->setItemText( + m_ui.PatchbayComboBox->currentIndex(), + tr("%1 [modified]").arg(m_sPatchbayName)); + } + + // Take care that IT might be destroyed already... + if (m_ui.PatchbayView->binding() == NULL) + return; + + qjackctlSocketList *pSocketList; + qjackctlSocketItem *pSocketItem; + + pSocketList = m_pPatchbay->OSocketList(); + pSocketItem = pSocketList->selectedSocketItem(); + if (pSocketItem) { + int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); + int iItemCount = (pSocketList->listView())->topLevelItemCount(); + m_ui.OSocketEditPushButton->setEnabled(true); + m_ui.OSocketCopyPushButton->setEnabled(true); + m_ui.OSocketRemovePushButton->setEnabled(true); + m_ui.OSocketMoveUpPushButton->setEnabled(iItem > 0); + m_ui.OSocketMoveDownPushButton->setEnabled(iItem < iItemCount - 1); + } else { + m_ui.OSocketEditPushButton->setEnabled(false); + m_ui.OSocketCopyPushButton->setEnabled(false); + m_ui.OSocketRemovePushButton->setEnabled(false); + m_ui.OSocketMoveUpPushButton->setEnabled(false); + m_ui.OSocketMoveDownPushButton->setEnabled(false); + } + + pSocketList = m_pPatchbay->ISocketList(); + pSocketItem = pSocketList->selectedSocketItem(); + if (pSocketItem) { + int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); + int iItemCount = (pSocketList->listView())->topLevelItemCount(); + m_ui.ISocketEditPushButton->setEnabled(true); + m_ui.ISocketCopyPushButton->setEnabled(true); + m_ui.ISocketRemovePushButton->setEnabled(true); + m_ui.ISocketMoveUpPushButton->setEnabled(iItem > 0); + m_ui.ISocketMoveDownPushButton->setEnabled(iItem < iItemCount - 1); + } else { + m_ui.ISocketEditPushButton->setEnabled(false); + m_ui.ISocketCopyPushButton->setEnabled(false); + m_ui.ISocketRemovePushButton->setEnabled(false); + m_ui.ISocketMoveUpPushButton->setEnabled(false); + m_ui.ISocketMoveDownPushButton->setEnabled(false); + } + + m_ui.ConnectPushButton->setEnabled( + m_pPatchbay->canConnectSelected()); + m_ui.DisconnectPushButton->setEnabled( + m_pPatchbay->canDisconnectSelected()); + m_ui.DisconnectAllPushButton->setEnabled( + m_pPatchbay->canDisconnectAll()); +} + + +// Patchbay path accessor. +const QString& qjackctlPatchbayForm::patchbayPath (void) const +{ + return m_sPatchbayPath; +} + + +// Reset patchbay definition from scratch. +void qjackctlPatchbayForm::newPatchbayFile ( bool bSnapshot ) +{ + m_pPatchbay->clear(); + m_sPatchbayPath.clear(); + m_sPatchbayName = tr("Untitled%1").arg(m_iUntitled++); + if (bSnapshot) + m_pPatchbay->connectionsSnapshot(); +// updateRecentPatchbays(); +} + + +// Load patchbay definitions from specific file path. +bool qjackctlPatchbayForm::loadPatchbayFile ( const QString& sFileName ) +{ + // Check if we're going to discard safely the current one... + if (!queryClose()) + return false; + + // We'll have a temporary rack... + qjackctlPatchbayRack rack; + // Step 1: load from file... + if (!qjackctlPatchbayFile::load(&rack, sFileName)) { + QMessageBox::critical(this, + tr("Error") + " - " QJACKCTL_SUBTITLE1, + tr("Could not load patchbay definition file: \n\n\"%1\"") + .arg(sFileName), + QMessageBox::Cancel); + // Reset/disable further trials. + m_sPatchbayPath.clear(); + return false; + } + // Step 2: load from rack... + m_pPatchbay->loadRack(&rack); + + // Step 3: stabilize form... + m_sPatchbayPath = sFileName; + m_sPatchbayName = QFileInfo(sFileName).completeBaseName(); +// updateRecentPatchbays(); + + return true; +} + + +// Save current patchbay definition to specific file path. +bool qjackctlPatchbayForm::savePatchbayFile ( const QString& sFileName ) +{ + // We'll have a temporary rack... + qjackctlPatchbayRack rack; + // Step 1: save to rack... + m_pPatchbay->saveRack(&rack); + // Step 2: save to file... + if (!qjackctlPatchbayFile::save(&rack, sFileName)) { + QMessageBox::critical(this, + tr("Error") + " - " QJACKCTL_SUBTITLE1, + tr("Could not save patchbay definition file: \n\n\"%1\"") + .arg(sFileName), + QMessageBox::Cancel); + return false; + } + // Step 3: stabilize form... + m_sPatchbayPath = sFileName; + m_sPatchbayName = QFileInfo(sFileName).completeBaseName(); +// updateRecentPatchbays(); + + // Step 4: notify main form if applicable ... + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + m_bActivePatchbay = (pMainForm + && pMainForm->isActivePatchbay(m_sPatchbayPath)); + if (m_bActivePatchbay) + pMainForm->updateActivePatchbay(); + + return true; +} + + +// Dirty-(re)load patchbay definitions from know rack. +void qjackctlPatchbayForm::loadPatchbayRack ( qjackctlPatchbayRack *pRack ) +{ + // Step 1: load from rack... + m_pPatchbay->loadRack(pRack); + + // Override dirty flag. + m_ui.PatchbayView->setDirty(true); + + // Done. + stabilizeForm(); +} + + +// Create a new patchbay definition from scratch. +void qjackctlPatchbayForm::newPatchbay (void) +{ + // Assume a snapshot from scratch... + bool bSnapshot = false; + + // Ask user what he/she wants to do... + if (m_pPatchbay->jackClient() || m_pPatchbay->alsaSeq()) { + switch (QMessageBox::information(this, + tr("New Patchbay definition") + " - " QJACKCTL_SUBTITLE1, + tr("Create patchbay definition as a snapshot\n" + "of all actual client connections?"), + QMessageBox::Yes | + QMessageBox::No | + QMessageBox::Cancel)) { + case QMessageBox::Yes: + bSnapshot = true; + break; + case QMessageBox::No: + bSnapshot = false; + break; + default: // Cancel. + return; + } + } + + // Check if we can discard safely the current one... + if (!queryClose()) + return; + + // Reset patchbay editor. + newPatchbayFile(bSnapshot); + updateRecentPatchbays(); + stabilizeForm(); +} + + +// Load patchbay definitions from file. +void qjackctlPatchbayForm::loadPatchbay (void) +{ + QString sFileName = QFileDialog::getOpenFileName( + this, tr("Load Patchbay Definition"), // Parent & Caption. + m_sPatchbayPath, // Start here. + tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) + ); + + if (sFileName.isEmpty()) + return; + + // Load it right away. + if (loadPatchbayFile(sFileName)) + updateRecentPatchbays(); + + stabilizeForm(); +} + + +// Save current patchbay definition to file. +void qjackctlPatchbayForm::savePatchbay (void) +{ + QString sFileName = QFileDialog::getSaveFileName( + this, tr("Save Patchbay Definition"), // Parent & Caption. + m_sPatchbayPath, // Start here. + tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) + ); + + if (sFileName.isEmpty()) + return; + + // Enforce .xml extension... + if (QFileInfo(sFileName).suffix().isEmpty()) + sFileName += ".xml"; + + // Save it right away. + if (savePatchbayFile(sFileName)) + updateRecentPatchbays(); + + stabilizeForm(); +} + + +// A new patchbay has been selected +void qjackctlPatchbayForm::selectPatchbay ( int iPatchbay ) +{ + + // Remember and avoid reloading the previous (first) selected one. + if (iPatchbay > 0) { + // Take care whether the first is untitled, and + // thus not present in the recenet ptachbays list + if (m_sPatchbayPath.isEmpty()) + iPatchbay--; + if (iPatchbay >= 0 && iPatchbay < m_recentPatchbays.count()) { + // If we cannot load the new one, backout... + loadPatchbayFile(m_recentPatchbays[iPatchbay]); + updateRecentPatchbays(); + } + } + + stabilizeForm(); +} + + +// Set current active patchbay definition file. +void qjackctlPatchbayForm::toggleActivePatchbay (void) +{ + // Check if we're going to discard safely the current one... + if (!queryClose()) + return; + + // Activate it... + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) { + pMainForm->setActivePatchbay( + m_bActivePatchbay ? QString::null : m_sPatchbayPath); + } + + // Need to force/refresh the patchbay list... + updateRecentPatchbays(); + stabilizeForm(); +} + + +// Set/initialize the MRU patchbay list. +void qjackctlPatchbayForm::setRecentPatchbays ( const QStringList& patchbays ) +{ + m_recentPatchbays = patchbays; +} + + +// Update patchbay MRU variables and widgets. +void qjackctlPatchbayForm::updateRecentPatchbays (void) +{ + // TRye not to be reeentrant. + if (m_iUpdate > 0) + return; + + m_iUpdate++; + + // Update the visible combobox... + const QIcon icon(":/icons/patchbay1.png"); + m_ui.PatchbayComboBox->clear(); + + if (m_sPatchbayPath.isEmpty()) { + // Display a probable untitled patchbay... + m_ui.PatchbayComboBox->addItem(icon, m_sPatchbayName); + } else { + // Remove from list if already there (avoid duplicates)... + int iIndex = m_recentPatchbays.indexOf(m_sPatchbayPath); + if (iIndex >= 0) + m_recentPatchbays.removeAt(iIndex); + // Put it to front... + m_recentPatchbays.push_front(m_sPatchbayPath); + } + + // Time to keep the list under limits. + while (m_recentPatchbays.count() > 8) + m_recentPatchbays.pop_back(); + + // Update the main setup list... + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->setRecentPatchbays(m_recentPatchbays); + + QStringListIterator iter(m_recentPatchbays); + while (iter.hasNext()) { + const QString& sPatchbayPath = iter.next(); + QString sText = QFileInfo(sPatchbayPath).completeBaseName(); + if (pMainForm && pMainForm->isActivePatchbay(sPatchbayPath)) + sText += " [" + tr("active") + "]"; + m_ui.PatchbayComboBox->addItem(icon, sText); + } + + // Sure this one must be currently selected. + m_ui.PatchbayComboBox->setCurrentIndex(0); +// stabilizeForm(); + + m_iUpdate--; +} + + +// (Un)Bind a JACK client to this form. +void qjackctlPatchbayForm::setJackClient ( jack_client_t *pJackClient ) +{ + m_pPatchbay->setJackClient(pJackClient); +} + + +// (Un)Bind a ALSA sequencer to this form. +void qjackctlPatchbayForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) +{ + m_pPatchbay->setAlsaSeq(pAlsaSeq); +} + + +// Output socket list push button handlers gallore... + +void qjackctlPatchbayForm::addOSocket (void) +{ + (m_pPatchbay->OSocketList())->addSocketItem(); +} + + +void qjackctlPatchbayForm::removeOSocket (void) +{ + (m_pPatchbay->OSocketList())->removeSocketItem(); +} + + +void qjackctlPatchbayForm::editOSocket (void) +{ + (m_pPatchbay->OSocketList())->editSocketItem(); +} + + +void qjackctlPatchbayForm::copyOSocket (void) +{ + (m_pPatchbay->OSocketList())->copySocketItem(); +} + + +void qjackctlPatchbayForm::moveUpOSocket (void) +{ + (m_pPatchbay->OSocketList())->moveUpSocketItem(); +} + + +void qjackctlPatchbayForm::moveDownOSocket (void) +{ + (m_pPatchbay->OSocketList())->moveDownSocketItem(); +} + + +// Input socket list push button handlers gallore... + +void qjackctlPatchbayForm::addISocket (void) +{ + (m_pPatchbay->ISocketList())->addSocketItem(); +} + + +void qjackctlPatchbayForm::removeISocket (void) +{ + (m_pPatchbay->ISocketList())->removeSocketItem(); +} + + +void qjackctlPatchbayForm::editISocket (void) +{ + (m_pPatchbay->ISocketList())->editSocketItem(); +} + + +void qjackctlPatchbayForm::copyISocket (void) +{ + (m_pPatchbay->ISocketList())->copySocketItem(); +} + + +void qjackctlPatchbayForm::moveUpISocket (void) +{ + (m_pPatchbay->ISocketList())->moveUpSocketItem(); +} + + +void qjackctlPatchbayForm::moveDownISocket (void) +{ + (m_pPatchbay->ISocketList())->moveDownSocketItem(); +} + + +// Connect current selected ports. +void qjackctlPatchbayForm::connectSelected (void) +{ + m_pPatchbay->connectSelected(); +} + + +// Disconnect current selected ports. +void qjackctlPatchbayForm::disconnectSelected (void) +{ + m_pPatchbay->disconnectSelected(); +} + + +// Disconnect all connected ports. +void qjackctlPatchbayForm::disconnectAll (void) +{ + m_pPatchbay->disconnectAll(); +} + + +// Keyboard event handler. +void qjackctlPatchbayForm::keyPressEvent ( QKeyEvent *pKeyEvent ) +{ +#ifdef CONFIG_DEBUG_0 + qDebug("qjackctlPatchbayForm::keyPressEvent(%d)", pKeyEvent->key()); +#endif + int iKey = pKeyEvent->key(); + switch (iKey) { + case Qt::Key_Escape: + close(); + break; + default: + QWidget::keyPressEvent(pKeyEvent); + break; + } + + // Make sure we've get focus back... + QWidget::setFocus(); +} + + +// end of qjackctlPatchbayForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayForm.h qjackctl-0.3.6/src/qjackctlPatchbayForm.h --- qjackctl-0.3.4/src/qjackctlPatchbayForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayForm.h 2009-10-02 09:19:17.000000000 +0100 @@ -0,0 +1,127 @@ +// qjackctlPatchbayForm.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlPatchbayForm_h +#define __qjackctlPatchbayForm_h + +#include "ui_qjackctlPatchbayForm.h" + +// Forward declarations. +class qjackctlPatchbay; +class qjackctlSetup; + + +//---------------------------------------------------------------------------- +// qjackctlPatchbayForm -- UI wrapper form. + +class qjackctlPatchbayForm : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlPatchbayForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlPatchbayForm(); + + void setup(qjackctlSetup *pSetup); + + qjackctlPatchbayView *patchbayView() const; + + bool queryClose(); + + const QString& patchbayPath() const; + + void newPatchbayFile(bool bSnapshot); + bool loadPatchbayFile(const QString& sFileName); + bool savePatchbayFile(const QString& sFileName); + + void loadPatchbayRack(qjackctlPatchbayRack *pRack); + + void setRecentPatchbays(const QStringList& patchbays); + void updateRecentPatchbays(); + + void setJackClient(jack_client_t * pJackClient); + void setAlsaSeq(snd_seq_t *pAlsaSeq); + +public slots: + + void newPatchbay(); + void loadPatchbay(); + void savePatchbay(); + void selectPatchbay(int iPatchbay); + void toggleActivePatchbay(); + + void addOSocket(); + void removeOSocket(); + void editOSocket(); + void copyOSocket(); + void moveUpOSocket(); + void moveDownOSocket(); + + void addISocket(); + void removeISocket(); + void editISocket(); + void copyISocket(); + void moveUpISocket(); + void moveDownISocket(); + + void connectSelected(); + void disconnectSelected(); + void disconnectAll(); + + void contentsChanged(); + + void refreshForm(); + void stabilizeForm(); + +protected: + + void showEvent(QShowEvent *); + void hideEvent(QHideEvent *); + void closeEvent(QCloseEvent *); + + void keyPressEvent(QKeyEvent *); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlPatchbayForm m_ui; + + // Instance variables. + qjackctlSetup *m_pSetup; + + int m_iUntitled; + qjackctlPatchbay *m_pPatchbay; + QString m_sPatchbayPath; + QString m_sPatchbayName; + QStringList m_recentPatchbays; + bool m_bActivePatchbay; + + int m_iUpdate; +}; + + +#endif // __qjackctlPatchbayForm_h + + +// end of qjackctlPatchbayForm.h diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayForm.ui qjackctl-0.3.6/src/qjackctlPatchbayForm.ui --- qjackctl-0.3.4/src/qjackctlPatchbayForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayForm.ui 2008-12-02 22:58:22.000000000 +0000 @@ -0,0 +1,585 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlPatchbayForm + + + + 0 + 0 + 598 + 321 + + + + + 1 + 1 + 0 + 0 + + + + + + + Patchbay - JACK Audio Connection Kit + + + :/icons/patchbay1.png + + + + 4 + + + 4 + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 80 + 8 + + + + + + + + 4 + + + 4 + + + + + + 7 + 7 + 0 + 0 + + + + Qt::TabFocus + + + + + + + Move currently selected output socket down one position + + + Down + + + :/icons/down1.png + + + + + + + + + + Create a new output socket + + + Add... + + + :/icons/add1.png + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 8 + 42 + + + + + + + + Edit currently selected input socket properties + + + Edit... + + + :/icons/edit1.png + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 8 + 42 + + + + + + + + Move currently selected output socket up one position + + + Up + + + :/icons/up1.png + + + + + + + + + + Remove currently selected output socket + + + Remove + + + :/icons/remove1.png + + + + + + + + + + Duplicate (copy) currently selected output socket + + + Copy... + + + :/icons/copy1.png + + + + + + + + + + Move currently selected output socket down one position + + + Down + + + :/icons/down1.png + + + + + + + + + + Remove currently selected input socket + + + Remove + + + :/icons/remove1.png + + + + + + + + + + Duplicate (copy) currently selected input socket + + + Copy... + + + :/icons/copy1.png + + + + + + + + + + Create a new input socket + + + Add... + + + :/icons/add1.png + + + + + + + + + + Edit currently selected output socket properties + + + Edit... + + + :/icons/edit1.png + + + + + + + + + + Move currently selected output socket up one position + + + Up + + + :/icons/up1.png + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 80 + 8 + + + + + + + + 4 + + + 4 + + + + + Connect currently selected sockets + + + &Connect + + + :/icons/connect1.png + + + Alt+C + + + + + + + Disconnect currently selected sockets + + + &Disconnect + + + :/icons/disconnect1.png + + + Alt+D + + + + + + + Disconnect all currently connected sockets + + + Disconnect &All + + + :/icons/disconnect1.png + + + Alt+A + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 87 + 8 + + + + + + + + Refresh current patchbay view + + + &Refresh + + + :/icons/refresh1.png + + + Alt+R + + + true + + + + + + + + + 4 + + + 4 + + + + + Create a new patchbay profile + + + &New + + + :/icons/new1.png + + + Alt+N + + + false + + + + + + + Load patchbay profile + + + &Load... + + + :/icons/open1.png + + + Alt+L + + + false + + + + + + + Save current patchbay profile + + + &Save... + + + :/icons/save1.png + + + Alt+S + + + false + + + + + + + + 7 + 5 + 0 + 0 + + + + + 75 + true + + + + Current (recent) patchbay profile(s) + + + + + + + Toggle activation of current patchbay profile + + + Acti&vate + + + :/icons/apply1.png + + + Alt+V + + + true + + + false + + + + + + + + + + + qjackctlPatchbayView + QWidget +
qjackctlPatchbay.h
+
+
+ + NewPatchbayPushButton + LoadPatchbayPushButton + SavePatchbayPushButton + PatchbayComboBox + ActivatePatchbayPushButton + OSocketAddPushButton + OSocketEditPushButton + OSocketCopyPushButton + OSocketRemovePushButton + OSocketMoveUpPushButton + OSocketMoveDownPushButton + PatchbayView + ISocketAddPushButton + ISocketEditPushButton + ISocketCopyPushButton + ISocketRemovePushButton + ISocketMoveUpPushButton + ISocketMoveDownPushButton + ConnectPushButton + DisconnectPushButton + DisconnectAllPushButton + RefreshPushButton + + + + + +
diff -Nru qjackctl-0.3.4/src/qjackctlPatchbay.h qjackctl-0.3.6/src/qjackctlPatchbay.h --- qjackctl-0.3.4/src/qjackctlPatchbay.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbay.h 2009-02-19 10:28:56.000000000 +0000 @@ -0,0 +1,488 @@ +// qjackctlPatchbay.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlPatchbay_h +#define __qjackctlPatchbay_h + +#include +#include + + +// Our external patchbay models. +#include "qjackctlPatchbayRack.h" + +// QListViewItem::rtti return values. +#define QJACKCTL_SOCKETITEM 2001 +#define QJACKCTL_PLUGITEM 2002 + +// Forward declarations. +class qjackctlPlugItem; +class qjackctlSocketItem; +class qjackctlSocketList; +class qjackctlSocketListView; +class qjackctlPatchworkView; +class qjackctlPatchbayView; +class qjackctlPatchbay; + +// Pixmap-set indexes. +#define QJACKCTL_XPM_AUDIO_SOCKET 0 +#define QJACKCTL_XPM_AUDIO_SOCKET_X 1 +#define QJACKCTL_XPM_AUDIO_CLIENT 2 +#define QJACKCTL_XPM_AUDIO_PLUG 3 +#define QJACKCTL_XPM_MIDI_SOCKET 4 +#define QJACKCTL_XPM_MIDI_SOCKET_X 5 +#define QJACKCTL_XPM_MIDI_CLIENT 6 +#define QJACKCTL_XPM_MIDI_PLUG 7 +#define QJACKCTL_XPM_PIXMAPS 8 + + +// Patchbay plug (port) list item. +class qjackctlPlugItem : public QTreeWidgetItem +{ +public: + + // Constructor. + qjackctlPlugItem(qjackctlSocketItem *pSocket, + const QString& sPlugName, qjackctlPlugItem *pPlugAfter); + // Default destructor. + ~qjackctlPlugItem(); + + // Instance accessors. + const QString& socketName() const; + const QString& plugName() const; + + // Patchbay socket item accessor. + qjackctlSocketItem *socket() const; + +private: + + // Instance variables. + qjackctlSocketItem *m_pSocket; + QString m_sPlugName; +}; + + +// Patchbay socket (client) list item. +class qjackctlSocketItem : public QTreeWidgetItem +{ +public: + + // Constructor. + qjackctlSocketItem(qjackctlSocketList *pSocketList, + const QString& sSocketName, const QString& sClientName, + int iSocketType,qjackctlSocketItem *pSocketAfter); + + // Default destructor. + ~qjackctlSocketItem(); + + // Instance accessors. + const QString& socketName() const; + const QString& clientName() const; + int socketType() const; + bool isExclusive() const; + const QString& forward() const; + + void setSocketName (const QString& sSocketName); + void setClientName (const QString& sClientName); + void setSocketType (int iSocketType); + void setExclusive (bool bExclusive); + void setForward (const QString& sSocketForward); + + // Socket flags accessor. + bool isReadable() const; + + // Connected plug list primitives. + void addConnect(qjackctlSocketItem *pSocket); + void removeConnect(qjackctlSocketItem *pSocket); + + // Connected plug finders. + qjackctlSocketItem *findConnectPtr(qjackctlSocketItem *pSocketPtr); + + // Connection list accessor. + const QList& connects() const; + + // Plug list primitive methods. + void addPlug(qjackctlPlugItem *pPlug); + void removePlug(qjackctlPlugItem *pPlug); + + // Plug finder. + qjackctlPlugItem *findPlug(const QString& sPlugName); + + // Plug list accessor. + QList& plugs(); + + // Plug list cleaner. + void clear(); + + // Retrieve a context pixmap. + const QPixmap& pixmap(int iPixmap) const; + + // Update pixmap to its proper context. + void updatePixmap(); + + // Client item openness status. + void setOpen(bool bOpen); + bool isOpen() const; + +private: + + // Instance variables. + qjackctlSocketList *m_pSocketList; + QString m_sSocketName; + QString m_sClientName; + int m_iSocketType; + bool m_bExclusive; + QString m_sSocketForward; + + // Plug (port) list. + QList m_plugs; + + // Connection cache list. + QList m_connects; +}; + + +// Patchbay socket (client) list. +class qjackctlSocketList : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlSocketList(qjackctlSocketListView *pListView, bool bReadable); + // Default destructor. + ~qjackctlSocketList(); + + // Socket list primitive methods. + void addSocket(qjackctlSocketItem *pSocket); + void removeSocket(qjackctlSocketItem *pSocket); + + // Socket finder. + qjackctlSocketItem *findSocket(const QString& sSocketName, int iSocketType); + + // List view accessor. + qjackctlSocketListView *listView() const; + + // Socket flags accessor. + bool isReadable() const; + + // Socket aesthetics accessors. + const QString& socketCaption() const; + + // JACK client accessors. + void setJackClient(jack_client_t *pJackClient); + jack_client_t *jackClient() const; + + // ALSA sequencer accessors. + void setAlsaSeq(snd_seq_t *pAlsaSeq); + snd_seq_t *alsaSeq() const; + + // Socket list cleaner. + void clear(); + + // Socket list accessor. + QList& sockets(); + + // Find the current selected socket item in list. + qjackctlSocketItem *selectedSocketItem() const; + + // Retrieve a context pixmap. + const QPixmap& pixmap(int iPixmap) const; + +public slots: + + // Socket item interactivity methods. + bool addSocketItem(); + bool removeSocketItem(); + bool editSocketItem(); + bool copySocketItem(); + bool exclusiveSocketItem(); + bool moveUpSocketItem(); + bool moveDownSocketItem(); + +private: + + // Merge two pixmaps with union of respective masks. + QPixmap *createPixmapMerge(const QPixmap& xpmDst, const QPixmap& xpmSrc); + + // Instance variables. + qjackctlSocketListView *m_pListView; + bool m_bReadable; + QString m_sSocketCaption; + jack_client_t *m_pJackClient; + snd_seq_t *m_pAlsaSeq; + + QPixmap *m_apPixmaps[QJACKCTL_XPM_PIXMAPS]; + + QList m_sockets; +}; + + +//---------------------------------------------------------------------------- +// qjackctlSocketListView -- Socket list view, supporting drag-n-drop. + +class qjackctlSocketListView : public QTreeWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlSocketListView(qjackctlPatchbayView *pPatchbayView, bool bReadable); + // Default destructor. + ~qjackctlSocketListView(); + + // Patchbay dirty flag accessors. + void setDirty (bool bDirty); + bool dirty() const; + + // Auto-open timer methods. + void setAutoOpenTimeout(int iAutoOpenTimeout); + int autoOpenTimeout() const; + +protected slots: + + // Auto-open timeout slot. + void timeoutSlot(); + +protected: + + // Trap for help/tool-tip events. + bool eventFilter(QObject *pObject, QEvent *pEvent); + + // Drag-n-drop stuff. + QTreeWidgetItem *dragDropItem(const QPoint& pos); + + // Drag-n-drop stuff -- reimplemented virtual methods. + void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); + void dragMoveEvent(QDragMoveEvent *pDragMoveEvent); + void dragLeaveEvent(QDragLeaveEvent *); + void dropEvent(QDropEvent *pDropEvent); + + // Handle mouse events for drag-and-drop stuff. + void mousePressEvent(QMouseEvent *pMouseEvent); + void mouseMoveEvent(QMouseEvent *pMouseEvent); + + // Context menu request event handler. + void contextMenuEvent(QContextMenuEvent *); + +private: + + // Bindings. + qjackctlPatchbayView *m_pPatchbayView; + + bool m_bReadable; + + // Auto-open timer. + int m_iAutoOpenTimeout; + QTimer *m_pAutoOpenTimer; + + // Items we'll eventually drop something. + QTreeWidgetItem *m_pDragItem; + QTreeWidgetItem *m_pDropItem; + // The point from where drag started. + QPoint m_posDrag; +}; + + +//---------------------------------------------------------------------------- +// qjackctlPatchworkView -- Socket plugging connector widget. + +class qjackctlPatchworkView : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlPatchworkView(qjackctlPatchbayView *pPatchbayView); + // Default destructor. + ~qjackctlPatchworkView(); + +public slots: + + // Useful slots (should this be protected?). + void contentsChanged(); + +protected: + + // Draw visible port connection relation arrows. + void paintEvent(QPaintEvent *); + + // Context menu request event handler. + void contextMenuEvent(QContextMenuEvent *); + +private: + + // Legal socket item position helper. + int itemY(QTreeWidgetItem *pItem) const; + + // Drawing methods. + void drawForwardLine(QPainter *pPainter, + int x, int dx, int y1, int y2, int h); + void drawConnectionLine(QPainter *pPainter, + int x1, int y1, int x2, int y2, int h1, int h2); + + // Local instance variables. + qjackctlPatchbayView *m_pPatchbayView; +}; + + +//---------------------------------------------------------------------------- +// qjackctlPatchbayView -- Patchbay integrated widget. + +class qjackctlPatchbayView : public QSplitter +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlPatchbayView(QWidget *pParent = 0); + // Default destructor. + ~qjackctlPatchbayView(); + + // Widget accesors. + qjackctlSocketListView *OListView() { return m_pOListView; } + qjackctlSocketListView *IListView() { return m_pIListView; } + qjackctlPatchworkView *PatchworkView() { return m_pPatchworkView; } + + // Patchbay object binding methods. + void setBinding(qjackctlPatchbay *pPatchbay); + qjackctlPatchbay *binding() const; + + // Socket list accessors. + qjackctlSocketList *OSocketList() const; + qjackctlSocketList *ISocketList() const; + + // Patchwork line style accessors. + void setBezierLines(bool bBezierLines); + bool isBezierLines() const; + + // Patchbay dirty flag accessors. + void setDirty (bool bDirty); + bool dirty() const; + +signals: + + // Contents change signal. + void contentsChanged(); + +public slots: + + // Common context menu slots. + void contextMenu(const QPoint& pos, qjackctlSocketList *pSocketList); + void activateForwardMenu(QAction *); + +private: + + // Child controls. + qjackctlSocketListView *m_pOListView; + qjackctlSocketListView *m_pIListView; + qjackctlPatchworkView *m_pPatchworkView; + + // The main binding object. + qjackctlPatchbay *m_pPatchbay; + + // How we'll draw patchwork lines. + bool m_bBezierLines; + + // The obnoxious dirty flag. + bool m_bDirty; +}; + + +//---------------------------------------------------------------------------- +// qjackctlPatchbay -- Patchbay integrated object. + +class qjackctlPatchbay : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlPatchbay(qjackctlPatchbayView *pPatchbayView); + // Default destructor. + ~qjackctlPatchbay(); + + // Explicit connection tests. + bool canConnectSelected(); + bool canDisconnectSelected(); + bool canDisconnectAll(); + + // Socket list accessors. + qjackctlSocketList *OSocketList() const; + qjackctlSocketList *ISocketList() const; + + // External rack transfer methods. + void loadRack(qjackctlPatchbayRack *pPatchbayRack); + void saveRack(qjackctlPatchbayRack *pPatchbayRack); + + // JACK client property accessors. + void setJackClient(jack_client_t *pJackClient); + jack_client_t *jackClient() const; + + // ALSA sequencer property accessors. + void setAlsaSeq(snd_seq_t *pAlsaSeq); + snd_seq_t *alsaSeq() const; + +public slots: + + // Complete contents refreshner. + void refresh(); + + // Explicit connection slots. + bool connectSelected(); + bool disconnectSelected(); + bool disconnectAll(); + + // Complete patchbay clearer. + void clear(); + + // Do actual and complete connections snapshot. + void connectionsSnapshot(); + +private: + + // Internal rack transfer methods. + void loadRackSockets (qjackctlSocketList *pSocketList, + QList& socketlist); + void saveRackSockets (qjackctlSocketList *pSocketList, + QList& socketlist); + + // Connect/Disconnection primitives. + void connectSockets(qjackctlSocketItem *pOSocket, + qjackctlSocketItem *pISocket); + void disconnectSockets(qjackctlSocketItem *pOSocket, + qjackctlSocketItem *pISocket); + + // Instance variables. + qjackctlPatchbayView *m_pPatchbayView; + qjackctlSocketList *m_pOSocketList; + qjackctlSocketList *m_pISocketList; +}; + + +#endif // __qjackctlPatchbay_h + +// end of qjackctlPatchbay.h diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayRack.cpp qjackctl-0.3.6/src/qjackctlPatchbayRack.cpp --- qjackctl-0.3.4/src/qjackctlPatchbayRack.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayRack.cpp 2010-02-13 11:39:16.000000000 +0000 @@ -0,0 +1,1551 @@ +// qjackctlPatchbayRack.cpp +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlPatchbayRack.h" + +// Aliases accessors. +#include "qjackctlConnectAlias.h" + +#include + + +//---------------------------------------------------------------------- +// class qjackctlPatchbaySnapshot -- Patchbay snapshot infrastructure. +// + +#include + +class qjackctlPatchbaySnapshot +{ +public: + + // Constructor. + qjackctlPatchbaySnapshot() {}; + + // Cleanup. + void clear() { m_hash.clear(); } + + // Prepare/add snapshot connection item. + void append ( + const QString& sOClientName, const QString& sOPortName, + const QString& sIClientName, const QString& sIPortName ) + { + Ports& ports = m_hash[sOClientName + ':' + sIClientName]; + ports.outs.append(sOPortName); + ports.ins.append(sIPortName); + } + + // Commit snapshot into patchbay rack. + void commit ( qjackctlPatchbayRack *pRack, int iSocketType ) + { + QHash::Iterator iter = m_hash.begin(); + for ( ; iter != m_hash.end(); ++iter) { + const QString& sKey = iter.key(); + const QString& sOClient = sKey.section(':', 0, 0); + const QString& sIClient = sKey.section(':', 1); + Ports& ports = iter.value(); + qjackctlPatchbaySocket *pOSocket = get_socket( + pRack->osocketlist(), sOClient, ports.outs, iSocketType); + qjackctlPatchbaySocket *pISocket = get_socket( + pRack->isocketlist(), sIClient, ports.ins, iSocketType); + pRack->addCable(new qjackctlPatchbayCable(pOSocket, pISocket)); + } + + m_hash.clear(); + } + + // Find first existing socket. + static qjackctlPatchbaySocket *find_socket ( + QList& socketlist, + const QString& sClientName, int iSocketType ) + { + QListIterator iter(socketlist); + while (iter.hasNext()) { + qjackctlPatchbaySocket *pSocket = iter.next(); + if (QRegExp(pSocket->clientName()).exactMatch(sClientName) + && pSocket->type() == iSocketType) { + return pSocket; + } + } + return NULL; + } + + // Add socket plug. + static void add_socket ( QList& socketlist, + const QString& sClientName, const QString& sPortName, int iSocketType ) + { + qjackctlPatchbaySocket *pSocket + = find_socket(socketlist, sClientName, iSocketType); + if (pSocket == NULL) { + pSocket = new qjackctlPatchbaySocket(sClientName, + qjackctlClientAlias::escapeRegExpDigits(sClientName), + iSocketType); + socketlist.append(pSocket); + } + pSocket->addPlug( + qjackctlClientAlias::escapeRegExpDigits(sPortName)); + } + + // Get client socket into rack (socket list). + static qjackctlPatchbaySocket *get_socket ( + QList& socketlist, + const QString& sClientName, const QStringList& ports, + int iSocketType ) + { + int iSocket = 0; + qjackctlPatchbaySocket *pSocket = NULL; + QListIterator iter(socketlist); + while (iter.hasNext()) { + pSocket = iter.next(); + if (QRegExp(pSocket->clientName()).exactMatch(sClientName) + && pSocket->type() == iSocketType) { + QStringListIterator plug_iter(pSocket->pluglist()); + QStringListIterator port_iter(ports); + bool bMatch = true; + while (bMatch + && plug_iter.hasNext() && port_iter.hasNext()) { + const QString& sPlug = plug_iter.next(); + const QString& sPort = port_iter.next(); + bMatch = (QRegExp(sPlug).exactMatch(sPort)); + } + if (bMatch) + return pSocket; + iSocket++; + } + } + + QString sSocketName = sClientName; + if (iSocket > 0) + sSocketName += ' ' + QString::number(iSocket + 1); + + pSocket = new qjackctlPatchbaySocket(sSocketName, + qjackctlClientAlias::escapeRegExpDigits(sClientName), + iSocketType); + QStringListIterator port_iter(ports); + while (port_iter.hasNext()) { + pSocket->addPlug( + qjackctlClientAlias::escapeRegExpDigits(port_iter.next())); + } + + socketlist.append(pSocket); + + return pSocket; + } + +private: + + // Snapshot instance variables. + struct Ports + { + QStringList outs; + QStringList ins; + }; + + QHash m_hash; +}; + + +//---------------------------------------------------------------------- +// class qjackctlPatchbaySocket -- Patchbay socket implementation. +// + +// Constructor. +qjackctlPatchbaySocket::qjackctlPatchbaySocket ( const QString& sSocketName, + const QString& sClientName, int iSocketType ) +{ + m_sSocketName = sSocketName; + m_sClientName = sClientName; + m_iSocketType = iSocketType; + m_bExclusive = false; + m_sSocketForward.clear(); +} + +// Default destructor. +qjackctlPatchbaySocket::~qjackctlPatchbaySocket (void) +{ + m_pluglist.clear(); +} + + +// Socket property accessors. +const QString& qjackctlPatchbaySocket::name (void) const +{ + return m_sSocketName; +} + +const QString& qjackctlPatchbaySocket::clientName (void) const +{ + return m_sClientName; +} + +int qjackctlPatchbaySocket::type (void) const +{ + return m_iSocketType; +} + +bool qjackctlPatchbaySocket::isExclusive (void) const +{ + return m_bExclusive; +} + +const QString& qjackctlPatchbaySocket::forward (void) const +{ + return m_sSocketForward; +} + + +// Slot property methods. +void qjackctlPatchbaySocket::setName ( const QString& sSocketName ) +{ + m_sSocketName = sSocketName; +} + +void qjackctlPatchbaySocket::setClientName ( const QString& sClientName ) +{ + m_sClientName = sClientName; +} + +void qjackctlPatchbaySocket::setType ( int iSocketType ) +{ + m_iSocketType = iSocketType; +} + +void qjackctlPatchbaySocket::setExclusive ( bool bExclusive ) +{ + m_bExclusive = bExclusive; +} + +void qjackctlPatchbaySocket::setForward ( const QString& sSocketForward ) +{ + m_sSocketForward = sSocketForward; +} + + +// Plug list primitive methods. +void qjackctlPatchbaySocket::addPlug ( const QString& sPlugName ) +{ + m_pluglist.append(sPlugName); +} + +void qjackctlPatchbaySocket::removePlug ( const QString& sPlugName ) +{ + int iPlug = m_pluglist.indexOf(sPlugName); + if (iPlug >= 0) + m_pluglist.removeAt(iPlug); +} + + +// Plug list accessor. +QStringList& qjackctlPatchbaySocket::pluglist (void) +{ + return m_pluglist; +} + + +//---------------------------------------------------------------------- +// class qjackctlPatchbaySlot -- Patchbay socket slot implementation. +// + +// Constructor. +qjackctlPatchbaySlot::qjackctlPatchbaySlot ( + const QString& sSlotName, int iSlotMode ) +{ + m_pOutputSocket = NULL; + m_pInputSocket = NULL; + + m_sSlotName = sSlotName; + m_iSlotMode = iSlotMode; +} + +// Default destructor. +qjackctlPatchbaySlot::~qjackctlPatchbaySlot (void) +{ + setOutputSocket(NULL); + setInputSocket(NULL); +} + + +// Slot property accessors. +const QString& qjackctlPatchbaySlot::name (void) const +{ + return m_sSlotName; +} + +int qjackctlPatchbaySlot::mode (void) const +{ + return m_iSlotMode; +} + + +// Slot property methods. +void qjackctlPatchbaySlot::setName ( const QString& sSlotName ) +{ + m_sSlotName = sSlotName; +} + +void qjackctlPatchbaySlot::setMode ( int iSlotMode ) +{ + m_iSlotMode = iSlotMode; +} + + +// Socket methods. +void qjackctlPatchbaySlot::setOutputSocket ( qjackctlPatchbaySocket *pSocket ) +{ + m_pOutputSocket = pSocket; +} + +void qjackctlPatchbaySlot::setInputSocket ( qjackctlPatchbaySocket *pSocket ) +{ + m_pInputSocket = pSocket; +} + + +// Socket accessors. +qjackctlPatchbaySocket *qjackctlPatchbaySlot::outputSocket (void) const +{ + return m_pOutputSocket; +} + +qjackctlPatchbaySocket *qjackctlPatchbaySlot::inputSocket (void) const +{ + return m_pInputSocket; +} + + +//---------------------------------------------------------------------- +// class qjackctlPatchbayCable -- Patchbay cable connection implementation. +// + +// Constructor. +qjackctlPatchbayCable::qjackctlPatchbayCable ( + qjackctlPatchbaySocket *pOutputSocket, + qjackctlPatchbaySocket *pInputSocket ) +{ + m_pOutputSocket = pOutputSocket; + m_pInputSocket = pInputSocket; +} + +// Default destructor. +qjackctlPatchbayCable::~qjackctlPatchbayCable (void) +{ + setOutputSocket(NULL); + setInputSocket(NULL); +} + + +// Socket methods. +void qjackctlPatchbayCable::setOutputSocket ( qjackctlPatchbaySocket *pSocket ) +{ + m_pOutputSocket = pSocket; +} + +void qjackctlPatchbayCable::setInputSocket ( qjackctlPatchbaySocket *pSocket ) +{ + m_pInputSocket = pSocket; +} + + +// Socket accessors. +qjackctlPatchbaySocket *qjackctlPatchbayCable::outputSocket (void) const +{ + return m_pOutputSocket; +} + +qjackctlPatchbaySocket *qjackctlPatchbayCable::inputSocket (void) const +{ + return m_pInputSocket; +} + + +//---------------------------------------------------------------------- +// class qjackctlPatchbayRack -- Patchbay rack profile implementation. +// + +// Constructor. +qjackctlPatchbayRack::qjackctlPatchbayRack (void) +{ + m_pJackClient = NULL; + m_ppszOAudioPorts = NULL; + m_ppszIAudioPorts = NULL; + m_ppszOMidiPorts = NULL; + m_ppszIMidiPorts = NULL; + + // MIDI connection persistence cache variables. + m_pAlsaSeq = NULL; +} + +// Default destructor. +qjackctlPatchbayRack::~qjackctlPatchbayRack (void) +{ + clear(); +} + + +// Common socket list primitive methods. +void qjackctlPatchbayRack::addSocket ( + QList& socketlist, + qjackctlPatchbaySocket *pSocket ) +{ + qjackctlPatchbaySocket *pSocketPtr + = findSocket(socketlist, pSocket->name()); + if (pSocketPtr) + removeSocket(socketlist, pSocketPtr); + + socketlist.append(pSocket); +} + + +void qjackctlPatchbayRack::removeSocket ( + QList& socketlist, + qjackctlPatchbaySocket *pSocket ) +{ + int iSocket = socketlist.indexOf(pSocket); + if (iSocket >= 0) { + socketlist.removeAt(iSocket); + delete pSocket; + } +} + + +// Slot list primitive methods. +void qjackctlPatchbayRack::addSlot ( qjackctlPatchbaySlot *pSlot ) +{ + qjackctlPatchbaySlot *pSlotPtr = findSlot(pSlot->name()); + if (pSlotPtr) + removeSlot(pSlotPtr); + + m_slotlist.append(pSlot); +} + +void qjackctlPatchbayRack::removeSlot ( qjackctlPatchbaySlot *pSlot ) +{ + int iSlot = m_slotlist.indexOf(pSlot); + if (iSlot >= 0) { + m_slotlist.removeAt(iSlot); + delete pSlot; + } +} + + +// Cable list primitive methods. +void qjackctlPatchbayRack::addCable ( qjackctlPatchbayCable *pCable ) +{ + qjackctlPatchbayCable *pCablePtr = findCable(pCable); + if (pCablePtr) + removeCable(pCablePtr); + + m_cablelist.append(pCable); +} + +void qjackctlPatchbayRack::removeCable ( qjackctlPatchbayCable *pCable ) +{ + int iCable = m_cablelist.indexOf(pCable); + if (iCable >= 0) { + m_cablelist.removeAt(iCable); + delete pCable; + } +} + + +// Common socket finders. +qjackctlPatchbaySocket *qjackctlPatchbayRack::findSocket ( + QList& socketlist, const QString& sSocketName ) +{ + QListIterator iter(socketlist); + while (iter.hasNext()) { + qjackctlPatchbaySocket *pSocket = iter.next(); + if (sSocketName == pSocket->name()) + return pSocket; + } + + return NULL; +} + + +// Patchbay socket slot finders. +qjackctlPatchbaySlot *qjackctlPatchbayRack::findSlot ( const QString& sSlotName ) +{ + QListIterator iter(m_slotlist); + while (iter.hasNext()) { + qjackctlPatchbaySlot *pSlot = iter.next(); + if (sSlotName == pSlot->name()) + return pSlot; + } + + return NULL; +} + + +// Cable finders. +qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( + const QString& sOutputSocket, const QString& sInputSocket ) +{ + qjackctlPatchbaySocket *pSocket; + + QListIterator iter(m_cablelist); + while (iter.hasNext()) { + qjackctlPatchbayCable *pCable = iter.next(); + pSocket = pCable->outputSocket(); + if (pSocket && sOutputSocket == pSocket->name()) { + pSocket = pCable->inputSocket(); + if (pSocket && sInputSocket == pSocket->name()) + return pCable; + } + } + + return NULL; +} + +qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( + qjackctlPatchbayCable *pCablePtr ) +{ + QString sOutputSocket; + if (pCablePtr->outputSocket()) + sOutputSocket = pCablePtr->outputSocket()->name(); + + QString sInputSocket; + if (pCablePtr->inputSocket()) + sInputSocket = pCablePtr->inputSocket()->name(); + + return findCable(sOutputSocket, sInputSocket); +} + + +// Cable finder (logical matching by client/port names). +qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( + const QString& sOClientName, const QString& sOPortName, + const QString& sIClientName, const QString& sIPortName, + int iSocketType ) +{ + // This is a regex prefix needed for ALSA MDII + // as client and port names include id-number+colon... + QString sPrefix; + if (iSocketType == QJACKCTL_SOCKETTYPE_ALSA_MIDI) + sPrefix = "[0-9]+:"; + + // Scan from output-socket list... + QListIterator osocket(m_osocketlist); + while (osocket.hasNext()) { + qjackctlPatchbaySocket *pOSocket = osocket.next(); + if (pOSocket->type() != iSocketType) + continue; + // Output socket client name match? + if (!QRegExp(sPrefix + pOSocket->clientName()) + .exactMatch(sOClientName)) + continue; + // Output plug port names match? + QStringListIterator oplug(pOSocket->pluglist()); + while (oplug.hasNext()) { + if (!QRegExp(sPrefix + oplug.next()) + .exactMatch(sOPortName)) + continue; + // Scan for output-socket cable... + QListIterator cable(m_cablelist); + while (cable.hasNext()) { + qjackctlPatchbayCable *pCable = cable.next(); + if (pCable->outputSocket() != pOSocket) + continue; + qjackctlPatchbaySocket *pISocket = pCable->inputSocket(); + // Input socket client name match? + if (!QRegExp(sPrefix + pISocket->clientName()) + .exactMatch(sIClientName)) + continue; + // Input plug port names match? + QStringListIterator iplug(pISocket->pluglist()); + while (iplug.hasNext()) { + // Found it? + if (QRegExp(sPrefix + iplug.next()) + .exactMatch(sIPortName)) + return pCable; + } + } + } + } + + // No matching cable was found. + return NULL; +} + + +// Patckbay cleaners. +void qjackctlPatchbayRack::clear (void) +{ + qDeleteAll(m_cablelist); + m_cablelist.clear(); + + qDeleteAll(m_slotlist); + m_slotlist.clear(); + + qDeleteAll(m_isocketlist); + m_isocketlist.clear(); + + qDeleteAll(m_osocketlist); + m_osocketlist.clear(); +} + + +// Patchbay rack output sockets list accessor. +QList& qjackctlPatchbayRack::osocketlist (void) +{ + return m_osocketlist; +} + + +// Patchbay rack input sockets list accessor. +QList& qjackctlPatchbayRack::isocketlist (void) +{ + return m_isocketlist; +} + + +// Patchbay rack slots list accessor. +QList& qjackctlPatchbayRack::slotlist (void) +{ + return m_slotlist; +} + + +// Patchbay cable connections list accessor. +QList& qjackctlPatchbayRack::cablelist (void) +{ + return m_cablelist; +} + + +// Lookup for the n-th JACK client port +// that matches the given regular expression... +const char *qjackctlPatchbayRack::findJackPort ( const char **ppszJackPorts, + const QString& sClientName, const QString& sPortName, int n ) +{ + QRegExp rxClientName(sClientName); + QRegExp rxPortName(sPortName); + + int i = 0; + int iClientPort = 0; + while (ppszJackPorts[iClientPort]) { + QString sClientPort = QString::fromUtf8(ppszJackPorts[iClientPort]); + int iColon = sClientPort.indexOf(':'); + if (iColon >= 0) { + if (rxClientName.exactMatch(sClientPort.left(iColon)) && + rxPortName.exactMatch(sClientPort.right( + sClientPort.length() - iColon - 1))) { + if (++i > n) + return ppszJackPorts[iClientPort]; + } + } + iClientPort++; + } + + return NULL; +} + +// JACK port-pair connection executive IS DEPRECATED! +void qjackctlPatchbayRack::connectJackPorts ( + const char *pszOutputPort, const char *pszInputPort ) +{ + unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; + + if (jack_connect(m_pJackClient, pszOutputPort, pszInputPort) == 0) + uiCableFlags = QJACKCTL_CABLE_CONNECTED; + + emit cableConnected( + pszOutputPort, pszInputPort, uiCableFlags); +} + + +// JACK port-pair disconnection executive. +void qjackctlPatchbayRack::disconnectJackPorts ( + const char *pszOutputPort, const char *pszInputPort ) +{ + unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; + + if (jack_disconnect(m_pJackClient, pszOutputPort, pszInputPort) == 0) + uiCableFlags = QJACKCTL_CABLE_DISCONNECTED; + + emit cableConnected( + pszOutputPort, pszInputPort, uiCableFlags); +} + + +// JACK port-pair connection notifier. +void qjackctlPatchbayRack::checkJackPorts ( + const char *pszOutputPort, const char *pszInputPort ) +{ + emit cableConnected( + pszOutputPort, pszInputPort, QJACKCTL_CABLE_CHECKED); +} + + +// Check and enforce if an audio output client:port is connected to one input. +void qjackctlPatchbayRack::connectJackSocketPorts ( + qjackctlPatchbaySocket *pOutputSocket, const char *pszOutputPort, + qjackctlPatchbaySocket *pInputSocket, const char *pszInputPort ) +{ + bool bConnected = false; + + // Check for inputs from output... + const char **ppszInputPorts = jack_port_get_all_connections( + m_pJackClient, jack_port_by_name(m_pJackClient, pszOutputPort)); + if (ppszInputPorts) { + for (int i = 0 ; ppszInputPorts[i]; i++) { + if (strcmp(ppszInputPorts[i], pszInputPort) == 0) + bConnected = true; + else if (pOutputSocket->isExclusive()) + disconnectJackPorts(pszOutputPort, ppszInputPorts[i]); + } + ::free(ppszInputPorts); + } + + // Check for outputs from input, if the input socket is on exclusive mode... + if (pInputSocket->isExclusive()) { + const char **ppszOutputPorts = jack_port_get_all_connections( + m_pJackClient, jack_port_by_name(m_pJackClient, pszInputPort)); + if (ppszOutputPorts) { + for (int i = 0 ; ppszOutputPorts[i]; i++) { + if (strcmp(ppszOutputPorts[i], pszOutputPort) == 0) + bConnected = true; + else + disconnectJackPorts(ppszOutputPorts[i], pszInputPort); + } + ::free(ppszOutputPorts); + } + } + + // Finally do the connection?... + if (!bConnected) { + connectJackPorts(pszOutputPort, pszInputPort); + } else { + emit cableConnected( + pszOutputPort, + pszInputPort, + QJACKCTL_CABLE_CHECKED); + } +} + + +// Check and maint whether an JACK socket pair is fully connected. +void qjackctlPatchbayRack::connectJackCable ( + qjackctlPatchbaySocket *pOutputSocket, qjackctlPatchbaySocket *pInputSocket ) +{ + if (pOutputSocket == NULL || pInputSocket == NULL) + return; + if (pOutputSocket->type() != pInputSocket->type()) + return; + + const char **ppszOutputPorts = NULL; + const char **ppszInputPorts = NULL; + if (pOutputSocket->type() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { + ppszOutputPorts = m_ppszOAudioPorts; + ppszInputPorts = m_ppszIAudioPorts; + } + else + if (pOutputSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) { + ppszOutputPorts = m_ppszOMidiPorts; + ppszInputPorts = m_ppszIMidiPorts; + } + + if (ppszOutputPorts == NULL || ppszInputPorts == NULL) + return; + + // Iterate on each corresponding plug... + QStringListIterator iterOutputPlug(pOutputSocket->pluglist()); + QStringListIterator iterInputPlug(pInputSocket->pluglist()); + while (iterOutputPlug.hasNext() && iterInputPlug.hasNext()) { + const QString& sOutputPlug = iterOutputPlug.next(); + const QString& sInputPlug = iterInputPlug.next(); + // Check audio port connection sequentially... + int iOPort = 0; + const char *pszOutputPort; + while ((pszOutputPort = findJackPort(ppszOutputPorts, + pOutputSocket->clientName(), sOutputPlug, iOPort)) != NULL) { + int iIPort = 0; + const char *pszInputPort; + while ((pszInputPort = findJackPort(ppszInputPorts, + pInputSocket->clientName(), sInputPlug, iIPort)) != NULL) { + connectJackSocketPorts( + pOutputSocket, pszOutputPort, + pInputSocket, pszInputPort); + iIPort++; + } + iOPort++; + } + } +} + + +// Main JACK cable connect persistance scan cycle. +void qjackctlPatchbayRack::connectJackScan ( jack_client_t *pJackClient ) +{ + if (pJackClient == NULL || m_pJackClient) + return; + + // Cache client descriptor. + m_pJackClient = pJackClient; + // Cache all current audio client-ports... + m_ppszOAudioPorts = jack_get_ports(m_pJackClient, + 0, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput); + m_ppszIAudioPorts = jack_get_ports(m_pJackClient, + 0, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput); +#ifdef CONFIG_JACK_MIDI + // Cache all current MIDI client-ports... + m_ppszOMidiPorts = jack_get_ports(m_pJackClient, + 0, JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput); + m_ppszIMidiPorts = jack_get_ports(m_pJackClient, + 0, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput); +#else + m_ppszOMidiPorts = NULL; + m_ppszIMidiPorts = NULL; +#endif + + // Start looking for connections... + QListIterator iter(m_cablelist); + while (iter.hasNext()) { + qjackctlPatchbayCable *pCable = iter.next(); + connectJackCable( + pCable->outputSocket(), + pCable->inputSocket()); + } + + // Forward sockets... + connectForwardScan(QJACKCTL_SOCKETTYPE_JACK_AUDIO); +#ifdef CONFIG_JACK_MIDI + connectForwardScan(QJACKCTL_SOCKETTYPE_JACK_MIDI); +#endif + + // Free client-ports caches... + if (m_ppszOAudioPorts) + ::free(m_ppszOAudioPorts); + if (m_ppszIAudioPorts) + ::free(m_ppszIAudioPorts); +#ifdef CONFIG_JACK_MIDI + if (m_ppszOMidiPorts) + ::free(m_ppszOMidiPorts); + if (m_ppszIMidiPorts) + ::free(m_ppszIMidiPorts); +#endif + // Reset cached pointers. + m_ppszOAudioPorts = NULL; + m_ppszIAudioPorts = NULL; + m_ppszOMidiPorts = NULL; + m_ppszIMidiPorts = NULL; + m_pJackClient = NULL; +} + + +// Load all midi available midi ports of a given type. +void qjackctlPatchbayRack::loadAlsaPorts ( + QList& midiports, bool bReadable ) +{ + if (m_pAlsaSeq == NULL) + return; + + qDeleteAll(midiports); + midiports.clear(); + +#ifdef CONFIG_ALSA_SEQ + + unsigned int uiAlsaFlags; + if (bReadable) + uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; + else + uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; + + snd_seq_client_info_t *pClientInfo; + snd_seq_port_info_t *pPortInfo; + + snd_seq_client_info_alloca(&pClientInfo); + snd_seq_port_info_alloca(&pPortInfo); + snd_seq_client_info_set_client(pClientInfo, -1); + + while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { + int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); + if (iAlsaClient > 0) { + QString sClientName = snd_seq_client_info_get_name(pClientInfo); + snd_seq_port_info_set_client(pPortInfo, iAlsaClient); + snd_seq_port_info_set_port(pPortInfo, -1); + while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { + unsigned int uiPortCapability = snd_seq_port_info_get_capability(pPortInfo); + if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && + ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { + qjackctlAlsaMidiPort *pMidiPort = new qjackctlAlsaMidiPort; + pMidiPort->sClientName = sClientName; + pMidiPort->iAlsaClient = iAlsaClient; + pMidiPort->sPortName = snd_seq_port_info_get_name(pPortInfo); + pMidiPort->iAlsaPort = snd_seq_port_info_get_port(pPortInfo); + midiports.append(pMidiPort); + } + } + } + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Get current connections from given MIDI port. +void qjackctlPatchbayRack::loadAlsaConnections ( + QList& midiports, + qjackctlAlsaMidiPort *pMidiPort, bool bReadable ) +{ + qDeleteAll(midiports); + midiports.clear(); + +#ifdef CONFIG_ALSA_SEQ + + snd_seq_query_subs_type_t snd_subs_type; + if (bReadable) + snd_subs_type = SND_SEQ_QUERY_SUBS_READ; + else + snd_subs_type = SND_SEQ_QUERY_SUBS_WRITE; + + snd_seq_query_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_query_subscribe_alloca(&pAlsaSubs); + + snd_seq_query_subscribe_set_type(pAlsaSubs, snd_subs_type); + snd_seq_query_subscribe_set_index(pAlsaSubs, 0); + seq_addr.client = pMidiPort->iAlsaClient; + seq_addr.port = pMidiPort->iAlsaPort; + snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); + while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { + seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); + qjackctlAlsaMidiPort *pPort = new qjackctlAlsaMidiPort; + setAlsaPort(pPort, seq_addr.client, seq_addr.port); + midiports.append(pPort); + snd_seq_query_subscribe_set_index(pAlsaSubs, + snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Lookup for the n-th MIDI client port that matches the given regular expression... +qjackctlAlsaMidiPort *qjackctlPatchbayRack::findAlsaPort ( + QList& midiports, + const QString& sClientName, const QString& sPortName, int n ) +{ + QRegExp rxClientName(sClientName); + QRegExp rxPortName(sPortName); + + int i = 0; + // For each port... + QListIterator iter(midiports); + while (iter.hasNext()) { + qjackctlAlsaMidiPort *pMidiPort = iter.next(); + if (rxClientName.exactMatch(pMidiPort->sClientName) && + rxPortName.exactMatch(pMidiPort->sPortName)) { + if (++i > n) + return pMidiPort; + } + } + + return NULL; +} + + +// MIDI port-pair name string. +QString qjackctlPatchbayRack::getAlsaPortName ( qjackctlAlsaMidiPort *pMidiPort ) +{ + return QString::number(pMidiPort->iAlsaClient) + + ':' + QString::number(pMidiPort->iAlsaPort) + + ' ' + pMidiPort->sClientName; +} + + +// MIDI port-pair name string. +void qjackctlPatchbayRack::setAlsaPort ( qjackctlAlsaMidiPort *pMidiPort, + int iAlsaClient, int iAlsaPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + snd_seq_client_info_t *pClientInfo; + snd_seq_port_info_t *pPortInfo; + + snd_seq_client_info_alloca(&pClientInfo); + snd_seq_port_info_alloca(&pPortInfo); + + pMidiPort->iAlsaClient = iAlsaClient; + pMidiPort->iAlsaPort = iAlsaPort; + + if (snd_seq_get_any_client_info(m_pAlsaSeq, iAlsaClient, pClientInfo) == 0) + pMidiPort->sClientName = snd_seq_client_info_get_name(pClientInfo); + + if (snd_seq_get_any_port_info(m_pAlsaSeq, iAlsaClient, iAlsaPort, pPortInfo) == 0) + pMidiPort->sPortName = snd_seq_port_info_get_name(pPortInfo); + +#endif // CONFIG_ALSA_SEQ +} + + +// MIDI port-pair connection executive. +void qjackctlPatchbayRack::connectAlsaPorts ( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; + + snd_seq_port_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_port_subscribe_alloca(&pAlsaSubs); + + seq_addr.client = pOutputPort->iAlsaClient; + seq_addr.port = pOutputPort->iAlsaPort; + snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); + + seq_addr.client = pInputPort->iAlsaClient; + seq_addr.port = pInputPort->iAlsaPort; + snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); + + if (snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs) == 0) + uiCableFlags = QJACKCTL_CABLE_CONNECTED; + + emit cableConnected( + getAlsaPortName(pOutputPort), + getAlsaPortName(pInputPort), + uiCableFlags); + +#endif // CONFIG_ALSA_SEQ +} + + +// MIDI port-pair disconnection executive. +void qjackctlPatchbayRack::disconnectAlsaPorts ( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; + + snd_seq_port_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_port_subscribe_alloca(&pAlsaSubs); + + seq_addr.client = pOutputPort->iAlsaClient; + seq_addr.port = pOutputPort->iAlsaPort; + snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); + + seq_addr.client = pInputPort->iAlsaClient; + seq_addr.port = pInputPort->iAlsaPort; + snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); + + if (snd_seq_unsubscribe_port(m_pAlsaSeq, pAlsaSubs) == 0) + uiCableFlags = QJACKCTL_CABLE_DISCONNECTED; + + emit cableConnected( + getAlsaPortName(pOutputPort), + getAlsaPortName(pInputPort), + uiCableFlags); + +#endif // CONFIG_ALSA_SEQ +} + + +// MIDI port-pair disconnection notifier. +void qjackctlPatchbayRack::checkAlsaPorts ( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) +{ + emit cableConnected( + getAlsaPortName(pOutputPort), + getAlsaPortName(pInputPort), + QJACKCTL_CABLE_CHECKED); +} + + +// Check and enforce if a midi output client:port is connected to one input. +void qjackctlPatchbayRack::connectAlsaSocketPorts ( + qjackctlPatchbaySocket *pOutputSocket, qjackctlAlsaMidiPort *pOutputPort, + qjackctlPatchbaySocket *pInputSocket, qjackctlAlsaMidiPort *pInputPort ) +{ +#ifdef CONFIG_ALSA_SEQ + + bool bConnected = false; + + snd_seq_query_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_query_subscribe_alloca(&pAlsaSubs); + + // Check for inputs from output... + snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_READ); + snd_seq_query_subscribe_set_index(pAlsaSubs, 0); + seq_addr.client = pOutputPort->iAlsaClient; + seq_addr.port = pOutputPort->iAlsaPort; + snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); + while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { + seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); + if (seq_addr.client == pInputPort->iAlsaClient + && seq_addr.port == pInputPort->iAlsaPort) + bConnected = true; + else if (pOutputSocket->isExclusive()) { + qjackctlAlsaMidiPort iport; + setAlsaPort(&iport, seq_addr.client, seq_addr.port); + disconnectAlsaPorts(pOutputPort, &iport); + } + snd_seq_query_subscribe_set_index(pAlsaSubs, + snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); + } + + // Check for outputs from input, if the input socket is on exclusive mode... + if (pInputSocket->isExclusive()) { + snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_WRITE); + snd_seq_query_subscribe_set_index(pAlsaSubs, 0); + seq_addr.client = pInputPort->iAlsaClient; + seq_addr.port = pInputPort->iAlsaPort; + snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); + while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { + seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); + if (seq_addr.client == pOutputPort->iAlsaClient + && seq_addr.port == pOutputPort->iAlsaPort) + bConnected = true; + else if (pInputSocket->isExclusive()) { + qjackctlAlsaMidiPort oport; + setAlsaPort(&oport, seq_addr.client, seq_addr.port); + disconnectAlsaPorts(&oport, pInputPort); + } + snd_seq_query_subscribe_set_index(pAlsaSubs, + snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); + } + } + + // Finally do the connection?... + if (!bConnected) { + connectAlsaPorts(pOutputPort, pInputPort); + } else { + emit cableConnected( + getAlsaPortName(pOutputPort), + getAlsaPortName(pInputPort), + QJACKCTL_CABLE_CHECKED); + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Check and maint whether a MIDI socket pair is fully connected. +void qjackctlPatchbayRack::connectAlsaCable ( + qjackctlPatchbaySocket *pOutputSocket, qjackctlPatchbaySocket *pInputSocket ) +{ + if (pOutputSocket == NULL || pInputSocket == NULL) + return; + if (pOutputSocket->type() != pInputSocket->type() || + pOutputSocket->type() != QJACKCTL_SOCKETTYPE_ALSA_MIDI) + return; + + // Iterate on each corresponding plug... + QStringListIterator iterOutputPlug(pOutputSocket->pluglist()); + QStringListIterator iterInputPlug(pInputSocket->pluglist()); + while (iterOutputPlug.hasNext() && iterInputPlug.hasNext()) { + const QString& sOutputPlug = iterOutputPlug.next(); + const QString& sInputPlug = iterInputPlug.next(); + // Check MIDI port connection sequentially... + int iOPort = 0; + qjackctlAlsaMidiPort *pOutputPort; + while ((pOutputPort = findAlsaPort(m_omidiports, + pOutputSocket->clientName(), sOutputPlug, iOPort)) != NULL) { + int iIPort = 0; + qjackctlAlsaMidiPort *pInputPort; + while ((pInputPort = findAlsaPort(m_imidiports, + pInputSocket->clientName(), sInputPlug, iIPort)) != NULL) { + connectAlsaSocketPorts( + pOutputSocket, pOutputPort, + pInputSocket, pInputPort); + iIPort++; + } + iOPort++; + } + } +} + + +// Overloaded MIDI cable connect persistance scan cycle. +void qjackctlPatchbayRack::connectAlsaScan ( snd_seq_t *pAlsaSeq ) +{ + if (pAlsaSeq == NULL || m_pAlsaSeq) + return; + + // Cache sequencer descriptor. + m_pAlsaSeq = pAlsaSeq; + + // Cache all current output client-ports... + loadAlsaPorts(m_omidiports, true); + loadAlsaPorts(m_imidiports, false); + + // Run the MIDI cable scan... + QListIterator iter(m_cablelist); + while (iter.hasNext()) { + qjackctlPatchbayCable *pCable = iter.next(); + connectAlsaCable( + pCable->outputSocket(), + pCable->inputSocket()); + } + + // Forward MIDI sockets... + connectForwardScan(QJACKCTL_SOCKETTYPE_ALSA_MIDI); + + // Free client-ports caches... + qDeleteAll(m_omidiports); + m_omidiports.clear(); + + qDeleteAll(m_imidiports); + m_imidiports.clear(); + + m_pAlsaSeq = NULL; +} + + +// JACK socket/ports forwarding scan... +void qjackctlPatchbayRack::connectJackForwardPorts ( + const char *pszPort, const char *pszPortForward ) +{ + // Check for outputs from forwarded input... + const char **ppszOutputPorts = jack_port_get_all_connections( + m_pJackClient, jack_port_by_name(m_pJackClient, pszPortForward)); + if (ppszOutputPorts) { + // Grab current connections of target port... + const char **ppszPorts = jack_port_get_all_connections( + m_pJackClient, jack_port_by_name(m_pJackClient, pszPort)); + for (int i = 0 ; ppszOutputPorts[i]; i++) { + // Need to lookup if already connected... + bool bConnected = false; + for (int j = 0; ppszPorts && ppszPorts[j]; j++) { + if (strcmp(ppszOutputPorts[i], ppszPorts[j]) == 0) { + bConnected = true; + break; + } + } + // Make or just report the connection... + if (bConnected) { + checkJackPorts(ppszOutputPorts[i], pszPort); + } else { + connectJackPorts(ppszOutputPorts[i], pszPort); + } + } + // Free provided arrays... + if (ppszPorts) + ::free(ppszPorts); + ::free(ppszOutputPorts); + } +} + +void qjackctlPatchbayRack::connectJackForward ( + qjackctlPatchbaySocket *pSocket, qjackctlPatchbaySocket *pSocketForward ) +{ + if (pSocket == NULL || pSocketForward == NULL) + return; + if (pSocket->type() != pSocketForward->type()) + return; + + const char **ppszOutputPorts = NULL; + const char **ppszInputPorts = NULL; + if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { + ppszOutputPorts = m_ppszOAudioPorts; + ppszInputPorts = m_ppszIAudioPorts; + } + else + if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) { + ppszOutputPorts = m_ppszOMidiPorts; + ppszInputPorts = m_ppszIMidiPorts; + } + + if (ppszOutputPorts == NULL || ppszInputPorts == NULL) + return; + + QStringListIterator iterPlug(pSocket->pluglist()); + QStringListIterator iterPlugForward(pSocketForward->pluglist()); + while (iterPlug.hasNext() && iterPlugForward.hasNext()) { + // Check audio port connection sequentially... + const QString& sPlug = iterPlug.next(); + const QString& sPlugForward = iterPlugForward.next(); + const char *pszPortForward = findJackPort(ppszInputPorts, + pSocketForward->clientName(), sPlugForward, 0); + if (pszPortForward) { + const char *pszPort = findJackPort(ppszInputPorts, + pSocket->clientName(), sPlug, 0); + if (pszPort) + connectJackForwardPorts(pszPort, pszPortForward); + } + } +} + + +// ALSA socket/ports forwarding scan... +void qjackctlPatchbayRack::connectAlsaForwardPorts ( + qjackctlAlsaMidiPort *pPort, qjackctlAlsaMidiPort *pPortForward ) +{ +#ifdef CONFIG_ALSA_SEQ + + // Grab current connections of target port... + QList midiports; + loadAlsaConnections(midiports, pPort, false); + + snd_seq_query_subscribe_t *pAlsaSubs; + snd_seq_addr_t seq_addr; + + snd_seq_query_subscribe_alloca(&pAlsaSubs); + + // Check for inputs from output... + snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_WRITE); + snd_seq_query_subscribe_set_index(pAlsaSubs, 0); + seq_addr.client = pPortForward->iAlsaClient; + seq_addr.port = pPortForward->iAlsaPort; + snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); + while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { + seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); + // Need to lookup if already connected... + bool bConnected = false; + QListIterator iter(midiports); + while (iter.hasNext()) { + qjackctlAlsaMidiPort *pMidiPort = iter.next(); + if (pMidiPort->iAlsaClient == seq_addr.client && + pMidiPort->iAlsaPort == seq_addr.port) { + bConnected = true; + break; + } + } + // Make and/or just report the connection... + qjackctlAlsaMidiPort oport; + setAlsaPort(&oport, seq_addr.client, seq_addr.port); + if (bConnected) { + checkAlsaPorts(&oport, pPort); + } else { + connectAlsaPorts(&oport, pPort); + } + snd_seq_query_subscribe_set_index(pAlsaSubs, + snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); + } + + qDeleteAll(midiports); + midiports.clear(); + +#endif // CONFIG_ALSA_SEQ +} + +void qjackctlPatchbayRack::connectAlsaForward ( + qjackctlPatchbaySocket *pSocket, qjackctlPatchbaySocket *pSocketForward ) +{ + if (pSocket == NULL || pSocketForward == NULL) + return; + if (pSocket->type() != pSocketForward->type() || + pSocket->type() != QJACKCTL_SOCKETTYPE_ALSA_MIDI) + return; + + QStringListIterator iterPlug(pSocket->pluglist()); + QStringListIterator iterPlugForward(pSocketForward->pluglist()); + while (iterPlug.hasNext() && iterPlugForward.hasNext()) { + // Check MIDI port connection sequentially... + const QString& sPlug = iterPlug.next(); + const QString& sPlugForward = iterPlugForward.next(); + qjackctlAlsaMidiPort *pPortForward = findAlsaPort(m_imidiports, + pSocketForward->clientName(), sPlugForward, 0); + if (pPortForward) { + qjackctlAlsaMidiPort *pPort = findAlsaPort(m_imidiports, + pSocket->clientName(), sPlug, 0); + if (pPort) + connectAlsaForwardPorts(pPort, pPortForward); + } + } +} + + +// Common socket forwrading scan... +void qjackctlPatchbayRack::connectForwardScan ( int iSocketType ) +{ + // First, make a copy of a seriously forwarded socket list... + QList socketlist; + + QListIterator isocket(m_isocketlist); + while (isocket.hasNext()) { + qjackctlPatchbaySocket *pSocket = isocket.next(); + if (pSocket->type() != iSocketType) + continue; + if (pSocket->forward().isEmpty()) + continue; + socketlist.append(pSocket); + } + + // Second, scan for input forwarded sockets... + QListIterator iter(socketlist); + while (iter.hasNext()) { + qjackctlPatchbaySocket *pSocket = iter.next(); + qjackctlPatchbaySocket *pSocketForward + = findSocket(m_isocketlist, pSocket->forward()); + if (pSocketForward == NULL) + continue; + switch (iSocketType) { + case QJACKCTL_SOCKETTYPE_JACK_AUDIO: + case QJACKCTL_SOCKETTYPE_JACK_MIDI: + connectJackForward(pSocket, pSocketForward); + break; + case QJACKCTL_SOCKETTYPE_ALSA_MIDI: + connectAlsaForward(pSocket, pSocketForward); + break; + } + } +} + + +//---------------------------------------------------------------------- +// JACK snapshot. + +void qjackctlPatchbayRack::connectJackSnapshotEx ( int iSocketType ) +{ + if (m_pJackClient == NULL) + return; + + const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; +#ifdef CONFIG_JACK_MIDI + if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) + pszJackPortType = JACK_DEFAULT_MIDI_TYPE; +#endif + + const char **ppszInputPorts = jack_get_ports(m_pJackClient, + 0, pszJackPortType, JackPortIsInput); + if (ppszInputPorts) { + for (int i = 0; ppszInputPorts[i]; ++i) { + const char *pszInputPort = ppszInputPorts[i]; + const QString sInputPort = QString::fromUtf8(pszInputPort); + const QString& sIClient = sInputPort.section(':', 0, 0); + const QString& sIPort = sInputPort.section(':', 1); + qjackctlPatchbaySnapshot::add_socket( + isocketlist(), sIClient, sIPort, iSocketType); + } + ::free(ppszInputPorts); + } + + const char **ppszOutputPorts = jack_get_ports(m_pJackClient, + 0, pszJackPortType, JackPortIsOutput); + if (ppszOutputPorts == NULL) + return; + + qjackctlPatchbaySnapshot snapshot; + + for (int i = 0; ppszOutputPorts[i]; ++i) { + const char *pszOutputPort = ppszOutputPorts[i]; + const QString sOutputPort = QString::fromUtf8(pszOutputPort); + const QString& sOClient = sOutputPort.section(':', 0, 0); + const QString& sOPort = sOutputPort.section(':', 1); + qjackctlPatchbaySnapshot::add_socket( + osocketlist(), sOClient, sOPort, iSocketType); + // Check for inputs from output... + ppszInputPorts = jack_port_get_all_connections( + m_pJackClient, jack_port_by_name(m_pJackClient, pszOutputPort)); + if (ppszInputPorts == NULL) + continue; + for (int j = 0 ; ppszInputPorts[j]; ++j) { + const char *pszInputPort = ppszInputPorts[j]; + const QString sInputPort = QString::fromUtf8(pszInputPort); + const QString& sIClient = sInputPort.section(':', 0, 0); + const QString& sIPort = sInputPort.section(':', 1); + snapshot.append(sOClient, sOPort, sIClient, sIPort); + } + ::free(ppszInputPorts); + } + ::free(ppszOutputPorts); + + snapshot.commit(this, iSocketType); +} + + +void qjackctlPatchbayRack::connectJackSnapshot ( jack_client_t *pJackClient ) +{ + if (pJackClient == NULL || m_pJackClient) + return; + + // Cache JACK client descriptor. + m_pJackClient = pJackClient; + + connectJackSnapshotEx(QJACKCTL_SOCKETTYPE_JACK_AUDIO); + connectJackSnapshotEx(QJACKCTL_SOCKETTYPE_JACK_MIDI); + + // Done. + m_pJackClient = NULL; +} + + +//---------------------------------------------------------------------- +// ALSA snapshot. + +void qjackctlPatchbayRack::connectAlsaSnapshot ( snd_seq_t *pAlsaSeq ) +{ + if (pAlsaSeq == NULL || m_pAlsaSeq) + return; + + // Cache sequencer descriptor. + m_pAlsaSeq = pAlsaSeq; + +#ifdef CONFIG_ALSA_SEQ + + QList imidiports; + loadAlsaPorts(imidiports, false); + + QListIterator iport(imidiports); + while (iport.hasNext()) { + qjackctlAlsaMidiPort *pIPort = iport.next(); + qjackctlPatchbaySnapshot::add_socket( + isocketlist(), pIPort->sClientName, pIPort->sPortName, + QJACKCTL_SOCKETTYPE_ALSA_MIDI); + } + + qDeleteAll(imidiports); + imidiports.clear(); + + qjackctlPatchbaySnapshot snapshot; + + QList omidiports; + loadAlsaPorts(omidiports, true); + + QListIterator oport(omidiports); + while (oport.hasNext()) { + qjackctlAlsaMidiPort *pOPort = oport.next(); + qjackctlPatchbaySnapshot::add_socket( + osocketlist(), pOPort->sClientName, pOPort->sPortName, + QJACKCTL_SOCKETTYPE_ALSA_MIDI); + loadAlsaConnections(imidiports, pOPort, true); + QListIterator iport(imidiports); + while (iport.hasNext()) { + qjackctlAlsaMidiPort *pIPort = iport.next(); + snapshot.append( + pOPort->sClientName, pOPort->sPortName, + pIPort->sClientName, pIPort->sPortName); + } + qDeleteAll(imidiports); + imidiports.clear(); + } + + qDeleteAll(omidiports); + omidiports.clear(); + + snapshot.commit(this, QJACKCTL_SOCKETTYPE_ALSA_MIDI); + +#endif + + // Done. + m_pAlsaSeq = NULL; +} + + +// qjackctlPatchbayRack.cpp diff -Nru qjackctl-0.3.4/src/qjackctlPatchbayRack.h qjackctl-0.3.6/src/qjackctlPatchbayRack.h --- qjackctl-0.3.4/src/qjackctlPatchbayRack.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlPatchbayRack.h 2010-02-13 11:39:16.000000000 +0000 @@ -0,0 +1,325 @@ +// qjackctlPatchbayRack.h +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlPatchbayRack_h +#define __qjackctlPatchbayRack_h + +#include "qjackctlAbout.h" + +#include + +#include + +#ifdef CONFIG_ALSA_SEQ +#include +#else +typedef void snd_seq_t; +#endif + +// Patchbay socket types. +#define QJACKCTL_SOCKETTYPE_JACK_AUDIO 0 +#define QJACKCTL_SOCKETTYPE_JACK_MIDI 1 +#define QJACKCTL_SOCKETTYPE_ALSA_MIDI 2 + +// Patchbay slot normalization modes. +#define QJACKCTL_SLOTMODE_OPEN 0 +#define QJACKCTL_SLOTMODE_HALF 1 +#define QJACKCTL_SLOTMODE_FULL 2 + +// Patchbay change signal flags. +#define QJACKCTL_CABLE_FAILED 0 +#define QJACKCTL_CABLE_CHECKED 1 +#define QJACKCTL_CABLE_CONNECTED 2 +#define QJACKCTL_CABLE_DISCONNECTED 3 + + +// Struct name says it all. +struct qjackctlAlsaMidiPort +{ + QString sClientName; + QString sPortName; + int iAlsaClient; + int iAlsaPort; +}; + +// Patchbay socket definition. +class qjackctlPatchbaySocket +{ +public: + + // Constructor. + qjackctlPatchbaySocket(const QString& sSocketName, const QString& sClientName, int iSocketType); + // Default destructor. + ~qjackctlPatchbaySocket(); + + // Socket property accessors. + const QString& name() const; + const QString& clientName() const; + int type() const; + bool isExclusive() const; + const QString& forward() const; + + // Socket property methods. + void setName(const QString& sSocketName); + void setClientName(const QString& sClientName); + void setType(int iSocketType); + void setExclusive(bool bExclusive); + void setForward(const QString& sSocketForward); + + // Plug list primitive methods. + void addPlug(const QString& sPlugName); + void removePlug(const QString& sPlugName); + + // Plug list accessor. + QStringList& pluglist(); + +private: + + // Properties. + QString m_sSocketName; + QString m_sClientName; + int m_iSocketType; + bool m_bExclusive; + QString m_sSocketForward; + + // Patchbay socket plug list. + QStringList m_pluglist; +}; + + +// Patchbay socket slot definition. +class qjackctlPatchbaySlot +{ +public: + + // Constructor. + qjackctlPatchbaySlot(const QString& sSlotName, int iSlotMode = QJACKCTL_SLOTMODE_OPEN); + // Default destructor. + ~qjackctlPatchbaySlot(); + + // Slot property accessors. + const QString& name() const; + int mode() const; + + // Slot property methods. + void setName(const QString& sSlotName); + void setMode(int iSlotMode); + + // Socket methods. + void setOutputSocket(qjackctlPatchbaySocket *pSocket); + void setInputSocket(qjackctlPatchbaySocket *pSocket); + + // Socket accessors. + qjackctlPatchbaySocket *outputSocket() const; + qjackctlPatchbaySocket *inputSocket() const; + +private: + + // Slot properties. + QString m_sSlotName; + int m_iSlotMode; + + // Socket references. + qjackctlPatchbaySocket *m_pOutputSocket; + qjackctlPatchbaySocket *m_pInputSocket; +}; + + +// Patchbay cable connection definition. +class qjackctlPatchbayCable +{ +public: + + // Constructor. + qjackctlPatchbayCable(qjackctlPatchbaySocket *pOutputSocket, + qjackctlPatchbaySocket *pInputSocket); + // Default destructor. + ~qjackctlPatchbayCable(); + + // Socket methods. + void setOutputSocket(qjackctlPatchbaySocket *pSocket); + void setInputSocket(qjackctlPatchbaySocket *pSocket); + + // Socket accessors. + qjackctlPatchbaySocket *outputSocket() const; + qjackctlPatchbaySocket *inputSocket() const; + +private: + + // Socket references. + qjackctlPatchbaySocket *m_pOutputSocket; + qjackctlPatchbaySocket *m_pInputSocket; +}; + + +// Patchbay rack profile definition. +class qjackctlPatchbayRack : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlPatchbayRack(); + // Default destructor. + ~qjackctlPatchbayRack(); + + // Common socket list primitive methods. + void addSocket(QList& socketlist, + qjackctlPatchbaySocket *pSocket); + void removeSocket(QList& socketlist, + qjackctlPatchbaySocket *pSocket); + + // Slot list primitive methods. + void addSlot(qjackctlPatchbaySlot *pSlot); + void removeSlot(qjackctlPatchbaySlot *pSlot); + + // Cable list primitive methods. + void addCable(qjackctlPatchbayCable *pCable); + void removeCable(qjackctlPatchbayCable *pCable); + + // Common socket finder. + qjackctlPatchbaySocket *findSocket( + QList& socketlist, const QString& sSocketName); + // Slot finders. + qjackctlPatchbaySlot *findSlot(const QString& sSlotName); + // Cable finder. + qjackctlPatchbayCable *findCable( + const QString& sOutputSocket, const QString& sInputSocket); + qjackctlPatchbayCable *findCable(qjackctlPatchbayCable *pCablePtr); + + // Cable finder (logical matching by client/port names). + qjackctlPatchbayCable *findCable ( + const QString& sOClientName, const QString& sOPortName, + const QString& sIClientName, const QString& sIPortName, + int iSocketType); + + // Patchbay cleaner. + void clear(); + + // Patchbay rack socket list accessors. + QList& osocketlist(); + QList& isocketlist(); + // Patchbay rack slots list accessor. + QList& slotlist(); + // Patchbay cable connections list accessor. + QList& cablelist(); + + // Overloaded cable connection persistence scan cycle methods. + void connectJackScan(jack_client_t *pJackClient); + void connectAlsaScan(snd_seq_t *pAlsaSeq); + + // Patchbay snapshot methods. + void connectJackSnapshot(jack_client_t *pJackClient); + void connectAlsaSnapshot(snd_seq_t *pAlsaSeq); + +signals: + + // Cable connection change signal. + void cableConnected(const QString& sOutputPort, + const QString& sInputPort, unsigned int uiCableFlags); + +private: + + // Audio connection scan related private methods. + const char *findJackPort(const char **ppszJackPorts, + const QString& sClientName, const QString& sPortName, int n = 0); + void connectJackPorts( + const char *pszOutputPort, const char *pszInputPort); + void disconnectJackPorts( + const char *pszOutputPort, const char *pszInputPort); + void checkJackPorts( + const char *pszOutputPort, const char *pszInputPort); + void connectJackSocketPorts( + qjackctlPatchbaySocket *pOutputSocket, const char *pszOutputPort, + qjackctlPatchbaySocket *pInputSocket, const char *pszInputPort); + void connectJackCable( + qjackctlPatchbaySocket *pOutputSocket, + qjackctlPatchbaySocket *pInputSocket); + + // MIDI connection scan related private methods. + void loadAlsaPorts(QList& midiports, bool bReadable); + qjackctlAlsaMidiPort *findAlsaPort(QList& midiports, + const QString& sClientName, const QString& sPortName, int n); + QString getAlsaPortName(qjackctlAlsaMidiPort *pAlsaPort); + void setAlsaPort(qjackctlAlsaMidiPort *pAlsaPort, + int iAlsaClient, int iAlsaPort); + void connectAlsaPorts( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); + void disconnectAlsaPorts( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); + void checkAlsaPorts( + qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); + void connectAlsaSocketPorts( + qjackctlPatchbaySocket *pOutputSocket, qjackctlAlsaMidiPort *pOutputPort, + qjackctlPatchbaySocket *pInputSocket, qjackctlAlsaMidiPort *pInputPort); + void connectAlsaCable( + qjackctlPatchbaySocket *pOutputSocket, + qjackctlPatchbaySocket *pInputSocket); + + void loadAlsaConnections(QList& midiports, + qjackctlAlsaMidiPort *pAlsaPort, bool bReadable); + + // Audio socket/ports forwarding executive methods. + void connectJackForwardPorts( + const char *pszPort, const char *pszPortForward); + void connectJackForward( + qjackctlPatchbaySocket *pSocket, + qjackctlPatchbaySocket *pSocketForward); + + // MIDI socket/ports forwarding executive methods. + void connectAlsaForwardPorts( + qjackctlAlsaMidiPort *pPort, qjackctlAlsaMidiPort *pPortForward); + void connectAlsaForward( + qjackctlPatchbaySocket *pSocket, + qjackctlPatchbaySocket *pSocketForward); + + // Common socket forwarding scan method. + void connectForwardScan(int iSocketType); + + // JACK snapshot executive. + void connectJackSnapshotEx(int iSocketType); + + // Patchbay sockets lists. + QList m_osocketlist; + QList m_isocketlist; + // Patchbay rack slots list. + QList m_slotlist; + // Patchbay cable connections list. + QList m_cablelist; + + // Audio connection persistence cache variables. + jack_client_t *m_pJackClient; + const char **m_ppszOAudioPorts; + const char **m_ppszIAudioPorts; + const char **m_ppszOMidiPorts; + const char **m_ppszIMidiPorts; + + // MIDI connection persistence cache variables. + snd_seq_t *m_pAlsaSeq; + QList m_omidiports; + QList m_imidiports; +}; + + +#endif // __qjackctlPatchbayRack_h + +// qjackctlPatchbayRack.h diff -Nru qjackctl-0.3.4/src/qjackctlSetup.cpp qjackctl-0.3.6/src/qjackctlSetup.cpp --- qjackctl-0.3.4/src/qjackctlSetup.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSetup.cpp 2009-11-02 18:31:27.000000000 +0000 @@ -0,0 +1,710 @@ +// qjackctlSetup.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlSetup.h" + +#include +#include +#include + +#include +#include + + +// Constructor. +qjackctlSetup::qjackctlSetup (void) + : m_settings(QJACKCTL_DOMAIN, QJACKCTL_TITLE) +{ + bStartJack = false; + sDefPresetName = QObject::tr("(default)"); + + loadSetup(); +} + +// Destructor; +qjackctlSetup::~qjackctlSetup (void) +{ + saveSetup(); +} + + +// Explicit load method. +void qjackctlSetup::loadSetup (void) +{ + m_settings.beginGroup("/Presets"); + sDefPreset = m_settings.value("/DefPreset", sDefPresetName).toString(); + QString sPrefix = "/Preset%1"; + int i = 0; + for (;;) { + QString sItem = m_settings.value(sPrefix.arg(++i)).toString(); + if (sItem.isEmpty()) + break; + presets.append(sItem); + } + m_settings.endGroup(); + + m_settings.beginGroup("/Options"); + bSingleton = m_settings.value("/Singleton", true).toBool(); +// sServerName = m_settings.value("/ServerName").toString(); + bStartJack = m_settings.value("/StartJack", false).toBool(); + bStartupScript = m_settings.value("/StartupScript", true).toBool(); + sStartupScriptShell = m_settings.value("/StartupScriptShell", "artsshell -q terminate").toString(); + bPostStartupScript = m_settings.value("/PostStartupScript", false).toBool(); + sPostStartupScriptShell = m_settings.value("/PostStartupScriptShell").toString(); + bShutdownScript = m_settings.value("/ShutdownScript", false).toBool(); + sShutdownScriptShell = m_settings.value("/ShutdownScriptShell").toString(); + bPostShutdownScript = m_settings.value("/PostShutdownScript", true).toBool(); + sPostShutdownScriptShell = m_settings.value("/PostShutdownScriptShell", "killall jackd").toString(); + bStdoutCapture = m_settings.value("/StdoutCapture", true).toBool(); + sXrunRegex = m_settings.value("/XrunRegex", "xrun of at least ([0-9|\\.]+) msecs").toString(); + bXrunIgnoreFirst = m_settings.value("/XrunIgnoreFirst", false).toBool(); + bActivePatchbay = m_settings.value("/ActivePatchbay", false).toBool(); + sActivePatchbayPath = m_settings.value("/ActivePatchbayPath").toString(); +#ifdef CONFIG_AUTO_REFRESH + bAutoRefresh = m_settings.value("/AutoRefresh", false).toBool(); + iTimeRefresh = m_settings.value("/TimeRefresh", 10).toInt(); +#endif + bMessagesLog = m_settings.value("/MessagesLog", false).toBool(); + sMessagesLogPath = m_settings.value("/MessagesLogPath", "qjackctl.log").toString(); + bBezierLines = m_settings.value("/BezierLines", false).toBool(); + iTimeDisplay = m_settings.value("/TimeDisplay", 0).toInt(); + iTimeFormat = m_settings.value("/TimeFormat", 0).toInt(); + sMessagesFont = m_settings.value("/MessagesFont").toString(); + bMessagesLimit = m_settings.value("/MessagesLimit", true).toBool(); + iMessagesLimitLines = m_settings.value("/MessagesLimitLines", 1000).toInt(); + sDisplayFont1 = m_settings.value("/DisplayFont1").toString(); + sDisplayFont2 = m_settings.value("/DisplayFont2").toString(); + bDisplayEffect = m_settings.value("/DisplayEffect", true).toBool(); + bDisplayBlink = m_settings.value("/DisplayBlink", true).toBool(); + iJackClientPortAlias = m_settings.value("/JackClientPortAlias", 0).toInt(); + iConnectionsIconSize = m_settings.value("/ConnectionsIconSize", QJACKCTL_ICON_16X16).toInt(); + sConnectionsFont = m_settings.value("/ConnectionsFont").toString(); + bQueryClose = m_settings.value("/QueryClose", true).toBool(); + bKeepOnTop = m_settings.value("/KeepOnTop", false).toBool(); + bSystemTray = m_settings.value("/SystemTray", false).toBool(); + bStartMinimized = m_settings.value("/StartMinimized", false).toBool(); + bDelayedSetup = m_settings.value("/DelayedSetup", false).toBool(); + bServerConfig = m_settings.value("/ServerConfig", true).toBool(); + sServerConfigName = m_settings.value("/ServerConfigName", ".jackdrc").toString(); + bServerConfigTemp = m_settings.value("/ServerConfigTemp", false).toBool(); + bQueryShutdown = m_settings.value("/QueryShutdown", true).toBool(); + bAlsaSeqEnabled = m_settings.value("/AlsaSeqEnabled", true).toBool(); + bDBusEnabled = m_settings.value("/DBusEnabled", false).toBool(); + bAliasesEnabled = m_settings.value("/AliasesEnabled", false).toBool(); + bAliasesEditing = m_settings.value("/AliasesEditing", false).toBool(); + bLeftButtons = m_settings.value("/LeftButtons", true).toBool(); + bRightButtons = m_settings.value("/RightButtons", true).toBool(); + bTransportButtons = m_settings.value("/TransportButtons", true).toBool(); + bTextLabels = m_settings.value("/TextLabels", true).toBool(); + iBaseFontSize = m_settings.value("/BaseFontSize", 0).toInt(); + m_settings.endGroup(); + + m_settings.beginGroup("/Defaults"); + sPatchbayPath = m_settings.value("/PatchbayPath").toString(); + m_settings.endGroup(); + + // Load recent patchbay list... + m_settings.beginGroup("/Patchbays"); + sPrefix = "/Patchbay%1"; + i = 0; + for (;;) { + QString sItem = m_settings.value(sPrefix.arg(++i)).toString(); + if (sItem.isEmpty()) + break; + patchbays.append(sItem); + } + m_settings.endGroup(); +} + + +// Explicit save method. +void qjackctlSetup::saveSetup (void) +{ + // Save all settings and options... + m_settings.beginGroup("/Program"); + m_settings.setValue("/Version", QJACKCTL_VERSION); + m_settings.endGroup(); + + m_settings.beginGroup("/Presets"); + m_settings.setValue("/DefPreset", sDefPreset); + // Save last preset list. + QString sPrefix = "/Preset%1"; + int i = 0; + QStringListIterator iter(presets); + while (iter.hasNext()) + m_settings.setValue(sPrefix.arg(++i), iter.next()); + // Cleanup old entries, if any... + while (!m_settings.value(sPrefix.arg(++i)).toString().isEmpty()) + m_settings.remove(sPrefix.arg(i)); + m_settings.endGroup(); + + m_settings.beginGroup("/Options"); + m_settings.setValue("/Singleton", bSingleton); +// m_settings.setValue("/ServerName", sServerName); + m_settings.setValue("/StartJack", bStartJack); + m_settings.setValue("/StartupScript", bStartupScript); + m_settings.setValue("/StartupScriptShell", sStartupScriptShell); + m_settings.setValue("/PostStartupScript", bPostStartupScript); + m_settings.setValue("/PostStartupScriptShell", sPostStartupScriptShell); + m_settings.setValue("/ShutdownScript", bShutdownScript); + m_settings.setValue("/ShutdownScriptShell", sShutdownScriptShell); + m_settings.setValue("/PostShutdownScript", bPostShutdownScript); + m_settings.setValue("/PostShutdownScriptShell", sPostShutdownScriptShell); + m_settings.setValue("/StdoutCapture", bStdoutCapture); + m_settings.setValue("/XrunRegex", sXrunRegex); + m_settings.setValue("/XrunIgnoreFirst", bXrunIgnoreFirst); + m_settings.setValue("/ActivePatchbay", bActivePatchbay); + m_settings.setValue("/ActivePatchbayPath", sActivePatchbayPath); +#ifdef CONFIG_AUTO_REFRESH + m_settings.setValue("/AutoRefresh", bAutoRefresh); + m_settings.setValue("/TimeRefresh", iTimeRefresh); +#endif + m_settings.setValue("/MessagesLog", bMessagesLog); + m_settings.setValue("/MessagesLogPath", sMessagesLogPath); + m_settings.setValue("/BezierLines", bBezierLines); + m_settings.setValue("/TimeDisplay", iTimeDisplay); + m_settings.setValue("/TimeFormat", iTimeFormat); + m_settings.setValue("/MessagesFont", sMessagesFont); + m_settings.setValue("/MessagesLimit", bMessagesLimit); + m_settings.setValue("/MessagesLimitLines", iMessagesLimitLines); + m_settings.setValue("/DisplayFont1", sDisplayFont1); + m_settings.setValue("/DisplayFont2", sDisplayFont2); + m_settings.setValue("/DisplayEffect", bDisplayEffect); + m_settings.setValue("/DisplayBlink", bDisplayBlink); + m_settings.setValue("/JackClientPortAlias", iJackClientPortAlias); + m_settings.setValue("/ConnectionsIconSize", iConnectionsIconSize); + m_settings.setValue("/ConnectionsFont", sConnectionsFont); + m_settings.setValue("/QueryClose", bQueryClose); + m_settings.setValue("/KeepOnTop", bKeepOnTop); + m_settings.setValue("/SystemTray", bSystemTray); + m_settings.setValue("/StartMinimized", bStartMinimized); + m_settings.setValue("/DelayedSetup", bDelayedSetup); + m_settings.setValue("/ServerConfig", bServerConfig); + m_settings.setValue("/ServerConfigName", sServerConfigName); + m_settings.setValue("/ServerConfigTemp", bServerConfigTemp); + m_settings.setValue("/QueryShutdown", bQueryShutdown); + m_settings.setValue("/AlsaSeqEnabled", bAlsaSeqEnabled); + m_settings.setValue("/DBusEnabled", bDBusEnabled); + m_settings.setValue("/AliasesEnabled", bAliasesEnabled); + m_settings.setValue("/AliasesEditing", bAliasesEditing); + m_settings.setValue("/LeftButtons", bLeftButtons); + m_settings.setValue("/RightButtons", bRightButtons); + m_settings.setValue("/TransportButtons", bTransportButtons); + m_settings.setValue("/TextLabels", bTextLabels); + m_settings.setValue("/BaseFontSize", iBaseFontSize); + m_settings.endGroup(); + + m_settings.beginGroup("/Defaults"); + m_settings.setValue("/PatchbayPath", sPatchbayPath); + m_settings.endGroup(); + + // Save patchbay list... + m_settings.beginGroup("/Patchbays"); + sPrefix = "/Patchbay%1"; + i = 0; + QStringListIterator iter2(patchbays); + while (iter2.hasNext()) + m_settings.setValue(sPrefix.arg(++i), iter2.next()); + // Cleanup old entries, if any... + while (!m_settings.value(sPrefix.arg(++i)).toString().isEmpty()) + m_settings.remove(sPrefix.arg(i)); + m_settings.endGroup(); + + // Commit all changes to disk. + m_settings.sync(); +} + + +//--------------------------------------------------------------------------- +// Aliases preset management methods. + +bool qjackctlSetup::loadAliases ( const QString& sPreset ) +{ + QString sSuffix; + if (sPreset != sDefPresetName && !sPreset.isEmpty()) { + sSuffix = '/' + sPreset; + // Check if on list. + if (!presets.contains(sPreset)) + return false; + } + + // Load preset aliases... + const QString sAliasesKey = "/Aliases" + sSuffix; + m_settings.beginGroup(sAliasesKey); + m_settings.beginGroup("/Jack"); // FIXME: Audio + aliasAudioOutputs.loadSettings(m_settings, "/Outputs"); + aliasAudioInputs.loadSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.beginGroup("/Midi"); + aliasMidiOutputs.loadSettings(m_settings, "/Outputs"); + aliasMidiInputs.loadSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.beginGroup("/Alsa"); + aliasAlsaOutputs.loadSettings(m_settings, "/Outputs"); + aliasAlsaInputs.loadSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.endGroup(); + + return true; +} + +bool qjackctlSetup::saveAliases ( const QString& sPreset ) +{ + QString sSuffix; + if (sPreset != sDefPresetName && !sPreset.isEmpty()) { + sSuffix = "/" + sPreset; + // Append to list if not already. + if (!presets.contains(sPreset)) + presets.prepend(sPreset); + } + + // Save preset aliases... + const QString sAliasesKey = "/Aliases" + sSuffix; + m_settings.remove(sAliasesKey); + m_settings.beginGroup(sAliasesKey); + m_settings.beginGroup("/Jack"); // FIXME: Audio + aliasAudioOutputs.saveSettings(m_settings, "/Outputs"); + aliasAudioInputs.saveSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.beginGroup("/Midi"); + aliasMidiOutputs.saveSettings(m_settings, "/Outputs"); + aliasMidiInputs.saveSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.beginGroup("/Alsa"); + aliasAlsaOutputs.saveSettings(m_settings, "/Outputs"); + aliasAlsaInputs.saveSettings(m_settings, "/Inputs"); + m_settings.endGroup(); + m_settings.endGroup(); + + return true; +} + + +//--------------------------------------------------------------------------- +// Preset management methods. + +bool qjackctlSetup::loadPreset ( qjackctlPreset& preset, const QString& sPreset ) +{ + QString sSuffix; + if (sPreset != sDefPresetName && !sPreset.isEmpty()) { + sSuffix = '/' + sPreset; + // Check if on list. + if (!presets.contains(sPreset)) + return false; + } + + m_settings.beginGroup("/Settings" + sSuffix); + preset.sServer = m_settings.value("/Server", "jackd").toString(); + preset.bRealtime = m_settings.value("/Realtime", true).toBool(); + preset.bSoftMode = m_settings.value("/SoftMode", false).toBool(); + preset.bMonitor = m_settings.value("/Monitor", false).toBool(); + preset.bShorts = m_settings.value("/Shorts", false).toBool(); + preset.bNoMemLock = m_settings.value("/NoMemLock", false).toBool(); + preset.bUnlockMem = m_settings.value("/UnlockMem", false).toBool(); + preset.bHWMon = m_settings.value("/HWMon", false).toBool(); + preset.bHWMeter = m_settings.value("/HWMeter", false).toBool(); + preset.bIgnoreHW = m_settings.value("/IgnoreHW", false).toBool(); + preset.iPriority = m_settings.value("/Priority", 0).toInt(); + preset.iFrames = m_settings.value("/Frames", 1024).toInt(); + preset.iSampleRate = m_settings.value("/SampleRate", 48000).toInt(); + preset.iPeriods = m_settings.value("/Periods", 2).toInt(); + preset.iWordLength = m_settings.value("/WordLength", 16).toInt(); + preset.iWait = m_settings.value("/Wait", 21333).toInt(); + preset.iChan = m_settings.value("/Chan", 0).toInt(); + preset.sDriver = m_settings.value("/Driver", "alsa").toString(); + preset.sInterface = m_settings.value("/Interface").toString(); + preset.iAudio = m_settings.value("/Audio", 0).toInt(); + preset.iDither = m_settings.value("/Dither", 0).toInt(); + preset.iTimeout = m_settings.value("/Timeout", 500).toInt(); + preset.sInDevice = m_settings.value("/InDevice").toString(); + preset.sOutDevice = m_settings.value("/OutDevice").toString(); + preset.iInChannels = m_settings.value("/InChannels", 0).toInt(); + preset.iOutChannels = m_settings.value("/OutChannels", 0).toInt(); + preset.iInLatency = m_settings.value("/InLatency", 0).toInt(); + preset.iOutLatency = m_settings.value("/OutLatency", 0).toInt(); + preset.iStartDelay = m_settings.value("/StartDelay", 2).toInt(); + preset.bVerbose = m_settings.value("/Verbose", false).toBool(); + preset.iPortMax = m_settings.value("/PortMax", 256).toInt(); + preset.sMidiDriver = m_settings.value("/MidiDriver").toString(); + m_settings.endGroup(); + +#ifdef CONFIG_JACK_MIDI + if (!preset.sMidiDriver.isEmpty() && + preset.sMidiDriver != "raw" && + preset.sMidiDriver != "seq") + preset.sMidiDriver.clear(); +#endif + + return true; +} + +bool qjackctlSetup::savePreset ( qjackctlPreset& preset, const QString& sPreset ) +{ + QString sSuffix; + if (sPreset != sDefPresetName && !sPreset.isEmpty()) { + sSuffix = '/' + sPreset; + // Append to list if not already. + if (!presets.contains(sPreset)) + presets.prepend(sPreset); + } + + m_settings.beginGroup("/Settings" + sSuffix); + m_settings.setValue("/Server", preset.sServer); + m_settings.setValue("/Realtime", preset.bRealtime); + m_settings.setValue("/SoftMode", preset.bSoftMode); + m_settings.setValue("/Monitor", preset.bMonitor); + m_settings.setValue("/Shorts", preset.bShorts); + m_settings.setValue("/NoMemLock", preset.bNoMemLock); + m_settings.setValue("/UnlockMem", preset.bUnlockMem); + m_settings.setValue("/HWMon", preset.bHWMon); + m_settings.setValue("/HWMeter", preset.bHWMeter); + m_settings.setValue("/IgnoreHW", preset.bIgnoreHW); + m_settings.setValue("/Priority", preset.iPriority); + m_settings.setValue("/Frames", preset.iFrames); + m_settings.setValue("/SampleRate", preset.iSampleRate); + m_settings.setValue("/Periods", preset.iPeriods); + m_settings.setValue("/WordLength", preset.iWordLength); + m_settings.setValue("/Wait", preset.iWait); + m_settings.setValue("/Chan", preset.iChan); + m_settings.setValue("/Driver", preset.sDriver); + m_settings.setValue("/Interface", preset.sInterface); + m_settings.setValue("/Audio", preset.iAudio); + m_settings.setValue("/Dither", preset.iDither); + m_settings.setValue("/Timeout", preset.iTimeout); + m_settings.setValue("/InDevice", preset.sInDevice); + m_settings.setValue("/OutDevice", preset.sOutDevice); + m_settings.setValue("/InChannels", preset.iInChannels); + m_settings.setValue("/OutChannels", preset.iOutChannels); + m_settings.setValue("/InLatency", preset.iInLatency); + m_settings.setValue("/OutLatency", preset.iOutLatency); + m_settings.setValue("/StartDelay", preset.iStartDelay); + m_settings.setValue("/Verbose", preset.bVerbose); + m_settings.setValue("/PortMax", preset.iPortMax); + m_settings.setValue("/MidiDriver", preset.sMidiDriver); + m_settings.endGroup(); + + return true; +} + +bool qjackctlSetup::deletePreset ( const QString& sPreset ) +{ + QString sSuffix; + if (sPreset != sDefPresetName && !sPreset.isEmpty()) { + sSuffix = '/' + sPreset; + int iPreset = presets.indexOf(sPreset); + if (iPreset < 0) + return false; + presets.removeAt(iPreset); + m_settings.remove("/Settings" + sSuffix); + m_settings.remove("/Aliases" + sSuffix); + } + return true; +} + + +//------------------------------------------------------------------------- +// Command-line argument stuff. +// + +// Help about command line options. +void qjackctlSetup::print_usage ( const QString& arg0 ) +{ + QTextStream out(stderr); + const QString sEot = "\n\t"; + const QString sEol = "\n\n"; + + out << QObject::tr("Usage: %1" + " [options] [command-and-args]").arg(arg0) + sEol; + out << QJACKCTL_TITLE " - " + QObject::tr(QJACKCTL_SUBTITLE) + sEol; + out << QObject::tr("Options:") + sEol; + out << " -s, --start" + sEot + + QObject::tr("Start JACK audio server immediately") + sEol; + out << " -p, --preset=[label]" + sEot + + QObject::tr("Set default settings preset name") + sEol; + out << " -a, --active-patchbay=[path]" + sEot + + QObject::tr("Set active patchbay definition file") + sEol; + out << " -n, --server-name=[label]" + sEot + + QObject::tr("Set default JACK audio server name") + sEol; + out << " -h, --help" + sEot + + QObject::tr("Show help about command line options") + sEol; + out << " -v, --version" + sEot + + QObject::tr("Show version information") + sEol; +} + + +// Parse command line arguments into m_settings. +bool qjackctlSetup::parse_args ( const QStringList& args ) +{ + QTextStream out(stderr); + const QString sEol = "\n\n"; + int iCmdArgs = 0; + int argc = args.count(); + + for (int i = 1; i < argc; i++) { + + if (iCmdArgs > 0) { + sCmdLine += ' '; + sCmdLine += args.at(i); + iCmdArgs++; + continue; + } + + QString sArg = args.at(i); + QString sVal = QString::null; + int iEqual = sArg.indexOf('='); + if (iEqual >= 0) { + sVal = sArg.right(sArg.length() - iEqual - 1); + sArg = sArg.left(iEqual); + } + else if (i < argc - 1) + sVal = args.at(i + 1); + + if (sArg == "-s" || sArg == "--start") { + bStartJack = true; + } + else if (sArg == "-p" || sArg == "--preset") { + if (sVal.isNull()) { + out << QObject::tr("Option -p requires an argument (preset).") + sEol; + return false; + } + sDefPreset = sVal; + if (iEqual < 0) + i++; + } + else if (sArg == "-a" || sArg == "--active-patchbay") { + if (sVal.isNull()) { + out << QObject::tr("Option -a requires an argument (path).") + sEol; + return false; + } + bActivePatchbay = true; + sActivePatchbayPath = sVal; + if (iEqual < 0) + i++; + } + else if (sArg == "-n" || sArg == "--server-name") { + if (sVal.isNull()) { + out << QObject::tr("Option -n requires an argument (name).") + sEol; + return false; + } + sServerName = sVal; + if (iEqual < 0) + i++; + } + else if (sArg == "-h" || sArg == "--help") { + print_usage(args.at(0)); + return false; + } + else if (sArg == "-v" || sArg == "--version") { + out << QObject::tr("Qt: %1\n").arg(qVersion()); + out << QObject::tr(QJACKCTL_TITLE ": %1\n").arg(QJACKCTL_VERSION); + return false; + } // FIXME: Avoid auto-start jackd stuffed args! + else if (sArg != "-T" && sArg != "-ndefault") { + // Here starts the optional command line... + sCmdLine += sArg; + iCmdArgs++; + } + } + + // HACK: If there's a command line, it must be spawned on background... + if (iCmdArgs > 0) + sCmdLine += " &"; + + // Alright with argument parsing. + return true; +} + + +//--------------------------------------------------------------------------- +// Combo box history persistence helper implementation. + +void qjackctlSetup::loadComboBoxHistory ( QComboBox *pComboBox, int iLimit ) +{ + // Load combobox list from configuration settings file... + m_settings.beginGroup("/History/" + pComboBox->objectName()); + + if (m_settings.childKeys().count() > 0) { + pComboBox->setUpdatesEnabled(false); + pComboBox->setDuplicatesEnabled(false); + pComboBox->clear(); + for (int i = 0; i < iLimit; i++) { + const QString& sText = m_settings.value( + "/Item" + QString::number(i + 1)).toString(); + if (sText.isEmpty()) + break; + pComboBox->addItem(sText); + } + pComboBox->setUpdatesEnabled(true); + } + + m_settings.endGroup(); +} + + +void qjackctlSetup::saveComboBoxHistory ( QComboBox *pComboBox, int iLimit ) +{ + // Add current text as latest item... + const QString& sCurrentText = pComboBox->currentText(); + int iCount = pComboBox->count(); + for (int i = 0; i < iCount; i++) { + const QString& sText = pComboBox->itemText(i); + if (sText == sCurrentText) { + pComboBox->removeItem(i); + iCount--; + break; + } + } + while (iCount >= iLimit) + pComboBox->removeItem(--iCount); + pComboBox->insertItem(0, sCurrentText); + iCount++; + + // Save combobox list to configuration settings file... + m_settings.beginGroup("/History/" + pComboBox->objectName()); + for (int i = 0; i < iCount; i++) { + const QString& sText = pComboBox->itemText(i); + if (sText.isEmpty()) + break; + m_settings.setValue("/Item" + QString::number(i + 1), sText); + } + m_settings.endGroup(); +} + + +//--------------------------------------------------------------------------- +// Splitter widget sizes persistence helper methods. + +void qjackctlSetup::loadSplitterSizes ( QSplitter *pSplitter, + QList& sizes ) +{ + // Try to restore old splitter sizes... + if (pSplitter) { + m_settings.beginGroup("/Splitter/" + pSplitter->objectName()); + QStringList list = m_settings.value("/sizes").toStringList(); + if (!list.isEmpty()) { + sizes.clear(); + QStringListIterator iter(list); + while (iter.hasNext()) + sizes.append(iter.next().toInt()); + } + pSplitter->setSizes(sizes); + m_settings.endGroup(); + } +} + + +void qjackctlSetup::saveSplitterSizes ( QSplitter *pSplitter ) +{ + // Try to save current splitter sizes... + if (pSplitter) { + m_settings.beginGroup("/Splitter/" + pSplitter->objectName()); + QStringList list; + QList sizes = pSplitter->sizes(); + QListIterator iter(sizes); + while (iter.hasNext()) + list.append(QString::number(iter.next())); + if (!list.isEmpty()) + m_settings.setValue("/sizes", list); + m_settings.endGroup(); + } +} + + +//--------------------------------------------------------------------------- +// Widget geometry persistence helper methods. + +void qjackctlSetup::loadWidgetGeometry ( QWidget *pWidget, bool bMinimized ) +{ + // Try to restore old form window positioning. + if (pWidget) { + QPoint fpos; + QSize fsize; + bool bVisible; + m_settings.beginGroup("/Geometry/" + pWidget->objectName()); + fpos.setX(m_settings.value("/x", -1).toInt()); + fpos.setY(m_settings.value("/y", -1).toInt()); + fsize.setWidth(m_settings.value("/width", -1).toInt()); + fsize.setHeight(m_settings.value("/height", -1).toInt()); + bVisible = m_settings.value("/visible", false).toBool(); + m_settings.endGroup(); + new qjackctlDelayedSetup(pWidget, fpos, fsize, bVisible && !bMinimized, + (bDelayedSetup ? 1000 : 0)); + } +} + + +void qjackctlSetup::saveWidgetGeometry ( QWidget *pWidget, bool bMinimized ) +{ + // Try to save form window position... + // (due to X11 window managers ideossincrasies, we better + // only save the form geometry while its up and visible) + if (pWidget) { + m_settings.beginGroup("/Geometry/" + pWidget->objectName()); + bool bVisible = pWidget->isVisible(); + const QPoint& fpos = pWidget->pos(); + const QSize& fsize = pWidget->size(); + m_settings.setValue("/x", fpos.x()); + m_settings.setValue("/y", fpos.y()); + m_settings.setValue("/width", fsize.width()); + m_settings.setValue("/height", fsize.height()); + m_settings.setValue("/visible", bVisible && !bMinimized); + m_settings.endGroup(); + } +} + + +//--------------------------------------------------------------------------- +// Delayed setup option. + +// Delayed widget setup helper class. +qjackctlDelayedSetup::qjackctlDelayedSetup ( QWidget *pWidget, + const QPoint& pos, const QSize& size, bool bVisible, int iDelay ) + : m_pos(pos), m_size(size) +{ + m_pWidget = pWidget; + m_bVisible = bVisible; + + if (iDelay > 0) { + QTimer::singleShot(iDelay, this, SLOT(setup())); + } else { + setup(); + } +} + + +void qjackctlDelayedSetup::setup (void) +{ + if (m_pWidget) { + if (m_pos.x() > 0 && m_pos.y() > 0) + m_pWidget->move(m_pos); + if (m_size.width() > 0 && m_size.height() > 0) + m_pWidget->resize(m_size); + else + m_pWidget->adjustSize(); + if (m_bVisible) + m_pWidget->show(); + } + deleteLater(); +} + + +// end of qjackctlSetup.cpp diff -Nru qjackctl-0.3.4/src/qjackctlSetupForm.cpp qjackctl-0.3.6/src/qjackctlSetupForm.cpp --- qjackctl-0.3.4/src/qjackctlSetupForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSetupForm.cpp 2010-01-05 20:04:51.000000000 +0000 @@ -0,0 +1,1865 @@ +// qjackctlSetupForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlSetupForm.h" + +#include "qjackctlSetup.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef CONFIG_COREAUDIO +#include +#include +#include +#include +#include +#endif + +#ifdef CONFIG_PORTAUDIO +#include +#include +#include +#endif + +#ifdef CONFIG_ALSA_SEQ +#include +#endif + + +//---------------------------------------------------------------------------- +// qjackctlSetupForm -- UI wrapper form. + +// Constructor. +qjackctlSetupForm::qjackctlSetupForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QDialog(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + // No settings descriptor initially (the caller will set it). + m_pSetup = NULL; + + // Setup time-display radio-button group. + m_pTimeDisplayButtonGroup = new QButtonGroup(this); + m_pTimeDisplayButtonGroup->addButton(m_ui.TransportTimeRadioButton, 0); + m_pTimeDisplayButtonGroup->addButton(m_ui.TransportBBTRadioButton, 1); + m_pTimeDisplayButtonGroup->addButton(m_ui.ElapsedResetRadioButton, 2); + m_pTimeDisplayButtonGroup->addButton(m_ui.ElapsedXrunRadioButton, 3); + m_pTimeDisplayButtonGroup->setExclusive(true); + + // Initialize dirty control state. + m_iDirtySetup = 0; + m_iDirtySettings = 0; + m_iDirtyOptions = 0; + + // Set dialog validators... + m_ui.PresetComboBox->setValidator( + new QRegExpValidator(QRegExp("[\\w-]+"), m_ui.PresetComboBox)); + m_ui.FramesComboBox->setValidator( + new QIntValidator(m_ui.FramesComboBox)); + m_ui.SampleRateComboBox->setValidator( + new QIntValidator(m_ui.SampleRateComboBox)); + m_ui.WaitComboBox->setValidator( + new QIntValidator(m_ui.WaitComboBox)); + m_ui.WordLengthComboBox->setValidator( + new QIntValidator(m_ui.WordLengthComboBox)); + m_ui.TimeoutComboBox->setValidator( + new QIntValidator(m_ui.TimeoutComboBox)); +#ifdef CONFIG_AUTO_REFRESH + m_ui.TimeRefreshComboBox->setValidator( + new QIntValidator(m_ui.TimeRefreshComboBox)); +#endif + m_ui.PortMaxComboBox->setValidator( + new QIntValidator(m_ui.PortMaxComboBox)); + m_ui.MessagesLimitLinesComboBox->setValidator( + new QIntValidator(m_ui.MessagesLimitLinesComboBox)); + +#if QT_VERSION >= 0x040200 + m_ui.PresetComboBox->setCompleter(NULL); +#endif + + // UI connections... + + QObject::connect(m_ui.PresetComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(changeCurrentPreset(const QString&))); + QObject::connect(m_ui.PresetSavePushButton, + SIGNAL(clicked()), + SLOT(saveCurrentPreset())); + QObject::connect(m_ui.PresetDeletePushButton, + SIGNAL(clicked()), + SLOT(deleteCurrentPreset())); + + QObject::connect(m_ui.DriverComboBox, + SIGNAL(highlighted(const QString&)), + SLOT(changeDriver(const QString&))); + QObject::connect(m_ui.InterfaceToolButton, + SIGNAL(clicked()), + SLOT(selectInterface())); + QObject::connect(m_ui.InDeviceToolButton, + SIGNAL(clicked()), + SLOT(selectInDevice())); + QObject::connect(m_ui.OutDeviceToolButton, + SIGNAL(clicked()), + SLOT(selectOutDevice())); + QObject::connect(m_ui.AudioComboBox, + SIGNAL(highlighted(int)), + SLOT(changeAudio(int))); + QObject::connect(m_ui.ServerComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.DriverComboBox, + SIGNAL(activated(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.RealtimeCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.NoMemLockCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.SoftModeCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.MonitorCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.ShortsCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.HWMonCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.HWMeterCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.IgnoreHWCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.UnlockMemCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.VerboseCheckBox, + SIGNAL(stateChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.PrioritySpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.FramesComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.SampleRateComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.PeriodsSpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.WordLengthComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.WaitComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.ChanSpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.InterfaceComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.AudioComboBox, + SIGNAL(activated(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.DitherComboBox, + SIGNAL(activated(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.TimeoutComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.InDeviceComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.OutDeviceComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + QObject::connect(m_ui.InChannelsSpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.OutChannelsSpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.InLatencySpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.OutLatencySpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.MidiDriverComboBox, + SIGNAL(activated(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.StartDelaySpinBox, + SIGNAL(valueChanged(int)), + SLOT(settingsChanged())); + QObject::connect(m_ui.PortMaxComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(settingsChanged())); + + QObject::connect(m_ui.StartupScriptCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.StartupScriptShellComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.PostStartupScriptCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.PostStartupScriptShellComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ShutdownScriptCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ShutdownScriptShellComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.PostShutdownScriptCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.PostShutdownScriptShellComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.StartupScriptBrowseToolButton, + SIGNAL(clicked()), + SLOT(browseStartupScript())); + QObject::connect(m_ui.PostStartupScriptBrowseToolButton, + SIGNAL(clicked()), + SLOT(browsePostStartupScript())); + QObject::connect(m_ui.ShutdownScriptBrowseToolButton, + SIGNAL(clicked()), + SLOT(browseShutdownScript())); + QObject::connect(m_ui.PostShutdownScriptBrowseToolButton, + SIGNAL(clicked()), + SLOT(browsePostShutdownScript())); + QObject::connect(m_ui.StartupScriptSymbolToolButton, + SIGNAL(clicked()), + SLOT(symbolStartupScript())); + QObject::connect(m_ui.PostStartupScriptSymbolToolButton, + SIGNAL(clicked()), + SLOT(symbolPostStartupScript())); + QObject::connect(m_ui.ShutdownScriptSymbolToolButton, + SIGNAL(clicked()), + SLOT(symbolShutdownScript())); + QObject::connect(m_ui.PostShutdownScriptSymbolToolButton, + SIGNAL(clicked()), + SLOT(symbolPostShutdownScript())); + + QObject::connect(m_ui.StdoutCaptureCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.XrunRegexComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.XrunIgnoreFirstCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ActivePatchbayCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ActivePatchbayPathComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ActivePatchbayPathToolButton, + SIGNAL(clicked()), + SLOT(browseActivePatchbayPath())); +#ifdef CONFIG_AUTO_REFRESH + QObject::connect(m_ui.AutoRefreshCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.TimeRefreshComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); +#endif + QObject::connect(m_ui.MessagesLogCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.MessagesLogPathComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.MessagesLogPathToolButton, + SIGNAL(clicked()), + SLOT(browseMessagesLogPath())); + QObject::connect(m_ui.TransportTimeRadioButton, + SIGNAL(toggled(bool)), + SLOT(optionsChanged())); + QObject::connect(m_ui.TransportBBTRadioButton, + SIGNAL(toggled(bool)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ElapsedResetRadioButton, + SIGNAL(toggled(bool)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ElapsedXrunRadioButton, + SIGNAL(toggled(bool)), + SLOT(optionsChanged())); + QObject::connect(m_ui.TimeFormatComboBox, + SIGNAL(activated(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.DisplayEffectCheckBox, + SIGNAL(toggled(bool)), + SLOT(toggleDisplayEffect(bool))); + QObject::connect(m_ui.DisplayBlinkCheckBox, + SIGNAL(toggled(bool)), + SLOT(optionsChanged())); + QObject::connect(m_ui.DisplayFont1PushButton, + SIGNAL(clicked()), + SLOT(chooseDisplayFont1())); + QObject::connect(m_ui.DisplayFont2PushButton, + SIGNAL(clicked()), + SLOT(chooseDisplayFont2())); + QObject::connect(m_ui.MessagesFontPushButton, + SIGNAL(clicked()), + SLOT(chooseMessagesFont())); + QObject::connect(m_ui.ConnectionsFontPushButton, + SIGNAL(clicked()), + SLOT(chooseConnectionsFont())); + QObject::connect(m_ui.MessagesLimitCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.MessagesLimitLinesComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ConnectionsIconSizeComboBox, + SIGNAL(activated(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.BezierLinesCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.AliasesEnabledCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.AliasesEditingCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.JackClientPortAliasComboBox, + SIGNAL(activated(int)), + SLOT(optionsChanged())); + + QObject::connect(m_ui.StartJackCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.QueryCloseCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.KeepOnTopCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.SystemTrayCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.StartMinimizedCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.DelayedSetupCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.SingletonCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.SingletonCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ServerConfigNameComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + QObject::connect(m_ui.ServerConfigTempCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.QueryShutdownCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.AlsaSeqEnabledCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.DBusEnabledCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.LeftButtonsCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.RightButtonsCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.TransportButtonsCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.TextLabelsCheckBox, + SIGNAL(stateChanged(int)), + SLOT(optionsChanged())); + QObject::connect(m_ui.BaseFontSizeComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(optionsChanged())); + + QObject::connect(m_ui.OkPushButton, + SIGNAL(clicked()), + SLOT(accept())); + QObject::connect(m_ui.CancelPushButton, + SIGNAL(clicked()), + SLOT(reject())); + + // Try to restore old window positioning. + adjustSize(); +} + + +// Destructor. +qjackctlSetupForm::~qjackctlSetupForm (void) +{ + delete m_pTimeDisplayButtonGroup; +} + + +// A combo-box text item setter helper. +void qjackctlSetupForm::setComboBoxCurrentText ( + QComboBox *pComboBox, const QString& sText ) const +{ + if (pComboBox->isEditable()) { + pComboBox->setEditText(sText); + } else { + int iIndex = pComboBox->findText(sText); + if (iIndex < 0) { + iIndex = 0; + if (!sText.isEmpty()) + pComboBox->insertItem(0, sText); + } + pComboBox->setCurrentIndex(iIndex); + } +} + + +// Populate (setup) dialog controls from settings descriptors. +void qjackctlSetupForm::setup ( qjackctlSetup *pSetup ) +{ + // Set reference descriptor. + m_pSetup = pSetup; + + // Avoid dirty this all up. + m_iDirtySetup++; + + // Load combo box history... + m_pSetup->loadComboBoxHistory(m_ui.ServerComboBox); + m_pSetup->loadComboBoxHistory(m_ui.InterfaceComboBox); + m_pSetup->loadComboBoxHistory(m_ui.InDeviceComboBox); + m_pSetup->loadComboBoxHistory(m_ui.OutDeviceComboBox); + m_pSetup->loadComboBoxHistory(m_ui.StartupScriptShellComboBox); + m_pSetup->loadComboBoxHistory(m_ui.PostStartupScriptShellComboBox); + m_pSetup->loadComboBoxHistory(m_ui.ShutdownScriptShellComboBox); + m_pSetup->loadComboBoxHistory(m_ui.PostShutdownScriptShellComboBox); + m_pSetup->loadComboBoxHistory(m_ui.XrunRegexComboBox); + m_pSetup->loadComboBoxHistory(m_ui.ActivePatchbayPathComboBox); + m_pSetup->loadComboBoxHistory(m_ui.MessagesLogPathComboBox); + m_pSetup->loadComboBoxHistory(m_ui.ServerConfigNameComboBox); + + // Load Options... + m_ui.StartupScriptCheckBox->setChecked(m_pSetup->bStartupScript); + setComboBoxCurrentText(m_ui.StartupScriptShellComboBox, + m_pSetup->sStartupScriptShell); + m_ui.PostStartupScriptCheckBox->setChecked(m_pSetup->bPostStartupScript); + setComboBoxCurrentText(m_ui.PostStartupScriptShellComboBox, + m_pSetup->sPostStartupScriptShell); + m_ui.ShutdownScriptCheckBox->setChecked(m_pSetup->bShutdownScript); + setComboBoxCurrentText(m_ui.ShutdownScriptShellComboBox, + m_pSetup->sShutdownScriptShell); + m_ui.PostShutdownScriptCheckBox->setChecked(m_pSetup->bPostShutdownScript); + setComboBoxCurrentText(m_ui.PostShutdownScriptShellComboBox, + m_pSetup->sPostShutdownScriptShell); + m_ui.StdoutCaptureCheckBox->setChecked(m_pSetup->bStdoutCapture); + setComboBoxCurrentText(m_ui.XrunRegexComboBox, + m_pSetup->sXrunRegex); + m_ui.XrunIgnoreFirstCheckBox->setChecked(m_pSetup->bXrunIgnoreFirst); + m_ui.ActivePatchbayCheckBox->setChecked(m_pSetup->bActivePatchbay); + setComboBoxCurrentText(m_ui.ActivePatchbayPathComboBox, + m_pSetup->sActivePatchbayPath); +#ifdef CONFIG_AUTO_REFRESH + m_ui.AutoRefreshCheckBox->setChecked(m_pSetup->bAutoRefresh); + setComboBoxCurrentText(m_ui.TimeRefreshComboBox, + QString::number(m_pSetup->iTimeRefresh)); +#else + m_ui.AutoRefreshCheckBox->setVisible(false); + m_ui.TimeRefreshComboBox->setVisible(false); +#endif + m_ui.MessagesLogCheckBox->setChecked(m_pSetup->bMessagesLog); + setComboBoxCurrentText(m_ui.MessagesLogPathComboBox, + m_pSetup->sMessagesLogPath); + m_ui.BezierLinesCheckBox->setChecked(m_pSetup->bBezierLines); + + // Load some other defaults... + QRadioButton *pRadioButton + = static_cast ( + m_pTimeDisplayButtonGroup->button(m_pSetup->iTimeDisplay)); + if (pRadioButton) + pRadioButton->setChecked(true); + + m_ui.TimeFormatComboBox->setCurrentIndex(m_pSetup->iTimeFormat); + + // Load font chooser samples... + const QString sSansSerif = "Sans Serif"; + QFont font; + QPalette pal; + + if (m_pSetup->sDisplayFont1.isEmpty() + || !font.fromString(m_pSetup->sDisplayFont1)) + font = QFont(sSansSerif, 12, QFont::Bold); + m_ui.DisplayFont1TextLabel->setFont(font); + m_ui.DisplayFont1TextLabel->setText( + font.family() + ' ' + QString::number(font.pointSize())); + + if (m_pSetup->sDisplayFont2.isEmpty() + || !font.fromString(m_pSetup->sDisplayFont2)) + font = QFont(sSansSerif, 6, QFont::Bold); + m_ui.DisplayFont2TextLabel->setFont(font); + m_ui.DisplayFont2TextLabel->setText( + font.family() + ' ' + QString::number(font.pointSize())); + + if (m_pSetup->sMessagesFont.isEmpty() + || !font.fromString(m_pSetup->sMessagesFont)) + font = QFont("Monospace", 8); + pal = m_ui.MessagesFontTextLabel->palette(); + pal.setColor(QPalette::Background, pal.base().color()); + m_ui.MessagesFontTextLabel->setPalette(pal); + m_ui.MessagesFontTextLabel->setFont(font); + m_ui.MessagesFontTextLabel->setText( + font.family() + ' ' + QString::number(font.pointSize())); + + if (m_pSetup->sConnectionsFont.isEmpty() + || !font.fromString(m_pSetup->sConnectionsFont)) + font = QFont(sSansSerif, 10); + pal = m_ui.ConnectionsFontTextLabel->palette(); + pal.setColor(QPalette::Background, pal.base().color()); + m_ui.ConnectionsFontTextLabel->setPalette(pal); + m_ui.ConnectionsFontTextLabel->setFont(font); + m_ui.ConnectionsFontTextLabel->setText( + font.family() + ' ' + QString::number(font.pointSize())); + + // The main display shiny effect option. + m_ui.DisplayEffectCheckBox->setChecked(m_pSetup->bDisplayEffect); + m_ui.DisplayBlinkCheckBox->setChecked(m_pSetup->bDisplayBlink); + toggleDisplayEffect(m_pSetup->bDisplayEffect); + + // Connections view icon size. + m_ui.ConnectionsIconSizeComboBox->setCurrentIndex( + m_pSetup->iConnectionsIconSize); + // and this JACK speciality... + m_ui.JackClientPortAliasComboBox->setCurrentIndex( + m_pSetup->iJackClientPortAlias); + + // Messages limit option. + m_ui.MessagesLimitCheckBox->setChecked(m_pSetup->bMessagesLimit); + setComboBoxCurrentText(m_ui.MessagesLimitLinesComboBox, + QString::number(m_pSetup->iMessagesLimitLines)); + + // Other misc options... + m_ui.StartJackCheckBox->setChecked(m_pSetup->bStartJack); + m_ui.QueryCloseCheckBox->setChecked(m_pSetup->bQueryClose); + m_ui.KeepOnTopCheckBox->setChecked(m_pSetup->bKeepOnTop); + m_ui.SystemTrayCheckBox->setChecked(m_pSetup->bSystemTray); + m_ui.StartMinimizedCheckBox->setChecked(m_pSetup->bStartMinimized); + m_ui.DelayedSetupCheckBox->setChecked(m_pSetup->bDelayedSetup); + m_ui.SingletonCheckBox->setChecked(m_pSetup->bSingleton); + m_ui.ServerConfigCheckBox->setChecked(m_pSetup->bServerConfig); + setComboBoxCurrentText(m_ui.ServerConfigNameComboBox, + m_pSetup->sServerConfigName); + m_ui.ServerConfigTempCheckBox->setChecked(m_pSetup->bServerConfigTemp); + m_ui.QueryShutdownCheckBox->setChecked(m_pSetup->bQueryShutdown); + m_ui.AlsaSeqEnabledCheckBox->setChecked(m_pSetup->bAlsaSeqEnabled); + m_ui.DBusEnabledCheckBox->setChecked(m_pSetup->bDBusEnabled); + m_ui.AliasesEnabledCheckBox->setChecked(m_pSetup->bAliasesEnabled); + m_ui.AliasesEditingCheckBox->setChecked(m_pSetup->bAliasesEditing); + m_ui.LeftButtonsCheckBox->setChecked(!m_pSetup->bLeftButtons); + m_ui.RightButtonsCheckBox->setChecked(!m_pSetup->bRightButtons); + m_ui.TransportButtonsCheckBox->setChecked(!m_pSetup->bTransportButtons); + m_ui.TextLabelsCheckBox->setChecked(!m_pSetup->bTextLabels); + if (m_pSetup->iBaseFontSize > 0) + m_ui.BaseFontSizeComboBox->setEditText(QString::number(m_pSetup->iBaseFontSize)); + else + m_ui.BaseFontSizeComboBox->setCurrentIndex(0); + +#ifndef CONFIG_SYSTEM_TRAY + m_ui.SystemTrayCheckBox->setChecked(false); + m_ui.SystemTrayCheckBox->setEnabled(false); + m_ui.StartMinimizedCheckBox->setChecked(false); + m_ui.StartMinimizedCheckBox->setEnabled(false); +#endif +#ifndef CONFIG_JACK_MIDI + m_ui.MidiDriverComboBox->setCurrentIndex(0); + m_ui.MidiDriverTextLabel->setEnabled(false); + m_ui.MidiDriverComboBox->setEnabled(false); +#endif +#ifndef CONFIG_JACK_PORT_ALIASES + m_ui.JackClientPortAliasComboBox->setCurrentIndex(0); + m_ui.JackClientPortAliasTextLabel->setEnabled(false); + m_ui.JackClientPortAliasComboBox->setEnabled(false); +#endif +#ifndef CONFIG_ALSA_SEQ + m_ui.AlsaSeqEnabledCheckBox->setEnabled(false); +#endif +#ifndef CONFIG_DBUS + m_ui.DBusEnabledCheckBox->setEnabled(false); +#endif + + // Load preset list... + resetPresets(); + setComboBoxCurrentText(m_ui.PresetComboBox, + m_pSetup->sDefPreset); + // Finally, load default settings... + changePreset(m_ui.PresetComboBox->currentText()); + + // We're clean now. + m_iDirtySetup--; + stabilizeForm(); +} + + +void qjackctlSetupForm::changePreset ( const QString& sPreset ) +{ + if (sPreset.isEmpty()) + return; + + // Load Settings... + qjackctlPreset preset; + if (m_pSetup->loadPreset(preset, sPreset)) { + setComboBoxCurrentText(m_ui.ServerComboBox, preset.sServer); + m_ui.RealtimeCheckBox->setChecked(preset.bRealtime); + m_ui.SoftModeCheckBox->setChecked(preset.bSoftMode); + m_ui.MonitorCheckBox->setChecked(preset.bMonitor); + m_ui.ShortsCheckBox->setChecked(preset.bShorts); + m_ui.NoMemLockCheckBox->setChecked(preset.bNoMemLock); + m_ui.UnlockMemCheckBox->setChecked(preset.bUnlockMem); + m_ui.HWMonCheckBox->setChecked(preset.bHWMon); + m_ui.HWMeterCheckBox->setChecked(preset.bHWMeter); + m_ui.IgnoreHWCheckBox->setChecked(preset.bIgnoreHW); + m_ui.PrioritySpinBox->setValue(preset.iPriority); + setComboBoxCurrentText(m_ui.FramesComboBox, + QString::number(preset.iFrames)); + setComboBoxCurrentText(m_ui.SampleRateComboBox, + QString::number(preset.iSampleRate)); + m_ui.PeriodsSpinBox->setValue(preset.iPeriods); + setComboBoxCurrentText(m_ui.WordLengthComboBox, + QString::number(preset.iWordLength)); + setComboBoxCurrentText(m_ui.WaitComboBox, + QString::number(preset.iWait)); + m_ui.ChanSpinBox->setValue(preset.iChan); + setComboBoxCurrentText(m_ui.DriverComboBox, preset.sDriver); + setComboBoxCurrentText(m_ui.InterfaceComboBox, + preset.sInterface.isEmpty() + ? m_pSetup->sDefPresetName + : preset.sInterface); + m_ui.AudioComboBox->setCurrentIndex(preset.iAudio); + m_ui.DitherComboBox->setCurrentIndex(preset.iDither); + setComboBoxCurrentText(m_ui.TimeoutComboBox, + QString::number(preset.iTimeout)); + setComboBoxCurrentText(m_ui.InDeviceComboBox, + preset.sInDevice.isEmpty() + ? m_pSetup->sDefPresetName + : preset.sInDevice); + setComboBoxCurrentText(m_ui.OutDeviceComboBox, + preset.sOutDevice.isEmpty() + ? m_pSetup->sDefPresetName + : preset.sOutDevice); + m_ui.InChannelsSpinBox->setValue(preset.iInChannels); + m_ui.OutChannelsSpinBox->setValue(preset.iOutChannels); + m_ui.InLatencySpinBox->setValue(preset.iInLatency); + m_ui.OutLatencySpinBox->setValue(preset.iOutLatency); + m_ui.StartDelaySpinBox->setValue(preset.iStartDelay); + m_ui.VerboseCheckBox->setChecked(preset.bVerbose); + setComboBoxCurrentText(m_ui.PortMaxComboBox, + QString::number(preset.iPortMax)); +#ifdef CONFIG_JACK_MIDI + setComboBoxCurrentText(m_ui.MidiDriverComboBox, + preset.sMidiDriver); +#endif + // Reset dirty flag. + m_iDirtySettings = 0; + } + + // Set current preset name.. + m_sPreset = sPreset; +} + + +bool qjackctlSetupForm::savePreset ( const QString& sPreset ) +{ + if (sPreset.isEmpty()) + return false; + + // Unload settings. + qjackctlPreset preset; + preset.sServer = m_ui.ServerComboBox->currentText(); + preset.bRealtime = m_ui.RealtimeCheckBox->isChecked(); + preset.bSoftMode = m_ui.SoftModeCheckBox->isChecked(); + preset.bMonitor = m_ui.MonitorCheckBox->isChecked(); + preset.bShorts = m_ui.ShortsCheckBox->isChecked(); + preset.bNoMemLock = m_ui.NoMemLockCheckBox->isChecked(); + preset.bUnlockMem = m_ui.UnlockMemCheckBox->isChecked(); + preset.bHWMon = m_ui.HWMonCheckBox->isChecked(); + preset.bHWMeter = m_ui.HWMeterCheckBox->isChecked(); + preset.bIgnoreHW = m_ui.IgnoreHWCheckBox->isChecked(); + preset.iPriority = m_ui.PrioritySpinBox->value(); + preset.iFrames = m_ui.FramesComboBox->currentText().toInt(); + preset.iSampleRate = m_ui.SampleRateComboBox->currentText().toInt(); + preset.iPeriods = m_ui.PeriodsSpinBox->value(); + preset.iWordLength = m_ui.WordLengthComboBox->currentText().toInt(); + preset.iWait = m_ui.WaitComboBox->currentText().toInt(); + preset.iChan = m_ui.ChanSpinBox->value(); + preset.sDriver = m_ui.DriverComboBox->currentText(); + preset.sInterface = m_ui.InterfaceComboBox->currentText(); + preset.iAudio = m_ui.AudioComboBox->currentIndex(); + preset.iDither = m_ui.DitherComboBox->currentIndex(); + preset.iTimeout = m_ui.TimeoutComboBox->currentText().toInt(); + preset.sInDevice = m_ui.InDeviceComboBox->currentText(); + preset.sOutDevice = m_ui.OutDeviceComboBox->currentText(); + preset.iInChannels = m_ui.InChannelsSpinBox->value(); + preset.iOutChannels = m_ui.OutChannelsSpinBox->value(); + preset.iInLatency = m_ui.InLatencySpinBox->value(); + preset.iOutLatency = m_ui.OutLatencySpinBox->value(); + preset.iStartDelay = m_ui.StartDelaySpinBox->value(); + preset.bVerbose = m_ui.VerboseCheckBox->isChecked(); + preset.iPortMax = m_ui.PortMaxComboBox->currentText().toInt(); +#ifdef CONFIG_JACK_MIDI + preset.sMidiDriver = m_ui.MidiDriverComboBox->currentText(); +#endif + if (preset.sInterface == m_pSetup->sDefPresetName) + preset.sInterface.clear(); + if (preset.sInDevice == m_pSetup->sDefPresetName) + preset.sInDevice.clear(); + if (preset.sOutDevice == m_pSetup->sDefPresetName) + preset.sOutDevice.clear(); + m_pSetup->savePreset(preset, sPreset); + + return true; +} + + +bool qjackctlSetupForm::deletePreset ( const QString& sPreset ) +{ + if (sPreset.isEmpty()) + return false; + + // Just remove the preset item... + m_pSetup->deletePreset(sPreset); + + return true; +} + + +void qjackctlSetupForm::resetPresets (void) +{ + m_ui.PresetComboBox->clear(); + m_ui.PresetComboBox->addItems(m_pSetup->presets); + m_ui.PresetComboBox->addItem(m_pSetup->sDefPresetName); +} + + +void qjackctlSetupForm::changeCurrentPreset ( const QString& sPreset ) +{ + if (m_iDirtySetup > 0) + return; + + // Check if there's any pending changes... + if (m_iDirtySettings > 0 && !m_sPreset.isEmpty()) { + switch (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Some settings have been changed:\n\n" + "\"%1\"\n\nDo you want to save the changes?") + .arg(m_sPreset), + QMessageBox::Save | + QMessageBox::Discard | + QMessageBox::Cancel)) { + case QMessageBox::Save: + savePreset(m_sPreset); + m_iDirtySetup++; + resetPresets(); + setComboBoxCurrentText(m_ui.PresetComboBox, sPreset); + m_iDirtySetup--; + case QMessageBox::Discard: + m_iDirtySettings = 0; + break; + default: // Cancel... + m_iDirtySetup++; + resetPresets(); + setComboBoxCurrentText(m_ui.PresetComboBox, m_sPreset); + m_iDirtySetup--; + return; + } + } + + changePreset(sPreset); + optionsChanged(); +} + +void qjackctlSetupForm::saveCurrentPreset (void) +{ + const QString sPreset = m_ui.PresetComboBox->currentText(); + + if (savePreset(sPreset)) { + // Reset preset combobox list. + m_iDirtySetup++; + resetPresets(); + setComboBoxCurrentText(m_ui.PresetComboBox, sPreset); + m_iDirtySetup--; + // Reset dirty flag. + m_iDirtySettings = 0; + stabilizeForm(); + } +} + + +void qjackctlSetupForm::deleteCurrentPreset (void) +{ + const QString sPreset = m_ui.PresetComboBox->currentText(); + + // Try to prompt user if he/she really wants this... + if (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Delete preset:\n\n" + "\"%1\"\n\nAre you sure?") + .arg(sPreset), + QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) + return; + + if (deletePreset(sPreset)) { + // Reset preset combobox list, + // and load a new available preset.. + m_iDirtySetup++; + int iItem = m_ui.PresetComboBox->currentIndex(); + resetPresets(); + m_ui.PresetComboBox->setCurrentIndex(iItem); + changePreset(m_ui.PresetComboBox->currentText()); + m_iDirtySetup--; + // Take care that maybe it was the default one... + if (m_pSetup->sDefPreset == sPreset) + m_pSetup->sDefPreset = m_sPreset; + // Make this stable now. + optionsChanged(); + } +} + + +void qjackctlSetupForm::computeLatency (void) +{ + float lat = 0.0; + int p = m_ui.FramesComboBox->currentText().toInt(); + int r = m_ui.SampleRateComboBox->currentText().toInt(); + int n = m_ui.PeriodsSpinBox->value(); + if (r > 0) + lat = (float) (1000.0 * p * n) / (float) r; + if (lat > 0.0) + m_ui.LatencyTextValue->setText(QString::number(lat, 'g', 3) + " " + tr("msec")); + else + m_ui.LatencyTextValue->setText(tr("n/a")); +} + + +void qjackctlSetupForm::changeDriverAudio ( const QString& sDriver, int iAudio ) +{ + bool bSun = (sDriver == "sun"); + bool bOss = (sDriver == "oss"); + bool bAlsa = (sDriver == "alsa"); + bool bCoreaudio = (sDriver == "coreaudio"); + bool bPortaudio = (sDriver == "portaudio"); + bool bFreebob = (sDriver == "freebob"); + bool bFirewire = (sDriver == "firewire"); + bool bNet = (sDriver == "net" || sDriver == "netone"); + bool bInEnabled = false; + bool bOutEnabled = false; + bool bEnabled; + + switch (iAudio) { + case QJACKCTL_DUPLEX: + bInEnabled = (bSun || bOss || bAlsa || bCoreaudio || bPortaudio || bNet); + bOutEnabled = (bSun || bOss || bAlsa || bCoreaudio || bPortaudio || bNet); + break; + case QJACKCTL_CAPTURE: + bInEnabled = (bSun || bOss || bCoreaudio || bPortaudio || bNet); + break; + case QJACKCTL_PLAYBACK: + bOutEnabled = (bSun || bOss || bCoreaudio || bPortaudio || bNet); + break; + } + + bEnabled = (bInEnabled && (bAlsa || bSun || bOss || bPortaudio)); + m_ui.InDeviceTextLabel->setEnabled(bEnabled); + m_ui.InDeviceComboBox->setEnabled(bEnabled); + m_ui.InDeviceToolButton->setEnabled(bEnabled); + if (!bEnabled) + setComboBoxCurrentText(m_ui.InDeviceComboBox, m_pSetup->sDefPresetName); + + bEnabled = (bOutEnabled && (bAlsa || bSun || bOss || bPortaudio)); + m_ui.OutDeviceTextLabel->setEnabled(bEnabled); + m_ui.OutDeviceComboBox->setEnabled(bEnabled); + m_ui.OutDeviceToolButton->setEnabled(bEnabled); + if (!bEnabled) + setComboBoxCurrentText(m_ui.OutDeviceComboBox, m_pSetup->sDefPresetName); + + m_ui.InChannelsTextLabel->setEnabled(bInEnabled + || ((bAlsa || bFirewire) && iAudio != QJACKCTL_PLAYBACK)); + m_ui.InChannelsSpinBox->setEnabled(bInEnabled + || ((bAlsa || bFirewire) && iAudio != QJACKCTL_PLAYBACK)); + + m_ui.OutChannelsTextLabel->setEnabled(bOutEnabled + || ((bAlsa || bFirewire) && iAudio != QJACKCTL_CAPTURE)); + m_ui.OutChannelsSpinBox->setEnabled(bOutEnabled + || ((bAlsa || bFirewire) && iAudio != QJACKCTL_CAPTURE)); + + m_ui.InLatencyTextLabel->setEnabled((bInEnabled && !bNet) + || ((bAlsa || bFreebob) && iAudio != QJACKCTL_PLAYBACK)); + m_ui.InLatencySpinBox->setEnabled((bInEnabled && !bNet) + || ((bAlsa || bFreebob) && iAudio != QJACKCTL_PLAYBACK)); + m_ui.OutLatencyTextLabel->setEnabled((bOutEnabled && !bNet) + || ((bAlsa || bFreebob) && iAudio != QJACKCTL_CAPTURE)); + m_ui.OutLatencySpinBox->setEnabled((bOutEnabled && !bNet) + || ((bAlsa || bFreebob) && iAudio != QJACKCTL_CAPTURE)); + + computeLatency(); +} + + +void qjackctlSetupForm::changeAudio ( int iAudio ) +{ + changeDriverAudio(m_ui.DriverComboBox->currentText(), iAudio); +} + + +void qjackctlSetupForm::changeDriver ( const QString& sDriver ) +{ + changeDriverUpdate(sDriver, true); +} + + +void qjackctlSetupForm::changeDriverUpdate ( const QString& sDriver, bool bUpdate ) +{ + bool bDummy = (sDriver == "dummy"); + bool bSun = (sDriver == "sun"); + bool bOss = (sDriver == "oss"); + bool bAlsa = (sDriver == "alsa"); + bool bPortaudio = (sDriver == "portaudio"); + bool bCoreaudio = (sDriver == "coreaudio"); + bool bFreebob = (sDriver == "freebob"); + bool bFirewire = (sDriver == "firewire"); + bool bNet = (sDriver == "net" || sDriver == "netone"); + + m_ui.NoMemLockCheckBox->setEnabled(!bCoreaudio); + m_ui.UnlockMemCheckBox->setEnabled(!bCoreaudio + && !m_ui.NoMemLockCheckBox->isChecked()); + + m_ui.SoftModeCheckBox->setEnabled(bAlsa); + m_ui.MonitorCheckBox->setEnabled(bAlsa); + m_ui.ShortsCheckBox->setEnabled(bAlsa); + m_ui.HWMonCheckBox->setEnabled(bAlsa); + m_ui.HWMeterCheckBox->setEnabled(bAlsa); + + m_ui.IgnoreHWCheckBox->setEnabled(bSun || bOss); + + if (bCoreaudio || bPortaudio) { + m_ui.PriorityTextLabel->setEnabled(false); + m_ui.PrioritySpinBox->setEnabled(false); + } else { + bool bPriorityEnabled = m_ui.RealtimeCheckBox->isChecked(); + m_ui.PriorityTextLabel->setEnabled(bPriorityEnabled); + m_ui.PrioritySpinBox->setEnabled(bPriorityEnabled); + } + + m_ui.SampleRateTextLabel->setEnabled(!bNet); + m_ui.SampleRateComboBox->setEnabled(!bNet); + + m_ui.FramesTextLabel->setEnabled(!bNet); + m_ui.FramesComboBox->setEnabled(!bNet); + + m_ui.PeriodsTextLabel->setEnabled(bAlsa || bSun || bOss || bFreebob || bFirewire); + m_ui.PeriodsSpinBox->setEnabled(bAlsa || bSun || bOss || bFreebob || bFirewire); + + if (bUpdate && (bFreebob || bFirewire) && m_ui.PeriodsSpinBox->value() < 3) + m_ui.PeriodsSpinBox->setValue(3); + + m_ui.WordLengthTextLabel->setEnabled(bSun || bOss); + m_ui.WordLengthComboBox->setEnabled(bSun || bOss); + + m_ui.WaitTextLabel->setEnabled(bDummy); + m_ui.WaitComboBox->setEnabled(bDummy); + + m_ui.ChanTextLabel->setEnabled(bPortaudio); + m_ui.ChanSpinBox->setEnabled(bPortaudio); + + int iAudio = m_ui.AudioComboBox->currentIndex(); + bool bEnabled = bAlsa; + if (bEnabled && iAudio == QJACKCTL_DUPLEX) { + const QString& sInDevice = m_ui.InDeviceComboBox->currentText(); + const QString& sOutDevice = m_ui.OutDeviceComboBox->currentText(); + bEnabled = (sInDevice.isEmpty() || sInDevice == m_pSetup->sDefPresetName || + sOutDevice.isEmpty() || sOutDevice == m_pSetup->sDefPresetName); + } + + bool bInterface = (bEnabled || bCoreaudio || bFreebob || bFirewire || bPortaudio); + m_ui.InterfaceTextLabel->setEnabled(bInterface); + m_ui.InterfaceComboBox->setEnabled(bInterface); + m_ui.InterfaceToolButton->setEnabled(bEnabled || bCoreaudio || bPortaudio); + if (!bInterface) + setComboBoxCurrentText(m_ui.InterfaceComboBox, m_pSetup->sDefPresetName); + + m_ui.DitherTextLabel->setEnabled(bAlsa || bPortaudio); + m_ui.DitherComboBox->setEnabled(bAlsa || bPortaudio); + +#ifdef CONFIG_JACK_MIDI + m_ui.MidiDriverTextLabel->setEnabled(bAlsa); + m_ui.MidiDriverComboBox->setEnabled(bAlsa); +#endif + + changeDriverAudio(sDriver, iAudio); +} + + +// Stabilize current form state. +void qjackctlSetupForm::stabilizeForm (void) +{ + bool bValid = (m_iDirtySettings > 0 || m_iDirtyOptions > 0); + + QString sPreset = m_ui.PresetComboBox->currentText(); + if (!sPreset.isEmpty()) { + bool bPreset = (m_pSetup->presets.contains(sPreset)); + m_ui.PresetSavePushButton->setEnabled(m_iDirtySettings > 0 + || (!bPreset && sPreset != m_pSetup->sDefPresetName)); + m_ui.PresetDeletePushButton->setEnabled(bPreset); + } else { + m_ui.PresetSavePushButton->setEnabled(false); + m_ui.PresetDeletePushButton->setEnabled(false); + } + + bool bEnabled = m_ui.StartupScriptCheckBox->isChecked(); + m_ui.StartupScriptShellComboBox->setEnabled(bEnabled); + m_ui.StartupScriptSymbolToolButton->setEnabled(bEnabled); + m_ui.StartupScriptBrowseToolButton->setEnabled(bEnabled); + + bEnabled = m_ui.PostStartupScriptCheckBox->isChecked(); + m_ui.PostStartupScriptShellComboBox->setEnabled(bEnabled); + m_ui.PostStartupScriptSymbolToolButton->setEnabled(bEnabled); + m_ui.PostStartupScriptBrowseToolButton->setEnabled(bEnabled); + + bEnabled = m_ui.ShutdownScriptCheckBox->isChecked(); + m_ui.ShutdownScriptShellComboBox->setEnabled(bEnabled); + m_ui.ShutdownScriptSymbolToolButton->setEnabled(bEnabled); + m_ui.ShutdownScriptBrowseToolButton->setEnabled(bEnabled); + + bEnabled = m_ui.PostShutdownScriptCheckBox->isChecked(); + m_ui.PostShutdownScriptShellComboBox->setEnabled(bEnabled); + m_ui.PostShutdownScriptSymbolToolButton->setEnabled(bEnabled); + m_ui.PostShutdownScriptBrowseToolButton->setEnabled(bEnabled); + + bEnabled = m_ui.StdoutCaptureCheckBox->isChecked(); + m_ui.XrunRegexTextLabel->setEnabled(bEnabled); + m_ui.XrunRegexComboBox->setEnabled(bEnabled); + m_ui.XrunIgnoreFirstCheckBox->setEnabled(bEnabled); + + bEnabled = m_ui.ActivePatchbayCheckBox->isChecked(); + m_ui.ActivePatchbayPathComboBox->setEnabled(bEnabled); + m_ui.ActivePatchbayPathToolButton->setEnabled(bEnabled); + if (bEnabled && bValid) { + const QString& sPath = m_ui.ActivePatchbayPathComboBox->currentText(); + bValid = (!sPath.isEmpty() && QFileInfo(sPath).exists()); + } + +#ifdef CONFIG_AUTO_REFRESH + m_ui.TimeRefreshComboBox->setEnabled( + m_ui.AutoRefreshCheckBox->isChecked()); +#endif + + bEnabled = m_ui.MessagesLogCheckBox->isChecked(); + m_ui.MessagesLogPathComboBox->setEnabled(bEnabled); + m_ui.MessagesLogPathToolButton->setEnabled(bEnabled); + if (bEnabled && bValid) { + const QString& sPath = m_ui.MessagesLogPathComboBox->currentText(); + bValid = !sPath.isEmpty(); + } + + m_ui.MessagesLimitLinesComboBox->setEnabled( + m_ui.MessagesLimitCheckBox->isChecked()); + + m_ui.StartMinimizedCheckBox->setEnabled( + m_ui.SystemTrayCheckBox->isChecked()); + + bEnabled = m_ui.ServerConfigCheckBox->isChecked(); + m_ui.ServerConfigNameComboBox->setEnabled(bEnabled); + m_ui.ServerConfigTempCheckBox->setEnabled(bEnabled); + + m_ui.AliasesEditingCheckBox->setEnabled( + m_ui.AliasesEnabledCheckBox->isChecked()); + + m_ui.DelayedSetupCheckBox->setEnabled( + !m_ui.StartMinimizedCheckBox->isChecked()); + +#if !defined(Q_WS_X11) + m_ui.SingletonCheckBox->setEnabled(false); +#endif + + m_ui.TransportButtonsCheckBox->setEnabled( + m_ui.LeftButtonsCheckBox->isChecked()); + + changeDriverUpdate(m_ui.DriverComboBox->currentText(), false); + + m_ui.OkPushButton->setEnabled(bValid); +} + + +#ifdef CONFIG_COREAUDIO +// borrowed from jackpilot source +static OSStatus getTotalChannels( AudioDeviceID device, + UInt32* channelCount, Boolean isInput ) +{ + OSStatus err = noErr; + UInt32 outSize; + Boolean outWritable; + AudioBufferList* bufferList = 0; + AudioStreamID* streamList = 0; + size_t i, numStream; + + err = AudioDeviceGetPropertyInfo(device, 0, isInput, + kAudioDevicePropertyStreams, &outSize, &outWritable); + if (err == noErr) { + streamList = (AudioStreamID*)malloc(outSize); + numStream = outSize/sizeof(AudioStreamID); + //JPLog("getTotalChannels device stream number %ld %ld\n", device, numStream); + err = AudioDeviceGetProperty(device, 0, isInput, + kAudioDevicePropertyStreams, &outSize, streamList); + if (err == noErr) { + AudioStreamBasicDescription streamDesc; + outSize = sizeof(AudioStreamBasicDescription); + for (i = 0; i < numStream; i++) { + err = AudioStreamGetProperty(streamList[i], 0, + kAudioDevicePropertyStreamFormat, &outSize, &streamDesc); + //JPLog("getTotalChannels streamDesc mFormatFlags %ld mChannelsPerFrame %ld\n", streamDesc.mFormatFlags, streamDesc.mChannelsPerFrame); + } + } + } + + *channelCount = 0; + err = AudioDeviceGetPropertyInfo(device, 0, isInput, + kAudioDevicePropertyStreamConfiguration, &outSize, &outWritable); + if (err == noErr) { + bufferList = (AudioBufferList*)malloc(outSize); + err = AudioDeviceGetProperty(device, 0, isInput, + kAudioDevicePropertyStreamConfiguration, &outSize, bufferList); + if (err == noErr) { + for (i = 0; i < bufferList->mNumberBuffers; i++) + *channelCount += bufferList->mBuffers[i].mNumberChannels; + } + } + + if (streamList) + free(streamList); + if (bufferList) + free(bufferList); + + return (err); +} + +static OSStatus getDeviceUIDFromID( AudioDeviceID id, + char *name, UInt32 nsize ) +{ + UInt32 size = sizeof(CFStringRef); + CFStringRef UI; + OSStatus res = AudioDeviceGetProperty(id, 0, false, + kAudioDevicePropertyDeviceUID, &size, &UI); + if (res == noErr) + CFStringGetCString(UI,name,nsize,CFStringGetSystemEncoding()); + CFRelease(UI); + return res; +} + +#endif // CONFIG_COREAUDIO + + +// Device selection menu executive. +void qjackctlSetupForm::deviceMenu( QLineEdit *pLineEdit, + QToolButton *pToolButton, int iAudio ) +{ + // FIXME: Only valid for ALSA, Sun and OSS devices, + // for the time being... and also CoreAudio ones too. + const QString& sDriver = m_ui.DriverComboBox->currentText(); + bool bAlsa = (sDriver == "alsa"); + bool bSun = (sDriver == "sun"); + bool bOss = (sDriver == "oss"); +#ifdef CONFIG_COREAUDIO + bool bCoreaudio = (sDriver == "coreaudio"); + std::map coreaudioIdMap; +#endif +#ifdef CONFIG_PORTAUDIO + bool bPortaudio = (sDriver == "portaudio"); +#endif + QString sCurName = pLineEdit->text(); + QString sName, sSubName; + QString sText; + + QMenu menu(this); + QAction *pAction; + + int iCards = 0; + + if (bAlsa) { +#ifdef CONFIG_ALSA_SEQ + // Enumerate the ALSA cards and PCM harfware devices... + snd_ctl_t *handle; + snd_ctl_card_info_t *info; + snd_pcm_info_t *pcminfo; + snd_ctl_card_info_alloca(&info); + snd_pcm_info_alloca(&pcminfo); + bool bCapture, bPlayback; + int iCard = -1; + while (snd_card_next(&iCard) >= 0 && iCard >= 0) { + sName = "hw:" + QString::number(iCard); + if (snd_ctl_open(&handle, sName.toUtf8().constData(), 0) >= 0 + && snd_ctl_card_info(handle, info) >= 0) { + if (iCards > 0) + menu.addSeparator(); + sText = sName + '\t'; + sText += snd_ctl_card_info_get_name(info); + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sName); + int iDevice = -1; + while (snd_ctl_pcm_next_device(handle, &iDevice) >= 0 + && iDevice >= 0) { + // Capture devices.. + bCapture = false; + if (iAudio == QJACKCTL_CAPTURE || + iAudio == QJACKCTL_DUPLEX) { + snd_pcm_info_set_device(pcminfo, iDevice); + snd_pcm_info_set_subdevice(pcminfo, 0); + snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_CAPTURE); + bCapture = (snd_ctl_pcm_info(handle, pcminfo) >= 0); + } + // Playback devices.. + bPlayback = false; + if (iAudio == QJACKCTL_PLAYBACK || + iAudio == QJACKCTL_DUPLEX) { + snd_pcm_info_set_device(pcminfo, iDevice); + snd_pcm_info_set_subdevice(pcminfo, 0); + snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_PLAYBACK); + bPlayback = (snd_ctl_pcm_info(handle, pcminfo) >= 0); + } + // List iif compliant with the audio mode criteria... + if ((iAudio == QJACKCTL_CAPTURE && bCapture && !bPlayback) || + (iAudio == QJACKCTL_PLAYBACK && !bCapture && bPlayback) || + (iAudio == QJACKCTL_DUPLEX && bCapture && bPlayback)) { + sSubName = sName + ',' + QString::number(iDevice); + sText = sSubName + '\t'; + sText += snd_pcm_info_get_name(pcminfo); + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sSubName); + } + } + snd_ctl_close(handle); + ++iCards; + } + } +#endif // CONFIG_ALSA_SEQ + } // Enumerate the OSS Audio devices... + else + if (bSun) { + QFile file("/var/run/dmesg.boot"); + if (file.open(QIODevice::ReadOnly)) { + QTextStream stream(&file); + QString sLine; + QRegExp rxDevice("audio([0-9]) at (.*)"); + while (!stream.atEnd()) { + sLine = stream.readLine(); + if (rxDevice.exactMatch(sLine)) { + sName = "/dev/audio" + rxDevice.cap(1); + sText = sName + '\t' + rxDevice.cap(2); + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sName); + ++iCards; + } + } + file.close(); + } + } + else + if (bOss) { + QFile file("/dev/sndstat"); + if (file.open(QIODevice::ReadOnly)) { + QTextStream stream(&file); + QString sLine; + bool bAudioDevices = false; + QRegExp rxHeader("Audio devices.*", Qt::CaseInsensitive); + QRegExp rxDevice("([0-9]+):[ ]+(.*)"); + while (!stream.atEnd()) { + sLine = stream.readLine(); + if (bAudioDevices) { + if (rxDevice.exactMatch(sLine)) { + sName = "/dev/dsp" + rxDevice.cap(1); + sText = sName + '\t' + rxDevice.cap(2); + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sName); + ++iCards; + } + else break; + } + else if (rxHeader.exactMatch(sLine)) + bAudioDevices = true; + } + file.close(); + } + } +#ifdef CONFIG_COREAUDIO + else if (bCoreaudio) { + // Find out how many Core Audio devices are there, if any... + // (code snippet gently "borrowed" from Stephane Letz jackdmp;) + OSStatus err; + Boolean isWritable; + UInt32 outSize = sizeof(isWritable); + err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, + &outSize, &isWritable); + if (err == noErr) { + // Calculate the number of device available... + int numCoreDevices = outSize / sizeof(AudioDeviceID); + // Make space for the devices we are about to get... + AudioDeviceID *coreDeviceIDs = new AudioDeviceID [numCoreDevices]; + err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, + &outSize, (void *) coreDeviceIDs); + if (err == noErr) { + // Look for the CoreAudio device name... + char coreDeviceName[256]; + UInt32 nameSize = 256; + for (int i = 0; i < numCoreDevices; i++) { + err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i], + 0, true, kAudioDevicePropertyDeviceName, + &outSize, &isWritable); + if (err == noErr) { + err = AudioDeviceGetProperty(coreDeviceIDs[i], + 0, true, kAudioDevicePropertyDeviceName, + &nameSize, (void *) coreDeviceName); + if (err == noErr) { + char drivername[128]; + UInt32 dnsize = 128; + // this returns the unique id for the device + // that must be used on the commandline for jack + if (getDeviceUIDFromID(coreDeviceIDs[i], + drivername, dnsize) == noErr) { + sName = drivername; + } else { + sName = "Error"; + } + coreaudioIdMap[sName] = coreDeviceIDs[i]; + // TODO: hide this ugly ID from the user, + // only show human readable name + // humanreadable \t UID + sText = QString(coreDeviceName) + '\t' + sName; + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sName); + ++iCards; + } + } + } + } + delete [] coreDeviceIDs; + } + } +#endif // CONFIG_COREAUDIO +#ifdef CONFIG_PORTAUDIO + else if (bPortaudio) { + if (Pa_Initialize() == paNoError) { + // Fill hostapi info... + PaHostApiIndex iNumHostApi = Pa_GetHostApiCount(); + QString *pHostName = new QString[iNumHostApi]; + for (PaHostApiIndex i = 0; i < iNumHostApi; ++i) + pHostName[i] = QString(Pa_GetHostApiInfo(i)->name); + // Fill device info... + PaDeviceIndex iNumDevice = Pa_GetDeviceCount(); + PaDeviceInfo **ppDeviceInfo = new PaDeviceInfo * [iNumDevice]; + for (PaDeviceIndex i = 0; i < iNumDevice; ++i) { + ppDeviceInfo[i] = const_cast (Pa_GetDeviceInfo(i)); + sText = pHostName[ppDeviceInfo[i]->hostApi] + "::" + QString(ppDeviceInfo[i]->name); + pAction = menu.addAction(sText); + pAction->setCheckable(true); + pAction->setChecked(sCurName == sText); + ++iCards; + } + Pa_Terminate(); + } + } +#endif // CONFIG_PORTAUDIO + + // There's always the default device... + if (iCards > 0) + menu.addSeparator(); + pAction = menu.addAction(m_pSetup->sDefPresetName); + pAction->setCheckable(true); + pAction->setChecked(sCurName == m_pSetup->sDefPresetName); + + // Show the device menu and read selection... + pAction = menu.exec(pToolButton->mapToGlobal(QPoint(0,0))); + if (pAction) { + sText = pAction->text(); + int iTabPos = sText.indexOf('\t'); + if (iTabPos >= 0) { +#ifndef CONFIG_COREAUDIO + pLineEdit->setText(sText.left(iTabPos)); +#else + // for OSX, figure out the device's channel counts and set the combos. + // this might be too difficult for the user to determine themselves + // and jack won't start if the values exceed the actual. + // we now use the second tab delimited field as the value to + // put in the combo + pLineEdit->setText(sText.mid(iTabPos + 1)); + std::map::iterator found + = coreaudioIdMap.find(sText.mid(iTabPos+1)); + if (found != coreaudioIdMap.end()) { + AudioDeviceID devid = found->second; + UInt32 chans; + if (getTotalChannels(devid, &chans, true) == noErr) { + //InChannelsSpinBox->setMaxValue(chans); + m_ui.InChannelsSpinBox->setValue(chans); + } + if (getTotalChannels(devid, &chans, false) == noErr) { + //OutChannelsSpinBox->setMaxValue(chans); + m_ui.OutChannelsSpinBox->setValue(chans); + } + } +#endif + } else { + pLineEdit->setText(sText); + } + // settingsChanged(); + } +} + + +// Interface device selection menu. +void qjackctlSetupForm::selectInterface (void) +{ + deviceMenu(m_ui.InterfaceComboBox->lineEdit(), + m_ui.InterfaceToolButton, m_ui.AudioComboBox->currentIndex()); +} + + +// Input device selection menu. +void qjackctlSetupForm::selectInDevice (void) +{ + deviceMenu(m_ui.InDeviceComboBox->lineEdit(), + m_ui.InDeviceToolButton, QJACKCTL_CAPTURE); +} + + +// Output device selection menu. +void qjackctlSetupForm::selectOutDevice (void) +{ + deviceMenu(m_ui.OutDeviceComboBox->lineEdit(), + m_ui.OutDeviceToolButton, QJACKCTL_PLAYBACK); +} + + +// Meta-symbol menu executive. +void qjackctlSetupForm::symbolMenu( QLineEdit *pLineEdit, + QToolButton *pToolButton ) +{ + const QString s = " "; + + QMenu menu(this); + + menu.addAction("%P" + s + tr("&Preset Name")); + menu.addSeparator(); + menu.addAction("%s" + s + tr("&Server Path")); + menu.addAction("%d" + s + tr("&Driver")); + menu.addAction("%i" + s + tr("&Interface")); + menu.addSeparator(); + menu.addAction("%r" + s + tr("Sample &Rate")); + menu.addAction("%p" + s + tr("&Frames/Period")); + menu.addAction("%n" + s + tr("Periods/&Buffer")); + + QAction *pAction = menu.exec(pToolButton->mapToGlobal(QPoint(0,0))); + if (pAction) { + const QString sText = pAction->text(); + int iMetaChar = sText.indexOf('%'); + if (iMetaChar >= 0) { + pLineEdit->insert('%' + sText[iMetaChar + 1]); + // optionsChanged(); + } + } +} + + +// Startup script meta-symbol button slot. +void qjackctlSetupForm::symbolStartupScript (void) +{ + symbolMenu(m_ui.StartupScriptShellComboBox->lineEdit(), + m_ui.StartupScriptSymbolToolButton); +} + +// Post-startup script meta-symbol button slot. +void qjackctlSetupForm::symbolPostStartupScript (void) +{ + symbolMenu(m_ui.PostStartupScriptShellComboBox->lineEdit(), + m_ui.PostStartupScriptSymbolToolButton); +} + +// Shutdown script meta-symbol button slot. +void qjackctlSetupForm::symbolShutdownScript (void) +{ + symbolMenu(m_ui.ShutdownScriptShellComboBox->lineEdit(), + m_ui.ShutdownScriptSymbolToolButton); +} + +// Post-shutdown script meta-symbol button slot. +void qjackctlSetupForm::symbolPostShutdownScript (void) +{ + symbolMenu(m_ui.PostShutdownScriptShellComboBox->lineEdit(), + m_ui.PostShutdownScriptSymbolToolButton); +} + + +// Startup script browse slot. +void qjackctlSetupForm::browseStartupScript() +{ + QString sFileName = QFileDialog::getOpenFileName( + this, // Parent. + tr("Startup Script"), // Caption. + m_ui.StartupScriptShellComboBox->currentText() // Start here. + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.StartupScriptShellComboBox, sFileName); + m_ui.StartupScriptShellComboBox->setFocus(); + optionsChanged(); + } +} + + +// Post-startup script browse slot. +void qjackctlSetupForm::browsePostStartupScript() +{ + QString sFileName = QFileDialog::getOpenFileName( + this, // Parent. + tr("Post-Startup Script"), // Caption. + m_ui.PostStartupScriptShellComboBox->currentText() // Start here. + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.PostStartupScriptShellComboBox, sFileName); + m_ui.PostStartupScriptShellComboBox->setFocus(); + optionsChanged(); + } +} + + +// Shutdown script browse slot. +void qjackctlSetupForm::browseShutdownScript() +{ + QString sFileName = QFileDialog::getOpenFileName( + this, // Parent. + tr("Shutdown Script"), // Caption. + m_ui.ShutdownScriptShellComboBox->currentText() // Start here. + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.ShutdownScriptShellComboBox, sFileName); + m_ui.ShutdownScriptShellComboBox->setFocus(); + optionsChanged(); + } +} + + +// Post-shutdown script browse slot. +void qjackctlSetupForm::browsePostShutdownScript() +{ + QString sFileName = QFileDialog::getOpenFileName( + this, // Parent. + tr("Post-Shutdown Script"), // Caption. + m_ui.PostShutdownScriptShellComboBox->currentText() // Start here. + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.PostShutdownScriptShellComboBox, sFileName); + m_ui.PostShutdownScriptShellComboBox->setFocus(); + optionsChanged(); + } +} + + +// Active Patchbay path browse slot. +void qjackctlSetupForm::browseActivePatchbayPath() +{ + QString sFileName = QFileDialog::getOpenFileName( + this, // Parent. + tr("Active Patchbay Definition"), // Caption. + m_ui.ActivePatchbayPathComboBox->currentText(), // Start here. + tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.ActivePatchbayPathComboBox, sFileName); + m_ui.ActivePatchbayPathComboBox->setFocus(); + optionsChanged(); + } +} + + +// Messages log path browse slot. +void qjackctlSetupForm::browseMessagesLogPath() +{ + QString sFileName = QFileDialog::getSaveFileName( + this, // Parent. + tr("Messages Log"), // Caption. + m_ui.MessagesLogPathComboBox->currentText(), // Start here. + tr("Log files") + " (*.log)" // Filter (log files) + ); + + if (!sFileName.isEmpty()) { + setComboBoxCurrentText(m_ui.MessagesLogPathComboBox, sFileName); + m_ui.MessagesLogPathComboBox->setFocus(); + optionsChanged(); + } +} + + +// The display font 1 (big time) selection dialog. +void qjackctlSetupForm::chooseDisplayFont1() +{ + bool bOk = false; + QFont font = QFontDialog::getFont(&bOk, + m_ui.DisplayFont1TextLabel->font(), this); + if (bOk) { + m_ui.DisplayFont1TextLabel->setFont(font); + m_ui.DisplayFont1TextLabel->setText(font.family() + + ' ' + QString::number(font.pointSize())); + optionsChanged(); + } +} + + +// The display font 2 (normal time et al.) selection dialog. +void qjackctlSetupForm::chooseDisplayFont2() +{ + bool bOk = false; + QFont font = QFontDialog::getFont(&bOk, + m_ui.DisplayFont2TextLabel->font(), this); + if (bOk) { + m_ui.DisplayFont2TextLabel->setFont(font); + m_ui.DisplayFont2TextLabel->setText(font.family() + + ' ' + QString::number(font.pointSize())); + optionsChanged(); + } +} + + +// The channel display effect demo changer. +void qjackctlSetupForm::toggleDisplayEffect ( bool bOn ) +{ + QPalette pal; + pal.setColor(QPalette::Foreground, Qt::green); + if (bOn) { + QPixmap pm(":/icons/displaybg1.png"); + pal.setBrush(QPalette::Background, QBrush(pm)); + } else { + pal.setColor(QPalette::Background, Qt::black); + } + m_ui.DisplayFont1TextLabel->setPalette(pal); + m_ui.DisplayFont2TextLabel->setPalette(pal); + optionsChanged(); +} + + +// The messages font selection dialog. +void qjackctlSetupForm::chooseMessagesFont (void) +{ + bool bOk = false; + QFont font = QFontDialog::getFont(&bOk, + m_ui.MessagesFontTextLabel->font(), this); + if (bOk) { + m_ui.MessagesFontTextLabel->setFont(font); + m_ui.MessagesFontTextLabel->setText(font.family() + + ' ' + QString::number(font.pointSize())); + optionsChanged(); + } +} + + +// The connections font selection dialog. +void qjackctlSetupForm::chooseConnectionsFont (void) +{ + bool bOk = false; + QFont font = QFontDialog::getFont(&bOk, + m_ui.ConnectionsFontTextLabel->font(), this); + if (bOk) { + m_ui.ConnectionsFontTextLabel->setFont(font); + m_ui.ConnectionsFontTextLabel->setText(font.family() + + ' ' + QString::number(font.pointSize())); + optionsChanged(); + } +} + + +// Mark that some server preset settings have changed. +void qjackctlSetupForm::settingsChanged (void) +{ + if (m_iDirtySetup > 0) + return; + + m_iDirtySettings++; + stabilizeForm(); +} + +// Mark that some program options have changed. +void qjackctlSetupForm::optionsChanged (void) +{ + if (m_iDirtySetup > 0) + return; + + m_iDirtyOptions++; + stabilizeForm(); +} + + +// Accept settings (OK button slot). +void qjackctlSetupForm::accept (void) +{ + if (m_iDirtySettings > 0 || m_iDirtyOptions > 0) { + // Save current preset selection. + m_pSetup->sDefPreset = m_ui.PresetComboBox->currentText(); + // Always save current settings... + savePreset(m_pSetup->sDefPreset); + // Save Options... + m_pSetup->bStartupScript = m_ui.StartupScriptCheckBox->isChecked(); + m_pSetup->sStartupScriptShell = m_ui.StartupScriptShellComboBox->currentText(); + m_pSetup->bPostStartupScript = m_ui.PostStartupScriptCheckBox->isChecked(); + m_pSetup->sPostStartupScriptShell = m_ui.PostStartupScriptShellComboBox->currentText(); + m_pSetup->bShutdownScript = m_ui.ShutdownScriptCheckBox->isChecked(); + m_pSetup->sShutdownScriptShell = m_ui.ShutdownScriptShellComboBox->currentText(); + m_pSetup->bPostShutdownScript = m_ui.PostShutdownScriptCheckBox->isChecked(); + m_pSetup->sPostShutdownScriptShell = m_ui.PostShutdownScriptShellComboBox->currentText(); + m_pSetup->bStdoutCapture = m_ui.StdoutCaptureCheckBox->isChecked(); + m_pSetup->sXrunRegex = m_ui.XrunRegexComboBox->currentText(); + m_pSetup->bXrunIgnoreFirst = m_ui.XrunIgnoreFirstCheckBox->isChecked(); + m_pSetup->bActivePatchbay = m_ui.ActivePatchbayCheckBox->isChecked(); + m_pSetup->sActivePatchbayPath = m_ui.ActivePatchbayPathComboBox->currentText(); +#ifdef CONFIG_AUTO_REFRESH + m_pSetup->bAutoRefresh = m_ui.AutoRefreshCheckBox->isChecked(); + m_pSetup->iTimeRefresh = m_ui.TimeRefreshComboBox->currentText().toInt(); +#endif + m_pSetup->bMessagesLog = m_ui.MessagesLogCheckBox->isChecked(); + m_pSetup->sMessagesLogPath = m_ui.MessagesLogPathComboBox->currentText(); + m_pSetup->bBezierLines = m_ui.BezierLinesCheckBox->isChecked(); + // Save Defaults... + m_pSetup->iTimeDisplay = m_pTimeDisplayButtonGroup->checkedId(); + m_pSetup->iTimeFormat = m_ui.TimeFormatComboBox->currentIndex(); + m_pSetup->sMessagesFont = m_ui.MessagesFontTextLabel->font().toString(); + m_pSetup->bMessagesLimit = m_ui.MessagesLimitCheckBox->isChecked(); + m_pSetup->iMessagesLimitLines = m_ui.MessagesLimitLinesComboBox->currentText().toInt(); + m_pSetup->sDisplayFont1 = m_ui.DisplayFont1TextLabel->font().toString(); + m_pSetup->sDisplayFont2 = m_ui.DisplayFont2TextLabel->font().toString(); + m_pSetup->bDisplayEffect = m_ui.DisplayEffectCheckBox->isChecked(); + m_pSetup->bDisplayBlink = m_ui.DisplayBlinkCheckBox->isChecked(); + m_pSetup->iJackClientPortAlias = m_ui.JackClientPortAliasComboBox->currentIndex(); + m_pSetup->iConnectionsIconSize = m_ui.ConnectionsIconSizeComboBox->currentIndex(); + m_pSetup->sConnectionsFont = m_ui.ConnectionsFontTextLabel->font().toString(); + m_pSetup->bStartJack = m_ui.StartJackCheckBox->isChecked(); + m_pSetup->bQueryClose = m_ui.QueryCloseCheckBox->isChecked(); + m_pSetup->bKeepOnTop = m_ui.KeepOnTopCheckBox->isChecked(); + m_pSetup->bSystemTray = m_ui.SystemTrayCheckBox->isChecked(); + m_pSetup->bStartMinimized = m_ui.StartMinimizedCheckBox->isChecked(); + m_pSetup->bDelayedSetup = m_ui.DelayedSetupCheckBox->isChecked(); + m_pSetup->bSingleton = m_ui.SingletonCheckBox->isChecked(); + m_pSetup->bServerConfig = m_ui.ServerConfigCheckBox->isChecked(); + m_pSetup->sServerConfigName = m_ui.ServerConfigNameComboBox->currentText(); + m_pSetup->bServerConfigTemp = m_ui.ServerConfigTempCheckBox->isChecked(); + m_pSetup->bQueryShutdown = m_ui.QueryShutdownCheckBox->isChecked(); + m_pSetup->bAlsaSeqEnabled = m_ui.AlsaSeqEnabledCheckBox->isChecked(); + m_pSetup->bDBusEnabled = m_ui.DBusEnabledCheckBox->isChecked(); + m_pSetup->bAliasesEnabled = m_ui.AliasesEnabledCheckBox->isChecked(); + m_pSetup->bAliasesEditing = m_ui.AliasesEditingCheckBox->isChecked(); + m_pSetup->bLeftButtons = !m_ui.LeftButtonsCheckBox->isChecked(); + m_pSetup->bRightButtons = !m_ui.RightButtonsCheckBox->isChecked(); + m_pSetup->bTransportButtons = !m_ui.TransportButtonsCheckBox->isChecked(); + m_pSetup->bTextLabels = !m_ui.TextLabelsCheckBox->isChecked(); + m_pSetup->iBaseFontSize = m_ui.BaseFontSizeComboBox->currentText().toInt(); + } + + // Save combobox history... + m_pSetup->saveComboBoxHistory(m_ui.ServerComboBox); + m_pSetup->saveComboBoxHistory(m_ui.InterfaceComboBox); + m_pSetup->saveComboBoxHistory(m_ui.InDeviceComboBox); + m_pSetup->saveComboBoxHistory(m_ui.OutDeviceComboBox); + m_pSetup->saveComboBoxHistory(m_ui.StartupScriptShellComboBox); + m_pSetup->saveComboBoxHistory(m_ui.PostStartupScriptShellComboBox); + m_pSetup->saveComboBoxHistory(m_ui.ShutdownScriptShellComboBox); + m_pSetup->saveComboBoxHistory(m_ui.PostShutdownScriptShellComboBox); + m_pSetup->saveComboBoxHistory(m_ui.XrunRegexComboBox); + m_pSetup->saveComboBoxHistory(m_ui.ActivePatchbayPathComboBox); + m_pSetup->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); + m_pSetup->saveComboBoxHistory(m_ui.ServerConfigNameComboBox); + + // Save/commit to disk. + m_pSetup->saveSetup(); + + // Just go with dialog acceptance. + QDialog::accept(); +} + + +// Reject settings (Cancel button slot). +void qjackctlSetupForm::reject (void) +{ + bool bReject = true; + + // Check if there's any pending changes... + if (m_iDirtySettings > 0 || m_iDirtyOptions > 0) { + switch (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Some settings have been changed.\n\n" + "Do you want to apply the changes?"), + QMessageBox::Apply | + QMessageBox::Discard | + QMessageBox::Cancel)) { + case QMessageBox::Apply: + accept(); + return; + case QMessageBox::Discard: + break; + default: // Cancel. + bReject = false; + } + } + + if (bReject) + QDialog::reject(); +} + + +// end of qjackctlSetupForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlSetupForm.h qjackctl-0.3.6/src/qjackctlSetupForm.h --- qjackctl-0.3.4/src/qjackctlSetupForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSetupForm.h 2010-01-05 20:04:51.000000000 +0000 @@ -0,0 +1,129 @@ +// qjackctlSetupForm.h +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlSetupForm_h +#define __qjackctlSetupForm_h + +#include "ui_qjackctlSetupForm.h" + +// Forward declarations. +class qjackctlSetup; + +class QButtonGroup; + + +//---------------------------------------------------------------------------- +// qjackctlSetupForm -- UI wrapper form. + +class qjackctlSetupForm : public QDialog +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlSetupForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlSetupForm(); + + void setup(qjackctlSetup * pSetup); + +public slots: + + void changeCurrentPreset(const QString&); + void saveCurrentPreset(); + void deleteCurrentPreset(); + + void changeAudio(int); + void changeDriver(const QString&); + void selectInterface(); + void selectInDevice(); + void selectOutDevice(); + + void symbolStartupScript(); + void symbolPostStartupScript(); + void symbolShutdownScript(); + void symbolPostShutdownScript(); + + void browseStartupScript(); + void browsePostStartupScript(); + void browseShutdownScript(); + void browsePostShutdownScript(); + void browseActivePatchbayPath(); + void browseMessagesLogPath(); + + void chooseDisplayFont1(); + void chooseDisplayFont2(); + void toggleDisplayEffect(bool); + void chooseMessagesFont(); + void chooseConnectionsFont(); + + void settingsChanged(); + void optionsChanged(); + +protected slots: + + void accept(); + void reject(); + +protected: + + // A combo-box text item setter helper. + void setComboBoxCurrentText ( + QComboBox *pComboBox, const QString& sText ) const; + + void changePreset(const QString& sPreset); + bool savePreset(const QString& sPreset); + bool deletePreset(const QString& sPreset); + void resetPresets(); + + void computeLatency(); + + void changeDriverAudio( const QString& sDriver, int iAudio ); + void changeDriverUpdate( const QString& sDriver, bool bUpdate ); + + void deviceMenu(QLineEdit * pLineEdit, QToolButton * pToolButton, int iAudio); + void symbolMenu(QLineEdit * pLineEdit, QToolButton * pToolButton ); + + void stabilizeForm(); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlSetupForm m_ui; + + // Instance variables. + qjackctlSetup *m_pSetup; + + QButtonGroup *m_pTimeDisplayButtonGroup; + + int m_iDirtySetup; + int m_iDirtySettings; + int m_iDirtyOptions; + + QString m_sPreset; +}; + + +#endif // __qjackctlSetupForm_h + + +// end of qjackctlSetupForm.h diff -Nru qjackctl-0.3.4/src/qjackctlSetupForm.ui qjackctl-0.3.6/src/qjackctlSetupForm.ui --- qjackctl-0.3.4/src/qjackctlSetupForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSetupForm.ui 2010-01-05 20:04:51.000000000 +0000 @@ -0,0 +1,4453 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlSetupForm + + + + 0 + 0 + 666 + 539 + + + + + 1 + 1 + 0 + 0 + + + + Setup - JACK Audio Connection Kit + + + :/icons/setup1.png + + + true + + + + 4 + + + 4 + + + + + false + + + 0 + + + + Settings + + + + 9 + + + 6 + + + + + 4 + + + 4 + + + + + Preset &Name: + + + false + + + PresetComboBox + + + + + + + + 3 + 0 + 0 + 0 + + + + Settings preset name + + + true + + + + (default) + + + + + + + + Save settings as current preset name + + + &Save + + + :/icons/save1.png + + + Alt+S + + + false + + + + + + + Delete current settings preset + + + &Delete + + + :/icons/remove1.png + + + Alt+D + + + false + + + + + + + + + + 75 + true + + + + Server + + + true + + + + 4 + + + 4 + + + + + + 50 + false + + + + Server &Path: + + + Qt::AlignVCenter + + + false + + + ServerComboBox + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + The JACK Audio Connection Kit sound server path + + + true + + + + jackd + + + + + jackdmp + + + + + jackstart + + + + + + + + + 50 + false + + + + Driv&er: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + DriverComboBox + + + + + + + + 50 + false + + + + The audio backend driver interface to use + + + false + + + + dummy + + + + + sun + + + + + oss + + + + + alsa + + + + + portaudio + + + + + coreaudio + + + + + freebob + + + + + firewire + + + + + net + + + + + netone + + + + + + + + + + + + 75 + true + + + + Parameters + + + true + + + + 8 + + + 4 + + + + + 0 + + + 4 + + + + + + 50 + false + + + + MIDI Driv&er: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + MidiDriverComboBox + + + + + + + + 50 + false + + + + The ALSA MIDI backend driver to use + + + false + + + + none + + + + + raw + + + + + seq + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + 50 + false + + + + Start De&lay (secs): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + StartDelaySpinBox + + + + + + + + 50 + false + + + + Time in seconds that client is delayed after server startup + + + 999 + + + 0 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + 5 + 5 + 0 + 0 + + + + + 50 + false + + + + QFrame::NoFrame + + + QFrame::Plain + + + Latency: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 1 + 5 + 0 + 0 + + + + + 80 + 0 + + + + + 50 + false + + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + + + QFrame::StyledPanel + + + QFrame::Sunken + + + 0 + + + Qt::AlignCenter + + + false + + + + + + + + + 0 + + + 4 + + + + + + 50 + false + + + + Use realtime scheduling + + + &Realtime + + + Alt+R + + + + + + + + 50 + false + + + + Do not attempt to lock memory, even if in realtime mode + + + No Memory Loc&k + + + Alt+K + + + + + + + + 50 + false + + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + + + &Unlock Memory + + + Alt+U + + + + + + + + 50 + false + + + + Ignore xruns reported by the backend driver + + + So&ft Mode + + + Alt+F + + + + + + + + 50 + false + + + + Provide output monitor ports + + + &Monitor + + + Alt+M + + + + + + + + 50 + false + + + + Force 16bit mode instead of failing over 32bit (default) + + + Force &16bit + + + Alt+1 + + + + + + + + 50 + false + + + + Enable hardware monitoring of capture ports + + + H/W M&onitor + + + Alt+O + + + + + + + + 50 + false + + + + Enable hardware metering on cards that support it + + + H/&W Meter + + + Alt+W + + + + + + + + 50 + false + + + + Ignore hardware period/buffer size + + + &Ignore H/W + + + Alt+I + + + + + + + + 50 + false + + + + Whether to give verbose output on messages + + + &Verbose messages + + + Alt+V + + + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 8 + 8 + + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 8 + 8 + + + + + + + + 0 + + + 4 + + + + + + 50 + false + + + + &Output Device: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + OutDeviceComboBox + + + + + + + + 50 + false + + + + &Output Channels: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + OutChannelsSpinBox + + + + + + + + 50 + false + + + + &Interface: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + InterfaceComboBox + + + + + + + + 50 + false + + + + Maximum input audio hardware channels to allocate + + + 999 + + + (default) + + + + + + + + 50 + false + + + + &Audio: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + AudioComboBox + + + + + + + + 50 + false + + + + &Input Latency: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + InLatencySpinBox + + + + + + + + 50 + false + + + + QFrame::NoFrame + + + QFrame::Plain + + + Dit&her: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + DitherComboBox + + + + + + + + 50 + false + + + + External output latency (frames) + + + 9999999 + + + (default) + + + + + + + + 50 + false + + + + &Input Device: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + InDeviceComboBox + + + + + + + + 50 + false + + + + Provide either audio capture, playback or both + + + + Duplex + + + + + Capture Only + + + + + Playback Only + + + + + + + + + 50 + false + + + + The PCM device name to use + + + true + + + + (default) + + + + + hw:0 + + + + + plughw:0 + + + + + /dev/audio + + + + + /dev/dsp + + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Select output device for playback + + + > + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 8 + 8 + + + + + + + + + 50 + false + + + + Alternate input device for capture + + + true + + + + (default) + + + + + hw:0 + + + + + plughw:0 + + + + + /dev/audio + + + + + /dev/dsp + + + + + + + + + 50 + false + + + + &Output Latency: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + OutLatencySpinBox + + + + + + + + 50 + false + + + + Maximum output audio hardware channels to allocate + + + 999 + + + (default) + + + + + + + + 50 + false + + + + Alternate output device for playback + + + true + + + + (default) + + + + + hw:0 + + + + + plughw:0 + + + + + /dev/audio + + + + + /dev/dsp + + + + + + + + + 50 + false + + + + &Input Channels: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + InChannelsSpinBox + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Select input device for capture + + + > + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Select PCM device name + + + > + + + + + + + + 50 + false + + + + External input latency (frames) + + + 9999999 + + + (default) + + + + + + + + 50 + false + + + + Set dither mode + + + + None + + + + + Rectangular + + + + + Shaped + + + + + Triangular + + + + + + + + + + 0 + + + 4 + + + + + + 50 + false + + + + Number of periods in the hardware buffer + + + 999 + + + 2 + + + + + + + + 50 + false + + + + QFrame::NoFrame + + + QFrame::Plain + + + Priorit&y: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + PrioritySpinBox + + + + + + + + 50 + false + + + + &Frames/Period: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + FramesComboBox + + + + + + + + 50 + false + + + + Frames per period between process() calls + + + true + + + + 16 + + + + + 32 + + + + + 64 + + + + + 128 + + + + + 256 + + + + + 512 + + + + + 1024 + + + + + 2048 + + + + + 4096 + + + + + + + + + 50 + false + + + + Port Ma&ximum: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + PortMaxComboBox + + + + + + + + 5 + 5 + 0 + 0 + + + + + 50 + false + + + + &Channels: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + 0 + + + ChanSpinBox + + + + + + + + Sans Serif + 50 + false + + + + false + + + Number of microseconds to wait between engine processes (dummy) + + + true + + + + 21333 + + + + + + + + + 50 + false + + + + Sample rate in frames per second + + + true + + + + 22050 + + + + + 32000 + + + + + 44100 + + + + + 48000 + + + + + 88200 + + + + + 96000 + + + + + 192000 + + + + + + + + + 50 + false + + + + Scheduler priority when running realtime + + + 89 + + + (default) + + + + + + + + 50 + false + + + + &Word Length: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + WordLengthComboBox + + + + + + + + 50 + false + + + + Periods/&Buffer: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + PeriodsSpinBox + + + + + + + + 50 + false + + + + false + + + Word length + + + true + + + + 16 + + + + + 32 + + + + + 64 + + + + + + + + + 5 + 0 + 0 + 0 + + + + + 60 + 0 + + + + + 50 + false + + + + Maximum number of ports the JACK server can manage + + + true + + + 1 + + + + 128 + + + + + 256 + + + + + 512 + + + + + 1024 + + + + + + + + + 50 + false + + + + &Wait (usec): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + WaitComboBox + + + + + + + + 50 + false + + + + QFrame::NoFrame + + + QFrame::Plain + + + Sample &Rate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + SampleRateComboBox + + + + + + + + 50 + false + + + + Maximum number of audio channels to allocate + + + 999 + + + (default) + + + + + + + + 50 + false + false + + + + QFrame::NoFrame + + + QFrame::Plain + + + &Timeout (msec): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + TimeoutComboBox + + + + + + + + 50 + false + + + + Set client timeout limit in miliseconds + + + true + + + 1 + + + + 200 + + + + + 500 + + + + + 1000 + + + + + 2000 + + + + + 5000 + + + + + 10000 + + + + + + + + + + + + + + Options + + + + 4 + + + 4 + + + + + + 75 + true + + + + Scripting + + + true + + + + 8 + + + 4 + + + + + + 50 + false + + + + Whether to execute a custom shell script before starting up the JACK audio server. + + + Execute script on Start&up: + + + Alt+U + + + + + + + + 50 + false + + + + Whether to execute a custom shell script after starting up the JACK audio server. + + + Execute script after &Startup: + + + Alt+S + + + + + + + + 50 + false + + + + Whether to execute a custom shell script before shuting down the JACK audio server. + + + Execute script on Shut&down: + + + Alt+D + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Command line to be executed before starting up the JACK audio server + + + true + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Scripting argument meta-symbols + + + > + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for script to be executed before starting up the JACK audio server + + + ... + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Command line to be executed after starting up the JACK audio server + + + true + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Scripting argument meta-symbols + + + > + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for script to be executed after starting up the JACK audio server + + + ... + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Scripting argument meta-symbols + + + > + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for script to be executed before shutting down the JACK audio server + + + ... + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Command line to be executed before shutting down the JACK audio server + + + true + + + + + + + + 50 + false + + + + Whether to execute a custom shell script after shuting down the JACK audio server. + + + Execute script after Shu&tdown: + + + Alt+T + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Scripting argument meta-symbols + + + > + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for script to be executed after shutting down the JACK audio server + + + ... + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Command line to be executed after shutting down the JACK audio server + + + true + + + + + + + + + + + 75 + true + + + + Statistics + + + true + + + + 8 + + + 4 + + + + + + 50 + false + + + + Whether to capture standard output (stdout/stderr) into messages window + + + &Capture standard output + + + Alt+C + + + + + + + + 5 + 5 + 0 + 0 + + + + + 50 + false + + + + &XRUN detection regex: + + + false + + + XrunRegexComboBox + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Regular expression used to detect XRUNs on server output messages + + + true + + + + xrun of at least ([0-9|\.]+) msecs + + + + + + + + + 50 + false + + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + + + &Ignore first XRUN occurrence on statistics + + + Alt+I + + + + + + + + + + + 75 + true + + + + Connections + + + true + + + + 8 + + + 4 + + + + + + 40 + 0 + + + + + 50 + false + + + + Time in seconds between each auto-refresh cycle + + + true + + + + 5 + + + + + 10 + + + + + 20 + + + + + 30 + + + + + 60 + + + + + 120 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 200 + 8 + + + + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Patchbay definition file to be activated as connection persistence profile + + + true + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for a patchbay definition file to be activated + + + ... + + + + + + + + 50 + false + + + + Whether to refresh the connections patchbay automatically + + + &Auto refresh connections Patchbay, every (secs): + + + Alt+A + + + + + + + + 50 + false + + + + Whether to activate a patchbay definition for connection persistence profile. + + + Activate &Patchbay persistence: + + + Alt+P + + + + + + + + + + + 75 + true + + + + Logging + + + true + + + + 8 + + + 4 + + + + + + 7 + 0 + 0 + 0 + + + + + 50 + false + + + + Messages log file + + + true + + + + + + + + 22 + 22 + + + + + 24 + 24 + + + + + 50 + false + + + + Qt::TabFocus + + + Browse for the messages log file location + + + ... + + + + + + + + 50 + false + + + + Whether to activate a messages logging to file. + + + &Messages log file: + + + Alt+M + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 8 + 8 + + + + + + + + + Display + + + + 4 + + + 4 + + + + + + 75 + true + + + + Time Display + + + true + + + + 8 + + + 4 + + + + + 4 + + + 4 + + + + + + 50 + false + + + + Time F&ormat: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + TimeFormatComboBox + + + + + + + + 50 + false + + + + The general time format on display + + + false + + + + hh:mm:ss + + + + + hh:mm:ss.d + + + + + hh:mm:ss.dd + + + + + hh:mm:ss.ddd + + + + + + + + + + 4 + + + 4 + + + + + + 50 + false + + + + Transport &Time Code + + + Alt+T + + + + + + + + 50 + false + + + + Transport &BBT (bar:beat.ticks) + + + Alt+B + + + + + + + + 50 + false + + + + Elapsed time since last &Reset + + + Alt+R + + + + + + + + 50 + false + + + + Elapsed time since last &XRUN + + + Alt+X + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 24 + 8 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 24 + 8 + + + + + + + + 4 + + + 4 + + + + + + 180 + 0 + + + + + 260 + 32767 + + + + + 50 + false + + + + Sample front panel normal display font + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + Qt::AlignCenter + + + false + + + + + + + + 180 + 0 + + + + + 260 + 32767 + + + + + 50 + false + + + + Sample big time display font + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + Qt::AlignCenter + + + false + + + + + + + + 50 + false + + + + Big Time display: + + + false + + + + + + + + 50 + false + + + + Select font for front panel normal display + + + &Font... + + + Alt+F + + + false + + + + + + + + 50 + false + + + + Select font for big time display + + + &Font... + + + Alt+F + + + false + + + + + + + + 50 + false + + + + Normal display: + + + false + + + + + + + + 50 + false + + + + Whether to enable a shiny glass light effect on the main display + + + &Display shiny glass light effect + + + Alt+D + + + + + + + + 50 + false + + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + + + Blin&k server mode indicator + + + Alt+K + + + + + + + + + + + + + 75 + true + + + + Messages Window + + + true + + + + 8 + + + 4 + + + + + + 180 + 0 + + + + + 260 + 16777215 + + + + + 50 + false + + + + Sample messages text font display + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + Qt::AlignCenter + + + false + + + + + + + + 50 + false + + + + Select font for the messages text display + + + &Font... + + + Alt+F + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + 50 + false + + + + Whether to keep a maximum number of lines in the messages window + + + &Messages limit: + + + Alt+M + + + + + + + + 50 + false + + + + The maximum number of message lines to keep in view + + + true + + + 3 + + + + 100 + + + + + 250 + + + + + 500 + + + + + 1000 + + + + + 2500 + + + + + 5000 + + + + + + + + + + + + 75 + true + + + + Connections Window + + + true + + + + 8 + + + 4 + + + + + + 180 + 0 + + + + + 260 + 16777215 + + + + + 50 + false + + + + Sample connections view font + + + true + + + QFrame::StyledPanel + + + QFrame::Sunken + + + Qt::AlignCenter + + + false + + + + + + + + 50 + false + + + + Select font for the connections view + + + &Font... + + + Alt+F + + + false + + + + + + + + 50 + false + + + + &Icon size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + ConnectionsIconSizeComboBox + + + + + + + + 50 + false + + + + The icon size for each item of the connections view + + + false + + + 0 + + + + 16 x 16 + + + + + 32 x 32 + + + + + 64 x 64 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + Qt::Vertical + + + QSizePolicy::Minimum + + + + 8 + 8 + + + + + + + + + 50 + false + + + + &JACK client/port aliases: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + JackClientPortAliasComboBox + + + + + + + + 50 + false + + + + JACK client/port aliases display mode + + + false + + + 0 + + + + Default + + + + + First + + + + + Second + + + + + + + + + 50 + false + + + + Whether to enable in-place client/port name editing (rename) + + + Ena&ble client/port aliases editing (rename) + + + Alt+B + + + + + + + + 50 + false + + + + Whether to enable client/port name aliases on the connections window + + + E&nable client/port aliases + + + Alt+N + + + + + + + + 50 + false + + + + Whether to draw connection lines as cubic Bezier curves + + + Draw connection and patchbay lines as Be&zier curves + + + Alt+Z + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 8 + 8 + + + + + + + + + Misc + + + + 4 + + + 4 + + + + + + 75 + true + + + + Other + + + true + + + + 4 + + + 4 + + + + + 0 + + + 4 + + + + + + 50 + false + + + + Whether to start JACK audio server immediately on application startup + + + &Start JACK audio server on application startup + + + Alt+S + + + + + + + + 50 + false + + + + Whether to ask for confirmation on application exit + + + &Confirm application close + + + Alt+C + + + + + + + + 50 + false + false + + + + Whether to keep all child windows on top of the main window + + + &Keep child windows always on top + + + Alt+K + + + + + + + + 50 + false + + + + Whether to enable the system tray icon + + + &Enable system tray icon + + + Alt+E + + + + + + + + 50 + false + + + + Whether to start minimized to system tray + + + Start minimi&zed to system tray + + + Alt+Z + + + + + + + + 50 + false + + + + Whether to delay window positioning at application startup + + + &Delay window positioning at startup + + + Alt+D + + + + + + + + 50 + false + + + + Whether to restrict to one single application instance (X11) + + + Single application &instance + + + Alt+I + + + + + + + + + 0 + + + 4 + + + + + + 50 + false + + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + + + S&ave JACK audio server configuration to: + + + Alt+A + + + + + + + + 50 + false + + + + The server configuration local file name (auto-start) + + + true + + + + .jackdrc + + + + + + + + + 50 + false + + + + Whether to exit once all clients have closed (auto-start) + + + C&onfigure as temporary server + + + Alt+O + + + + + + + + 50 + false + + + + Whether to ask for confirmation on JACK audio server shutdown + + + Confirm server sh&utdown + + + Alt+U + + + + + + + + 50 + false + + + + Whether to enable ALSA Sequencer (MIDI) support on startup + + + E&nable ALSA Sequencer support + + + Alt+N + + + + + + + + 50 + false + + + + Whether to enable D-Bus interface + + + &Enable D-Bus interface + + + Alt+B + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + + + + 75 + true + + + + Buttons + + + true + + + + 4 + + + 4 + + + + + 0 + + + 4 + + + + + + 50 + false + + + + Whether to hide the left button group on the main window + + + Hide main window &Left buttons + + + Alt+L + + + + + + + + 50 + false + + + + Whether to hide the right button group on the main window + + + Hide main window &Right buttons + + + Alt+R + + + + + + + + 50 + false + + + + Whether to hide the transport button group on the main window + + + Hide main window &Transport buttons + + + Alt+T + + + + + + + + 50 + false + + + + Whether to hide the text labels on the main window buttons + + + Hide main window &button text labels + + + Alt+B + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + + + + 75 + true + + + + Defaults + + + true + + + + 4 + + + 4 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 8 + 8 + + + + + + + + + 50 + false + + + + &Base font size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + BaseFontSizeComboBox + + + + + + + + 50 + false + + + + Base application font size (pt.) + + + true + + + + (default) + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + + + + + + + + + + + 4 + + + 4 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 160 + 8 + + + + + + + + OK + + + :/icons/accept1.png + + + + + + + Cancel + + + :/icons/quit1.png + + + + + + + + + + SetupTabWidget + PresetComboBox + PresetSavePushButton + PresetDeletePushButton + ServerComboBox + DriverComboBox + RealtimeCheckBox + NoMemLockCheckBox + UnlockMemCheckBox + SoftModeCheckBox + MonitorCheckBox + ShortsCheckBox + HWMonCheckBox + HWMeterCheckBox + IgnoreHWCheckBox + VerboseCheckBox + PrioritySpinBox + FramesComboBox + SampleRateComboBox + PeriodsSpinBox + WordLengthComboBox + WaitComboBox + ChanSpinBox + PortMaxComboBox + TimeoutComboBox + InterfaceComboBox + InterfaceToolButton + DitherComboBox + AudioComboBox + InDeviceComboBox + InDeviceToolButton + OutDeviceComboBox + OutDeviceToolButton + InChannelsSpinBox + OutChannelsSpinBox + InLatencySpinBox + OutLatencySpinBox + MidiDriverComboBox + StartDelaySpinBox + StartupScriptCheckBox + StartupScriptShellComboBox + StartupScriptSymbolToolButton + StartupScriptBrowseToolButton + PostStartupScriptCheckBox + PostStartupScriptShellComboBox + PostStartupScriptSymbolToolButton + PostStartupScriptBrowseToolButton + ShutdownScriptCheckBox + ShutdownScriptShellComboBox + ShutdownScriptSymbolToolButton + ShutdownScriptBrowseToolButton + PostShutdownScriptCheckBox + PostShutdownScriptShellComboBox + PostShutdownScriptSymbolToolButton + PostShutdownScriptBrowseToolButton + StdoutCaptureCheckBox + XrunRegexComboBox + XrunIgnoreFirstCheckBox + ActivePatchbayCheckBox + ActivePatchbayPathComboBox + ActivePatchbayPathToolButton + AutoRefreshCheckBox + TimeRefreshComboBox + MessagesLogCheckBox + MessagesLogPathComboBox + MessagesLogPathToolButton + TransportTimeRadioButton + TransportBBTRadioButton + ElapsedResetRadioButton + ElapsedXrunRadioButton + TimeFormatComboBox + DisplayFont1PushButton + DisplayFont2PushButton + DisplayEffectCheckBox + DisplayBlinkCheckBox + MessagesFontPushButton + MessagesLimitCheckBox + MessagesLimitLinesComboBox + ConnectionsFontPushButton + ConnectionsIconSizeComboBox + BezierLinesCheckBox + AliasesEnabledCheckBox + AliasesEditingCheckBox + StartJackCheckBox + QueryCloseCheckBox + KeepOnTopCheckBox + SystemTrayCheckBox + StartMinimizedCheckBox + DelayedSetupCheckBox + SingletonCheckBox + ServerConfigCheckBox + ServerConfigNameComboBox + ServerConfigTempCheckBox + QueryShutdownCheckBox + AlsaSeqEnabledCheckBox + LeftButtonsCheckBox + RightButtonsCheckBox + TransportButtonsCheckBox + TextLabelsCheckBox + BaseFontSizeComboBox + OkPushButton + CancelPushButton + + + + + + diff -Nru qjackctl-0.3.4/src/qjackctlSetup.h qjackctl-0.3.6/src/qjackctlSetup.h --- qjackctl-0.3.4/src/qjackctlSetup.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSetup.h 2009-11-02 18:31:27.000000000 +0000 @@ -0,0 +1,237 @@ +// qjackctlSetup.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlSetup_h +#define __qjackctlSetup_h + +#include "qjackctlConnectAlias.h" + +#include + + +// Forward declarations. +class QComboBox; +class QSplitter; + + +// Audio mode combobox item indexes. +#define QJACKCTL_DUPLEX 0 +#define QJACKCTL_CAPTURE 1 +#define QJACKCTL_PLAYBACK 2 + +// Icon size combobox item indexes. +#define QJACKCTL_ICON_16X16 0 +#define QJACKCTL_ICON_32X32 1 +#define QJACKCTL_ICON_64X64 2 + + +// Server settings preset struct. +struct qjackctlPreset +{ + QString sServer; + bool bRealtime; + bool bSoftMode; + bool bMonitor; + bool bShorts; + bool bNoMemLock; + bool bUnlockMem; + bool bHWMon; + bool bHWMeter; + bool bIgnoreHW; + int iPriority; + int iFrames; + int iSampleRate; + int iPeriods; + int iWordLength; + int iWait; + int iChan; + QString sDriver; + QString sInterface; + int iAudio; + int iDither; + int iTimeout; + QString sInDevice; + QString sOutDevice; + int iInChannels; + int iOutChannels; + int iInLatency; + int iOutLatency; + int iStartDelay; + bool bVerbose; + int iPortMax; + QString sMidiDriver; +}; + +// Common settings profile class. +class qjackctlSetup +{ +public: + + // Constructor. + qjackctlSetup(); + // Destructor; + ~qjackctlSetup(); + + // Explicit I/O methods. + void loadSetup(); + void saveSetup(); + + // Command line arguments parser. + bool parse_args(const QStringList& args); + // Command line usage helper. + void print_usage(const QString& arg0); + + // Default (translated) preset name. + QString sDefPresetName; + + // Immediate server start option. + bool bStartJack; + + // User supplied command line. + QString sCmdLine; + + // Current (default) preset name. + QString sDefPreset; + // Available presets list. + QStringList presets; + + // Options... + bool bSingleton; + QString sServerName; + bool bStartupScript; + QString sStartupScriptShell; + bool bPostStartupScript; + QString sPostStartupScriptShell; + bool bShutdownScript; + QString sShutdownScriptShell; + bool bPostShutdownScript; + QString sPostShutdownScriptShell; + bool bStdoutCapture; + QString sXrunRegex; + bool bXrunIgnoreFirst; + bool bActivePatchbay; + QString sActivePatchbayPath; +#ifdef CONFIG_AUTO_REFRESH + bool bAutoRefresh; + int iTimeRefresh; +#endif + bool bMessagesLog; + QString sMessagesLogPath; + bool bBezierLines; + int iTimeDisplay; + int iTimeFormat; + QString sMessagesFont; + bool bMessagesLimit; + int iMessagesLimitLines; + QString sDisplayFont1; + QString sDisplayFont2; + bool bDisplayEffect; + bool bDisplayBlink; + int iJackClientPortAlias; + int iConnectionsIconSize; + QString sConnectionsFont; + bool bQueryClose; + bool bKeepOnTop; + bool bSystemTray; + bool bStartMinimized; + bool bDelayedSetup; + bool bServerConfig; + QString sServerConfigName; + bool bServerConfigTemp; + bool bQueryShutdown; + bool bAlsaSeqEnabled; + bool bDBusEnabled; + bool bAliasesEnabled; + bool bAliasesEditing; + bool bLeftButtons; + bool bRightButtons; + bool bTransportButtons; + bool bTextLabels; + int iBaseFontSize; + + // Defaults... + QString sPatchbayPath; + // Recent patchbay listing. + QStringList patchbays; + + // Aliases containers. + qjackctlConnectAlias aliasAudioOutputs; + qjackctlConnectAlias aliasAudioInputs; + qjackctlConnectAlias aliasMidiOutputs; + qjackctlConnectAlias aliasMidiInputs; + qjackctlConnectAlias aliasAlsaOutputs; + qjackctlConnectAlias aliasAlsaInputs; + + // Aliases preset management methods. + bool loadAliases(const QString& sPreset); + bool saveAliases(const QString& sPreset); + // Preset management methods. + bool loadPreset(qjackctlPreset& preset, const QString& sPreset); + bool savePreset(qjackctlPreset& preset, const QString& sPreset); + bool deletePreset(const QString& sPreset); + + // Combo box history persistence helper prototypes. + void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); + void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); + + // Splitter widget sizes persistence helper methods. + void loadSplitterSizes(QSplitter *pSplitter, QList& sizes); + void saveSplitterSizes(QSplitter *pSplitter); + + // Widget geometry persistence helper prototypes. + void saveWidgetGeometry(QWidget *pWidget, bool bMinimized = false); + void loadWidgetGeometry(QWidget *pWidget, bool bMinimized = false); + +private: + + // Our proper settings profile. + QSettings m_settings; +}; + + +// Delayed widget setup helper class. +class qjackctlDelayedSetup : public QObject +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlDelayedSetup(QWidget *pWidget, + const QPoint& pos, const QSize& size, bool bVisible, int iDelay = 0); + +protected slots: + + void setup(); + +private: + + QWidget *m_pWidget; + QPoint m_pos; + QSize m_size; + bool m_bVisible; +}; + + +#endif // __qjackctlSetup_h + + +// end of qjackctlSetup.h diff -Nru qjackctl-0.3.4/src/qjackctlSocketForm.cpp qjackctl-0.3.6/src/qjackctlSocketForm.cpp --- qjackctl-0.3.4/src/qjackctlSocketForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSocketForm.cpp 2010-02-20 15:49:09.000000000 +0000 @@ -0,0 +1,897 @@ +// qjackctlSocketForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlSocketForm.h" + +#include "qjackctlPatchbay.h" +#include "qjackctlConnectAlias.h" + +#include +#include +#include +#include +#include +#include + + +//---------------------------------------------------------------------------- +// qjackctlSocketForm -- UI wrapper form. + +// Constructor. +qjackctlSocketForm::qjackctlSocketForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QDialog(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + m_pSocketList = NULL; + m_pJackClient = NULL; + m_pAlsaSeq = NULL; + m_ppPixmaps = NULL; + m_iDirtyCount = 0; + + // Setup time-display radio-button group. + m_pSocketTypeButtonGroup = new QButtonGroup(this); + m_pSocketTypeButtonGroup->addButton(m_ui.AudioRadioButton, 0); + m_pSocketTypeButtonGroup->addButton(m_ui.MidiRadioButton, 1); + m_pSocketTypeButtonGroup->addButton(m_ui.AlsaRadioButton, 2); + m_pSocketTypeButtonGroup->setExclusive(true); + + // Plug list is not sortable. + //m_ui.PlugListView->setSorting(-1); + + // Plug list view... + QHeaderView *pHeader = m_ui.PlugListView->header(); +// pHeader->setResizeMode(QHeaderView::Custom); + pHeader->setDefaultAlignment(Qt::AlignLeft); +// pHeader->setDefaultSectionSize(300); + pHeader->setMovable(false); + pHeader->setStretchLastSection(true); + +#ifndef CONFIG_JACK_MIDI + m_ui.MidiRadioButton->setEnabled(false); +#endif +#ifndef CONFIG_ALSA_SEQ + m_ui.AlsaRadioButton->setEnabled(false); +#endif + + // UI connections... + + QObject::connect(m_ui.PlugAddPushButton, + SIGNAL(clicked()), + SLOT(addPlug())); + QObject::connect(m_ui.PlugRemovePushButton, + SIGNAL(clicked()), + SLOT(removePlug())); + QObject::connect(m_ui.PlugEditPushButton, + SIGNAL(clicked()), + SLOT(editPlug())); + QObject::connect(m_ui.PlugUpPushButton, + SIGNAL(clicked()), + SLOT(moveUpPlug())); + QObject::connect(m_ui.PlugDownPushButton, + SIGNAL(clicked()), + SLOT(moveDownPlug())); + QObject::connect(m_ui.PlugListView, + SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), + SLOT(selectedPlug())); + + QObject::connect(m_ui.SocketNameLineEdit, + SIGNAL(textChanged(const QString&)), + SLOT(changed())); + QObject::connect(m_ui.AudioRadioButton, + SIGNAL(toggled(bool)), + SLOT(socketTypeChanged())); + QObject::connect(m_ui.MidiRadioButton, + SIGNAL(toggled(bool)), + SLOT(socketTypeChanged())); + QObject::connect(m_ui.AlsaRadioButton, + SIGNAL(toggled(bool)), + SLOT(socketTypeChanged())); + QObject::connect(m_ui.ExclusiveCheckBox, + SIGNAL(toggled(bool)), + SLOT(socketTypeChanged())); + QObject::connect(m_ui.ClientNameComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(clientNameChanged())); + QObject::connect(m_ui.PlugNameComboBox, + SIGNAL(editTextChanged(const QString&)), + SLOT(changed())); + + QObject::connect(m_ui.PlugListView, + SIGNAL(customContextMenuRequested(const QPoint&)), + SLOT(customContextMenu(const QPoint&))); + QObject::connect(m_ui.PlugListView->itemDelegate(), + SIGNAL(commitData(QWidget*)), + SLOT(changed())); + QObject::connect(m_ui.SocketForwardComboBox, + SIGNAL(activated(int)), + SLOT(changed())); + + QObject::connect(m_ui.OkPushButton, + SIGNAL(clicked()), + SLOT(accept())); + QObject::connect(m_ui.CancelPushButton, + SIGNAL(clicked()), + SLOT(reject())); +} + + +// Destructor. +qjackctlSocketForm::~qjackctlSocketForm (void) +{ + delete m_pSocketTypeButtonGroup; +} + + +// Socket caption utility method. +void qjackctlSocketForm::setSocketCaption ( const QString& sSocketCaption ) +{ + m_ui.SocketTabWidget->setTabText(0, sSocketCaption); + (m_ui.PlugListView->headerItem())->setText(0, + sSocketCaption + ' ' + tr("Plugs / Ports")); +} + + +// Socket list enablement. +void qjackctlSocketForm::setSocketList ( qjackctlSocketList *pSocketList ) +{ + m_pSocketList = pSocketList; +} + + +// Pixmap utility methods. +void qjackctlSocketForm::setPixmaps ( QPixmap **ppPixmaps ) +{ + m_ppPixmaps = ppPixmaps; +} + + +// JACK client accessor. +void qjackctlSocketForm::setJackClient ( jack_client_t *pJackClient ) +{ + m_pJackClient = pJackClient; +} + + +// ALSA sequencer accessor. +void qjackctlSocketForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) +{ + m_pAlsaSeq = pAlsaSeq; +} + + +// Socket type and exclusiveness editing enablement. +void qjackctlSocketForm::setConnectCount ( int iConnectCount ) +{ +// m_ui.SocketTypeGroupBox->setEnabled(iConnectCount < 1); + if (iConnectCount) { + switch (m_pSocketTypeButtonGroup->checkedId()) { + case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO + m_ui.MidiRadioButton->setEnabled(false); + m_ui.AlsaRadioButton->setEnabled(false); + break; + case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI + m_ui.AudioRadioButton->setEnabled(false); + m_ui.AlsaRadioButton->setEnabled(false); + break; + case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI + m_ui.AudioRadioButton->setEnabled(false); + m_ui.MidiRadioButton->setEnabled(false); + break; + } + } + m_ui.ExclusiveCheckBox->setEnabled(iConnectCount < 2); + +#ifndef CONFIG_JACK_MIDI + m_ui.MidiRadioButton->setEnabled(false); +#endif +#ifndef CONFIG_ALSA_SEQ + m_ui.AlsaRadioButton->setEnabled(false); +#endif +} + + +// Load dialog controls from socket properties. +void qjackctlSocketForm::load ( qjackctlPatchbaySocket *pSocket ) +{ + m_ui.SocketNameLineEdit->setText(pSocket->name()); + + QRadioButton *pRadioButton + = static_cast ( + m_pSocketTypeButtonGroup->button(pSocket->type())); + if (pRadioButton) + pRadioButton->setChecked(true); + + m_ui.ClientNameComboBox->setEditText(pSocket->clientName()); + m_ui.ExclusiveCheckBox->setChecked(pSocket->isExclusive()); + + m_ui.PlugListView->clear(); + QTreeWidgetItem *pPlugItem = NULL; + QStringListIterator iter(pSocket->pluglist()); + while (iter.hasNext()) { + const QString& sPlugName = iter.next(); + pPlugItem = new QTreeWidgetItem(m_ui.PlugListView, pPlugItem); + if (pPlugItem) { + pPlugItem->setText(0, sPlugName); + pPlugItem->setFlags(pPlugItem->flags() | Qt::ItemIsEditable); + } + } + + socketTypeChanged(); + + int iItemIndex = 0; + if (!pSocket->forward().isEmpty()) { + int iItem = m_ui.SocketForwardComboBox->findText(pSocket->forward()); + if (iItem >= 0) + iItemIndex = iItem; + } + m_ui.SocketForwardComboBox->setCurrentIndex(iItemIndex); + + m_iDirtyCount = 0; + + stabilizeForm(); +} + + +// Save dialog controls into socket properties. +void qjackctlSocketForm::save ( qjackctlPatchbaySocket *pSocket ) +{ + pSocket->setName(m_ui.SocketNameLineEdit->text()); + pSocket->setType(m_pSocketTypeButtonGroup->checkedId()); + pSocket->setClientName(m_ui.ClientNameComboBox->currentText()); + pSocket->setExclusive(m_ui.ExclusiveCheckBox->isChecked()); + + pSocket->pluglist().clear(); + int iPlugCount = m_ui.PlugListView->topLevelItemCount(); + for (int iPlug = 0; iPlug < iPlugCount; ++iPlug) { + QTreeWidgetItem *pItem = m_ui.PlugListView->topLevelItem(iPlug); + pSocket->addPlug(pItem->text(0)); + } + + if (m_ui.SocketForwardComboBox->currentIndex() > 0) + pSocket->setForward(m_ui.SocketForwardComboBox->currentText()); + else + pSocket->setForward(QString::null); + + m_iDirtyCount = 0; +} + + +// Stabilize current state form. +void qjackctlSocketForm::stabilizeForm (void) +{ + m_ui.OkPushButton->setEnabled(validateForm()); + + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) { + int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); + int iItemCount = m_ui.PlugListView->topLevelItemCount(); + m_ui.PlugEditPushButton->setEnabled(true); + m_ui.PlugRemovePushButton->setEnabled(true); + m_ui.PlugUpPushButton->setEnabled(iItem > 0); + m_ui.PlugDownPushButton->setEnabled(iItem < iItemCount - 1); + } else { + m_ui.PlugEditPushButton->setEnabled(false); + m_ui.PlugRemovePushButton->setEnabled(false); + m_ui.PlugUpPushButton->setEnabled(false); + m_ui.PlugDownPushButton->setEnabled(false); + } + + bool bEnabled = !m_ui.PlugNameComboBox->currentText().isEmpty(); + if (bEnabled) { + bEnabled = (m_ui.PlugListView->findItems( + m_ui.PlugNameComboBox->currentText(), Qt::MatchExactly).isEmpty()); + } + m_ui.PlugAddPushButton->setEnabled(bEnabled); +} + + +// Validate form fields. +bool qjackctlSocketForm::validateForm (void) +{ + bool bValid = (m_iDirtyCount > 0); + + bValid = bValid && !m_ui.SocketNameLineEdit->text().isEmpty(); + bValid = bValid && !m_ui.ClientNameComboBox->currentText().isEmpty(); + bValid = bValid && (m_ui.PlugListView->topLevelItemCount() > 0); + + return bValid; +} + +// Validate form fields and accept it valid. +void qjackctlSocketForm::accept (void) +{ + if (m_pSocketList == NULL) + return; + + if (!validateForm()) + return; + + // Check if a socket with the same name already exists... + QListIterator iter(m_pSocketList->sockets()); + while (iter.hasNext()) { + const QString& sSocketName = iter.next()->socketName(); + if (m_ui.SocketNameLineEdit->text() == sSocketName) { + QMessageBox::critical(this, + tr("Error") + " - " QJACKCTL_SUBTITLE1, + tr("A socket named \"%1\" already exists.") + .arg(sSocketName), QMessageBox::Cancel); + // Reject. + return; + } + } + + QDialog::accept(); +} + + +void qjackctlSocketForm::reject (void) +{ + bool bReject = true; + + // Check if there's any pending changes... + if (m_iDirtyCount > 0) { + switch (QMessageBox::warning(this, + tr("Warning") + " - " QJACKCTL_SUBTITLE1, + tr("Some settings have been changed.\n\n" + "Do you want to apply the changes?"), + QMessageBox::Apply | + QMessageBox::Discard | + QMessageBox::Cancel)) { + case QMessageBox::Apply: + accept(); + return; + case QMessageBox::Discard: + break; + default: // Cancel. + bReject = false; + } + } + + if (bReject) + QDialog::reject(); +} + + +// Dirty up the current form. +void qjackctlSocketForm::changed (void) +{ + m_iDirtyCount++; + stabilizeForm(); +} + + +// Add new Plug to socket list. +void qjackctlSocketForm::addPlug (void) +{ + if (m_ppPixmaps == NULL) + return; + + QString sPlugName = m_ui.PlugNameComboBox->currentText(); + if (!sPlugName.isEmpty()) { + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) +#if QT_VERSION >= 0x040200 + pItem->setSelected(false); +#else + m_ui.PlugListView->setItemSelected(pItem, false); +#endif + pItem = new QTreeWidgetItem(m_ui.PlugListView, pItem); + if (pItem) { + pItem->setText(0, sPlugName); + pItem->setFlags(pItem->flags() | Qt::ItemIsEditable); + QPixmap *pXpmPlug = NULL; + switch (m_pSocketTypeButtonGroup->checkedId()) { + case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO + pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_AUDIO_PLUG]; + break; + case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI + case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI + pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; + break; + } + if (pXpmPlug) + pItem->setIcon(0, QIcon(*pXpmPlug)); +#if QT_VERSION >= 0x040200 + pItem->setSelected(true); +#else + m_ui.PlugListView->setItemSelected(pItem, true); +#endif + m_ui.PlugListView->setCurrentItem(pItem); + } + m_ui.PlugNameComboBox->setEditText(QString::null); + } + + clientNameChanged(); +} + + +// Rename current selected Plug. +void qjackctlSocketForm::editPlug (void) +{ + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) + m_ui.PlugListView->editItem(pItem, 0); + + clientNameChanged(); +} + + +// Remove current selected Plug. +void qjackctlSocketForm::removePlug (void) +{ + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) + delete pItem; + + clientNameChanged(); +} + + +// Move current selected Plug one position up. +void qjackctlSocketForm::moveUpPlug (void) +{ + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) { + int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); + if (iItem > 0) { +#if QT_VERSION >= 0x040200 + pItem->setSelected(false); +#else + m_ui.PlugListView->setItemSelected(pItem, false); +#endif + pItem = m_ui.PlugListView->takeTopLevelItem(iItem); + m_ui.PlugListView->insertTopLevelItem(iItem - 1, pItem); +#if QT_VERSION >= 0x040200 + pItem->setSelected(true); +#else + m_ui.PlugListView->setItemSelected(pItem, true); +#endif + m_ui.PlugListView->setCurrentItem(pItem); + } + } + + changed(); +} + + +// Move current selected Plug one position down +void qjackctlSocketForm::moveDownPlug (void) +{ + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) { + int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); + int iItemCount = m_ui.PlugListView->topLevelItemCount(); + if (iItem < iItemCount - 1) { +#if QT_VERSION >= 0x040200 + pItem->setSelected(false); +#else + m_ui.PlugListView->setItemSelected(pItem, false); +#endif + pItem = m_ui.PlugListView->takeTopLevelItem(iItem); + m_ui.PlugListView->insertTopLevelItem(iItem + 1, pItem); +#if QT_VERSION >= 0x040200 + pItem->setSelected(true); +#else + m_ui.PlugListView->setItemSelected(pItem, true); +#endif + m_ui.PlugListView->setCurrentItem(pItem); + } + } + + changed(); +} + +// Update selected plug one position down +void qjackctlSocketForm::selectedPlug (void) +{ + QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); + if (pItem) + m_ui.PlugNameComboBox->setEditText(pItem->text(0)); + + stabilizeForm(); +} + + +// Add new Plug from context menu. +void qjackctlSocketForm::activateAddPlugMenu ( QAction *pAction ) +{ + int iIndex = pAction->data().toInt(); + if (iIndex >= 0 && iIndex < m_ui.PlugNameComboBox->count()) { + m_ui.PlugNameComboBox->setCurrentIndex(iIndex); + addPlug(); + } +} + + +// Plug list context menu handler. +void qjackctlSocketForm::customContextMenu ( const QPoint& pos ) +{ + int iItem = 0; + int iItemCount = 0; + QTreeWidgetItem *pItem = m_ui.PlugListView->itemAt(pos); + if (pItem == NULL) + pItem = m_ui.PlugListView->currentItem(); + if (pItem) { + iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); + iItemCount = m_ui.PlugListView->topLevelItemCount(); + } + + QMenu menu(this); + QAction *pAction; + + // Build the add plug sub-menu... + QMenu *pAddPlugMenu = menu.addMenu( + QIcon(":/icons/add1.png"), tr("Add Plug")); + int iIndex = 0; + for (iIndex = 0; iIndex < m_ui.PlugNameComboBox->count(); iIndex++) { + pAction = pAddPlugMenu->addAction( + m_ui.PlugNameComboBox->itemText(iIndex)); + pAction->setData(iIndex); + } + QObject::connect(pAddPlugMenu, + SIGNAL(triggered(QAction*)), + SLOT(activateAddPlugMenu(QAction*))); + pAddPlugMenu->setEnabled(iIndex > 0); + // Build the plug context menu... + bool bEnabled = (pItem != NULL); + pAction = menu.addAction(QIcon(":/icons/edit1.png"), + tr("Edit"), this, SLOT(editPlug())); + pAction->setEnabled(bEnabled); + pAction = menu.addAction(QIcon(":/icons/remove1.png"), + tr("Remove"), this, SLOT(removePlug())); + pAction->setEnabled(bEnabled); + menu.addSeparator(); + pAction = menu.addAction(QIcon(":/icons/up1.png"), + tr("Move Up"), this, SLOT(moveUpPlug())); + pAction->setEnabled(bEnabled && iItem > 0); + pAction = menu.addAction(QIcon(":/icons/down1.png"), + tr("Move Down"), this, SLOT(moveDownPlug())); + pAction->setEnabled(bEnabled && iItem < iItemCount - 1); + + menu.exec((m_ui.PlugListView->viewport())->mapToGlobal(pos)); +} + + +void qjackctlSocketForm::updateJackClients ( int iSocketType ) +{ + if (m_pJackClient == NULL) + return; + + const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; + int iPixmap = QJACKCTL_XPM_AUDIO_CLIENT; +#ifdef CONFIG_JACK_MIDI + if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) { + pszJackPortType = JACK_DEFAULT_MIDI_TYPE; + iPixmap = QJACKCTL_XPM_MIDI_CLIENT; + } +#endif + + bool bReadable = m_pSocketList->isReadable(); + const QIcon icon(*m_ppPixmaps[iPixmap]); + + // Grab all client ports. + const char **ppszClientPorts = jack_get_ports(m_pJackClient, + NULL, pszJackPortType, + (bReadable ? JackPortIsOutput : JackPortIsInput)); + if (ppszClientPorts) { + int iClientPort = 0; + while (ppszClientPorts[iClientPort]) { + QString sClientPort = QString::fromUtf8(ppszClientPorts[iClientPort]); + int iColon = sClientPort.indexOf(':'); + if (iColon >= 0) { + QString sClientName + = qjackctlClientAlias::escapeRegExpDigits( + sClientPort.left(iColon)); + bool bExists = false; + for (int i = 0; + i < m_ui.ClientNameComboBox->count() && !bExists; i++) + bExists = (sClientName == m_ui.ClientNameComboBox->itemText(i)); + if (!bExists) { + m_ui.ClientNameComboBox->addItem(icon, sClientName); + } + } + iClientPort++; + } + ::free(ppszClientPorts); + } +} + + +// ALSA client names refreshner. +void qjackctlSocketForm::updateAlsaClients ( int iSocketType ) +{ + if (m_pAlsaSeq == NULL) + return; + +#ifdef CONFIG_ALSA_SEQ + + bool bReadable = m_pSocketList->isReadable(); + const QIcon icon(*m_ppPixmaps[QJACKCTL_XPM_MIDI_CLIENT]); + + // Readd all subscribers... + snd_seq_client_info_t *pClientInfo; + snd_seq_port_info_t *pPortInfo; + unsigned int uiAlsaFlags; + if (bReadable) + uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; + else + uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; + + snd_seq_client_info_alloca(&pClientInfo); + snd_seq_port_info_alloca(&pPortInfo); + snd_seq_client_info_set_client(pClientInfo, -1); + while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { + int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); + QString sClient + = qjackctlClientAlias::escapeRegExpDigits( + QString::fromUtf8(snd_seq_client_info_get_name(pClientInfo))); + if (iAlsaClient > 0) { + bool bExists = false; + snd_seq_port_info_set_client(pPortInfo, iAlsaClient); + snd_seq_port_info_set_port(pPortInfo, -1); + while (!bExists + && snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { + unsigned int uiPortCapability + = snd_seq_port_info_get_capability(pPortInfo); + if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && + ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { + for (int i = 0; + i < m_ui.ClientNameComboBox->count() && !bExists; i++) + bExists = (sClient == m_ui.ClientNameComboBox->itemText(i)); + if (!bExists) { + m_ui.ClientNameComboBox->addItem(icon, sClient); + bExists = true; + } + } + } + } + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Socket type change slot. +void qjackctlSocketForm::socketTypeChanged (void) +{ + if (m_ppPixmaps == NULL) + return; + if (m_pSocketList == NULL) + return; + + QString sOldClientName = m_ui.ClientNameComboBox->currentText(); + + m_ui.ClientNameComboBox->clear(); + + QPixmap *pXpmSocket = NULL; + QPixmap *pXpmPlug = NULL; + + bool bReadable = m_pSocketList->isReadable(); + int iSocketType = m_pSocketTypeButtonGroup->checkedId(); + switch (iSocketType) { + case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO + if (m_ui.ExclusiveCheckBox->isChecked()) + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X]; + else + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET]; + m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); + pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_AUDIO_PLUG]; + updateJackClients(QJACKCTL_SOCKETTYPE_JACK_AUDIO); + break; + case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI + if (m_ui.ExclusiveCheckBox->isChecked()) + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; + else + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; + m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); + pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; + updateJackClients(QJACKCTL_SOCKETTYPE_JACK_MIDI); + break; + case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI + if (m_ui.ExclusiveCheckBox->isChecked()) + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; + else + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; + m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); + pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; + updateAlsaClients(QJACKCTL_SOCKETTYPE_ALSA_MIDI); + break; + } + + m_ui.ClientNameComboBox->setEditText(sOldClientName); + clientNameChanged(); + + if (pXpmPlug) { + int iItemCount = m_ui.PlugListView->topLevelItemCount(); + for (int iItem = 0; iItem < iItemCount; ++iItem) { + QTreeWidgetItem *pItem = m_ui.PlugListView->topLevelItem(iItem); + pItem->setIcon(0, QIcon(*pXpmPlug)); + } + } + + // Now the socket forward list... + m_ui.SocketForwardComboBox->clear(); + m_ui.SocketForwardComboBox->addItem(tr("(None)")); + if (!bReadable) { + QListIterator iter(m_pSocketList->sockets()); + while (iter.hasNext()) { + qjackctlSocketItem *pSocketItem = iter.next(); + if (pSocketItem->socketType() == iSocketType + && pSocketItem->socketName() != m_ui.SocketNameLineEdit->text()) { + switch (iSocketType) { + case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO + if (pSocketItem->isExclusive()) + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X]; + else + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET]; + break; + case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI + case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI + if (pSocketItem->isExclusive()) + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; + else + pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; + break; + } + m_ui.SocketForwardComboBox->addItem( + QIcon(*pXpmSocket), pSocketItem->socketName()); + } + } + } + + bool bEnabled = (m_ui.SocketForwardComboBox->count() > 1); + m_ui.SocketForwardTextLabel->setEnabled(bEnabled); + m_ui.SocketForwardComboBox->setEnabled(bEnabled); +} + + +// JACK client plugs refreshner. +void qjackctlSocketForm::updateJackPlugs ( int iSocketType ) +{ + if (m_pJackClient == NULL) + return; + + const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; + int iPixmap = QJACKCTL_XPM_AUDIO_PLUG; +#ifdef CONFIG_JACK_MIDI + if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) { + pszJackPortType = JACK_DEFAULT_MIDI_TYPE; + iPixmap = QJACKCTL_XPM_MIDI_PLUG; + } +#endif + + QString sClientName = m_ui.ClientNameComboBox->currentText(); + if (sClientName.isEmpty()) + return; + QRegExp rxClientName(sClientName); + + bool bReadable = m_pSocketList->isReadable(); + const QIcon icon(*m_ppPixmaps[iPixmap]); + const char **ppszClientPorts = jack_get_ports(m_pJackClient, + NULL, pszJackPortType, + (bReadable ? JackPortIsOutput : JackPortIsInput)); + if (ppszClientPorts) { + int iClientPort = 0; + while (ppszClientPorts[iClientPort]) { + QString sClientPort = QString::fromUtf8(ppszClientPorts[iClientPort]); + int iColon = sClientPort.indexOf(':'); + if (iColon >= 0 && rxClientName.exactMatch(sClientPort.left(iColon))) { + QString sPort + = qjackctlClientAlias::escapeRegExpDigits( + sClientPort.right(sClientPort.length() - iColon - 1)); + if (m_ui.PlugListView->findItems(sPort, Qt::MatchExactly).isEmpty()) + m_ui.PlugNameComboBox->addItem(icon, sPort); + } + iClientPort++; + } + ::free(ppszClientPorts); + } +} + + +// ALSA client plugs refreshner. +void qjackctlSocketForm::updateAlsaPlugs ( int iSocketType ) +{ + if (m_pAlsaSeq == NULL) + return; + if (iSocketType != QJACKCTL_SOCKETTYPE_ALSA_MIDI) + return; + +#ifdef CONFIG_ALSA_SEQ + + QString sClientName = m_ui.ClientNameComboBox->currentText(); + if (sClientName.isEmpty()) + return; + QRegExp rxClientName(sClientName); + + bool bReadable = m_pSocketList->isReadable(); + const QIcon icon(*m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]); + + // Fill sequencer plugs... + snd_seq_client_info_t *pClientInfo; + snd_seq_port_info_t *pPortInfo; + unsigned int uiAlsaFlags; + if (bReadable) + uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; + else + uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; + + snd_seq_client_info_alloca(&pClientInfo); + snd_seq_port_info_alloca(&pPortInfo); + snd_seq_client_info_set_client(pClientInfo, -1); + while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { + int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); + QString sClient = QString::fromUtf8( + snd_seq_client_info_get_name(pClientInfo)); + if (iAlsaClient > 0 && rxClientName.exactMatch(sClient)) { + snd_seq_port_info_set_client(pPortInfo, iAlsaClient); + snd_seq_port_info_set_port(pPortInfo, -1); + while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { + unsigned int uiPortCapability + = snd_seq_port_info_get_capability(pPortInfo); + if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && + ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { + QString sPort + = qjackctlClientAlias::escapeRegExpDigits( + QString::fromUtf8(snd_seq_port_info_get_name(pPortInfo))); + if (m_ui.PlugListView->findItems(sPort, Qt::MatchExactly).isEmpty()) + m_ui.PlugNameComboBox->addItem(icon, sPort); + } + } + } + } + +#endif // CONFIG_ALSA_SEQ +} + + +// Update client list if available. +void qjackctlSocketForm::clientNameChanged (void) +{ + if (m_ppPixmaps == NULL) + return; + if (m_pSocketList == NULL) + return; + + m_ui.PlugNameComboBox->clear(); + + int iSocketType = m_pSocketTypeButtonGroup->checkedId(); + switch (iSocketType) { + case 0: + updateJackPlugs(QJACKCTL_SOCKETTYPE_JACK_AUDIO); + break; + case 1: + updateJackPlugs(QJACKCTL_SOCKETTYPE_JACK_MIDI); + break; + case 2: + updateAlsaPlugs(QJACKCTL_SOCKETTYPE_ALSA_MIDI); + break; + } + + changed(); +} + + +// end of qjackctlSocketForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlSocketForm.h qjackctl-0.3.6/src/qjackctlSocketForm.h --- qjackctl-0.3.4/src/qjackctlSocketForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSocketForm.h 2010-02-20 15:49:09.000000000 +0000 @@ -0,0 +1,126 @@ +// qjackctlSocketForm.h +// +/**************************************************************************** + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlSocketForm_h +#define __qjackctlSocketForm_h + +#include + +#if QT_VERSION < 0x040200 +#define setAllColumnsShowFocus(x) parent() +#endif + +#include "ui_qjackctlSocketForm.h" + +#include "qjackctlJackConnect.h" +#include "qjackctlAlsaConnect.h" + +// Forward declarations. +class qjackctlPatchbay; +class qjackctlPatchbaySocket; +class qjackctlSocketList; + +class QButtonGroup; +class QPixmap; + + +//---------------------------------------------------------------------------- +// qjackctlSocketForm -- UI wrapper form. + +class qjackctlSocketForm : public QDialog +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlSocketForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlSocketForm(); + + void setSocketCaption(const QString& sSocketCaption); + void setSocketList(qjackctlSocketList *pSocketList); + + void setPixmaps(QPixmap **ppPixmaps); + + void setJackClient(jack_client_t *pJackClient); + void setAlsaSeq(snd_seq_t *pAlsaSeq); + + void setConnectCount(int iConnectCount); + + void load(qjackctlPatchbaySocket *pSocket); + void save(qjackctlPatchbaySocket *pSocket); + +public slots: + + void changed(); + + void addPlug(); + void editPlug(); + void removePlug(); + void moveUpPlug(); + void moveDownPlug(); + void selectedPlug(); + + void activateAddPlugMenu(QAction *); + + void customContextMenu(const QPoint&); + + void socketTypeChanged(); + void clientNameChanged(); + + void stabilizeForm(); + +protected slots: + + void accept(); + void reject(); + +protected: + + void updateJackClients(int iSocketType); + void updateAlsaClients(int iSocketType); + + void updateJackPlugs(int iSocketType); + void updateAlsaPlugs(int iSocketType); + + bool validateForm(); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlSocketForm m_ui; + + // Instance variables. + qjackctlSocketList *m_pSocketList; + jack_client_t *m_pJackClient; + snd_seq_t *m_pAlsaSeq; + QPixmap **m_ppPixmaps; + int m_iDirtyCount; + + QButtonGroup *m_pSocketTypeButtonGroup; +}; + + +#endif // __qjackctlSocketForm_h + + +// end of qjackctlSocketForm.h diff -Nru qjackctl-0.3.4/src/qjackctlSocketForm.ui qjackctl-0.3.6/src/qjackctlSocketForm.ui --- qjackctl-0.3.4/src/qjackctlSocketForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSocketForm.ui 2010-02-20 15:49:09.000000000 +0000 @@ -0,0 +1,437 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlSocketForm + + + + 0 + 0 + 400 + 467 + + + + Socket - JACK Audio Connection Kit + + + :/icons/patchbay1.png + + + + 9 + + + 6 + + + + + QTabWidget::Rounded + + + + &Socket + + + + 8 + + + 4 + + + + + &Name (alias): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + SocketNameLineEdit + + + + + + + Socket name (an alias for client name) + + + + + + + Client name (regular expression) + + + true + + + + + + + Add plug to socket plug list + + + Add P&lug + + + :/icons/add1.png + + + Alt+L + + + + + + + &Plug: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + PlugNameComboBox + + + + + + + Port name (regular expression) + + + true + + + + + + + Qt::CustomContextMenu + + + Socket plug list + + + false + + + true + + + false + + + true + + + + Socket Plugs / Ports + + + + + + + + Edit currently selected plug + + + &Edit + + + :/icons/edit1.png + + + Alt+E + + + + + + + Remove currently selected plug from socket plug list + + + &Remove + + + :/icons/remove1.png + + + Alt+R + + + + + + + &Client: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + ClientNameComboBox + + + + + + + Move down currently selected plug in socket plug list + + + &Down + + + :/icons/down1.png + + + Alt+D + + + + + + + Move up current selected plug in socket plug list + + + &Up + + + :/icons/up1.png + + + Alt+U + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 16 + 38 + + + + + + + + Enforce only one exclusive cable connection + + + E&xclusive + + + Alt+X + + + + + + + &Forward: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + SocketForwardComboBox + + + + + + + Forward (clone) all connections from this socket + + + false + + + + + + + Type + + + + 8 + + + 4 + + + + + Audio socket type (JACK) + + + &Audio + + + Alt+A + + + + + + + MIDI socket type (JACK) + + + &MIDI + + + Alt+M + + + + + + + MIDI socket type (ALSA) + + + AL&SA + + + Alt+S + + + + + + + + + + + + + + 4 + + + 4 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 120 + 8 + + + + + + + + + + + OK + + + :/icons/accept1.png + + + true + + + + + + + + + + Cancel + + + :/icons/quit1.png + + + + + + + + + + SocketTabWidget + SocketNameLineEdit + AudioRadioButton + MidiRadioButton + AlsaRadioButton + ClientNameComboBox + PlugNameComboBox + PlugAddPushButton + PlugListView + PlugEditPushButton + PlugRemovePushButton + PlugUpPushButton + PlugDownPushButton + ExclusiveCheckBox + SocketForwardComboBox + OkPushButton + CancelPushButton + + + + + + diff -Nru qjackctl-0.3.4/src/qjackctlStatusForm.cpp qjackctl-0.3.6/src/qjackctlStatusForm.cpp --- qjackctl-0.3.4/src/qjackctlStatusForm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlStatusForm.cpp 2009-10-30 17:41:49.000000000 +0000 @@ -0,0 +1,204 @@ +// qjackctlStatusForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlStatusForm.h" + +#include "qjackctlStatus.h" +#include "qjackctlSetup.h" + +#include "qjackctlMainForm.h" + +#include + +#include +#include + + +//---------------------------------------------------------------------------- +// qjackctlStatusForm -- UI wrapper form. + +// Constructor. +qjackctlStatusForm::qjackctlStatusForm ( + QWidget *pParent, Qt::WindowFlags wflags ) + : QWidget(pParent, wflags) +{ + // Setup UI struct... + m_ui.setupUi(this); + + // Create the list view items 'a priori'... + QString s = " "; + QString c = ":" + s; + QString n = "--"; + QTreeWidgetItem *pViewItem; + + // Status list view... + QHeaderView *pHeader = m_ui.StatsListView->header(); +// pHeader->setResizeMode(QHeaderView::Custom); + pHeader->setDefaultAlignment(Qt::AlignLeft); +// pHeader->setDefaultSectionSize(320); + pHeader->setMovable(false); + pHeader->setStretchLastSection(true); + + m_apStatus[STATUS_SERVER_NAME] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Server name") + c << n); + m_apStatus[STATUS_SERVER_STATE] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Server state") + c << n); + m_apStatus[STATUS_DSP_LOAD] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("DSP Load") + c << n); + m_apStatus[STATUS_SAMPLE_RATE] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Sample Rate") + c << n); + m_apStatus[STATUS_BUFFER_SIZE] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Buffer Size") + c << n); + m_apStatus[STATUS_REALTIME] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Realtime Mode") + c << n); + + pViewItem = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Transport state") + c << n); + m_apStatus[STATUS_TRANSPORT_STATE] = pViewItem; + m_apStatus[STATUS_TRANSPORT_TIME] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("Transport Timecode") + c << n); + m_apStatus[STATUS_TRANSPORT_BBT] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("Transport BBT") + c << n); + m_apStatus[STATUS_TRANSPORT_BPM] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("Transport BPM") + c << n); + + pViewItem = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("XRUN count since last server startup") + c << n); + m_apStatus[STATUS_XRUN_COUNT] = pViewItem; + m_apStatus[STATUS_XRUN_TIME] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN last time detected") + c << n); + m_apStatus[STATUS_XRUN_LAST] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN last") + c << n); + m_apStatus[STATUS_XRUN_MAX] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN maximum") + c << n); + m_apStatus[STATUS_XRUN_MIN] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN minimum") + c << n); + m_apStatus[STATUS_XRUN_AVG] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN average") + c << n); + m_apStatus[STATUS_XRUN_TOTAL] = new QTreeWidgetItem(pViewItem, + QStringList() << s + tr("XRUN total") + c << n); + +#ifdef CONFIG_JACK_MAX_DELAY + m_apStatus[STATUS_MAX_DELAY] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Maximum scheduling delay") + c << n); +#endif + m_apStatus[STATUS_RESET_TIME] = new QTreeWidgetItem(m_ui.StatsListView, + QStringList() << s + tr("Time of last reset") + c << n); + + m_ui.StatsListView->resizeColumnToContents(0); // Description. + m_ui.StatsListView->resizeColumnToContents(1); // Value. + + // UI connections... + + QObject::connect(m_ui.ResetPushButton, + SIGNAL(clicked()), + SLOT(resetXrunStats())); + QObject::connect(m_ui.RefreshPushButton, + SIGNAL(clicked()), + SLOT(refreshXrunStats())); +} + + +// Destructor. +qjackctlStatusForm::~qjackctlStatusForm (void) +{ +} + + +// Notify our parent that we're emerging. +void qjackctlStatusForm::showEvent ( QShowEvent *pShowEvent ) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); + + QWidget::showEvent(pShowEvent); +} + +// Notify our parent that we're closing. +void qjackctlStatusForm::hideEvent ( QHideEvent *pHideEvent ) +{ + QWidget::hideEvent(pHideEvent); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + +// Just about to notify main-window that we're closing. +void qjackctlStatusForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) +{ + QWidget::hide(); + + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->stabilizeForm(); +} + + +// Ask our parent to reset status. +void qjackctlStatusForm::resetXrunStats (void) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->resetXrunStats(); +} + +// Ask our parent to refresh our status. +void qjackctlStatusForm::refreshXrunStats (void) +{ + qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); + if (pMainForm) + pMainForm->refreshXrunStats(); +} + + +// Update one status item value. +void qjackctlStatusForm::updateStatusItem ( int iStatusItem, + const QString& sText ) +{ + m_apStatus[iStatusItem]->setText(1, sText); +} + + +// Keyboard event handler. +void qjackctlStatusForm::keyPressEvent ( QKeyEvent *pKeyEvent ) +{ +#ifdef CONFIG_DEBUG_0 + qDebug("qjackctlStatusForm::keyPressEvent(%d)", pKeyEvent->key()); +#endif + int iKey = pKeyEvent->key(); + switch (iKey) { + case Qt::Key_Escape: + close(); + break; + default: + QWidget::keyPressEvent(pKeyEvent); + break; + } + + // Make sure we've get focus back... + QWidget::setFocus(); +} + + +// end of qjackctlStatusForm.cpp diff -Nru qjackctl-0.3.4/src/qjackctlStatusForm.h qjackctl-0.3.6/src/qjackctlStatusForm.h --- qjackctl-0.3.4/src/qjackctlStatusForm.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlStatusForm.h 2009-10-30 17:41:49.000000000 +0000 @@ -0,0 +1,79 @@ +// qjackctlStatusForm.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlStatusForm_h +#define __qjackctlStatusForm_h + +#include + +#if QT_VERSION < 0x040200 +#define setAllColumnsShowFocus(x) parent() +#endif + +#include "ui_qjackctlStatusForm.h" + +// Forward declarations. +class QTreeWidgetItem; + + +//---------------------------------------------------------------------------- +// qjackctlStatusForm -- UI wrapper form. + +class qjackctlStatusForm : public QWidget +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlStatusForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); + // Destructor. + ~qjackctlStatusForm(); + + void updateStatusItem(int iStatusItem, const QString& sText); + +public slots: + + void resetXrunStats(); + void refreshXrunStats(); + +protected: + + void showEvent(QShowEvent *); + void hideEvent(QHideEvent *); + void closeEvent(QCloseEvent *); + + void keyPressEvent(QKeyEvent *); + +private: + + // The Qt-designer UI struct... + Ui::qjackctlStatusForm m_ui; + + // Instance variables. + QTreeWidgetItem *m_apStatus[19]; +}; + + +#endif // __qjackctlStatusForm_h + + +// end of qjackctlStatusForm.h diff -Nru qjackctl-0.3.4/src/qjackctlStatusForm.ui qjackctl-0.3.6/src/qjackctlStatusForm.ui --- qjackctl-0.3.4/src/qjackctlStatusForm.ui 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlStatusForm.ui 2007-07-08 17:35:41.000000000 +0100 @@ -0,0 +1,167 @@ + + rncbc aka Rui Nuno Capela + JACK Audio Connection Kit - Qt GUI Interface. + + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + + qjackctlStatusForm + + + + 0 + 0 + 440 + 220 + + + + + 1 + 1 + 0 + 0 + + + + + + + Status - JACK Audio Connection Kit + + + :/icons/status1.png + + + + 4 + + + 4 + + + + + + 7 + 7 + 0 + 0 + + + + + 240 + 0 + + + + Statistics since last server startup + + + false + + + true + + + QAbstractItemView::NoSelection + + + true + + + true + + + false + + + true + + + + Description + + + + + Value + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 192 + 16 + + + + + + + + Reset XRUN statistic values + + + Re&set + + + :/icons/reset1.png + + + Alt+S + + + + + + + Refresh XRUN statistic values + + + &Refresh + + + :/icons/refresh1.png + + + Alt+R + + + + + + + + StatsListView + ResetPushButton + + + + + + diff -Nru qjackctl-0.3.4/src/qjackctlStatus.h qjackctl-0.3.6/src/qjackctlStatus.h --- qjackctl-0.3.4/src/qjackctlStatus.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlStatus.h 2009-10-30 17:41:49.000000000 +0000 @@ -0,0 +1,55 @@ +// qjackctlStatus.h +// +/**************************************************************************** + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlStatus_h +#define __qjackctlStatus_h + +// List view statistics item indexes +#define STATUS_SERVER_NAME 0 +#define STATUS_SERVER_STATE 1 +#define STATUS_DSP_LOAD 2 +#define STATUS_SAMPLE_RATE 3 +#define STATUS_BUFFER_SIZE 4 +#define STATUS_REALTIME 5 +#define STATUS_TRANSPORT_STATE 6 +#define STATUS_TRANSPORT_TIME 7 +#define STATUS_TRANSPORT_BBT 8 +#define STATUS_TRANSPORT_BPM 9 +#define STATUS_XRUN_COUNT 10 +#define STATUS_XRUN_TIME 11 +#define STATUS_XRUN_LAST 12 +#define STATUS_XRUN_MAX 13 +#define STATUS_XRUN_MIN 14 +#define STATUS_XRUN_AVG 15 +#define STATUS_XRUN_TOTAL 16 +#define STATUS_RESET_TIME 17 +#define STATUS_MAX_DELAY 18 + +// (Big)Time display identifiers. +#define DISPLAY_TRANSPORT_TIME 0 +#define DISPLAY_TRANSPORT_BBT 1 +#define DISPLAY_RESET_TIME 2 +#define DISPLAY_XRUN_TIME 3 + +#endif // __qjackctlStatus_h + +// end of qjackctlStatus.h + diff -Nru qjackctl-0.3.4/src/qjackctlSystemTray.cpp qjackctl-0.3.6/src/qjackctlSystemTray.cpp --- qjackctl-0.3.4/src/qjackctlSystemTray.cpp 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSystemTray.cpp 2009-09-24 22:03:07.000000000 +0100 @@ -0,0 +1,330 @@ +// qjackctlSystemTray.cpp +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#include "qjackctlAbout.h" +#include "qjackctlSystemTray.h" + +#include +#include + +#if QT_VERSION < 0x040500 +namespace Qt { +const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); +#if QT_VERSION < 0x040200 +const WindowFlags CustomizeWindowHint = WindowFlags(0x02000000); +#endif +} +#endif + + +#ifndef QJACKCTL_QT4_SYSTEM_TRAY + +#include +#include + +#if defined(Q_WS_X11) + +#include + +#include +#include + +// System Tray Protocol Specification opcodes. +#define SYSTEM_TRAY_REQUEST_DOCK 0 +#define SYSTEM_TRAY_BEGIN_MESSAGE 1 +#define SYSTEM_TRAY_CANCEL_MESSAGE 2 + +#endif // Q_WS_X11 + +#endif + + +//---------------------------------------------------------------------------- +// qjackctlSystemTray -- Custom system tray widget. + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + +// Constructor. +qjackctlSystemTray::qjackctlSystemTray ( QWidget *pParent ) + : QSystemTrayIcon(pParent) +{ + // Set things inherited... + if (pParent) { + m_icon = pParent->windowIcon(); + QSystemTrayIcon::setIcon(m_icon); + QSystemTrayIcon::setToolTip(pParent->windowTitle()); + } + + QObject::connect(this, + SIGNAL(activated(QSystemTrayIcon::ActivationReason)), + SLOT(activated(QSystemTrayIcon::ActivationReason))); + + setBackground(Qt::transparent); + + QSystemTrayIcon::show(); +} + + +// Redirect to hide. +void qjackctlSystemTray::close (void) +{ + QSystemTrayIcon::hide(); +} + + +// Handle systeam tray activity. +void qjackctlSystemTray::activated ( QSystemTrayIcon::ActivationReason reason ) +{ + switch (reason) { + case QSystemTrayIcon::Context: + emit contextMenuRequested(QCursor::pos()); + break; + case QSystemTrayIcon::Trigger: + emit clicked(); + break; + case QSystemTrayIcon::MiddleClick: + emit middleClicked(); + break; + case QSystemTrayIcon::DoubleClick: + case QSystemTrayIcon::Unknown: + default: + break; + } +} + +#else + +// Constructor. +qjackctlSystemTray::qjackctlSystemTray ( QWidget *pParent ) + : QWidget(pParent, Qt::Window + | Qt::CustomizeWindowHint + | Qt::X11BypassWindowManagerHint + | Qt::FramelessWindowHint + | Qt::WindowStaysOnTopHint) +{ +#if QT_VERSION >= 0x040200 + QWidget::setAttribute(Qt::WA_AlwaysShowToolTips); +#endif +// QWidget::setAttribute(Qt::WA_NoSystemBackground); + +// QWidget::setBackgroundRole(QPalette::NoRole); +// QWidget::setAutoFillBackground(true); + + QWidget::setFixedSize(22, 22); +// QWidget::setMinimumSize(22, 22); + +#if defined(Q_WS_X11) + + Display *dpy = QX11Info::display(); + WId trayWin = winId(); + + // System Tray Protocol Specification. + Screen *screen = XDefaultScreenOfDisplay(dpy); + int iScreen = XScreenNumberOfScreen(screen); + char szAtom[32]; + snprintf(szAtom, sizeof(szAtom), "_NET_SYSTEM_TRAY_S%d", iScreen); + Atom selectionAtom = XInternAtom(dpy, szAtom, false); + XGrabServer(dpy); + Window managerWin = XGetSelectionOwner(dpy, selectionAtom); + if (managerWin != None) + XSelectInput(dpy, managerWin, StructureNotifyMask); + XUngrabServer(dpy); + XFlush(dpy); + if (managerWin != None) { + XEvent ev; + memset(&ev, 0, sizeof(ev)); + ev.xclient.type = ClientMessage; + ev.xclient.window = managerWin; + ev.xclient.message_type = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", false); + ev.xclient.format = 32; + ev.xclient.data.l[0] = CurrentTime; + ev.xclient.data.l[1] = SYSTEM_TRAY_REQUEST_DOCK; + ev.xclient.data.l[2] = trayWin; + ev.xclient.data.l[3] = 0; + ev.xclient.data.l[4] = 0; + XSendEvent(dpy, managerWin, false, NoEventMask, &ev); + XSync(dpy, false); + } + + // Follwing simple KDE specs: + Atom trayAtom; + // For older KDE's (hopefully)... + int data = 1; + trayAtom = XInternAtom(dpy, "KWM_DOCKWINDOW", false); + XChangeProperty(dpy, trayWin, trayAtom, trayAtom, 32, PropModeReplace, (unsigned char *) &data, 1); + // For not so older KDE's... + WId forWin = pParent ? pParent->topLevelWidget()->winId() : QX11Info::appRootWindow(); + trayAtom = XInternAtom(dpy, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false); + XChangeProperty(dpy, trayWin, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char *) &forWin, 1); + +#endif // Q_WS_X11 + + // Set things inherited... + if (pParent) { + QWidget::setWindowIcon(pParent->windowIcon()); + QWidget::setToolTip(pParent->windowTitle()); + } + + setBackground(Qt::transparent); +} + +#endif + + +// Default destructor. +qjackctlSystemTray::~qjackctlSystemTray (void) +{ +} + + +// System tray icon/pixmaps update method. +void qjackctlSystemTray::updatePixmap (void) +{ + // Renitialize icon as fit... +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + m_pixmap = m_icon.pixmap(22, 22); +#else + m_pixmap = QWidget::windowIcon().pixmap(QWidget::size()); +#endif + + // Merge with the overlay pixmap... + if (!m_pixmapOverlay.mask().isNull()) { + QBitmap mask = m_pixmap.mask(); + QPainter(&mask).drawPixmap(0, 0, m_pixmapOverlay.mask()); + m_pixmap.setMask(mask); + QPainter(&m_pixmap).drawPixmap(0, 0, m_pixmapOverlay); + } + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + + if (m_background != Qt::transparent) { + QPixmap pixmap(m_pixmap); + m_pixmap.fill(m_background); + QPainter(&m_pixmap).drawPixmap(0, 0, pixmap); + } + + // Setup system tray icon directly... + QSystemTrayIcon::setIcon(QIcon(m_pixmap)); + +#else + + // Setup widget drawable pixmap transparency... + if (!m_pixmap.mask().isNull() && m_background == Qt::transparent) { + QBitmap mask(m_pixmap.size()); + mask.fill(Qt::color0); + QBitmap maskPixmap = m_pixmap.mask(); + QPainter(&mask).drawPixmap( + (mask.width() - maskPixmap.width()) / 2, + (mask.height() - maskPixmap.height()) / 2, + maskPixmap); + QWidget::setMask(mask); + } else { + QWidget::setMask(QBitmap()); + } + + QWidget::update(); + +#endif +} + + + +// Background mask methods. +void qjackctlSystemTray::setBackground ( const QColor& background ) +{ + // Set background color, now. + m_background = background; + +#ifndef QJACKCTL_QT4_SYSTEM_TRAY + + QPalette pal(QWidget::palette()); + pal.setColor(QWidget::backgroundRole(), m_background); + QWidget::setPalette(pal); + +#endif + + updatePixmap(); +} + +const QColor& qjackctlSystemTray::background (void) const +{ + return m_background; +} + + +// Set system tray icon overlay. +void qjackctlSystemTray::setPixmapOverlay ( const QPixmap& pmOverlay ) +{ + m_pixmapOverlay = pmOverlay; + + updatePixmap(); +} + +const QPixmap& qjackctlSystemTray::pixmapOverlay (void) const +{ + return m_pixmapOverlay; +} + + +#ifndef QJACKCTL_QT4_SYSTEM_TRAY + +// Self-drawable methods. +void qjackctlSystemTray::paintEvent ( QPaintEvent * ) +{ + const QRect& rect = QWidget::rect(); + + QPainter(this).drawPixmap( + rect.x() + (rect.width() - m_pixmap.width()) / 2, + rect.y() + (rect.height() - m_pixmap.height()) / 2, + m_pixmap); +} + + +// Inherited mouse event. +void qjackctlSystemTray::mousePressEvent ( QMouseEvent *pMouseEvent ) +{ + if (!QWidget::rect().contains(pMouseEvent->pos())) + return; + + switch (pMouseEvent->button()) { + + case Qt::LeftButton: + // Toggle parent widget visibility. + emit clicked(); + break; + + case Qt::MidButton: + emit middleClicked(); + break; + + case Qt::RightButton: + // Just signal we're on to context menu. + emit contextMenuRequested(pMouseEvent->globalPos()); + break; + + default: + break; + } +} + +#endif + +// end of qjackctlSystemTray.cpp diff -Nru qjackctl-0.3.4/src/qjackctlSystemTray.h qjackctl-0.3.6/src/qjackctlSystemTray.h --- qjackctl-0.3.4/src/qjackctlSystemTray.h 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/src/qjackctlSystemTray.h 2009-09-21 15:27:22.000000000 +0100 @@ -0,0 +1,118 @@ +// qjackctlSystemTray.h +// +/**************************************************************************** + Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*****************************************************************************/ + +#ifndef __qjackctlSystemTray_h +#define __qjackctlSystemTray_h + +#include + +#if QT_VERSION >= 0x040200 +#define QJACKCTL_QT4_SYSTEM_TRAY +#endif + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY +#include +#else +#include +#endif + + +//---------------------------------------------------------------------------- +// qjackctlSystemTray -- Custom system tray widget. + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY +class qjackctlSystemTray : public QSystemTrayIcon +#else +class qjackctlSystemTray : public QWidget +#endif +{ + Q_OBJECT + +public: + + // Constructor. + qjackctlSystemTray(QWidget *pParent = 0); + // Default destructor. + ~qjackctlSystemTray(); + + // Background mask methods. + void setBackground(const QColor& background); + const QColor& background() const; + + // Set system tray icon overlay. + void setPixmapOverlay(const QPixmap& pmOverlay); + const QPixmap& pixmapOverlay() const; + + // System tray icon/pixmaps update method. + void updatePixmap(); + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + + // Redirect to hide. + void close(); + +#endif + +signals: + + // Clicked signal. + void clicked(); + + // Xrun reset signal. + void middleClicked(); + + // Context menu signal. + void contextMenuRequested(const QPoint& pos); + +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + +protected slots: + + // Handle systeam tray activity. + void activated(QSystemTrayIcon::ActivationReason); + +#else + +protected: + + // Self-drawable methods. + void paintEvent(QPaintEvent *); + + // Overriden mouse event method. + void mousePressEvent(QMouseEvent *); + +#endif + +private: + + // Instance pixmap and background color. +#ifdef QJACKCTL_QT4_SYSTEM_TRAY + QIcon m_icon; +#endif + QPixmap m_pixmap; + QPixmap m_pixmapOverlay; + QColor m_background; +}; + + +#endif // __qjackctlSystemTray_h + +// end of qjackctlSystemTray.h diff -Nru qjackctl-0.3.4/TODO qjackctl-0.3.6/TODO --- qjackctl-0.3.4/TODO 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/TODO 2005-04-01 15:14:24.000000000 +0100 @@ -0,0 +1,21 @@ +QjackCtl - JACK Audio Connection Kit Qt GUI Interface +----------------------------------------------------- + +TODOs + +0.1.1 Backlog + +- Having some LADCCA support or awareness may be very welcome. + + +0.0.5 Backlog + +- Make available some translations, as some has been contributed already; + I'm missing "volunteers" for French (fr), German (de) and Spanish (es). + + +0.0.3 Backlog: + +- Display of current jackd version string. +- XRUN ticker visual charting. +- Any other feature one can think of ;) diff -Nru qjackctl-0.3.4/translations/qjackctl_cs.ts qjackctl-0.3.6/translations/qjackctl_cs.ts --- qjackctl-0.3.4/translations/qjackctl_cs.ts 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/translations/qjackctl_cs.ts 2010-02-27 19:13:23.000000000 +0000 @@ -0,0 +1,4131 @@ + + + + + QObject + + + (default) + (výchozí) + + + + Usage: %1 [options] [command-and-args] + Použití: %1 [volby] [příkazy a argumenty] + + + + Options: + Volby: + + + + Start JACK audio server immediately + JACK audioserver spustit okamžitě + + + + Show help about command line options + Ukázat nápovědu k volbám (argumentům) příkazového řádku + + + + Show version information + Ukázat informace o verzi + + + + Option -p requires an argument (preset). + Volba -p vyžaduje argument (preset, přednastavení). + + + + Qt: %1 + + Qt: %1 + + + + Set default settings preset name + Určit název přednastavení výchozího nastavení + + + + Set active patchbay definition file + Nastavit soubor s vymezením činné zapojovací desky + + + + Option -a requires an argument (path). + Volba -a vyžaduje argument (cesta). + + + + Set default JACK audio server name + Nastavit výchozí název pro zvukový server JACK + + + + Option -n requires an argument (name). + Volba -n vyžaduje argument (název). + + + + qjackctlAboutForm + + + About QjackCtl + O QjackCtl + + + + &Close + &Zavřít + + + + Alt+C + Alt+C + + + + About Qt + O Qt + + + + Version + Verze + + + + Build + Sestavení + + + + Debugging option enabled. + Povolena volba pro ladění. + + + + System tray disabled. + Zakázána oznamovací oblast. + + + + Transport status control disabled. + Zakázáno ovládání stavu předání. + + + + Realtime status disabled. + Zakázán stav provádění ve skutečném čase. + + + + XRUN delay status disabled. + Zakázán stav zpoždění XRUN. + + + + Maximum delay status disabled. + Zakázán stav největšího zpoždění. + + + + JACK MIDI support disabled. + JACK MIDI není podporován. + + + + ALSA/MIDI sequencer support disabled. + ALSA/MIDI řadič (sequencer) není podporován. + + + + Website + Stránky + + + + This program is free software; you can redistribute it and/or modify it + Tento program je svobodným programem. Můžete jej šířit a/nebo upravit + + + + under the terms of the GNU General Public License version 2 or later. + za podmínek GNU General Public License ve verzi 2 nebo pozdější. + + + + JACK Port aliases support disabled. + Podpora pro přezdívky přípojek JACK zakázána. + + + + D-Bus interface support disabled. + Podpora pro rozhraní D-Bus zakázána. + + + + qjackctlClientListView + + + Readable Clients / Output Ports + Čitelné přípojky pro klienty/výstupy + + + + Writable Clients / Input Ports + Zapisovatelné přípojky pro klienty/výstupy + + + + &Connect + &Spojit + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Rozpojit + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + &Rozpojit vše + + + + Alt+A + Disconect All + Alt+A + + + + Re&name + &Přejmenovat + + + + Alt+N + Rename + Alt+N + + + + &Refresh + &Obnovit + + + + Alt+R + Refresh + Alt+R + + + + qjackctlConnect + + + Warning + Varování + + + + This will suspend sound processing +from all client applications. + +Are you sure? + Tímto se pozastaví zpracování +zvuku u všech klientských aplikací. + +Jste si jistý? + + + Yes + Ano + + + No + Ne + + + + qjackctlConnectionsForm + + + Connections - JACK Audio Connection Kit + Spojení - JACK Audio Connection Kit + + + + Audio + Zvuk + + + + + + Connect currently selected ports + Spojit nyní vybrané přípojky + + + + + + &Connect + &Spojit + + + + + + Alt+C + Alt+C + + + + + + Disconnect currently selected ports + Rozpojit nyní vybrané přípojky + + + + + + &Disconnect + &Rozpojit + + + + + + Alt+D + Alt+D + + + + + + Disconnect all currently connected ports + Rozpojit všechny nyní spojené přípojky + + + + + + Disconnect &All + &Rozpojit vše + + + + + + Alt+A + Alt+A + + + + + + Refresh current connections view + Obnovit pohled na nynější spojení + + + + + + &Refresh + &Obnovit + + + + + + Alt+R + Alt+R + + + + MIDI + JACK-MIDI + + + + ALSA + ALSA-MIDI + + + + Warning + Varování + + + + The preset aliases have been changed: + +"%1" + +Do you want to save the changes? + Přezdívky pro přednastavení byly změněny: +"%1" + +Chcete uložit změny? + + + Save + Uložit + + + Discard + Odmítnout + + + Cancel + Zrušit + + + + qjackctlConnectorView + + + &Connect + &Spojit + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Rozpojit + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + Rozpojit &vše + + + + Alt+A + Disconect All + Alt+A + + + + &Refresh + &Obnovit + + + + Alt+R + Refresh + Alt+R + + + + qjackctlMainForm + + + QjackCtl + QjackCtl + + + + Quit processing and exit + Ukončit zpracování signálu a ukončit program + + + + + &Quit + &Ukončit + + + + Alt+Q + ALT+Q + + + + Start the JACK server + Spustit server JACK + + + + + &Start + &Spustit + + + + Alt+S + Alt+S + + + + Stop the JACK server + Zastavit server JACK + + + + S&top + &Zastavit + + + + Alt+T + Alt+T + + + + Show/hide the extended status window + Ukázat/skrýt rozšířené stavové okno + + + + + St&atus + &Stav + + + + Show information about this application + Ukázat informace o této aplikaci + + + + + Ab&out... + &O... + + + + Alt+B + Alt+B + + + + Show settings and options dialog + Ukázat dialogové okno pro nastavení a volby + + + + + S&etup... + &Nastavení... + + + + Alt+E + Alt+E + + + + Show/hide the messages log window + Ukázat/skrýt okno se zápisy pro hlášení + + + + + &Messages + &Hlášení + + + + Alt+M + Alt+M + + + + Show/hide the patchbay editor window + Ukázat/skrýt okno editoru se zapojovací deskou + + + + &Patchbay + &Zapojovací deska + + + + Show/hide the actual connections patchbay window + Ukázat/skrýt okno se zapojovací deskou se stávajícími spojeními + + + + &Connect + &Spojit + + + + Alt+C + Alt+C + + + + JACK server state + Stav serveru JACK + + + + JACK server mode + Režim serveru JACK + + + + DSP Load + Zatížení DSP + + + + Sample rate + Vzorkovací kmitočet + + + + XRUN Count (notifications) + Počet XRUN (oznámení) + + + + Time display + Údaj o čase + + + + Transport state + Stav předání + + + + Transport BPM + Předání BPM + + + + Transport time + Čas předání + + + + Backward transport + Předání zpět + + + + &Backward + &Zpět + + + + Forward transport + Předání dopředu + + + + &Forward + &Dopředu + + + + Alt+F + Alt+F + + + + Rewind transport + Předání přetočit zpět + + + + + &Rewind + &Přetočit zpět + + + + Alt+R + Alt+R + + + + Stop transport rolling + Zastavit chod předání + + + + + Pa&use + &Pozastavit + + + Alt+U + Alt+U + + + + Start transport rolling + Spustit chod předání + + + + + &Play + &Přehrát + + + + Alt+P + Alt+P + + + + Could not open ALSA sequencer as a client. + +ALSA MIDI patchbay will be not available. + Nepodařilo se otevřít řadič (sekvencer) ALSA jako klienta. + +Zapojovací deska ALSA MIDI nebude dostupná. + + + + D-BUS: Service is available (%1 aka jackdbus). + D-BUS: Služba je dostupná (%1 aka jackdbus). + + + + D-BUS: Service not available (%1 aka jackdbus). + D-BUS: Služba není dostupná (%1 aka jackdbus). + + + + + Information + Informace + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" in the context menu of the system tray entry. + Program poběží dále viditelný jako symbol v oznamovací části panelu. + +Pro ukončení programu zvolte, prosím, "Ukončit" v nabídce souvisejících +kroků u symbolu v oznamovací části panelu. + + + + + + + + Warning + Varování + + + + JACK is currently running. + +Do you want to terminate the JACK audio server? + Server JACK nyní běží. + +Chcete ukončit zvukový server JACK? + + + Terminate + Ukončit + + + Cancel + Zrušit + + + + successfully + úspěšně + + + + with exit status=%1 + s vrácenou hodnotou = %1 + + + + Could not start JACK. + +Maybe JACK audio server is already started. + JACK se nepodařilo spustit. + +Možná je server JACK už spuštěn. + + + Stop + Zastavit + + + Kill + Ukončit + + + + Could not load preset "%1". + +Retrying with default. + Nastavení "%1" se nepodařilo nahrát. + +Zkouší se znovu s výchozím přednastavením. + + + + Could not load default preset. + +Sorry. + Nepodařilo se nahrát výchozí přednastavení. + +Promiňte. + + + + Startup script... + Skript pro spuštění... + + + + Startup script terminated + Skript pro spuštění ukončen + + + + D-BUS: JACK server is starting... + D-BUS: Spouští se server JACK... + + + + D-BUS: JACK server could not be started. + +Sorry + D-BUS: Server JACK se nepodařilo spustit. + +Promiňte + + + + JACK is starting... + JACK se spouští... + + + + Some client audio applications +are still active and connected. + +Do you want to stop the JACK audio server? + Některé z klientských zvukových aplikací +jsou stále činné a spojené. + +Chcete zastavit zvukový server JACK? + + + + JACK is stopping... + JACK se zastavuje... + + + + Shutdown script... + Skript pro zastavení chodu... + + + + Shutdown script terminated + Skript pro zastavení chodu ukončen + + + + D-BUS: JACK server is stopping... + D-BUS: Zastavuje se server JACK... + + + + D-BUS: JACK server could not be stopped. + +Sorry + D-BUS: Server JACK se nepodařilo zastavit. + +Promiňte + + + + + Post-shutdown script... + Skript pro po-zastavení chodu... + + + + + Post-shutdown script terminated + Skript pro po-zastavení chodu ukončen + + + + JACK was started with PID=%1. + JACK byl puštěn s PID = %1. + + + + D-BUS: JACK server was started (%1 aka jackdbus). + D-BUS: Server JACK byl spuštěn (%1 aka jackdbus). + + + + JACK is being forced... + JACK je nucen... + + + + JACK was stopped + JACK byl zastaven + + + + D-BUS: JACK server was stopped (%1 aka jackdbus). + D-BUS: Server JACK byl zastaven (%1 aka jackdbus). + + + + Error + Chyba + + + + Transport BBT (bar:beat.ticks) + Předání BBT (takt:doba.tiknutí - bar:beat.ticks) + + + + Transport time code + Předání časového kódu + + + + Elapsed time since last reset + Čas uplynulý od posledního znovunastavení + + + + Elapsed time since last XRUN + Čas uplynulý od posledního XRUN + + + + Could not load active patchbay definition. + +Disabled. + Nepodařilo se nahrát vymezení aktivní zapojovací desky. + +Zakázáno. + + + + Patchbay activated. + Zapojovací deska uvedena do chodu. + + + + Patchbay deactivated. + Zapojovací deska vyřazena z provozu. + + + + Statistics reset. + Nastavit znovu statistiku. + + + + msec + ms + + + + JACK connection graph change. + Nákres spojení JACK změněn. + + + + XRUN callback (%1). + Zavolání nazpátek XRUN (%1). + + + + Buffer size change (%1). + Velikost vyrovnávací paměti změněna (%1). + + + + Shutdown notification. + Oznámení o zastavení. + + + + Could not start JACK. + +Sorry. + Nepodařilo se spustit JACK. + +Promiňte. + + + + JACK has crashed. + JACK spadl. + + + + JACK timed out. + Překročení času u JACK. + + + + JACK write error. + Chyba při psaní u JACK. + + + + JACK read error. + Chyba při čtení u JACK. + + + + Unknown JACK error (%d). + Neznámá chyba u JACK (%d). + + + + ALSA connection graph change. + Nákres spojení ALSA změněn. + + + + JACK active patchbay scan + Prohlédnutí činné zapojovací desky JACK + + + + ALSA active patchbay scan + Prohlédnutí činné zapojovací desky ALSA + + + + JACK connection change. + Spojení JACK změněno. + + + + ALSA connection change. + Spojení ALSA změněno. + + + + checked + přezkoušeno + + + + connected + spojeno + + + + disconnected + rozpojeno + + + + failed + nepodařilo se + + + + A patchbay definition is currently active, +which is probable to redo this connection: + +%1 -> %2 + +Do you want to remove the patchbay connection? + Vymezení zapojovací desky je nyní aktivní, +což pravděpodobně znamená předělat toto spojení: + +%1 -> %2 + +Chcete odstranit spojení zapojovací desky? + + + Remove + Odstranit + + + Ignore + Přehlížet + + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" +in the context menu of the system tray icon. + Program poběží dále v oznamovací části panelu. + +Pro ukončení programu vyberte, prosím, "Ukončit" +v související nabídce vyskakující z ikony v oznamovací +části panelu. + + + + Overall operation failed. + Celková operace se nezdařila. + + + + Invalid or unsupported option. + Neplatná nebo nepodporovaná volba. + + + + Client name not unique. + Název klienta není jedinečný. + + + + Server is started. + Server je spuštěn. + + + + Unable to connect to server. + Nelze se připojit k serveru. + + + + Server communication error. + Chyba spojení se serverem. + + + + Client does not exist. + Klient neexistuje. + + + + Unable to load internal client. + Nepodařilo se nahrát vnitřního klienta. + + + + Unable to initialize client. + Nepodařilo se inicializovat vnitřního klienta. + + + + Unable to access shared memory. + Nepodařilo se přistoupit ke sdílené paměti. + + + + Client protocol version mismatch. + Nevhodná verze klientského protokolu. + + + + Could not connect to JACK server as client. +- %1 +Please check the messages window for more info. + Nepodařilo se připojit k serveru JACK jako klient. - %1 +Další informace hledejte, prosím, v okně s hlášením. + + + + Server configuration saved to "%1". + Nastavení serveru uloženo do "%1". + + + + Client activated. + Klient uveden do chodu. + + + + Post-startup script... + Skript pro po-spuštění... + + + + Post-startup script terminated + Skript pro po-spuštění ukončen + + + + Command line argument... + Argument pro příkazový řádek... + + + + Command line argument started + Argument pro příkazový řádek spuštěn + + + + Client deactivated. + Klient vyřazen z provozu. + + + + Transport rewind. + Předání přetočit zpět. + + + + Transport backward. + Předání zpět. + + + + + + Starting + Spouští se + + + + Transport start. + Spustit předání. + + + + + Stopping + Zastavuje se + + + + Transport stop. + Zastavit předání. + + + + Transport forward. + Předání dopředu. + + + + + Stopped + Zastaveno + + + + %1 (%2%) + %1 (%2 %) + + + + %1 % + %1 % + + + + %1 Hz + %1 Hz + + + + %1 frames + %1 snímků + + + + Yes + Ano + + + + No + Ne + + + + RT + RT + + + + Rolling + Jede + + + + Looping + Zapíná se do jednoduchého obvodu + + + + %1 msec + %1 ms + + + + XRUN callback (%1 skipped). + Zavolání nazpátek XRUN (%1 přeskočeno). + + + + Started + Běží + + + + Active + Činný + + + + Activating + Uvádí se do chodu + + + + Inactive + Nečinný + + + + &Hide + &Skrýt + + + + Mi&nimize + &Zmenšit + + + + S&how + &Ukázat + + + + Rest&ore + &Nahrát znovu + + + + &Stop + &Zastavit + + + + &Reset + &Nastavit znovu + + + + &Presets + &Přednastavení + + + + &Connections + &Spojení + + + + Patch&bay + &Zapojovací deska + + + + &Transport + &Předání + + + + Server settings will be only effective after +restarting the JACK audio server. + Nastavení serveru se projeví až po +novém spuštění serveru JACK. + + + + D-BUS: SetParameterValue('%1', '%2'): + +%3. +(%4) + D-BUS: Nastavit hodnotu parametru +SetParameterValue('%1', '%2'): + +%3. +(%4) + + + + D-BUS: ResetParameterValue('%1'): + +%2. +(%3) + D-BUS: Nastavit znovu hodnotu parametru +ResetParameterValue('%1'): + +%2. +(%3) + + + + D-BUS: GetParameterValue('%1'): + +%2. +(%3) + D-BUS: Získat hodnotu parametru +GetParameterValue('%1'): + +%2. +(%3) + + + OK + OK + + + + Some settings will be only effective +the next time you start this program. + Některá nastavení se projeví až tehdy, +když příště spustíte tento program. + + + + Alt+A + Alt+A + + + + Alt+O + Alt+O + + + + Shift+Space + Shift+Mezerník + + + + Space + Mezerník + + + + qjackctlMessagesForm + + + Messages - JACK Audio Connection Kit + Hlášení - JACK Audio Connection Kit + + + + Messages output log + Zápis hlášení o výstupu + + + + Logging stopped --- %1 --- + Zápis zastaven --- %1 --- + + + + Logging started --- %1 --- + Zápis spuštěn --- %1 --- + + + + qjackctlPatchbay + + + Warning + Varování + + + + This will disconnect all sockets. + +Are you sure? + Tento krok odpojí všechny zásuvky. + +Jste si jistýr? + + + Yes + Ano + + + No + Ne + + + + qjackctlPatchbayForm + + + Patchbay - JACK Audio Connection Kit + Zapojovací deska - JACK Audio Connection Kit + + + + + Move currently selected output socket down one position + Posunout nyní vybrané výstupní zásuvky dolů o jedno místo + + + + + Down + Dolů + + + + Create a new output socket + Vytvořit novou výstupní zásuvku + + + + + Add... + Přidat... + + + + Edit currently selected input socket properties + Upravit vlastnosti nyní vybrané vstupní zásuvky + + + + + Edit... + Upravit... + + + + + Move currently selected output socket up one position + Posunout nyní vybrané výstupní zásuvky nahoru o jedno místo + + + + + Up + Nahoru + + + + Remove currently selected output socket + Odstranit nyní vybranou výstupní zásuvku + + + + + Remove + Odstranit + + + + Duplicate (copy) currently selected output socket + Zdvojit (kopírovat) nyní vybranou výstupní zásuvku + + + + + Copy... + Kopírovat... + + + + Remove currently selected input socket + Odstranit nyní vybranou vstupní zásuvku + + + + Duplicate (copy) currently selected input socket + Zdvojit (kopírovat) nyní vybranou vstupní zásuvku + + + + Create a new input socket + Vytvořit novou vstupní zásuvku + + + + Edit currently selected output socket properties + Upravit vlastnosti nyní vybrané výstupní zásuvky + + + + Connect currently selected sockets + Spojit nyní vybrané zásuvky + + + + &Connect + &Spojit + + + + Alt+C + Alt+C + + + + Disconnect currently selected sockets + Odpojit nyní vybrané zásuvky + + + + &Disconnect + &Odpojit + + + + Alt+D + Alt+D + + + + Disconnect all currently connected sockets + Odpojit všechny nyní spojené zásuvky + + + + Disconnect &All + &Odpojit vše + + + + Alt+A + Alt+A + + + + Refresh current patchbay view + Obnovit nynější pohled na zapojovací desku + + + + &Refresh + &Obnovit + + + + Alt+R + Alt+R + + + + Create a new patchbay profile + Vytvořit nový profil zapojovací desky + + + + &New + &Nový + + + + Alt+N + Alt+N + + + + Load patchbay profile + Nahrát profil zapojovací desky + + + + &Load... + &Nahrát... + + + + Alt+L + Alt+L + + + + Save current patchbay profile + Uložit nynější profil zapojovací desky + + + + &Save... + &Uložit... + + + + Alt+S + Alt+S + + + + Current (recent) patchbay profile(s) + Nynější (naposledy použité) profil(y) zapojovací desky + + + + Toggle activation of current patchbay profile + Přepnout spuštění nynějšího profilu zapojovací desky + + + + Acti&vate + &Spustit + + + + Alt+V + Alt+V + + + + Warning + Varování + + + + The patchbay definition has been changed: + +"%1" + +Do you want to save the changes? + Vymezení zapojovací desky bylo změněno: + +"%1" + +Chcete uložit změny? + + + Save + Uložit + + + Discard + Odmítnout + + + Cancel + Zrušit + + + + %1 [modified] + %1 [změněn] + + + + Untitled%1 + Bez názvu%1 + + + + + Error + Chyba + + + + Could not load patchbay definition file: + +"%1" + Nepodařilo se nahrát soubor s vymezením zapojovací desky: + +"%1" + + + + Could not save patchbay definition file: + +"%1" + Nepodařilo se uložit soubor s vymezením zapojovací desky: + +"%1" + + + + New Patchbay definition + Nové vymezení zapojovací desky + + + + Create patchbay definition as a snapshot +of all actual client connections? + Vytvořit vymezení zapojovací desky jako snímek +všech skutečných klientských spojení? + + + Yes + Ano + + + No + Ne + + + + Load Patchbay Definition + Nahrát vymezení zapojovací desky + + + + + Patchbay Definition files + Soubory s vymezením zapojovací desky + + + + Save Patchbay Definition + Uložit vymezení zapojovací desky + + + + active + činný + + + + qjackctlPatchbayView + + + Add... + Přidat... + + + + Edit... + Upravit... + + + + Copy... + Kopírovat... + + + + Remove + Odstranit + + + + Exclusive + Výhradní + + + + Forward + Dopředu + + + + (None) + (Žádný) + + + + Move Up + Přesunout nahoru + + + + Move Down + Přesunout dolů + + + + &Connect + &Spojit + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Rozpojit + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + &Rozpojit vše + + + + Alt+A + Disconect All + Alt+A + + + + &Refresh + &Obnovit + + + + Alt+R + Refresh + Alt+R + + + + qjackctlSetupForm + + + Setup - JACK Audio Connection Kit + Nastavení - JACK Audio Connection Kit + + + + Settings + Nastavení + + + + Preset &Name: + &Název přednastavení: + + + + Settings preset name + Název pro přednastavení nastavení + + + + + + + + + + + + + + (default) + (výchozí) + + + + Save settings as current preset name + Uložit nastavení s nynějším názvem přednastavení + + + + &Save + &Uložit + + + + + + Alt+S + Alt+S + + + + Delete current settings preset + Smazat přednastavení nynějšího nastavení + + + + &Delete + &Smazat + + + + + + + Alt+D + Alt+D + + + + Server + Server + + + + Server &Path: + &Cesta k serveru: + + + + The JACK Audio Connection Kit sound server path + Cesta ke zvukovému serveru JACK Audio Connection Kit + + + + jackd + jackd + + + + jackdmp + jackdmp + + + + jackstart + jackstart + + + jackd-realtime + jackd-realtime + + + + Driv&er: + &Ovladač: + + + + The audio backend driver interface to use + Rozhraní ovladače k zadní části zvuku, které se bude používat + + + + dummy + dummy + + + + sun + sun + + + + oss + oss + + + + alsa + alsa + + + + portaudio + portaudio + + + + coreaudio + coreaudio + + + + freebob + freebob + + + + firewire + firewire + + + + Parameters + Parametry + + + + MIDI Driv&er: + Ovla&dač MIDI: + + + + The ALSA MIDI backend driver to use + Ovladač k zadní části ALSA MIDI, který se bude používat + + + + none + žádný + + + + raw + raw + + + + seq + seq + + + + Start De&lay (secs): + &Zpoždění spuštění (s): + + + + Time in seconds that client is delayed after server startup + Čas v sekundách, o který je klient opožděn po spuštění serveru + + + + Latency: + Skrytost neboli latence: + + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + Výstupní skrytost (latence) v milisekundách, jejíž výpočet je založen na nastavení údobí (period), rychlosti (snímání) a vyrovnávací paměti + + + + 0 + 0 + + + + Use realtime scheduling + Použít zpracování ve skutečném čase + + + + &Realtime + &Skutečný čas + + + + + + Alt+R + Alt+R + + + + Do not attempt to lock memory, even if in realtime mode + Nepokoušejte se uzamknout paměť, dokonce ani v režimu skutečného času + + + + No Memory Loc&k + &Neuzamknout paměť + + + + + + Alt+K + Alt+K + + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + Odemknout paměť běžných knihoven s nástroji (GTK+, QT, FLTK, Wine) + + + + &Unlock Memory + &Odemknout paměť + + + + + + Alt+U + Alt+U + + + + Ignore xruns reported by the backend driver + Přehlížet xruns hlášené ovladačem zadní části + + + + So&ft Mode + &Snadný režim + + + + + + + + Alt+F + Alt+F + + + + Provide output monitor ports + Poskytnout přípojky pro sledování výstupu + + + + &Monitor + &Sledování + + + + + + Alt+M + Alt+M + + + + Force 16bit mode instead of failing over 32bit (default) + Vynutit 16bitový režim namísto selhání ve 32bitovém (výchozí) + + + + Force &16bit + Vynutit &16bitový režim + + + + Alt+1 + Alt+1 + + + + Enable hardware monitoring of capture ports + Povolit přístrojové sledování zachytávacích přípojek + + + + H/W M&onitor + H/W &sledování + + + + + Alt+O + Alt+O + + + + Enable hardware metering on cards that support it + Povolit přístrojové měření u karet, které to podporují + + + + H/&W Meter + H/&W měřidlo + + + + Alt+W + Alt+W + + + + Ignore hardware period/buffer size + Přehlížet údobí (periodu)/velikost vyrovnávací paměti přístroje + + + + &Ignore H/W + &Přehlížet H/W + + + + + + Alt+I + Alt+I + + + + Whether to give verbose output on messages + Dát hlášením mnohomluvný výstup + + + + &Verbose messages + &Mnohomluvná hlášení + + + + Alt+V + Alt+V + + + + &Output Device: + &Výstupní zařízení: + + + + &Output Channels: + &Výstupní kanály: + + + + &Interface: + &Rozhraní: + + + + Maximum input audio hardware channels to allocate + Největší množství přidělitelných vstupních zvukových přístrojových kanálů + + + + &Audio: + &Zvuk: + + + + &Input Latency: + &Vstupní skrytost (latence): + + + + Dit&her: + &Chvění: + + + + External output latency (frames) + Vnější výstupní skrytost neboli latence (snímky) + + + + &Input Device: + Vstup&ní zařízení: + + + + Provide either audio capture, playback or both + Poskytnout buď zachytávání zvuku, přehrávání nebo obojí + + + + Duplex + Zdvojený + + + + Capture Only + Pouze zachytávání + + + + Playback Only + Pouze přehrávání + + + + The PCM device name to use + Název používaného zařízení PCM + + + + + + hw:0 + hw:0 + + + + + + plughw:0 + plughw:0 + + + + + + /dev/audio + /dev/audio + + + + + + /dev/dsp + /dev/dsp + + + + Select output device for playback + Vybrat výstupní zařízení pro přehrávání + + + + + + + + + + > + > + + + + Alternate input device for capture + Střídat vstupní zařízení pro zachytávání + + + + &Output Latency: + &Výstupní skrytost neboli latence: + + + + Maximum output audio hardware channels to allocate + Největší množství přidělitelných výstupních zvukových přístrojových kanálů + + + + Alternate output device for playback + Střídat výstupní zařízení pro přehrávání + + + + &Input Channels: + &Vstupní kanály: + + + + Select input device for capture + Vybrat vstupní zařízení pro zachytávání + + + + Select PCM device name + Vybrat název zařízení PCM + + + + External input latency (frames) + Vnější vstupní skrytost neboli latence (snímky) + + + + Set dither mode + Nastavit režim chvění + + + + None + Žádný + + + + Rectangular + Obdélníkový + + + + Shaped + Obalová křivka + + + + Triangular + Trojúhelníkový + + + + Number of periods in the hardware buffer + Počet údobí (period) ve vyrovnávací paměti přístroje + + + + Priorit&y: + &Přednost: + + + + &Frames/Period: + &Snímky/Údobí (perioda): + + + + Frames per period between process() calls + Snímků za údobí (periodu) mezi voláním process() Aufrufen + + + + + 16 + 16 + + + + + 32 + 32 + + + + + 64 + 64 + + + + + 128 + 128 + + + + + 256 + 256 + + + + + 512 + 512 + + + + + 1024 + 1024 + + + + 2048 + 2048 + + + + 4096 + 4096 + + + + Port Ma&ximum: + &Největší počet přípojek: + + + + &Channels: + &Kanály: + + + Number o microseconds to wait between engine processes (dummy) + Počet mikrosekund, po které se čeká mezi strojovými procesy (dummy) + + + + 21333 + 21333 + + + + Sample rate in frames per second + Vzorkovací kmitočet (rychlost snímkování) ve snímcích za sekundu + + + + 22050 + 22050 + + + + 32000 + 32000 + + + + 44100 + 44100 + + + + 48000 + 48000 + + + + 88200 + 88200 + + + + 96000 + 96000 + + + + 192000 + 192000 + + + + Scheduler priority when running realtime + Přednost rozvrhu při běhu ve skutečném čase + + + + &Word Length: + &Délka slova: + + + + Periods/&Buffer: + Ú&dobí/Vyrovnávací paměť: + + + + Word length + Délka slova + + + + Maximum number of ports the JACK server can manage + Největší počet přípojek, které server JACK může spravovat + + + + &Wait (usec): + &Čekat (µs): + + + + Sample &Rate: + Vzorkovací &kmitočet: + + + + Maximum number of audio channels to allocate + Největší množství přidělitelných zvukových kanálů + + + + &Timeout (msec): + &Překročení času (ms): + + + + Set client timeout limit in miliseconds + Nastavit mez pro překročení času u klienta; údaj v milisekundách + + + + 200 + 200 + + + + + 500 + 500 + + + + + 1000 + 1000 + + + + 2000 + 2000 + + + + + 5000 + 5000 + + + + 10000 + 10000 + + + + Options + Volby + + + + Scripting + Skriptování + + + + Whether to execute a custom shell script before starting up the JACK audio server. + Provést vlastní shellový skript před spuštěním zvukového serveru JACK. + + + + Execute script on Start&up: + Provést skript při &spuštění: + + + + Whether to execute a custom shell script after starting up the JACK audio server. + Provést vlastní shellový skript po spuštění zvukového serveru JACK. + + + + Execute script after &Startup: + Provést skript &po spuštění: + + + + Whether to execute a custom shell script before shuting down the JACK audio server. + Provést vlastní shellový skript před zastavením zvukového serveru JACK. + + + + Execute script on Shut&down: + Provést skript při zasta&vení: + + + + Command line to be executed before starting up the JACK audio server + Příkazový řádek k provedení před spuštěním zvukového serveru JACK + + + + + + + Scripting argument meta-symbols + Meta symboly pro argument při skriptování + + + + Browse for script to be executed before starting up the JACK audio server + Vybrat skript, který se provede před spuštěním zvukového serveru JACK + + + + + + + + + ... + ... + + + + Command line to be executed after starting up the JACK audio server + Příkazový řádek k provedení po spuštění zvukového serveru JACK + + + + Browse for script to be executed after starting up the JACK audio server + Vybrat skript, který se provede po spuštění zvukového serveru JACK + + + + Browse for script to be executed before shutting down the JACK audio server + Vybrat skript, který se provede před zastavením zvukového serveru JACK + + + + Command line to be executed before shutting down the JACK audio server + Příkazový řádek k provedení před zastavením zvukového serveru JACK + + + + Whether to execute a custom shell script after shuting down the JACK audio server. + Provést vlastní shellový skript po zastavení zvukového serveru JACK. + + + + Execute script after Shu&tdown: + Provést skript po zas&tavení: + + + + + + Alt+T + ALT+T + + + + Browse for script to be executed after shutting down the JACK audio server + Vybrat skript, který se provede po zastavení zvukového serveru JACK + + + + Command line to be executed after shutting down the JACK audio server + Příkazový řádek k provedení po zastavení zvukového serveru JACK + + + + Statistics + Statistika + + + + Whether to capture standard output (stdout/stderr) into messages window + Vést obvyklý výstup (stdout/stderr) do okna s hlášeními + + + + &Capture standard output + &Vést obvyklý výstup + + + + + Alt+C + Alt+C + + + + &XRUN detection regex: + Pravidelný výraz pro zjištění &XRUN: + + + + Regular expression used to detect XRUNs on server output messages + Pravidelný výraz užitý pro poznání XRUN v hlášeních posílaných serverem + + + + xrun of at least ([0-9|\.]+) msecs + xrun alespoň ([0-9|\.]+) ms + + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + Přehlížet první XRUN při spuštění serveru (většinou se vyskytuje na pre-0.80.0 serverech) + + + + &Ignore first XRUN occurrence on statistics + &Přehlížet výskyt prvního XRUN ve statistice + + + + Connections + Spojení + + + + Time in seconds between each auto-refresh cycle + Čas v sekundách mezi každým kolem automatického obnovení + + + + 5 + 5 + + + + + 10 + 10 + + + + 20 + 20 + + + + 30 + 30 + + + + 60 + 60 + + + + 120 + 120 + + + + Patchbay definition file to be activated as connection persistence profile + Spustit soubor s vymezením zapojovací desky jako stálý profil spojení + + + + Browse for a patchbay definition file to be activated + Vybrat soubor s vymezením zapojovací desky pro spuštění + + + + Whether to refresh the connections patchbay automatically + Obnovit automaticky pzapojovací desku pro spojení + + + + &Auto refresh connections Patchbay, every (secs): + Obnovit &automaticky zapojovací desku pro spojení, každých (s): + + + + + Alt+A + Alt+A + + + + Whether to activate a patchbay definition for connection persistence profile. + Spustit stálý profil s vymezením zapojovací desky spojení. + + + + Activate &Patchbay persistence: + Spustit stálý profil se &zapojovací deskou: + + + + Alt+P + Alt+P + + + + Logging + Provádění zápisu + + + + Messages log file + Soubor se zápisem hlášení + + + + Browse for the messages log file location + Vybrat místo pro umístění souboru se zápisem hlášení + + + + Whether to activate a messages logging to file. + Spustit provádění zápisu hlášení do souboru. + + + + &Messages log file: + &Soubor se zápisem hlášení: + + + + Display + Zobrazit + + + + Time Display + Údaj o čase + + + + Time F&ormat: + &Formát času: + + + + The general time format on display + Obecný formát času pro zobrazení + + + + hh:mm:ss + hh:mm:ss + + + + hh:mm:ss.d + hh:mm:ss.d + + + + hh:mm:ss.dd + hh:mm:ss.dd + + + + hh:mm:ss.ddd + hh:mm:ss.ddd + + + + Transport &Time Code + Předání &časového kódu + + + + Transport &BBT (bar:beat.ticks) + Předání &BBT (takt:doba.tiknutí - bar:beat.ticks) + + + + + + + Alt+B + Alt+B + + + + Elapsed time since last &Reset + Čas uplynulý od posledního &znovunastavení + + + + Elapsed time since last &XRUN + Čas uplynulý od posledního &XRUN + + + + Alt+X + Alt+X + + + + Sample front panel normal display font + Předvést písmo pro obvyklé zobrazení na přední straně panelu + + + + Sample big time display font + Předvést písmo pro velké zobrazení údaje o čase + + + + Big Time display: + Velké zobrazení údaje o čase: + + + + Select font for front panel normal display + Vybrat písmo pro zobrazení písma na přední straně panelu + + + + + + + &Font... + &Písmo... + + + + Select font for big time display + Vybrat písmo pro velké zobrazení údaje o čase + + + + Normal display: + Obvyklé zobrazení: + + + + Whether to enable a shiny glass light effect on the main display + Povolit zobrazení údajů s lesklým sklenným světelným efektem + + + + &Display shiny glass light effect + &Zobrazit údaje s lesklým sklenným světelným efektem + + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + Povolit mrkání indikátoru serverového režimu (realtime -RT) + + + + Blin&k server mode indicator + Zobrazovat mr&kání indikátoru režimu serveru + + + + Messages Window + Okno s hlášením + + + + Sample messages text font display + Předvést zobrazení textu v okně s hlášením + + + + Select font for the messages text display + Vybrat písmo pro zobrazení textu hlášení + + + + Whether to keep a maximum number of lines in the messages window + Určit největší počet řádků zobrazovaných v okně s hlášením + + + + &Messages limit: + &Největší počet hlášení: + + + + The maximum number of message lines to keep in view + Největší počet řádků zobrazovaných v okně s hlášením + + + + 100 + 100 + + + + 250 + 250 + + + + 2500 + 2500 + + + + Connections Window + Přehled spojení + + + + Sample connections view font + Předvést zobrazení písma v přehledu spojení + + + + Select font for the connections view + Vybrat písmo pro přehled spojení + + + + &Icon size: + &Velikost ikon: + + + + The icon size for each item of the connections view + Velikost jednotlivých symbolů v přehledu spojení + + + + 16 x 16 + 16 x 16 + + + + 32 x 32 + 32 x 32 + + + + 64 x 64 + 64 x 64 + + + + Whether to enable in-place client/port name editing (rename) + Povolit úpravu vedlejšího názvu (přezdívka) klienta/přípojky (přejmenování) + + + + Ena&ble client/port aliases editing (rename) + Po&volit úpravu vedlejšího názvu (přezdívka) klienta/přípojky (přejmenování) + + + + Whether to enable client/port name aliases on the connections window + Povolit vedlejší názvy (přezdívky) klienta/přípojky v přehledu spojení + + + + E&nable client/port aliases + &Povolit vedlejší názvy (přezdívky) klienta/přípojky + + + + + Alt+N + Alt+N + + + + Whether to draw connection lines as cubic Bezier curves + Určit, zda se mají čáry spojení kreslit jako Bézierovy křivky + + + + Draw connection and patchbay lines as Be&zier curves + Čáry pro spojení a čáry zapojovací desky kreslit jako &Bézierovy křivky + + + + + Alt+Z + Alt+Z + + + + Misc + Různé + + + + Other + Další + + + + Whether to start JACK audio server immediately on application startup + Spustit zvukový server JACK okamžitě při spuštění aplikace + + + + &Start JACK audio server on application startup + &Spustit zvukový server JACK okamžitě při spuštění aplikace + + + + Whether to ask for confirmation on application exit + Žádat o potvrzení při ukončení aplikace + + + + &Confirm application close + &Potvrdit ukončení aplikace + + + + Whether to keep all child windows on top of the main window + Všechna další okna udržovat nad hlavním oknem + + + + &Keep child windows always on top + &Všechna další okna udržovat vždy nahoře + + + + Whether to enable the system tray icon + Ukázat ikonu v systémové části panelu + + + + &Enable system tray icon + Po&volit ikonu v systémové části panelu + + + + Alt+E + Alt+E + + + + Whether to start minimized to system tray + Spustit program zmenšený do systémové části panelu + + + + Start minimi&zed to system tray + Spustit program &zmenšený do systémové části panelu + + + + Whether to delay window positioning at application startup + Zpozdit umístění okna při spuštění programu + + + + &Delay window positioning at startup + Zpozd&it umístění okna při spuštění programu + + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + Nastavení příkazového řádku ke spuštění serveru JACK-uložit do místního souboru (auto-start) + + + + S&ave JACK audio server configuration to: + Nastavení ke spuštění serveru JACK &uložit jako: + + + + The server configuration local file name (auto-start) + Název místního souboru s nastavením serveru (auto-start) + + + + .jackdrc + .jackdrc + + + + Whether to exit once all clients have closed (auto-start) + Ukončit program, když jsou rozpojena všechna klientská spojení (auto-start) + + + + C&onfigure as temporary server + Nastavit jako &dočasný server + + + + Whether to ask for confirmation on JACK audio server shutdown + Žádat o potvrzení při zastavení serveru JACK + + + + Confirm server sh&utdown + Potvrdit &zastavení serveru + + + + Whether to enable ALSA Sequencer (MIDI) support on startup + Povolit podporu (MIDI) pro řadič (sekvencer) ALSA při spuštění + + + + E&nable ALSA Sequencer support + P&ovolit podporu (MIDI) pro řadič (sekvencer) ALSA + + + + Buttons + Tlačítka + + + + Whether to hide the left button group on the main window + Skrýt skupinu s tlačítky nalevo v hlavním okně + + + + Hide main window &Left buttons + Skrýt &levá tlačítka v hlavním okně + + + + Alt+L + Alt+L + + + + Whether to hide the right button group on the main window + Skrýt skupinu s tlačítky napravo v hlavním okně + + + + Hide main window &Right buttons + Skrýt &pravá tlačítka v hlavním okně + + + + Whether to hide the transport button group on the main window + Skrýt skupinu s tlačítky pro předání v hlavním okně + + + + Hide main window &Transport buttons + Skrýt &předávací tlačítka v hlavním okně + + + + Whether to hide the text labels on the main window buttons + Skrýt textové popisky tlačítek v hlavním okně + + + + Hide main window &button text labels + Skrýt textové popisky &tlačítek v hlavním okně + + + + OK + OK + + + + Cancel + Zrušit + + + + + + Warning + Varování + + + + Some settings have been changed: + +"%1" + +Do you want to save the changes? + Některá nastavení byla změněna: + +"%1" + +Chcete uložit změny? + + + Save + Uložit + + + Discard + Odmítnout + + + + Delete preset: + +"%1" + +Are you sure? + Smazat přednastavení + +"%1" + +Jste si jistý? + + + + msec + ms + + + + n/a + n/a + + + + &Preset Name + &Název přednastavení + + + + &Server Path + &Cesta k serveru + + + + &Driver + &Ovladač + + + + &Interface + &Rozhraní + + + + Sample &Rate + Vzorkovací &kmitočet + + + + &Frames/Period + &Snímky/Údobí (perioda) + + + + Periods/&Buffer + Ú&dobí/Vyrovnávací paměť + + + + Startup Script + Skript pro spuštění + + + + Post-Startup Script + Skript pro po-spuštění + + + + Shutdown Script + Skript pro zastavení chodu + + + + Post-Shutdown Script + Skript pro po-zastavení chodu + + + + Active Patchbay Definition + Činné vymezení zapojovací desky + + + + Patchbay Definition files + Soubory s vymezením zapojovací desky + + + + Messages Log + Zápis s hlášením + + + + Log files + Soubory se zápisy + + + + Some settings have been changed. + +Do you want to apply the changes? + Některá nastavení byla změněna. + +Chcete použít změny? + + + Apply + Použít + + + + &JACK client/port aliases: + Vedlejší názvy (přezdívky) pro klienty/přípojky &JACK: + + + + JACK client/port aliases display mode + Režim zobrazení vedlejších názvů (přezdívek) pro klienty/přípojky JACK + + + + Default + Výchozí + + + + First + První + + + + Second + Druhý + + + + Defaults + Výchozí + + + + &Base font size: + &Základní velikost písma: + + + + Base application font size (pt.) + Základní velikost písma v aplikaci (pt.) + + + + 6 + 6 + + + + 7 + 7 + + + + 8 + 8 + + + + 9 + 9 + + + + 11 + 11 + + + + 12 + 12 + + + + net + síť + + + + netone + síť_1 + + + + Number of microseconds to wait between engine processes (dummy) + Počet mikrosekund, po které se čeká mezi strojovými procesy (dummy) + + + + Whether to enable D-Bus interface + Zda povolit rozhraní D-Bus + + + + &Enable D-Bus interface + &Povolit rozhraní D-Bus + + + + Whether to restrict to one single application instance (X11) + Zda omezit na úroveň jednoho programu (X11) + + + + Single application &instance + Ú&roveň jednoho programu + + + + qjackctlSocketForm + + + Socket - JACK Audio Connection Kit + Zásuvka - JACK Audio Connection Kit + + + + &Socket + &Zásuvka + + + + &Name (alias): + &Název (Přezdívka): + + + + Socket name (an alias for client name) + Název zásuvky (přezdívka pro název klienta) + + + + Client name (regular expression) + Název pro klienta (pravidelný výraz) + + + + Add plug to socket plug list + Přidat zástrčku do seznamu se zástrčkami do zásuvky + + + + Add P&lug + &Přidat zástrčku + + + + Alt+L + Alt+L + + + + &Plug: + &Zástrčka: + + + + Port name (regular expression) + Název přípojky (pravidelný výraz) + + + + Socket plug list + Seznam se zástrčkami do zásuvky + + + + Socket Plugs / Ports + Zástrčky do zásuvky/Přípojky + + + + Edit currently selected plug + Upravit nyní vybranou zástrčku + + + + &Edit + &Upravit + + + + Alt+E + Alt+E + + + + Remove currently selected plug from socket plug list + Odstranit nyní vybranou zástrčku ze seznamu se zástrčkami do zásuvky + + + + &Remove + &Odstranit + + + + Alt+R + Alt+R + + + + &Client: + &Klient: + + + + Move down currently selected plug in socket plug list + Posunout nyní vybranou zástrčku v seznamu se zástrčkami do zásuvky dolů + + + + &Down + &Dolů + + + + Alt+D + Alt+D + + + + Move up current selected plug in socket plug list + Posunout nyní vybranou zástrčku v seznamu se zástrčkami do zásuvky nahoru + + + + &Up + &Nahoru + + + + Alt+U + Alt+U + + + + Enforce only one exclusive cable connection + Vynutit jedno výlučné kabelové spojení + + + + E&xclusive + Vý&lučné + + + + Alt+X + Alt+X + + + + &Forward: + &Dopředu: + + + + Forward (clone) all connections from this socket + Předat všechna spojení z této zásuvky (klonovat) + + + + Type + Typ + + + + Audio socket type (JACK) + Zvukový typ zásuvky (napojení) JACK + + + + &Audio + &Zvuk + + + + Alt+A + Alt+A + + + + MIDI socket type (JACK) + MIDI typ zásuvky (napojení) (JACK) + + + + &MIDI + &JACK-MIDI + + + + Alt+M + Alt+M + + + + MIDI socket type (ALSA) + MIDI typ zásuvky (napojení) (ALSA) + + + + AL&SA + AL&SA-MIDI + + + + Alt+S + Alt+S + + + + OK + OK + + + + Cancel + Zrušit + + + + Plugs / Ports + Zástrčky/Přípojky + + + + Error + Chyba + + + + A socket named "%1" already exists. + Zásuvka s názvem "%1" již existuje. + + + + Warning + Varování + + + + Some settings have been changed. + +Do you want to apply the changes? + Některá nastavení byla změněna. + +Chcete použít změny? + + + Apply + Použít + + + Discard + Odmítnout + + + + Add Plug + Přidat zástrčku + + + + Edit + Upravit + + + + Remove + Odstranit + + + + Move Up + Přesunout nahoru + + + + Move Down + Přesunout dolů + + + + (None) + (Žádný) + + + + qjackctlSocketList + + + Output + Výstup + + + + Input + Vstup + + + + Socket + Zásuvka + + + + <New> - %1 + <Nový> %1 + + + + Warning + Varování + + + + %1 about to be removed: + +"%2" + +Are you sure? + %1 má být odstraněno: + +"%2" + +Jste si jistý? + + + Yes + Ano + + + No + Ne + + + + %1 <Copy> - %2 + %1 <Kopírovat> - %2 + + + + qjackctlSocketListView + + + Output Sockets / Plugs + Výstupní zásuvky/zástrčky + + + + Input Sockets / Plugs + Vstupní zásuvky/zástrčky + + + + qjackctlStatusForm + + + Status - JACK Audio Connection Kit + Stav - JACK Audio Connection Kit + + + + Statistics since last server startup + Statistika od posledního spuštění serveru + + + + Description + Popis + + + + Value + Hodnota + + + + Reset XRUN statistic values + Nastavit znovu údaje ve statistice XRUN + + + + Re&set + &Nastavit znovu + + + + Alt+S + ALT+S + + + + Refresh XRUN statistic values + Obnovit údaje ve statistice XRUN + + + + &Refresh + &Obnovit + + + + Alt+R + Alt+R + + + + Server state + Stav serveru + + + + DSP Load + Zatížení DSP + + + + Sample Rate + Vzorkovací kmitočet + + + + Buffer Size + Velikost vyrovnávací paměti + + + + Realtime Mode + Režim skutečného času + + + + Transport state + Stav předání + + + + Transport Timecode + Předání časového kódu + + + + Transport BBT + Předání BBT + + + + Transport BPM + Předání BPM + + + + XRUN count since last server startup + Počet XRUN od posledního spuštění serveru + + + + XRUN last time detected + Čas posledního zjištění XRUN + + + + XRUN last + Poslední XRUN + + + + XRUN maximum + Největší počet XRUN + + + + XRUN minimum + Nejmenší počet XRUN + + + + XRUN average + Průměrný počet XRUN + + + + XRUN total + Celkový počet XRUN + + + + Maximum scheduling delay + Největšího zpoždění času + + + + Time of last reset + Čas posledního znovunastavení + + + + Server name + Název serveru + + + diff -Nru qjackctl-0.3.4/translations/qjackctl_de.ts qjackctl-0.3.6/translations/qjackctl_de.ts --- qjackctl-0.3.4/translations/qjackctl_de.ts 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/translations/qjackctl_de.ts 2010-02-20 15:49:09.000000000 +0000 @@ -0,0 +1,4063 @@ + + + + + QObject + + + (default) + (voreingestellt) + + + + Usage: %1 [options] [command-and-args] + Benutzung: %1 [Optionen] [Kommandos und Argumente] + + + + Options: + Optionen: + + + + Start JACK audio server immediately + JACK Audioserver sofort starten + + + + Set active patchbay definition file + Steckfeldkonfigurationsdatei festlegen + + + + Show help about command line options + Zeige Hilfe zu Kommandozeilenargumenten an + + + + Show version information + Zeige Versionsinformation an + + + + Option -p requires an argument (preset). + Option -p benötigt ein Argument (Preset). + + + + Option -a requires an argument (path). + Option -a benötigt ein Argument (path) + + + + Qt: %1 + + Qt: %1 + + + + Set default settings preset name + Name für die Voreinstellungen festlegen + + + + Set default JACK audio server name + + + + + Option -n requires an argument (name). + + + + + qjackctlAboutForm + + + About QjackCtl + Über QjackCtl + + + + &Close + &Schließen + + + + Alt+C + Alt+S + + + + About Qt + Über Qt + + + + Version + Version + + + + Build + Build + + + + Debugging option enabled. + Debugging-Option aktiviert. + + + + System tray disabled. + Benachrichtigungsfeld deaktiviert. + + + + Transport status control disabled. + Transportstatuskontrolle abgeschaltet. + + + + Realtime status disabled. + Realtime-Status deaktiviert. + + + + XRUN delay status disabled. + XRUN Verzögerungsstatus abgeschaltet. + + + + Maximum delay status disabled. + Status für maximale Verzögerung abgeschaltet. + + + + JACK MIDI support disabled. + JACK MIDI wird nicht unterstütz. + + + + ALSA/MIDI sequencer support disabled. + ALSA/MIDI Sequencer wird nicht unterstütz. + + + + Website + Webseite + + + + This program is free software; you can redistribute it and/or modify it + Dieses Programm ist freie Software; Sie können es gemäß der + + + + under the terms of the GNU General Public License version 2 or later. + GNU General Public License weiterverteilen und/oder modifizieren. + + + + JACK Port aliases support disabled. + Alternativnamen für JACK-Anschlüsse abgeschaltet. + + + + D-Bus interface support disabled. + Unterstützung der D-Bus-Schnittstelle abgeschaltet. + + + + qjackctlClientListView + + + Readable Clients / Output Ports + Lesbare Clients/Ausgänge + + + + Writable Clients / Input Ports + Beschreibbare Clients/Eingänge + + + + &Connect + &Verbinden + + + + Alt+C + Connect + Alt+V + + + + &Disconnect + &Trennen + + + + Alt+D + Disconnect + Alt+T + + + + Disconnect &All + &Alle trennen + + + + Alt+A + Disconect All + Alt+A + + + + Re&name + &Umbenennen + + + + Alt+N + Rename + Alt+U + + + + &Refresh + Au&ffrischen + + + + Alt+R + Refresh + Alt+E + + + + qjackctlConnect + + + Warning + Warnung + + + + This will suspend sound processing +from all client applications. + +Are you sure? + Hiermit wird die Klangverarbeitung +aller Client-Anwendungen unterbrochen. +Sind Sie sicher? + + + Yes + Ja + + + No + Nein + + + + qjackctlConnectionsForm + + + Connections - JACK Audio Connection Kit + Verbindungen - JACK Audio Connection Kit + + + + Audio + Audio + + + + + + Connect currently selected ports + Ausgewählte Anschlüsse verbinden + + + + + + &Connect + &Verbinden + + + + + + Alt+C + Alt+V + + + + + + Disconnect currently selected ports + Ausgewählte Anschlüsse trennen + + + + + + &Disconnect + &Trennen + + + + + + Alt+D + Alt+T + + + + + + Disconnect all currently connected ports + Alle verbundenen Anschlüsse trennen + + + + + + Disconnect &All + &Alle trennen + + + + + + Alt+A + Alt+A + + + + + + Refresh current connections view + Ansicht der bestehenden Verbindungen erneuern + + + + + + &Refresh + &Auffrischen + + + + + + Alt+R + Alt+A + + + + MIDI + JACK-MIDI + + + + ALSA + ALSA-MIDI + + + + Warning + Warnung + + + + The preset aliases have been changed: + +"%1" + +Do you want to save the changes? + Die Alternativbezeichnungen für Voreinstellungen wurden verändert: +"%1" +Änderungen speichern? + + + + qjackctlConnectorView + + + &Connect + &Verbinden + + + + Alt+C + Connect + Alt+V + + + + &Disconnect + &Trennen + + + + Alt+D + Disconnect + Trennen + + + + Disconnect &All + &Alle trennen + + + + Alt+A + Disconect All + Alt+A + + + + &Refresh + Au&ffrischen + + + + Alt+R + Refresh + Alt+F + + + + qjackctlMainForm + + + QjackCtl + QjackCtl + + + + Quit processing and exit + Signalverarbeitung und Programm beenden + + + + + &Quit + &Beenden + + + + Alt+Q + Alt+B + + + + Start the JACK server + JACK-Server starten + + + + + &Start + &Start + + + + Alt+S + Alt+S + + + + Stop the JACK server + JACK-Server beenden + + + + S&top + S&topp + + + + Alt+T + Alt+T + + + + Show/hide the extended status window + Erweitertes Statusfenster anzeigen/verbergen + + + + + St&atus + St&atus... + + + + Show information about this application + Informationen über diese Anwendung anzeigen + + + + + Ab&out... + &Über... + + + + Alt+B + Alt+Ü + + + + Show settings and options dialog + Dialogfenster für Enstellungen und Optionen anzeigen + + + + + S&etup... + Konfi&guration... + + + + Alt+E + Alt+G + + + + Show/hide the messages log window + Protokollfenster für anfallende Nachrichten anzeigen/verbergen + + + + + &Messages + &Meldungen... + + + + Alt+M + Alt+M + + + + Show/hide the patchbay editor window + Steckfeldfenster anzeigen/verbergen + + + + &Patchbay + &Steckfeld... + + + + Show/hide the actual connections patchbay window + Zeige/Verberge das Steckfeldfenster mit den vorhandenen Verbindungen + + + + &Connect + &Verbinden... + + + + Alt+C + Alt+V + + + + JACK server state + Status des JACK-Servers + + + + JACK server mode + Modus des JACK-Servers + + + + DSP Load + DSP-Last + + + + Sample rate + Abtastrate + + + + XRUN Count (notifications) + XRUN Anzahl (Benachrichtigungen) + + + + Time display + Zeitanzeige + + + + Transport state + Transportstatus + + + + Transport BPM + Transport BPM + + + + Transport time + Transport Zeit + + + + Backward transport + Transport rückwärts + + + + &Backward + &Rückwärts + + + + Forward transport + Transport vorwärts + + + + &Forward + &Vorwärts + + + + Alt+F + Alt+F + + + + Rewind transport + Transport zurückspulen + + + + + &Rewind + &Zurückspulen + + + + Alt+R + Alt+Z + + + + Stop transport rolling + Transportvorgang anhalten + + + + + Pa&use + Pa&usieren + + + Alt+U + Alt+U + + + + Start transport rolling + Transportforgang starten + + + + + &Play + Abs&pielen + + + + Alt+P + Alt+P + + + + Could not open ALSA sequencer as a client. + +ALSA MIDI patchbay will be not available. + ALSA Sequencer konnte nicht als Client geöffnet werden. +Das ALSA-MIDI-Steckfeld wird nicht verfügbar sein. + + + + D-BUS: Service is available (%1 aka jackdbus). + + + + + D-BUS: Service not available (%1 aka jackdbus). + + + + + + Information + Information + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" in the context menu of the system tray entry. + Programm läuft weiter sichtbar als Symbol im Benachrichtigungsfeld. +Zum Beenden des Programms, wählen Sie bitte "Beenden" im +Kontextmenü des Symbols im Benachrichtigungsfeld. + + + + + + + + Warning + Warnung + + + + JACK is currently running. + +Do you want to terminate the JACK audio server? + Der JACK-Server läuft noch. +Wollen Sie diesen beenden? + + + Terminate + Beenden + + + Cancel + Abbrechen + + + + successfully + erfolgreich + + + + with exit status=%1 + mit Rückgabewert = %1 + + + + Could not start JACK. + +Maybe JACK audio server is already started. + Konnte JACK nicht starten. +Möglicheweise läuft der JACK-Server schon. + + + Stop + Stopp + + + Kill + Beenden + + + + Could not load preset "%1". + +Retrying with default. + Konnte Einstellung "%1" nicht laden. +Versuche erneut mit Voreinstellung. + + + + Could not load default preset. + +Sorry. + Konnte leider die Voreinstellung nicht laden. + + + + Startup script... + Start-Skript... + + + + Startup script terminated + Start-Skript beendet + + + + D-BUS: JACK server is starting... + + + + + D-BUS: JACK server could not be started. + +Sorry + + + + + JACK is starting... + JACK startet... + + + + Some client audio applications +are still active and connected. + +Do you want to stop the JACK audio server? + Einige Client-Audio-Anwendungen +sind noch aktiv und verbunden. +Wollen Sie den JACK-Server anhalten? + + + + JACK is stopping... + JACK fährt herunter... + + + + Shutdown script... + Herunterfahr-Skript... + + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" +in the context menu of the system tray icon. + + + + + Shutdown script terminated + Herunterfahr-Skript beendet + + + + D-BUS: JACK server is stopping... + + + + + D-BUS: JACK server could not be stopped. + +Sorry + + + + + + Post-shutdown script... + Nach-Herunterfahr-Skript... + + + + + Post-shutdown script terminated + Nach-Herunterfahr-Skript beendet + + + + JACK was started with PID=%1. + JACK wurde mit PID = %1 gestartet. + + + + D-BUS: JACK server was started (%1 aka jackdbus). + + + + + JACK is being forced... + JACK wird gezwungen... + + + + JACK was stopped + JACK wurde angehalten + + + + D-BUS: JACK server was stopped (%1 aka jackdbus). + + + + + Error + Fehler + + + + Transport BBT (bar:beat.ticks) + BBT (bar:beat.ticks) Übermittlung + + + + Transport time code + Timecode Übermittlung + + + + Elapsed time since last reset + Seit dem letzten Zurücksetzen vergangene Zeit + + + + Elapsed time since last XRUN + Seit dem letzten XRUN vergangene Zeit + + + + Could not load active patchbay definition. + +Disabled. + Konnte aktive Steckfelddefinition nicht laden. +Ist deaktiviert. + + + + Patchbay activated. + Steckfeld aktiviert. + + + + Patchbay deactivated. + Steckfeld deaktiviert. + + + + Statistics reset. + Statistik zurückgesetzt. + + + + msec + ms + + + + JACK connection graph change. + Schaubild der JACK-Verbindungen geändert. + + + + XRUN callback (%1). + + + + + Buffer size change (%1). + Puffergröße geändert (%1). + + + + Shutdown notification. + Benachrichtigung zum Herunterfahren. + + + + Could not start JACK. + +Sorry. + Konnte JACCK nicht starten. + + + + JACK has crashed. + JACK ist abgestürzt. + + + + JACK timed out. + JACK Zeitüberschreitung + + + + JACK write error. + JACK Schreibfehler. + + + + JACK read error. + JACK Lesefehler. + + + + Unknown JACK error (%d). + Unbekannter JACK-Fehler + + + + ALSA connection graph change. + Schaubild der ALSA-Verbindungen geändert. + + + + JACK active patchbay scan + JACK aktive Steckfeldsuche + + + + ALSA active patchbay scan + ALSA aktive Steckfeldsuche + + + + JACK connection change. + JACK-Verbindung geändert. + + + + ALSA connection change. + ALSA-Verbindung geändert. + + + + checked + überprüft + + + + connected + verbunden + + + + disconnected + getrennt + + + + failed + fehlgeschlagen + + + + A patchbay definition is currently active, +which is probable to redo this connection: + +%1 -> %2 + +Do you want to remove the patchbay connection? + Zur Zeit ist eine Steckfeldkonfiguration aktiv, + die wahrscheinlich diese Verbindungsänderung rückgängig macht: +%1 -> %2 +Wollen Sie diese Steckfeldverbindung entfernen? + + + + Overall operation failed. + Gesamtbetrieb schlug fehl. + + + + Invalid or unsupported option. + Ungültige oder nicht unterstützte Option. + + + + Client name not unique. + Name des Clients nicht einzigartig. + + + + Server is started. + Server ist gestartet. + + + + Unable to connect to server. + Verbindungsaufnahme zum Server gescheitert. + + + + Server communication error. + Server-Kommunikationsfehler. + + + + Client does not exist. + Client existiert nicht. + + + + Unable to load internal client. + Interner Client konnte nicht geladen werden. + + + + Unable to initialize client. + Client konnte nicht initialisiert werden. + + + + Unable to access shared memory. + Kein Zugriff auf Shared Memory möglich. + + + + Client protocol version mismatch. + Unpassende Client-Protokollversion + + + + Could not connect to JACK server as client. +- %1 +Please check the messages window for more info. + Keine Verbindungsaufnahme als Client zum JACK-Server möglich. - %1 +Bitte sehen Sie im Meldungsfenster nach weiteren Informationen. + + + + Server configuration saved to "%1". + Serverkonfiguration nach "%1" gespeichert. + + + + Client activated. + Client aktiviert + + + + Post-startup script... + Nach-Start-Skript... + + + + Post-startup script terminated + Nach-Start-Skript beendet + + + + Command line argument... + Kommandozeilenargument... + + + + Command line argument started + Kommandozeilenargument gestartet + + + + Client deactivated. + Client deaktiviert. + + + + Transport rewind. + Übermittlung zurückspulen. + + + + Transport backward. + Übermittlung zurück. + + + + + + Starting + Startend + + + + Transport start. + Übermittlung starten. + + + + + Stopping + Stoppe + + + + Transport stop. + Übermittlung anhalten. + + + + Transport forward. + Transport vorwärts. + + + + + Stopped + Steht + + + + %1 (%2%) + %1 (%2 %) + + + + %1 % + %1 % + + + + %1 Hz + %1 Hz + + + + %1 frames + %1 Frames + + + + Yes + Ja + + + + No + Nein + + + + RT + RT + + + + Rolling + Rollt + + + + Looping + Schleifen ausführend + + + + %1 msec + %1 ms + + + + XRUN callback (%1 skipped). + XRUN callback (%1 übersprungen). + + + + Started + Läuft + + + + Active + Aktiv + + + + Activating + Aktivierend + + + + Inactive + Inaktiv + + + + &Hide + &Verbergen + + + + Mi&nimize + Mi&nimieren + + + + S&how + An&zeigen + + + + Rest&ore + Neu&laden + + + + &Stop + &Stopp + + + + &Reset + &Zurücksetzen + + + + &Presets + &Voreinstellungen + + + + &Connections + &Verbindungen + + + + Patch&bay + Steck&feld + + + + &Transport + &Übermittlung + + + + Server settings will be only effective after +restarting the JACK audio server. + Die Server-Einstellungen werden erst nach einem +Neustart des JACK-Servers wirksam. + + + + D-BUS: SetParameterValue('%1', '%2'): + +%3. +(%4) + + + + + D-BUS: ResetParameterValue('%1'): + +%2. +(%3) + + + + + D-BUS: GetParameterValue('%1'): + +%2. +(%3) + + + + OK + OK + + + + Some settings will be only effective +the next time you start this program. + Einige Einstellungen werden erst nach +einem Neustart des Programms wirksam. + + + + Alt+A + Alt+A + + + + Alt+O + Alt+W + + + + Shift+Space + + + + + Space + + + + + qjackctlMessagesForm + + + Messages - JACK Audio Connection Kit + Meldungen - JACK Audio Connection Kit + + + + Messages output log + Meldungsprotokoll + + + + Logging stopped --- %1 --- + Protokollierung angehalten --- %1 --- + + + + Logging started --- %1 --- + Protokollierung gestartet --- %1 --- + + + + qjackctlPatchbay + + + Warning + Warnung + + + + This will disconnect all sockets. + +Are you sure? + Diese Aktion wird alle Anschlüsse trennen. +Sind Sie sicher? + + + Yes + Ja + + + No + Nein + + + + qjackctlPatchbayForm + + + Patchbay - JACK Audio Connection Kit + Steckfeld - JACK Audio Connection Kit + + + + + Move currently selected output socket down one position + Ausgewählten Ausgangsanschluß eine Position nach unten verschieben + + + + + Down + Ab + + + + Create a new output socket + Einen neuen Ausgangsanschluß anlegen + + + + + Add... + Hinzufügen... + + + + Edit currently selected input socket properties + Eigenschaften des gewählten Eingangsanschlusses bearbeiten + + + + + Edit... + Bearbeiten... + + + + + Move currently selected output socket up one position + Ausgewählten Ausgangsanschluß eine Position nach oben verschieben + + + + + Up + Auf + + + + Remove currently selected output socket + Ausgewählten Ausgangsanschluss entfernen + + + + + Remove + Entfernen + + + + Duplicate (copy) currently selected output socket + Dupliziere den gewählten Ausgangsanschluss + + + + + Copy... + Kopieren... + + + + Remove currently selected input socket + Ausgewählten Eingangsanschluss entfernen + + + + Duplicate (copy) currently selected input socket + Dupliziere den gewählten Eingangsanschluss + + + + Create a new input socket + Einen neuen Eingangsanschluß anlegen + + + + Edit currently selected output socket properties + Eigenschaften des gewählten Ausgangsanschlusses bearbeiten + + + + Connect currently selected sockets + Gewählte Anschlüsse miteinander verbinden + + + + &Connect + &Verbinden + + + + Alt+C + Alt+V + + + + Disconnect currently selected sockets + Verbindung zwischen den gewählten Anschlüssen trennen + + + + &Disconnect + &Trennen + + + + Alt+D + Alt+T + + + + Disconnect all currently connected sockets + Alle verbundenen Anschlüsse trennen + + + + Disconnect &All + &Alle trennen + + + + Alt+A + Alt+A + + + + Refresh current patchbay view + Steckfeldansicht auffrischen + + + + &Refresh + Auf&frischen + + + + Alt+R + Alt+F + + + + Create a new patchbay profile + Neues Steckfeldprofil anlegen + + + + &New + &Neu + + + + Alt+N + Alt+N + + + + Load patchbay profile + Steckfeldprofil laden + + + + &Load... + &Laden... + + + + Alt+L + Alt+L + + + + Save current patchbay profile + Aktuelles Steckfeldprofil speichern + + + + &Save... + &Speichern... + + + + Alt+S + Alt+S + + + + Current (recent) patchbay profile(s) + Aktuelle (zuletzt verwendete) Steckfeldprofile + + + + Toggle activation of current patchbay profile + Aktivierung des aktuellen Steckfeldprofils umschalten + + + + Acti&vate + A&ktivieren + + + + Alt+V + Alt+V + + + + Warning + Warnung + + + + The patchbay definition has been changed: + +"%1" + +Do you want to save the changes? + Die Steckfelddefinition wurde verändert: +"%1" +Wollen Sie die Änderungen übernehmen? + + + Save + Speichern + + + Discard + Verwerfen + + + Cancel + Abbrechen + + + + %1 [modified] + %1 [verändert] + + + + Untitled%1 + Unbenannt%1 + + + + + Error + Fehler + + + + Could not load patchbay definition file: + +"%1" + Konnte Steckfelddefinitionsdatei nicht laden: +"%1" + + + + Could not save patchbay definition file: + +"%1" + Konnte Steckfelddefinitionsdatei nicht speichern: +"%1" + + + + New Patchbay definition + Neue Steckfelddefinition + + + + Create patchbay definition as a snapshot +of all actual client connections? + Steckfelddefinitionsdatei als Schnappschuss +der aktuell vorhandenen Verbindungen erstellen? + + + Yes + Ja + + + No + Nein + + + + Load Patchbay Definition + Steckfelddefinition laden + + + + + Patchbay Definition files + Steckfelddefinitionsdateien + + + + Save Patchbay Definition + Speichere Steckfelddefinition + + + + active + aktiv + + + + qjackctlPatchbayView + + + Add... + Hinzufügen... + + + + Edit... + Bearbeiten... + + + + Copy... + Kopieren... + + + + Remove + Entfernen + + + + Exclusive + Exklusiv + + + + Forward + Weiterleiten + + + + (None) + (Keine) + + + + Move Up + Nach oben + + + + Move Down + Nach unten + + + + &Connect + &Verbinden + + + + Alt+C + Connect + Alt+V + + + + &Disconnect + &Trennen + + + + Alt+D + Disconnect + Alt+T + + + + Disconnect &All + &Alle trennen + + + + Alt+A + Disconect All + Alt+A + + + + &Refresh + Auf&frischen + + + + Alt+R + Refresh + Alt+A + + + + qjackctlSetupForm + + + Setup - JACK Audio Connection Kit + Einstellungen - JACK Audio Connection Kit + + + + Settings + Einstellungen + + + + Preset &Name: + &Benennung: + + + + Settings preset name + Benennung der Einstellung + + + + + + + + + + + + + + (default) + (voreinst.) + + + + Save settings as current preset name + Einstellungen mit aktueller Benennung speichern + + + + &Save + &Speichern + + + + + + Alt+S + Alt+S + + + + Delete current settings preset + Aktuelle Einstellung löschen + + + + &Delete + &Löschen + + + + + + + Alt+D + Alt+L + + + + Server + Server + + + + Server &Path: + Server-&Pfad: + + + + The JACK Audio Connection Kit sound server path + Pfad zum JACK-Server + + + + jackd + jackd + + + + jackdmp + jackdmp + + + + jackstart + jackstart + + + jackd-realtime + jackd-realtime + + + + Driv&er: + Trei&ber: + + + + The audio backend driver interface to use + Zu nutzender Audio-Schnittstellentreiber + + + + dummy + dummy + + + + sun + sun + + + + oss + oss + + + + alsa + alsa + + + + portaudio + portaudio + + + + coreaudio + coreaudio + + + + freebob + freebob + + + + firewire + firewire + + + + Parameters + Parameter + + + + MIDI Driv&er: + MIDI-&Treiber: + + + + The ALSA MIDI backend driver to use + Zu nutzender ALSA-MIDI-Treiber + + + + none + keiner + + + + raw + raw + + + + seq + seq + + + + Start De&lay (secs): + Startverz&ögerung (s): + + + + Time in seconds that client is delayed after server startup + Zeitverzögerung für den Client nach Start des Servers + + + + Latency: + Latenz: + + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + Ausgangslatenz in Millisekunden. Berechnung basiert auf Perioden-, Abtastraten- und Puffereinstellungen + + + + 0 + 0 + + + + Use realtime scheduling + Echtzeitverarbeitung nutzen + + + + &Realtime + Echt&zeit + + + + + + Alt+R + Alt+Z + + + + Do not attempt to lock memory, even if in realtime mode + Keinen Arbeitsspeicher sperren, auch nicht im Echtzeitmodus + + + + No Memory Loc&k + Spei&cher nicht sperren + + + + + + Alt+K + Alt+C + + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + Arbeitsspeicher von gängigen Bibliotheken (GTK+, QT, FLTK, Wine) entsperren + + + + &Unlock Memory + S&peicher entsperren + + + + + + Alt+U + Alt+P + + + + Ignore xruns reported by the backend driver + Xruns des Schnittstellentreibers anzeigen + + + + So&ft Mode + So&ft-Modus + + + + + + + + Alt+F + Alt+F + + + + Provide output monitor ports + Anschlüsse zur Ausgangsüberwachung anbieten + + + + &Monitor + &Überwachung + + + + + + Alt+M + Alt+Ü + + + + Force 16bit mode instead of failing over 32bit (default) + 16-Bit-Modus erzwingen statt versuchsweiser Aktivierung des 32-Bit-Modus (voreingestellt) + + + + Force &16bit + &16 Bit erzwingen + + + + Alt+1 + Alt+1 + + + + Enable hardware monitoring of capture ports + Hardware-überwachung der Caspture-Anschlüsse aktivieren + + + + H/W M&onitor + H/W Über&wachung + + + + + Alt+O + Alt+W + + + + Enable hardware metering on cards that support it + Hardware-Messung bei Karten aktivieren, die diese unterstützen + + + + H/&W Meter + H/W &Messung + + + + Alt+W + Alt+M + + + + Ignore hardware period/buffer size + Ignoriere Periode/Puffergröße der Hardware + + + + &Ignore H/W + &Ignoriere H/W + + + + + + Alt+I + Alt+I + + + + Whether to give verbose output on messages + Ausführliche Meldungen anzeigen + + + + &Verbose messages + Aus&führliche Meldungen + + + + Alt+V + Alt+F + + + + &Output Device: + A&usgabegerät: + + + + &Output Channels: + Aus&gangskanäle: + + + + &Interface: + S&chnittstelle: + + + + Maximum input audio hardware channels to allocate + Maximum belegbarer Audio-Hardware-Eingänge + + + + &Audio: + &Audio: + + + + &Input Latency: + &Eingangslatenz: + + + + Dit&her: + + + + + External output latency (frames) + Externe Ausgangslatenz (Frames) + + + + &Input Device: + Eingangsger&ät + + + + Provide either audio capture, playback or both + Entweder Audio-Aufnahme, -Wiedergabe oder beides anbieten + + + + Duplex + Duplex + + + + Capture Only + Nur Aufnahme + + + + Playback Only + Nur Wiedergabe + + + + The PCM device name to use + Name des genutzten PCM-Gerätes + + + + + + hw:0 + hw:0 + + + + + + plughw:0 + plughw:0 + + + + + + /dev/audio + /dev/audio + + + + + + /dev/dsp + /dev/dsp + + + + Select output device for playback + Ausgabegerät für Wiedergabe auswählen + + + + + + + + + + > + > + + + + Alternate input device for capture + Alternativer Geräteeingang für Aufnahme + + + + &Output Latency: + A&usgangslatenz: + + + + Maximum output audio hardware channels to allocate + Maximum der belegbaren Audio-Hardware-Kanäle + + + + Alternate output device for playback + Alternatives Ausgabegerät für Wiedergabe + + + + &Input Channels: + E&ingangskanäle: + + + + Select input device for capture + Eingangsgerät zum Aufnehmen wählen + + + + Select PCM device name + Name des PCM-Gerätes wählen + + + + External input latency (frames) + Externe Eingangslatenz (Frames) + + + + Set dither mode + Dither-Modus festlegen + + + + None + Keiner + + + + Rectangular + Rechteck + + + + Shaped + Hüllkurve + + + + Triangular + Dreieck + + + + Number of periods in the hardware buffer + Anzahl der Perioden im Hardware-Puffer + + + + Priorit&y: + Priorit&ät: + + + + &Frames/Period: + &Frames/Periode: + + + + Frames per period between process() calls + Frames pro Periode zwischen process() Aufrufen + + + + + 16 + 16 + + + + + 32 + 32 + + + + + 64 + 64 + + + + + 128 + 128 + + + + + 256 + 256 + + + + + 512 + 512 + + + + + 1024 + 1024 + + + + 2048 + 2048 + + + + 4096 + 4096 + + + + Port Ma&ximum: + Ma&ximaler Port: + + + + &Channels: + &Kanäle: + + + Number o microseconds to wait between engine processes (dummy) + Wartezeit in Mikrosekunden zwischen Verarbeitungsprozessen (dummy) + + + + 21333 + 21333 + + + + Sample rate in frames per second + Abtastrate in Frames pro Sekunde + + + + 22050 + 22050 + + + + 32000 + 32000 + + + + 44100 + 44100 + + + + 48000 + 48000 + + + + 88200 + 88200 + + + + 96000 + 96000 + + + + 192000 + 192000 + + + + Scheduler priority when running realtime + Priorität für die Echtzeitsteuerung + + + + &Word Length: + &Wortlänge: + + + + Periods/&Buffer: + Per&ioden/Puffer: + + + + Word length + Wortlänge + + + + Maximum number of ports the JACK server can manage + Maximum an Anschlüssen, die der JACK-Server verarbeiten kann. + + + + &Wait (usec): + &Warten (µs) + + + + Sample &Rate: + Abtast&rate: + + + + Maximum number of audio channels to allocate + Maximale Anzahl der belegbaren Audiokanäle festlegen + + + + &Timeout (msec): + &Timeout (ms): + + + + Set client timeout limit in miliseconds + Timeout-Limitierung für Clients festlegen; Angabe in Millisekunden + + + + 200 + 200 + + + + + 500 + 500 + + + + + 1000 + 1000 + + + + 2000 + 2000 + + + + + 5000 + 5000 + + + + 10000 + 10000 + + + + Options + Optionen + + + + Scripting + Skript-Steuerung + + + + Whether to execute a custom shell script before starting up the JACK audio server. + Festlegen, ob ein angepasstes Shell-Skript vor dem Start des JACK-Servers ausgeführt werden soll + + + + Execute script on Start&up: + Skript &beim Start ausführen: + + + + Whether to execute a custom shell script after starting up the JACK audio server. + Festlegen, ob ein angepasstes Shell-Skript nach dem Start des JACK-Servers ausgeführt werden soll + + + + Execute script after &Startup: + Skript &nach Start ausführen: + + + + Whether to execute a custom shell script before shuting down the JACK audio server. + Festlegen, ob ein angepasstes Shell-Skript vor dem Herunterfahren des JACK-Servers ausgeführt werden soll + + + + Execute script on Shut&down: + Skript beim &Herunterfahren ausführen: + + + + Command line to be executed before starting up the JACK audio server + Vor dem Starten des JACK-Servers ausgeführte Kommandozeile + + + + + + + Scripting argument meta-symbols + Meta-Symbole der Skriptargumente + + + + Browse for script to be executed before starting up the JACK audio server + Skript auswählen, dass vor dem Starten des JACK-Servers ausgeführt wird + + + + + + + + + ... + ... + + + + Command line to be executed after starting up the JACK audio server + Nach dem Starten des JACK-Servers ausgeführte Kommandozeile + + + + Browse for script to be executed after starting up the JACK audio server + Skript auswählen, dass nach dem Starten des JACK-Servers ausgeführt wird + + + + Browse for script to be executed before shutting down the JACK audio server + Skript auswählen, dass vor dem Herunterfahen des JACK-Servers ausgeführt wird + + + + Command line to be executed before shutting down the JACK audio server + Vor dem Herunterfahren des JACK-Servers ausgeführte Kommandozeile + + + + Whether to execute a custom shell script after shuting down the JACK audio server. + Festlegen, ob ein angepasstes Shell-Skript nach dem Herunterfahren des JACK-Servers ausgeführt werden soll + + + + Execute script after Shu&tdown: + Skript nach dem Herunter&fahren ausführen: + + + + + + Alt+T + Alt+F + + + + Browse for script to be executed after shutting down the JACK audio server + Skript auswählen, dass nach dem Herunterfahen des JACK-Servers ausgeführt wird + + + + Command line to be executed after shutting down the JACK audio server + Nach dem Herunterfahren des JACK-Servers ausgeführte Kommandozeile + + + + Statistics + Statistik + + + + Whether to capture standard output (stdout/stderr) into messages window + Standardausgabe (stdout/stderr) in Meldungsfenster umleiten + + + + &Capture standard output + Standardausgabe &umleiten + + + + + Alt+C + Alt+U + + + + &XRUN detection regex: + + + + + Regular expression used to detect XRUNs on server output messages + Regulärer Ausdruck zur Erkennung von XRUNs in vom Server gesendeten Meldungen + + + + xrun of at least ([0-9|\.]+) msecs + xrun mit mindestens ([0-9|\.]+) ms + + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + Erste XRUN-Meldungen beim Server-Start ignorieren (treten in der Regel bei Versionen vor 0.80.0 auf + + + + &Ignore first XRUN occurrence on statistics + &Erstes XRUN-Auftreten in Statistik ignorieren + + + + Connections + Verbindungen + + + + Time in seconds between each auto-refresh cycle + Zeit in Sekungen zwischen jedem Auto-Refresch-Zyklus + + + + 5 + 5 + + + + + 10 + 10 + + + + 20 + 20 + + + + 30 + 30 + + + + 60 + 60 + + + + 120 + 120 + + + + Patchbay definition file to be activated as connection persistence profile + Steckfelddefinitionsdatei als beständiges Verbindungsprofil aktivieren + + + + Browse for a patchbay definition file to be activated + Eine Steckfelddefinitionsdatei zum aktivieren wählen + + + + Whether to refresh the connections patchbay automatically + Die Steckfelddarstellung automatisch aktualisieren + + + + &Auto refresh connections Patchbay, every (secs): + Steckfeld &automatisch aktualisieren, je (s): + + + + + Alt+A + Alt+A + + + + Whether to activate a patchbay definition for connection persistence profile. + Ein beständiges Verbindungsprofil für das Steckfeld aktivieren. + + + + Activate &Patchbay persistence: + Steck&feldkonfiguration hat Bestand: + + + + Alt+P + Alt+F + + + + Logging + Protokollierung + + + + Messages log file + Protokolldatei für Meldungen + + + + Browse for the messages log file location + Speicherort für Protokolldatei wählen + + + + Whether to activate a messages logging to file. + Protokollierung der Meldungen festlegen + + + + &Messages log file: + &Protokolldatei: + + + + Display + Anzeige + + + + Time Display + Zeitanzeige + + + + Time F&ormat: + Zeit&format: + + + + The general time format on display + Allgemeinse Zeitformat des Displays + + + + hh:mm:ss + hh:mm:ss + + + + hh:mm:ss.d + hh:mm:ss.d + + + + hh:mm:ss.dd + hh:mm:ss.dd + + + + hh:mm:ss.ddd + hh:mm:ss.ddd + + + + Transport &Time Code + + + + + Transport &BBT (bar:beat.ticks) + + + + + + + + Alt+B + Alt+B + + + + Elapsed time since last &Reset + Seit dem letzten &Zurücksetzen verstrichene Zeit + + + + Elapsed time since last &XRUN + Seit dem letzten &XRUN verstrichene Zeit + + + + Alt+X + Alt+X + + + + Sample front panel normal display font + Beispielhafte Darstellung der normalen Anzeige + + + + Sample big time display font + Beispielhafte Darstellung der großen Anzeige + + + + Big Time display: + Große Zeitanzeige: + + + + Select font for front panel normal display + Schriftart für normale Anzeige wählen + + + + + + + &Font... + &Schriftart... + + + + Select font for big time display + Schriftart für große Zeitanzeige wählen + + + + Normal display: + Normale Anzeige: + + + + Whether to enable a shiny glass light effect on the main display + Anzeige mit Schimmereffekt darstellen + + + + &Display shiny glass light effect + Schi&mmereffekt darstellen + + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + Realtime-Indikator (RT) blinkend darstellen + + + + Blin&k server mode indicator + Ser&vermodus blinkend darstellen + + + + Messages Window + Meldungsfenster + + + + Sample messages text font display + Beispielhafte Darstellung des Textes im Meldungsfenster + + + + Select font for the messages text display + Schriftart für Text im Meldungsfenster wählen + + + + Whether to keep a maximum number of lines in the messages window + Maximale Anzahl der im Meldungsfenster angezeigten Zeilen festlegen + + + + &Messages limit: + &Nachrichtenmaximum: + + + + The maximum number of message lines to keep in view + Maximale Anzahl der Nachrichten im Meldungsfenster + + + + 100 + 100 + + + + 250 + 250 + + + + 2500 + 2500 + + + + Connections Window + Verbindungsübersicht + + + + Sample connections view font + Beispielhafte Darstellung der Schrift in der Verbindungsübersicht + + + + Select font for the connections view + Schriftart für Verbindungsübersicht wählen + + + + &Icon size: + &Symbolgröße: + + + + The icon size for each item of the connections view + Größe der einzelnen Symbole in der Verbindungsübersicht + + + + 16 x 16 + 16 x 16 + + + + 32 x 32 + 32 x 32 + + + + 64 x 64 + 64 x 64 + + + + Whether to enable in-place client/port name editing (rename) + Direktes Bearbeiten der Client/Anschluss-Alternativbezeichnung (Alias) erlauben + + + + Ena&ble client/port aliases editing (rename) + Bearbeiten von &Deckbezeichnungen für Client/Anschlüsse + + + + Whether to enable client/port name aliases on the connections window + Verwendung von Deckbezeichnungen (Alias) für Anschlüsse in der Verbindungsübersicht erlauben + + + + E&nable client/port aliases + Dec&kbezeichnungen (Alias) für Client/Anschlüsse + + + + + Alt+N + Alt+K + + + + Whether to draw connection lines as cubic Bezier curves + Festlegen, ob Verbindungslinien als Bezier-Kurven gezeichnet werden sollen + + + + Draw connection and patchbay lines as Be&zier curves + Verbindungslinien als Be&zier-Kurven zeichen + + + + + Alt+Z + Alt+Z + + + + Misc + Verschiedenes + + + + Other + Weiteres + + + + Whether to start JACK audio server immediately on application startup + JACK-Server unmittelbar bei Anwendungsstart starten + + + + &Start JACK audio server on application startup + JACK-&Server bei Anwendungsstart starten + + + + Whether to ask for confirmation on application exit + Vor dem Beenden des JACK-Servers nachfragen + + + + &Confirm application close + Beenden der An&wendung bestätigen + + + + Whether to keep all child windows on top of the main window + Alle Kindfenster oberhalb des Hauptfensters halten + + + + &Keep child windows always on top + &Kindfenster immer oben belassen + + + + Whether to enable the system tray icon + Anwendungssymbol im Benachrichtigungsfeld anzeigen + + + + &Enable system tray icon + S&ymbol im Benachrichtigungsfeld anzeigen + + + + Alt+E + Alt+Y + + + + Whether to start minimized to system tray + Anwendung minimiert als Symbol im Benachrichtigungsfeld starten + + + + Start minimi&zed to system tray + Minimiert im &Benachrichtigungsfeld starten + + + + Whether to delay window positioning at application startup + Verzögerung der Fensterpositionierung beim Anwendugsstart festlegen + + + + &Delay window positioning at startup + Fenster&positionierung beim Start verzögern + + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + Kommandozeilenkonfiguration zum Starten des JACK-Servers in einer lokalen Datei speichern (auto-start) + + + + S&ave JACK audio server configuration to: + Konfi&guration für JACK-Server speichern unter: + + + + The server configuration local file name (auto-start) + Name der lokal gespeicherten Serverkonfigurationsdatei (auto-start) + + + + .jackdrc + .jackdrc + + + + Whether to exit once all clients have closed (auto-start) + Programm beenden, wenn alle Client-Verbindungen getrennt sind (auto-start) + + + + C&onfigure as temporary server + Als &temporären Server konfigurieren + + + + Whether to ask for confirmation on JACK audio server shutdown + Das Herunterfahren des JACK-Servers per Nachfrage bestätigen + + + + Confirm server sh&utdown + Herunter&fahren des Servers bestätigen + + + + Whether to enable ALSA Sequencer (MIDI) support on startup + Unterstützung für den ALSA Sequencer (MIDI) beim Programmstart aktivieren + + + + E&nable ALSA Sequencer support + Unterstützung für ALSA-Se&quencer bereitstellen + + + + Buttons + Schaltflächen + + + + Whether to hide the left button group on the main window + Linke Schaltflächengruppe im Hauptfenster verbergen + + + + Hide main window &Left buttons + &Linke Schaltflächen des Hauptfensters verbergen + + + + Alt+L + Alt+L + + + + Whether to hide the right button group on the main window + Rechte Schaltflächengruppe im Hauptfenster verbergen + + + + Hide main window &Right buttons + &Rechte Schaltflächen des Hauptfensters verbergen + + + + Whether to hide the transport button group on the main window + Schaltflächen der Transportsteuerung im Hauptfenster verbergen + + + + Hide main window &Transport buttons + Schaltflächen für &Transportsteuerung verbergen + + + + Whether to hide the text labels on the main window buttons + Beschriftung der Schaltflächen im Hauptfenster verbergen + + + + Hide main window &button text labels + Besch&riftung der Schaltflächen verbergen + + + + OK + OK + + + + Cancel + Abbrechen + + + + + + Warning + Warnung + + + + Some settings have been changed: + +"%1" + +Do you want to save the changes? + Einige Einstellungen wurden verändert: +"%1" +Wollen Sie diese übernehmen? + + + Save + Speichern + + + Discard + Verwerfen + + + + Delete preset: + +"%1" + +Are you sure? + Voreinstellung löschen: +"%1" +Sind Sie sicher? + + + + msec + ms + + + + n/a + n/a + + + + &Preset Name + Benennung der &Voreinstellung + + + + &Server Path + &Serverpfad + + + + &Driver + Trei&ber + + + + &Interface + Sc&hnittstelle + + + + Sample &Rate + Abtast&rate + + + + &Frames/Period + &Frames/Periode + + + + Periods/&Buffer + Perioden/&Puffer + + + + Startup Script + Start-Skript + + + + Post-Startup Script + NAch-Start-Skript + + + + Shutdown Script + Herunterfahr-Skript + + + + Post-Shutdown Script + Nach-Herunterfahr-Skript + + + + Active Patchbay Definition + Aktive Steckfelddefinition + + + + Patchbay Definition files + Steckfelddefinitionsdateien + + + + Messages Log + Meldungsprotokoll + + + + Log files + Protokolldateien + + + + Some settings have been changed. + +Do you want to apply the changes? + Einige Einstellungen wurden verändert. +Wollen Sie diese übernehmen? + + + Apply + Anwenden + + + + &JACK client/port aliases: + Deckbezeichnungen bei &JACK-Anschlüssen: + + + + JACK client/port aliases display mode + Anzeigemodus für die JACK-Client/Anschlussbenennung + + + + Default + Voreinstellung + + + + First + Erster + + + + Second + Zweiter + + + + Defaults + Voreinstellungen + + + + &Base font size: + &Basisschriftgröße + + + + Base application font size (pt.) + Generelle Schriftgröße (pt.) für die Anwendung festlegen + + + + 6 + 6 + + + + 7 + 7 + + + + 8 + 8 + + + + 9 + 9 + + + + 11 + 11 + + + + 12 + 12 + + + + net + + + + + Whether to enable D-Bus interface + D-Bus-Schnittstelle aktivieren + + + + &Enable D-Bus interface + D-Bus-Schni&ttstelle aktivieren + + + + Number of microseconds to wait between engine processes (dummy) + + + + + netone + + + + + Whether to restrict to one single application instance (X11) + + + + + Single application &instance + + + + + qjackctlSocketForm + + + Socket - JACK Audio Connection Kit + Anschluss - JACK Audio Connection Kit + + + + &Socket + &Anschluss + + + + &Name (alias): + &Name (Alias): + + + + Socket name (an alias for client name) + Anschlussbenennung (Alias für Name des Clients) + + + + Client name (regular expression) + Name des Clients (Regulärer Ausdruck) + + + + Add plug to socket plug list + Füge Anschluss zur Liste hinzu + + + + Add P&lug + &Anschluss hinzufügen + + + + Alt+L + Alt+V + + + + &Plug: + A&nschluss: + + + + Port name (regular expression) + Anschlussbezeichnung (Regulärer Ausdruck) + + + + Socket plug list + Anschlussliste + + + + Socket Plugs / Ports + Socket-Anschlüsse + + + + Edit currently selected plug + Ausgewählten Anschluss bearbeiten + + + + &Edit + &Bearbeiten + + + + Alt+E + Alt+B + + + + Remove currently selected plug from socket plug list + Ausgewählten Anschluss von der Liste entfernen + + + + &Remove + En&tfernen + + + + Alt+R + Alt+R + + + + &Client: + &Client: + + + + Move down currently selected plug in socket plug list + Ausgewählten Anschluss in Liste nach unten schieben + + + + &Down + A&b + + + + Alt+D + Alt+B + + + + Move up current selected plug in socket plug list + Ausgewählten Anschluss in Liste nach oben schieben + + + + &Up + Au&f + + + + Alt+U + Alt+U + + + + Enforce only one exclusive cable connection + Erzwinge eine singuläre Kabelverbindung + + + + E&xclusive + E&xklusiv + + + + Alt+X + Alt+X + + + + &Forward: + &Weiterleiten: + + + + Forward (clone) all connections from this socket + Alle Verbindungen dieses Anschlusses weiterleiten (klonen) + + + + Type + Typ + + + + Audio socket type (JACK) + JACK-Audio-Anbindung + + + + &Audio + JACK-&Audio + + + + Alt+A + Alt+A + + + + MIDI socket type (JACK) + JACK-MIDI-Anbindung + + + + &MIDI + &JACK-MIDI + + + + Alt+M + Alt+M + + + + MIDI socket type (ALSA) + ALSA-MIDI-Anbindung + + + + AL&SA + AL&SA-MIDI + + + + Alt+S + Alt+S + + + + OK + OK + + + + Cancel + Abbrechen + + + + Plugs / Ports + Anschlüsse + + + + Error + Fehler + + + + A socket named "%1" already exists. + + + + + Warning + Warnung + + + + Some settings have been changed. + +Do you want to apply the changes? + Einige Einstellungen wurden verändert. +Wollen Sie diese übernehmen? + + + Apply + Anwenden + + + Discard + Verwerfen + + + + Add Plug + Anschluss hinzufügen + + + + Edit + Bearbeiten + + + + Remove + Entfernen + + + + Move Up + Auf + + + + Move Down + Ab + + + + (None) + (Keiner) + + + + qjackctlSocketList + + + Output + Ausgang + + + + Input + Eingang + + + + Socket + Anbindung + + + + <New> - %1 + <Neu> %1 + + + + Warning + Warnung + + + + %1 about to be removed: + +"%2" + +Are you sure? + %1 soll entfernt werden: +"%2" +Sind Sie sicher? + + + Yes + Ja + + + No + Nein + + + + %1 <Copy> - %2 + %1 <Kopieren> - %2 + + + + qjackctlSocketListView + + + Output Sockets / Plugs + Ausgangsanschlüsse + + + + Input Sockets / Plugs + Eingangsanschlüsse + + + + qjackctlStatusForm + + + Status - JACK Audio Connection Kit + Status - JACK Audio Connection Kit + + + + Statistics since last server startup + Statistik seit dem letzten Serverstart + + + + Description + Beschreibung + + + + Value + Wert + + + + Reset XRUN statistic values + Daten der XRUN-Statistik zurücksetzen + + + + Re&set + &Zurücksetzen + + + + Alt+S + Alt+Z + + + + Refresh XRUN statistic values + Daten der XRUN-Statistik erneuern + + + + &Refresh + Auf&frischen + + + + Alt+R + Alt+E + + + + Server state + Serverstatus + + + + DSP Load + DSP-Last + + + + Sample Rate + Abtastrate + + + + Buffer Size + Puffergröße + + + + Realtime Mode + Realtime-Modus + + + + Transport state + Status Übermittlung + + + + Transport Timecode + Timecode Übermittlung + + + + Transport BBT + BBT Übermittlung + + + + Transport BPM + BPM Übermittlung + + + + XRUN count since last server startup + XRUN-Anzahl seit dem letzten Serverstart + + + + XRUN last time detected + Zeitpunkt der letzten XRUN-Beobachtung + + + + XRUN last + XRUN Letzter + + + + XRUN maximum + XRUN Maximum + + + + XRUN minimum + XRUN Minimum + + + + XRUN average + XRUN Durchschnitt + + + + XRUN total + XRUN Summe + + + + Maximum scheduling delay + Maximale Zeitverzögerung + + + + Time of last reset + Zeitpunkt der letzten Zurücksetzung + + + + Server name + + + + diff -Nru qjackctl-0.3.4/translations/qjackctl_es.ts qjackctl-0.3.6/translations/qjackctl_es.ts --- qjackctl-0.3.4/translations/qjackctl_es.ts 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/translations/qjackctl_es.ts 2010-02-22 10:15:57.000000000 +0000 @@ -0,0 +1,3249 @@ + + + + + QObject + + (default) + + + + Start JACK audio server immediately + Iniciar servidor de audio JACK ahora + + + Set active patchbay definition file + Establecer el fichero del patchbay activo + + + Show help about command line options + Mostrar ayuda sobre las opciones de línea de comando + + + Show version information + Mostrar información sobre esta versión + + + Option -p requires an argument (preset). + La opción -p nececita un argumento (nombre de un preset). + + + Usage: %1 [options] [command-and-args] + Uso: %1 [opciones] [comandos-y-argumentos] + + + Options: + Opciones: + + + Set default settings preset name + Establece el preset predeterminado + + + Option -a requires an argument (path). + La opción -a requiere un argumento (ruta). + + + Qt: %1 + + Qt: %1 + + + + Set default JACK audio server name + Establecer el nombre predetermindado del servidor de audio JACK + + + Option -n requires an argument (name). + La opción -n necesita un argumento (nombre). + + + + qjackctlAboutForm + + About Qt + Acerca de QT + + + &Close + &Cerrar + + + Alt+C + Alt+C + + + Version + Versión + + + Build + Build + + + Debugging option enabled. + Depuración habilitada. + + + System tray disabled. + Bandeja del sistema deshabilitada. + + + Transport status control disabled. + Reporte del estado de transporte deshabilitado. + + + Realtime status disabled. + Estado de Realtime deshabilitado. + + + XRUN delay status disabled. + Reporte del retardo de XRUN deshabilitado. + + + Maximum delay status disabled. + Reporte del retardo máximo deshabilitado. + + + ALSA/MIDI sequencer support disabled. + Soporte para secuenciador ALSA/MIDI deshabilitado. + + + Website + Website + + + This program is free software; you can redistribute it and/or modify it + Este programa es software libre; Usted puede redistribuirlo y/o modificarlo + + + under the terms of the GNU General Public License version 2 or later. + bajo los términos de la Licencia Pública General GNU versión 2 o posterior. + + + JACK MIDI support disabled. + Soporte MIDI en JACK deshabilitado. + + + About QjackCtl + Acerca de QjackCtl + + + JACK Port aliases support disabled. + Soporte para alias de los puertos de JACK deshabilitado. + + + D-Bus interface support disabled. + Soporte para la interfaz D-Bus deshabilitado. + + + + qjackctlClientListView + + &Connect + &Conectar + + + Alt+C + Connect + Alt+C + + + &Disconnect + &Desconectar + + + Alt+D + Disconnect + Alt+D + + + Disconnect &All + Desconectar &Todo + + + Alt+A + Disconect All + Alt+T + + + Re&name + Cambiar &Nombre + + + Alt+N + Rename + Alt+N + + + &Refresh + &Refrescar + + + Alt+R + Refresh + Alt+R + + + Readable Clients / Output Ports + Puertos de Salida / Clientes Leíbles + + + Writable Clients / Input Ports + Puertos de Entrada / Clientes Escribibles + + + + qjackctlConnect + + Warning + Advertencia + + + Yes + Si + + + No + No + + + This will suspend sound processing +from all client applications. + +Are you sure? + Esto suspenderá el procesamiento de sonido +de todas las aplicaciones. +Está seguro? + + + + qjackctlConnectionsForm + + Connections - JACK Audio Connection Kit + Conexiones - JACK Audio Connection Kit + + + Audio + Audio + + + &Connect + &Conectar + + + Alt+C + Alt+C + + + Connect currently selected ports + Conectar los puertos seleccionados + + + &Disconnect + &Desconectar + + + Alt+D + Alt+D + + + Disconnect currently selected ports + Desconectar los puertos seleccionados + + + Disconnect &All + Desconectar &Todo + + + Alt+A + Alt+T + + + Disconnect all currently connected ports + Desconectar todos los puertos seleccionados + + + &Refresh + &Refrescar + + + Alt+R + Alt+R + + + Refresh current connections view + Refrescar la vista actual de conexiones + + + MIDI + MIDI + + + Warning + Advertencia + + + Save + Guardar + + + Discard + Descartar cambios + + + Cancel + Cancelar + + + The preset aliases have been changed: + +"%1" + +Do you want to save the changes? + Los alias de presets han cambiado: + +"%1" + +Desea guardar los cambios? + + + ALSA + ALSA + + + + qjackctlConnectorView + + &Connect + &Conectar + + + Alt+C + Connect + Alt+C + + + &Disconnect + &Desconectar + + + Alt+D + Disconnect + Alt+D + + + Disconnect &All + Desconectar &Todo + + + Alt+A + Disconect All + Alt+T + + + &Refresh + &Refrescar + + + Alt+R + Refresh + Alt+R + + + + qjackctlMainForm + + &Quit + &Salir + + + Alt+Q + Alt+S + + + Quit processing and exit + Terminar procesamiento y salir + + + &Start + &Iniciar + + + Alt+S + Alt+I + + + Start the JACK server + Iniciar el servidor JACK + + + S&top + &Detener + + + Alt+T + Alt+D + + + Stop the JACK server + Detener el servidor JACK + + + St&atus + &Estado + + + Show/hide the extended status window + Mostrar / ocultar la ventana de estado detallado + + + Ab&out... + Ace&rca... + + + Show information about this application + Mostrar información sobre esta aplicación + + + S&etup... + Se&tup... + + + Alt+E + Alt+T + + + Show settings and options dialog + Mostrar el diálogo de opciones y preferencias + + + &Messages + &Mensajes + + + Alt+M + Alt+M + + + Show/hide the messages log window + Mostrar / ocultar la ventana de mensajes + + + Patch&bay + Patch&bay + + + Alt+B + Alt+B + + + Show/hide the patchbay editor window + Mostrar / ocultar el editor de patchbay + + + &Connect + &Conexiones + + + Alt+C + Alt+C + + + Show/hide the actual connections patchbay window + Mostrar / ocultar el patchbay con las conexiones actuales + + + JACK server state + Estado del servidor JACK + + + JACK server mode + Modo del servidor JACK + + + Sample rate + Frecuencia de muestreo + + + Time display + Visor de tiempo + + + Transport state + Estado del transporte + + + Transport BPM + BPM del transporte + + + Transport time + Tiempo del transporte + + + Backward transport + Retroceder transporte + + + Alt+F + Alt+L + + + Forward transport + Avanzar transporte (Alt+L) + + + Alt+R + Alt+K + + + Rewind transport + Rebobinar transporte (Alt+K) + + + Alt+U + Alt+. + + + Stop transport rolling + Detener el transporte (Alt+ . [punto]) + + + Alt+P + Alt+N + + + Start transport rolling + Iniciar el transporte (Alt+N) + + + Warning + Advertencia + + + Terminate + Terminar + + + Cancel + Cancelar + + + successfully + satisfactoriamente + + + with exit status=%1 + con estado %1 + + + Stop + Detener + + + Kill + Matar + + + Could not load preset "%1". + +Retrying with default. + No se pudo cargar el preset "%1". +Probando con el predeterminado. + + + Could not load default preset. + +Sorry. + Lo siento. +No se pudo cargar el preset predeterminado. + + + Startup script... + Script de inicio... + + + Startup script terminated + El script de inicio finalizó + + + JACK is starting... + JACK está iniciándose... + + + Could not start JACK. + +Sorry. + Lo siento. +No se pudo iniciar JACK. + + + JACK is stopping... + JACK está deteniéndose... + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" +in the context menu of the system tray icon. + El programa seguirá corriendo en la bandeja del sistema. + +Para terminarlo, por favor eljia "Salir" +en el menú contextual del ícono en la bandeja del sistema. + + + Shutdown script... + Script de apagado... + + + Shutdown script terminated + El script de apagado finalizó + + + JACK was stopped + JACK ha sido detenido + + + Post-shutdown script... + Script de post - apagado... + + + D-BUS: Service is available (%1 aka jackdbus). + D-BUS: Disponible (%1 aka jackdbus). + + + D-BUS: Service not available (%1 aka jackdbus). + D-BUS: No disponible (%1 aka jackdbus). + + + D-BUS: JACK server is starting... + D-BUS: Iniciando servidor JACK... + + + D-BUS: JACK server could not be started. + +Sorry + D-BUS: El servidor JACK no puede iniciarse. + +Disculpa + + + D-BUS: JACK server is stopping... + D-BUS: Deteniendo el servidor JACK... + + + D-BUS: JACK server could not be stopped. + +Sorry + D-BUS: El servidor JACK no puede detenerse. + +Disculpa + + + Post-shutdown script terminated + El script de post - apagado finalizó + + + D-BUS: JACK server was started (%1 aka jackdbus). + D-BUS: El servidor JACK se ha iniciado (%1 aka jackdbus). + + + D-BUS: JACK server was stopped (%1 aka jackdbus). + D-BUS: El servidor JACK se ha detenido (%1 aka jackdbus). + + + Error + Error + + + Transport BBT (bar:beat.ticks) + BBT del transporte ( bar:beat:ticks ) + + + Transport time code + Código de tiempo del transporte + + + Elapsed time since last reset + Tiempo transcurrido desde el último reset + + + Elapsed time since last XRUN + Tiempo transcurrido desde el último XRUN + + + Could not load active patchbay definition. + +Disabled. + No se puede cargar el archivo con el esquema del patchbay activo. +Deshabilitándolo. + + + Patchbay activated. + Patchbay activada. + + + Patchbay deactivated. + Patchbay desactivada. + + + Statistics reset. + Reiniciar estadísticas. + + + msec + mseg + + + XRUN callback (%1). + XRUN callback (%1). + + + Buffer size change (%1). + Cambio en el tamaño de buffer (%1). + + + Shutdown notification. + Notificación de apagado. + + + checked + verificado + + + connected + conectado + + + disconnected + desconectado + + + failed + falló + + + Server configuration saved to "%1". + Configuración del servidor salvada en "%1". + + + Client activated. + Cliente activado. + + + Post-startup script... + Script de post - inicio... + + + Post-startup script terminated + El script de post - inicio finalizó + + + Command line argument... + Argumento de la línea de comando... + + + Command line argument started + Argumento de la línea de comando iniciado + + + Client deactivated. + Cliente desactivado. + + + Transport rewind. + Rebobinar transporte. + + + Transport backward. + Retroceder transporte. + + + Starting + Iniciando + + + Transport start. + Iniciar transporte. + + + Stopping + Deteniendo + + + Transport stop. + Detener transporte. + + + Transport forward. + Avanzar transporte. + + + Stopped + Detenido + + + Yes + Si + + + No + No + + + RT + RT + + + Rolling + Rolling + + + Looping + Looping + + + XRUN callback (%1 skipped). + XRUN callback (%1 omitidos). + + + Started + Iniciado + + + Active + Activo + + + Activating + Activando + + + Inactive + Inactivo + + + &Hide + &Ocultar + + + Mi&nimize + Mi&nimizar + + + S&how + &Mostrar + + + Rest&ore + &Restablecer + + + &Stop + &Detener + + + &Reset + &Reset + + + &Connections + &Conexiones + + + Server settings will be only effective after +restarting the JACK audio server. + La configuración sólo se hará efectiva +reiniciando el servidor JACK. + + + D-BUS: SetParameterValue('%1', '%2'): + +%3. +(%4) + + + + D-BUS: ResetParameterValue('%1'): + +%2. +(%3) + + + + D-BUS: GetParameterValue('%1'): + +%2. +(%3) + + + + OK + OK + + + Information + Información + + + Some settings will be only effective +the next time you start this program. + Algunas configuraciones sólo se aplicarán +la próxima vez que inicie este programa. + + + Could not open ALSA sequencer as a client. + +ALSA MIDI patchbay will be not available. + No se puede abrir el secuenciador ALSA como cliente + +El patchbay MIDI de ALSA no estará disponible. + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" in the context menu of the system tray entry. + El programa seguirá corriendo en la bandeja del sistema. + +Para terminarlo, por favor seleccione "Salir" en el menú del ítem en la bandeja del sistema. + + + JACK is currently running. + +Do you want to terminate the JACK audio server? + JACK se está ejecutando actualmente. + +Desea terminar el servidor de audio JACK? + + + Could not start JACK. + +Maybe JACK audio server is already started. + No puede iniciarse JACK. + +Quizás el servidor de audio JACK ya haya sido iniciado. + + + Some client audio applications +are still active and connected. + +Do you want to stop the JACK audio server? + Algunas aplicaciones de audio +están activas y conectadas. + +Desea detener el servidor de audio JACK? + + + JACK was started with PID=%1. + JACK se inició con PID=%1. + + + JACK is being forced... + JACK está siendo forzado... + + + JACK connection graph change. + Cambió el gráfico de conexiones de JACK. + + + JACK has crashed. + JACK ha petado. + + + JACK timed out. + Tiempo de espera para JACK agotado. + + + JACK write error. + Error de escritura JACK. + + + JACK read error. + Error de lectura JACK. + + + Unknown JACK error (%d). + Error JACK desconocido (%d). + + + ALSA connection graph change. + Cambió el gráfico de conexiones ALSA. + + + JACK active patchbay scan + Escaneo del patchbay JACK activo + + + ALSA active patchbay scan + Escaneo del patchbay ALSA activo + + + JACK connection change. + Cambios en las conexiones JACK. + + + ALSA connection change. + Cambios en las conexiones ALSA. + + + A patchbay definition is currently active, +which is probable to redo this connection: + +%1 -> %2 + +Do you want to remove the patchbay connection? + Una definición de patchbay está activa actualmente, +y es probable rehacer esta conexion: + +%1 -> %2 + +Desea remover la conexion? + + + Remove + Remover + + + Ignore + Ignorar + + + Overall operation failed. + La operación global falló. + + + Invalid or unsupported option. + Opción inválida o no soportada. + + + Client name not unique. + El nombre de cliente no es único. + + + Server is started. + El servidor está iniciado. + + + Unable to connect to server. + No puede conectarse al servidor. + + + Server communication error. + Error de comunicación con el servidor. + + + Client does not exist. + El cliente no existe. + + + Unable to load internal client. + No puede cargarse el cliente interno. + + + Unable to initialize client. + No puede inicializarse el cliente. + + + Unable to access shared memory. + No puede accederse a la memoria compartida. + + + Client protocol version mismatch. + La versión del protocolo cliente no concuerda. + + + Could not connect to JACK server as client. +- %1 +Please check the messages window for more info. + No puede conectarse al servidor JACK como cliente. +- %1 +Por favor revise la ventana de mensajes para mas información. + + + %1 (%2%) + + + + %1 % + + + + %1 Hz + + + + %1 frames + %1 cuadros + + + %1 msec + + + + &Presets + &Presets + + + &Transport + &Transporte + + + &Rewind + Re&bobinar + + + &Play + &Reproducir + + + Pa&use + Pa&usa + + + QjackCtl + QjackCtl + + + &Patchbay + &Patchbay + + + DSP Load + Uso de CPU del DSP + + + XRUN Count (notifications) + Cuenta de XRUN (notificaciones) + + + &Backward + &Retroceder + + + &Forward + &Avanzar + + + Alt+A + + + + Alt+O + Alt+O + + + Shift+Space + + + + Space + + + + + qjackctlMessagesForm + + Messages - JACK Audio Connection Kit + Mensajes de JACK Audio Connection Kit + + + Logging stopped --- %1 --- + Registro detenido --- %1 --- + + + Logging started --- %1 --- + Registro iniciado --- %1 --- + + + Messages output log + Registro de mensajes + + + + qjackctlPatchbay + + Warning + Advertencia + + + Yes + Si + + + No + No + + + This will disconnect all sockets. + +Are you sure? + Esto desconectará todos los sockets. + +Está seguro? + + + + qjackctlPatchbayForm + + Patchbay - JACK Audio Connection Kit + Patchbay - JACK Audio Connection Kit + + + &New + &Nueva + + + Alt+N + Alt+N + + + Create a new patchbay profile + + + + &Load... + &Abrir... + + + Alt+L + Alt+A + + + Load patchbay profile + Cargar perfil de patchbay + + + &Save... + &Salvar... + + + Alt+S + Alt+S + + + Save current patchbay profile + Salvar el perfil actual del patchbay + + + Acti&vate + Acti&var + + + Alt+V + Alt+V + + + Toggle activation of current patchbay profile + Conmutar la activación del esquema actual + + + &Connect + &Conectar + + + Alt+C + Alt+C + + + Connect currently selected sockets + Conectar los puertos seleccionados + + + &Disconnect + &Desconectar + + + Alt+D + Alt+D + + + Disconnect currently selected sockets + Desconectar los puertos seleccionados + + + Disconnect &All + Desconectar &Todo + + + Alt+A + Alt+T + + + Disconnect all currently connected sockets + Desconectar los socket seleccionados + + + &Refresh + &Refrescar + + + Alt+R + Alt+R + + + Refresh current patchbay view + Refrescar la vista actual + + + Down + Bajar + + + Move currently selected output socket down one position + Mover el socket de salida seleccionado una posición hacia abajo + + + Add... + Añadir... + + + Create a new output socket + Crear un nuevo socket de salida + + + Edit... + Editar... + + + Edit currently selected input socket properties + Editar las propiedades del socket de entrada seleccionado + + + Up + Subir + + + Move currently selected output socket up one position + Mover el socket de salida seleccionado una posición hacia arriba + + + Remove + Remover + + + Remove currently selected output socket + Remover el socket de salida seleccionado + + + Copy... + Copiar... + + + Duplicate (copy) currently selected output socket + Duplicar (copiar) el socket de salida seleccionado + + + Remove currently selected input socket + Remover el socket de entrada seleccionado + + + Duplicate (copy) currently selected input socket + Duplicar (copiar) el socket de entrada seleccionado + + + Create a new input socket + Crear un nuevo socket de entrada + + + Edit currently selected output socket properties + Editar las propiedades del socket de salida seleccionado + + + Warning + Advertencia + + + Save + Salvar + + + Discard + Descartar cambios + + + Cancel + Cancelar + + + active + activa + + + New Patchbay definition + Nuevo esquema de patchbay + + + Yes + Si + + + No + No + + + Patchbay Definition files + Archivos de esquemas de patchbay + + + Load Patchbay Definition + Cargar esquema de patchbay + + + Save Patchbay Definition + Salvar esquema de patchbay + + + The patchbay definition has been changed: + +"%1" + +Do you want to save the changes? + La definición del patchbay ha cambiado: + +"%1" + +Desea guardar los cambios? + + + %1 [modified] + %1 [modificado] + + + Untitled%1 + SinNombre%1 + + + Error + Error + + + Could not load patchbay definition file: + +"%1" + No se puede cargar el archivo con el esquema del patchbay: + +"%1" + + + Could not save patchbay definition file: + +"%1" + No se puede guardar el archivo con el esquema del patchbay: "%1" + + + Create patchbay definition as a snapshot +of all actual client connections? + Crear un esquema del patchbay en base a +una instantánea de las conexiones actuales? + + + Current (recent) patchbay profile(s) + Perfil actual (reciente) de patchbay + + + + qjackctlPatchbayView + + Add... + Añadir... + + + Edit... + Editar... + + + Copy... + Copiar... + + + Remove + Remover + + + Exclusive + Exclusivo + + + Move Up + Subir + + + Move Down + Bajar + + + &Connect + &Conectar + + + Alt+C + Connect + Alt+C + + + &Disconnect + &Desconectar + + + Alt+D + Disconnect + Alt+D + + + Disconnect &All + Desconectar &Todo + + + Alt+A + Disconect All + Alt+T + + + &Refresh + &Refrescar + + + Alt+R + Refresh + Alt+R + + + Forward + Avanzar + + + (None) + (Ninguno) + + + + qjackctlSetupForm + + Setup - JACK Audio Connection Kit + Configuración - JACK Audio Connection Kit + + + Settings + Configuraciones + + + Preset &Name: + &Nombre del Preset: + + + (default) + + + + Settings preset name + Preset con las configuraciones + + + &Save + &Salvar + + + Alt+S + Alt+S + + + Save settings as current preset name + Salvar configuraciones en el preset actual + + + &Delete + &Eliminar + + + Alt+D + Alt+E + + + Delete current settings preset + Eliminar el preset con la configuración actual + + + Server + Servidor + + + Server &Path: + &Ruta del servidor: + + + jackstart + jackstart + + + jackd + jackd + + + jackd-realtime + jackd-realtime + + + The JACK Audio Connection Kit sound server path + Ruta hacia el servidor de audio JACK + + + Driv&er: + Dri&ver: + + + dummy + dummy + + + oss + oss + + + alsa + alsa + + + portaudio + portaudio + + + coreaudio + coreaudio + + + Parameters + Parámetros + + + Number of periods in the hardware buffer + Número de períodos en el buffer de hardware + + + Priorit&y: + &Prioridad: + + + &Frames/Period: + &Cuadros / Período: + + + 16 + 16 + + + 32 + 32 + + + 64 + 64 + + + 128 + 128 + + + 256 + 256 + + + 512 + 512 + + + 1024 + 1024 + + + 2048 + 2048 + + + 4096 + 4096 + + + Frames per period between process() calls + Cuadros por período entre llamadas a process() + + + Port Ma&ximum: + Má&ximos Puertos: + + + 21333 + 21333 + + + Number o microseconds to wait between engine processes (dummy) + Número de microsegundos a esperar entre procesos (dummy) + + + 22050 + 22050 + + + 32000 + 32000 + + + 44100 + 44100 + + + 48000 + 48000 + + + 88200 + 88200 + + + 96000 + 96000 + + + Sample rate in frames per second + Frecuencia de muestreo en cuadros por segundo + + + Scheduler priority when running realtime + Prioridad del scheduler cuando se ejecuta en tiempo real + + + &Word Length: + &Largo de palabra: + + + Periods/&Buffer: + Períodos / &Buffer: + + + Word length + Tamaño de palabra + + + Maximum number of ports the JACK server can manage + Máximo número de puertos que podrá manejar el servidor JACK + + + &Wait (usec): + &Retardo (microseg): + + + Sample &Rate: + &Frecuencia de muestreo: + + + &Timeout (msec): + Límite de &Tiempo (mseg): + + + 200 + 200 + + + 500 + 500 + + + 1000 + 1000 + + + 2000 + 2000 + + + 5000 + 5000 + + + 10000 + 10000 + + + Set client timeout limit in miliseconds + Establece el límite de tiempo de los clientes en milisegundos + + + &Realtime + Tiempo &Real + + + Alt+R + Alt+R + + + Use realtime scheduling + Usar prioridad(scheduling) de tiempo real + + + No Memory Loc&k + No b&loquear memoria + + + Alt+K + Alt+L + + + Do not attempt to lock memory, even if in realtime mode + No intentar bloquear memoria, incluso en modo de tiempo real + + + &Unlock Memory + &Desbloquear Memoria + + + Alt+U + Alt+D + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + No bloquear memoria de las librerías comunes (GTK+, QT, FLTK, Wine) + + + So&ft Mode + Modo &Tolerante + + + Alt+F + Alt+T + + + Ignore xruns reported by the backend driver + Ignorar las xruns reportadas por el driver de sonido. JACK tendrá menos tendencia a desconectar los puertos que no respondan. Útil cuando no se corre en tiempo real + + + &Monitor + &Monitorear + + + Alt+M + Alt+M + + + Provide output monitor ports + Proveer puertos para monitoreo de la salida + + + Force &16bit + Forzar &16bit + + + Alt+1 + Alt+1 + + + Force 16bit mode instead of failing over 32bit (default) + Forzar modo 16 bit en lugar de 32 bit (predeterminado) + + + H/W M&onitor + M&onitoreo por Hardware + + + Alt+O + Alt+O + + + Enable hardware monitoring of capture ports + Habilitar monitoreo por hardware de los puertos de captura + + + H/&W Meter + Monitoreo por H/&W + + + Alt+W + Alt+W + + + Enable hardware metering on cards that support it + Habilita monitoreo por hardware en las placas que lo soporten + + + &Ignore H/W + &Ignorar H/W + + + Alt+I + Alt+I + + + Ignore hardware period/buffer size + Ignorar el tamaño de bufer / período del hardware + + + &Output Device: + Dispositiv&o de salida: + + + &Output Channels: + Númer&o de canales de salida: + + + &Interface: + &Interfaz: + + + Maximum input audio hardware channels to allocate + Máximo número de canales de entrada por hardware a establecer + + + &Audio: + &Audio: + + + &Input Latency: + Latenc&ia de la entrada: + + + Dit&her: + &Suavizado: + + + External output latency (frames) + Latencia de la salida externa (cuadros) + + + &Input Device: + D&ispositivo de entrada: + + + Duplex + Duplex + + + Capture Only + Sólo Captura + + + Playback Only + Sólo Reproducción + + + Provide either audio capture, playback or both + Proveer de puertos de audio para captura, reproducción o ambos + + + hw:0 + + + + The PCM device name to use + Nombre del dispositivo PCM a usar + + + > + > + + + Select output device for playback + Seleccionar dispositivo de salida para reproducción + + + /dev/dsp + + + + Alternate input device for capture + Dispositivo de entrada alternativo para captura + + + &Output Latency: + Latencia de la sal&ida: + + + Maximum output audio hardware channels to allocate + Máximo número de canales de salida por hardware a establecer + + + Alternate output device for playback + Dispositivo de salida alternativo para reproducción + + + &Input Channels: + &Canales de entrada: + + + Select input device for capture + Seleccionar dispositivo de entrada para captura + + + Select PCM device name + Seleccionar dispositivo PCM + + + External input latency (frames) + Latencia de la entrada externa (cuadros) + + + None + Ninguno + + + Rectangular + Rectangular + + + Shaped + + + + Triangular + Triangular + + + Set dither mode + Establecer método de suavizado + + + Alt+V + Alt+V + + + Whether to give verbose output on messages + Mostrar información mas detallada en los mensajes + + + Start De&lay (secs): + Retardo Inicia&l (segs): + + + Time in seconds that client is delayed after server startup + Tiempo en segundos que el cliente es demorado luego de iniciar el servidor + + + Latency: + Latencia: + + + 0 + 0 + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + Latencia del sistema en milisegundos, calculada en base a la configuración de período, buffer y frecuencia de muestreo + + + Options + Opciones + + + Scripting + Scripting + + + Execute script on Start&up: + Script a ejecutar al iniciar el servi&dor: + + + Whether to execute a custom shell script before starting up the JACK audio server. + Ejecutar un script personalizado antes de iniciar el servidor JACK. + + + Execute script after &Startup: + &Script a ejecutar luego de iniciar: + + + Whether to execute a custom shell script after starting up the JACK audio server. + Ejecutar un script personalizado después de iniciar el servidor JACK. + + + Execute script on Shut&down: + Script a ejecutar antes de d&etener: + + + Whether to execute a custom shell script before shuting down the JACK audio server. + Ejecutar un script personalizado antes de detener el servidor JACK. + + + Command line to be executed before starting up the JACK audio server + Comando a ejecutar antes de iniciar el servidor JACK + + + Scripting argument meta-symbols + Variables especiales para pasar al script + + + ... + ... + + + Browse for script to be executed before starting up the JACK audio server + Buscar el script a ejecutar antes de iniciar el servidor de audio JACK + + + Command line to be executed after starting up the JACK audio server + Comando a ejecutar luego de iniciar el servidor JACK + + + Browse for script to be executed after starting up the JACK audio server + Buscar el script a ejecutar luego de iniciar el servidor de audio JACK + + + Browse for script to be executed before shutting down the JACK audio server + Buscar el script a ejecutar antes de terminar el servidor de audio JACK + + + Command line to be executed before shutting down the JACK audio server + Comando a ejecutar antes de detener el servidor JACK + + + Execute script after Shu&tdown: + Script a ejecutar luego de &Terminar: + + + Alt+T + Alt+T + + + Whether to execute a custom shell script after shuting down the JACK audio server. + Ejecutar un script personalizado después de terminar el servidor JACK. + + + Browse for script to be executed after shutting down the JACK audio server + Buscar el script a ejecutar luego de terminar el servidor de audio JACK + + + Command line to be executed after shutting down the JACK audio server + Comando a ejecutar luego de detener el servidor JACK + + + Statistics + Estadísticas + + + &Capture standard output + &Capturar salida estándar + + + Alt+C + Alt+C + + + Whether to capture standard output (stdout/stderr) into messages window + Capturar la salida estándar de JACK en la ventana de mensajes + + + &XRUN detection regex: + Expresión regular para detectar &XRUN: + + + xrun of at least ([0-9|\.]+) msecs + xrun of at least ([0-9|\.]+) msecs + + + Regular expression used to detect XRUNs on server output messages + Expresión regular usada para detectar XRUNs en los mensajes del servidor + + + &Ignore first XRUN occurrence on statistics + &Ignorar las primeras XRUN en las estadísticas + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + Ignorar las XRUN producidas durante el inicio del servidor (suele suceder en versiones anteriores a la 0.80.0 ) + + + Connections + Conexiones + + + 5 + 5 + + + 10 + 10 + + + 20 + 20 + + + 30 + 30 + + + 60 + 60 + + + 120 + 120 + + + Time in seconds between each auto-refresh cycle + Tiempo en segundos entre cada ciclo de auto - refresco + + + Patchbay definition file to be activated as connection persistence profile + Esquemas de patchbay a activar como un perfil persistente de las conexiones + + + Browse for a patchbay definition file to be activated + Buscar el esquema de patchbay para activar + + + &Auto refresh connections Patchbay, every (secs): + &Auto refrescar las conexiones del Patchbay, cada (segs): + + + Alt+A + Alt+A + + + Whether to refresh the connections patchbay automatically + Automáticamente refresca el patchbay de conexiones + + + Activate &Patchbay persistence: + Activar &Persistencia del patchbay: + + + Alt+P + Alt+P + + + Whether to activate a patchbay definition for connection persistence profile. + Utilizar un perfil para conservar el esquema del patchbay entre sesiones. + + + Display + Display + + + Time Display + Display de tiempo + + + Time F&ormat: + F&ormato de tiempo: + + + hh:mm:ss + hh:mm:ss + + + hh:mm:ss.d + hh:mm:ss.d + + + hh:mm:ss.dd + hh:mm:ss.dd + + + hh:mm:ss.ddd + hh:mm:ss.ddd + + + The general time format on display + El formato general para mostrar el tiempo + + + Transport &Time Code + Código de Tiempo del &Transporte + + + Transport &BBT (bar:beat.ticks) + &BBT del Transporte (bar:beat:ticks) + + + Alt+B + Alt+B + + + Elapsed time since last &Reset + Tiempo transcurrido desde el último &Reset + + + Elapsed time since last &XRUN + Tiempo transcurrido desde la última &XRUN + + + Alt+X + Alt+X + + + Sample front panel normal display font + Muestra de la fuente para el panel frontal + + + Sample big time display font + Muestra de la fuente para el display de tiempo grande + + + Big Time display: + Display de tiempo grande: + + + &Font... + Fuen&te... + + + Select font for front panel normal display + Seleccionar fuente para el panel normal + + + Select font for big time display + Seleccionar fuente para el display de tiempo grande + + + Normal display: + Display normal: + + + &Display shiny glass light effect + Usar &efecto de Resplandor Vítreo + + + Whether to enable a shiny glass light effect on the main display + Dibujar la ventana principal con un efecto símil cristal + + + Messages Window + Ventana de Mensajes + + + Sample messages text font display + Muestra de la fuente para la ventana de mensajes + + + Select font for the messages text display + Seleccionar fuente para el display de mensajes + + + &Messages limit: + Límite de &Mensajes: + + + Whether to keep a maximum number of lines in the messages window + Almacenar un número limitado de líneas en la ventana de mensajes + + + 100 + 100 + + + 250 + 250 + + + 2500 + 2500 + + + The maximum number of message lines to keep in view + Máximo número de líneas para mantener en la ventana de mensajes + + + Connections Window + Ventana de conexiones + + + Sample connections view font + Muestra de la fuente para la ventana de conexiones + + + Select font for the connections view + Seleccionar fuente para la ventana de conexiones + + + &Icon size: + Tamaño de &Icono: + + + 16 x 16 + 16 x 16 + + + 32 x 32 + 32 x 32 + + + 64 x 64 + 64 x 64 + + + The icon size for each item of the connections view + Tamaño de ícono para cada ítem en la vista de conexiones + + + Ena&ble client/port aliases editing (rename) + Ha&bilitar la edición de alias para los puertos / clientes (renombrarlos) + + + Whether to enable in-place client/port name editing (rename) + Permitir la edición in-situ de los nobres asignados a puertos o clientes + + + E&nable client/port aliases + Habilitar alias para los nombres de &puertos / clientes + + + Alt+N + Alt+P + + + Whether to enable client/port name aliases on the connections window + Permitir alias para los puertos / clientes en la ventana de conexiones + + + Draw connection and patchbay lines as Be&zier curves + Dibujar líneas en el Patchbay y ventana de conexiones como curvas Bé&zier + + + Alt+Z + Alt+Z + + + Whether to draw connection lines as cubic Bezier curves + Utilizar curvas cúbicas Bézier en lugar de rectas (más estilizado) + + + Misc + Otras + + + Other + Otro + + + &Start JACK audio server on application startup + Iniciar el &servidor JACK al cargar qjackctl + + + Whether to start JACK audio server immediately on application startup + Iniciar en forma automática JACK cuando se lanza qjackctl + + + &Confirm application close + Pedir &Confirmación al salir + + + Whether to ask for confirmation on application exit + Preguntar antes de salir de qjackctl + + + &Keep child windows always on top + &Las ventanas hijas siempre arriba + + + Whether to keep all child windows on top of the main window + Todas las ventanas creadas por qjackctl estarán sobre la ventana principal + + + &Enable system tray icon + Habilitar ícono en band&eja del sistema + + + Alt+E + Alt+E + + + Whether to enable the system tray icon + Permitir íconos en la bandeja del sistema + + + &Delay window positioning at startup + D&emorar la reubicación de las ventanas al iniciar + + + Whether to delay window positioning at application startup + Esperar antes de ubicar las ventanas en su última posición al iniciar la aplicación + + + S&ave JACK audio server configuration to: + S&alvar la configuración del servidor JACK en: + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + Guardar la línea de comando de JACK a un archivo (auto - inicio) + + + .jackdrc + .jackdrc + + + The server configuration local file name (auto-start) + El archivo con la configuración de JACK (auto - inicio) + + + C&onfigure as temporary server + C&onfigurar como servidor temporal + + + Whether to exit once all clients have closed (auto-start) + Salir una vez que todos los clientes hayan finalizado (auto - inicio) + + + Whether to ask for confirmation on JACK audio server shutdown + Preguntar antes de detener JACK + + + OK + OK + + + Cancel + Cancelar + + + Warning + Advertencia + + + Save + Salvar + + + Discard + Descartar cambios + + + msec + mseg + + + n/a + n/d + + + &Preset Name + Nombre del &Preset + + + &Server Path + Ruta hacia el &Servidor + + + &Driver + &Driver + + + &Interface + &Interfaz + + + Sample &Rate + &Frecuencia de muestreo + + + &Frames/Period + &Cuadros / Período + + + Periods/&Buffer + Períodos / &Buffer + + + Patchbay Definition files + Archivos de esquema de patchbay + + + Apply + Aplicar + + + Some settings have been changed: + +"%1" + +Do you want to save the changes? + Algunas configuraciones han cambiado: + +"%1" + +Desea guardarlas? + + + Delete preset: + +"%1" + +Are you sure? + Borrar preset: + +"%1" + +Está seguro? + + + Startup Script + Script de Inicio + + + Post-Startup Script + Script de Post-Inicio + + + Shutdown Script + Script de Apagado + + + Post-Shutdown Script + Script de Post-Acabado + + + Active Patchbay Definition + Definición Activa de Patchbay + + + Messages Log + Registro de Mensajes + + + Log files + Archivos de registros + + + Some settings have been changed. + +Do you want to apply the changes? + Algunas configuraciones han cambiado.Desea aplicar los cambios? + + + jackdmp + jackdmp + + + The audio backend driver interface to use + El driver de audio a utilizar + + + sun + + + + freebob + + + + firewire + + + + MIDI Driv&er: + Driv&er MIDI: + + + The ALSA MIDI backend driver to use + El driver MIDI de ALSA a utilizar + + + none + ninguno + + + raw + + + + seq + + + + &Verbose messages + Mensajes &Verbosos + + + plughw:0 + + + + /dev/audio + + + + &Channels: + &Canales: + + + 192000 + 192000 + + + Maximum number of audio channels to allocate + El máximo número de canales de audio a utilizar + + + Logging + Registro + + + Messages log file + Archivo de registro de mensajes + + + Browse for the messages log file location + Ir hasta la ubicación del archivo con el registro de mensajes + + + Whether to activate a messages logging to file. + Si guardar los mensajes a un archivo. + + + &Messages log file: + Archivo con los &Mensajes: + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + Si hablilitar el parpadeo del indicador de modo del servidor (RT) + + + Blin&k server mode indicator + &Parpadeo del indicador de modo del servidor + + + &JACK client/port aliases: + Alias de cliente/puerto para &JACK: + + + JACK client/port aliases display mode + Modo de visualización de los alias cliente/puerto de JACK + + + Default + Predeterminado + + + First + Primero + + + Second + Segundo + + + Whether to start minimized to system tray + Si iniciar minimizado en la bandeja del sistema + + + Start minimi&zed to system tray + Iniciar minimi&zado en la bandeja del sistema + + + Confirm server sh&utdown + Confirmar apa&gado del servidor + + + Whether to enable ALSA Sequencer (MIDI) support on startup + Si habilitar soporte para el Secuenciador ALSA (MIDI) al iniciar + + + E&nable ALSA Sequencer support + Habilitar Secue&nciador ALSA + + + Buttons + Botones + + + Whether to hide the left button group on the main window + Si esconder el grupo de botones a la izquierda de la ventana principal + + + Hide main window &Left buttons + Esconder botones de &la izquierda + + + Alt+L + + + + Whether to hide the right button group on the main window + Si esconder el grupo de botones a la derecha de la ventana principal + + + Hide main window &Right buttons + Esconder botones de la de&recha + + + Whether to hide the transport button group on the main window + Si esconder el grupo de botones del transporte en la ventana principal + + + Hide main window &Transport buttons + Esconder los botones del &Transporte + + + Whether to hide the text labels on the main window buttons + Si esconder las etiquetas en los botones de la ventana principal + + + Hide main window &button text labels + Esconder etiquetas en los &botones + + + Defaults + Predeterminados + + + &Base font size: + Tamaño &básico de tipografías: + + + Base application font size (pt.) + Tamaño básico de tipografías para la aplicación (pt.) + + + 6 + 6 + + + 7 + 7 + + + 8 + 8 + + + 9 + 9 + + + 11 + 11 + + + 12 + 12 + + + net + + + + Whether to enable D-Bus interface + Habilitar la interfaz por D-Bus + + + &Enable D-Bus interface + &Habilitar la interfaz via D-Bus + + + Number of microseconds to wait between engine processes (dummy) + Número de microsegundos a esperar entre procesamientos (dummy) + + + netone + + + + Whether to restrict to one single application instance (X11) + Restringir una sola instancia de la aplicación (X11) + + + Single application &instance + Una sola &instancia + + + + qjackctlSocketForm + + OK + OK + + + Cancel + Cancelar + + + &Socket + &Socket + + + &Name (alias): + &Nombre (alias): + + + Socket name (an alias for client name) + Nombre del socket (un alias para el nombre de cliente) + + + Client name (regular expression) + Nombre del cliente (expresión regular) + + + Add P&lug + Añadir p&Lug + + + Alt+L + Alt+L + + + Add plug to socket plug list + Añadir plug a la lista de sockets + + + &Plug: + &Plug: + + + Port name (regular expression) + Nombre del puerto (expresión regular) + + + Socket Plugs / Ports + Socket Plug / Puerto + + + Socket plug list + Lista de socket tipo plug + + + &Edit + &Editar + + + Alt+E + Alt+E + + + &Remove + &Remover + + + Alt+R + Alt+R + + + Remove currently selected plug from socket plug list + Remover el plug seleccionado de la lista + + + &Client: + &Cliente: + + + &Down + &Bajar + + + Alt+D + Alt+B + + + &Up + &Subir + + + Alt+U + Alt+S + + + E&xclusive + E&xclusivo + + + Alt+X + Alt+X + + + Enforce only one exclusive cable connection + Permitir una conexión únicamente + + + Type + Tipo + + + &Audio + A&udio + + + Alt+A + Alt+U + + + Audio socket type (JACK) + Socket tipo audio (JACK) + + + &MIDI + &MIDI + + + Alt+M + Alt+M + + + MIDI socket type (ALSA) + Socket tipo MIDI (ALSA) + + + Plugs / Ports + Plugs / Puertos + + + Error + Error + + + A socket named "%1" already exists. + Un socket llamado "%1" ya existe. + + + Add Plug + Añadir Plug + + + Remove + Remover + + + Edit + Editar + + + Move Up + Subir + + + Move Down + Bajar + + + Warning + Advertencia + + + Some settings have been changed. + +Do you want to apply the changes? + Algunas configuraciones han cambiado. + +Desea aplicar los cambios? + + + Apply + Aplicar + + + Discard + Descartar + + + (None) + (Ninguno) + + + Socket - JACK Audio Connection Kit + Sockets - JACK Audio Connection Kit + + + Edit currently selected plug + Editar el plug seleccionado + + + Move down currently selected plug in socket plug list + Mover hacia abajo en la lista el plug seleccionado + + + Move up current selected plug in socket plug list + Mover hacia arriba en la lista el plug seleccionado + + + &Forward: + &Avanzar: + + + Forward (clone) all connections from this socket + Reenviar (clonar) todas las conexiones desde este socket + + + MIDI socket type (JACK) + Tipo de socket MIDI (JACK) + + + AL&SA + AL&SA + + + Alt+S + + + + + qjackctlSocketList + + Output + Salida + + + Input + Entrada + + + Socket + Socket + + + Warning + Advertencia + + + Yes + Si + + + No + No + + + <New> - %1 + <Nuevo> - %1 + + + %1 about to be removed: + +"%2" + +Are you sure? + A punto de remover %1: + +"%2" + +Está seguro? + + + %1 <Copy> - %2 + %1 <Copia> - %2 + + + + qjackctlSocketListView + + Output Sockets / Plugs + Sockets de Salida / Plugs + + + Input Sockets / Plugs + Sockets de Entrada / Plugs + + + + qjackctlStatusForm + + Status - JACK Audio Connection Kit + Estado - JACK Audio Connection Kit + + + Description + Descripción + + + Value + Valor + + + Statistics since last server startup + Estadísticas desde el último inicio de JACK + + + Re&set + re&Iniciar + + + Alt+S + Alt+I + + + Reset XRUN statistic values + Reiniciar estadísticas de XRUN + + + &Refresh + &Refrescar + + + Alt+R + Alt+R + + + Refresh XRUN statistic values + Refrescar estadísticas de XRUN + + + Time of last reset + Tiempo desde el último reset + + + Maximum scheduling delay + Máximo retardo de programación(scheduling) + + + XRUN count since last server startup + XRUNs desde el último inicio + + + XRUN total + Total de XRUN + + + XRUN average + Promedio de XRUN + + + XRUN minimum + Mínimo de XRUN + + + XRUN maximum + Máximo de XRUN + + + XRUN last + Última XRUN + + + XRUN last time detected + Fecha de la última XRUN detectada + + + Transport state + Estado del transporte + + + Transport BPM + BPM del transporte + + + Transport BBT + BBT del Transporte + + + Transport Timecode + Código de tiempo del transporte + + + Realtime Mode + Modo Realtime + + + Buffer Size + Tamaño de Buffer + + + Sample Rate + Frecuencia de muestreo + + + Server state + Estado del Servidor + + + DSP Load + Uso de CPU del DSP + + + Server name + Nombre del servidor + + + diff -Nru qjackctl-0.3.4/translations/qjackctl_fr.ts qjackctl-0.3.6/translations/qjackctl_fr.ts --- qjackctl-0.3.4/translations/qjackctl_fr.ts 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/translations/qjackctl_fr.ts 2010-02-23 10:14:20.000000000 +0000 @@ -0,0 +1,4390 @@ + + + + + QObject + + + (default) + (par défaut) + + + Usage + Utilisation + + + options + options + + + command-and-args + commande-et-args + + + Options + Options + + + + Start JACK audio server immediately + Démarrer immédiatement le serveur audio JACK + + + Set default setings preset name + Régler le nom du préréglage des paramètres par défaut + + + + Show help about command line options + Montrer l'aide à propos des options en ligne de commande + + + + Show version information + Montrer les informations de version + + + + Option -p requires an argument (preset). + L'option -p nécessite un argument (préréglage). + + + + Usage: %1 [options] [command-and-args] + Utilisation : %1 [options] [commandes-et-args] + + + + Options: + Options : + + + + Set active patchbay definition file + Choisir le fichiers de définition de baie de brassage actif + + + + Set default JACK audio server name + + + + + Option -a requires an argument (path). + L'option -a requiert un argument (chemin). + + + + Option -n requires an argument (name). + + + + + Qt: %1 + + Qt : %1 + + + + + Set default settings preset name + Régler le nom du préréglage des paramètres par défaut + + + + qjackctlAboutForm + + + About QjackCtl + À propos de QjackCtl + + + + About Qt + À propos de Qt + + + + &Close + &Fermer + + + + Alt+C + Alt+F + + + + Version + Version + + + + Build + Compilation + + + + Debugging option enabled. + Option de débogage activée. + + + + System tray disabled. + Zone de notification système désactivée. + + + + Transport status control disabled. + Contrôle du statut du déplacement désactivé. + + + + Realtime status disabled. + Statut temps réel désactivé. + + + + XRUN delay status disabled. + Statut du délai de désynchronisation (XRUN) désactivé. + + + + Maximum delay status disabled. + Statut du délai maximal désactivé. + + + + ALSA/MIDI sequencer support disabled. + Prise en charge du séquenceur ALSA/MIDI désactivé. + + + + Website + Site web + + + + This program is free software; you can redistribute it and/or modify it + Ce programme est libre; vous pouvez le redistribuer et/ou le modifier + + + + under the terms of the GNU General Public License version 2 or later. + selon les termes de la Licence Publique Générale GNU version 2 ou ultérieure. + + + + JACK MIDI support disabled. + Prise en charge de JACK MIDI désactivé. + + + + JACK Port aliases support disabled. + Prise en charge des alias de port JACK désactivé. + + + + D-Bus interface support disabled. + Prise en charge de l'interface D-Bus désactivé. + + + + qjackctlClientListView + + Readable Clients + Clients en lecture + + + Output Ports + Ports de sortie + + + Writable Clients + Clients en ecriture + + + Input Ports + Ports d'entrée + + + + &Connect + &Connecter + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Déconnecter + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + &Tout déconnecter + + + + Alt+A + Disconect All + Alt+T + + + + Re&name + Re&nommer + + + + Alt+N + Rename + Alt+N + + + + &Refresh + &Rafraîchir + + + + Alt+R + Refresh + Alt+R + + + + Readable Clients / Output Ports + Clients en lecture / Ports de sortie + + + + Writable Clients / Input Ports + Clients en ecriture / Ports d'entrée + + + + qjackctlConnect + + + Warning + Attention + + + This will suspend sound processing + Cela va suspendre le traitement du son + + + from all client applications. + de toutes les applications clientes. + + + Are you sure? + Êtes-vous certain? + + + Yes + Oui + + + No + Non + + + + This will suspend sound processing +from all client applications. + +Are you sure? + Cela va suspendre le traitement du son +de toutes les applications clientes. + +Êtes-vous certain? + + + + qjackctlConnectionsForm + + + Connections - JACK Audio Connection Kit + Connexions - Kit de Connexion Audio JACK + + + + Audio + Audio + + + + + + &Connect + &Connecter + + + + + + Alt+C + Alt+C + + + + + + Connect currently selected ports + Connecter les ports actuellement sélectionnés + + + + + + &Disconnect + &Déconnecter + + + + + + Alt+D + Alt+D + + + + + + Disconnect currently selected ports + Déconnecter les ports actuellement sélectionnés + + + + + + Disconnect &All + &Tout déconnecter + + + + + + Alt+A + Alt+T + + + + + + Disconnect all currently connected ports + Déconnecter tous les ports actuellement connectés + + + + + + &Refresh + &Rafraîchir + + + + + + Alt+R + Alt+R + + + + + + Refresh current connections view + Rafraîchir la vue actuelle des connexions + + + + MIDI + MIDI + + + + Warning + Attention + + + The preset aliases have been changed: + Les alias de préréglage ont été changés: + + + Do you want to save the changes? + Voulez-vous enregistrer les changements? + + + Save + Enregistrer + + + Discard + Ignorer + + + Cancel + Annuler + + + + ALSA + ALSA + + + + The preset aliases have been changed: + +"%1" + +Do you want to save the changes? + Les alias de préréglage ont été changés : + +"%1" + +Voulez-vous enregistrer les changements? + + + + qjackctlConnectorView + + + &Connect + &Connecter + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Déconnecter + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + &Tout déconnecter + + + + Alt+A + Disconect All + Alt+T + + + + &Refresh + &Rafraîchir + + + + Alt+R + Refresh + Alt+R + + + + qjackctlMainForm + + + QjackCtl + QjackCtl + + + + Alt+Q + Alt+Q + + + + + &Quit + &Quitter + + + + Quit processing and exit + Quitter le traitement et sortir + + + + Alt+S + Alt+D + + + + + &Start + &Démarrer + + + + Start the JACK server + Démarrer le serveur JACK + + + + Alt+T + Alt+A + + + + S&top + &Arrêter + + + + Stop the JACK server + Arrêter le serveur JACK + + + + + St&atus + S&tatut + + + + Show/hide the extended status window + Montrer/cacher la fenêtre de statut étendu + + + + Alt+B + Alt+R + + + + + Ab&out... + À propo&s... + + + + Show information about this application + Montrer des informations à propos de cette application + + + + Alt+E + Alt+E + + + + + S&etup... + R&églages... + + + + Show settings and options dialog + Montrer la fenêtre d'options et de paramètres + + + + Alt+M + Alt+M + + + + + &Messages + &Messages + + + + Show/hide the messages log window + Montrer/cacher la fenêtre du journal des messages + + + + &Patchbay + &Brassage + + + + Show/hide the patchbay editor window + Montrer/cacher la fenêtre de l'éditeur de baie de brassage + + + + Alt+C + Alt+C + + + + &Connect + &Connecter + + + + Show/hide the actual connections patchbay window + Montrer/cacher la fenêtre des connexions actuelles de la baie de brassage + + + + JACK server state + État du serveur JACK + + + + JACK server mode + Mode du serveur JACK + + + CPU Load + Charge processeur + + + + Sample rate + Fréquence d'échantillonnage + + + XRUN Count + Décompte des désynchronisations (XRUN) + + + + Time display + Horloge + + + + Transport state + État du déplacement + + + + Transport BPM + BPM du déplacement + + + + Transport time + Horaire du déplacement + + + + &Backward + A&rrière + + + + Backward transport + Déplacer en arrière + + + + Alt+F + Alt+V + + + + &Forward + A&vant + + + + Forward transport + Déplacer en avant + + + + Alt+R + Alt+O + + + + + &Rewind + Remb&obiner + + + + Rewind transport + Rembobiner + + + Alt+U + Alt+P + + + + + Pa&use + Pa&use + + + + Stop transport rolling + Arrêter le déplacement + + + + Alt+P + Alt+L + + + + + &Play + &Lecture + + + + Start transport rolling + Démarrer le déplacement + + + Could not open ALSA sequencer as a client. + +MIDI patchbay will be not available. + Impossible d'ouvrir le sequenceur ALSA comme client. + +La baie de brassage MIDI ne sera pas disponible. + + + + + + + + Warning + Attention + + + JACK is currently running. + JACK fonctionne actuellement. + + + Do you want to terminate the JACK audio server? + Voulez-vous arrêter le serveur audio JACK? + + + Terminate + Arrêter + + + Leave + Laisser + + + Cancel + Annuler + + + + successfully + avec succès + + + + with exit status=%1 + avec statut de sortie=%1 + + + Could not start JACK. + Impossible de démarrer JACK. + + + Maybe JACK audio server is already started. + Peut-être que le serveur audio JACK est déjà démarré. + + + Stop + Arrêter + + + Kill + Tuer + + + + Could not load preset "%1". + +Retrying with default. + Impossible de charger le préréglage "%1". + +Nouvel essai avec celui par défaut. + + + + Could not load default preset. + +Sorry. + Impossible de charger le préréglage par défaut. + +Désolé. + + + + Startup script... + Script de démarrage... + + + + Startup script terminated + Script de démarrage terminé + + + + JACK is starting... + JACK démarre... + + + + Could not start JACK. + +Sorry. + Impossible de démarrer JACK. + +Désolé. + + + JACK was started with PID=%1 (0x%2). + JACK a été démarrer avec le PID=%1 (0x%2). + + + Some client audio applications + Certaines applications audio clientes + + + are still active and connected. + sont encore actives et connectées. + + + Do you want to stop the JACK audio server? + Voulez-vous arrêter le serveur audio JACK? + + + + JACK is stopping... + JACK s'arrête... + + + + Shutdown script... + Script d'extinction... + + + + Shutdown script terminated + Script d'extinction terminé + + + + + Post-shutdown script... + Script post-extinction... + + + + + Post-shutdown script terminated + Script post-extinction terminé + + + + JACK was stopped + JACK a été arrêté + + + + Error + Erreur + + + + Transport BBT (bar:beat.ticks) + MTB (mesure:temps.battement) du déplacement + + + + Transport time code + Code temporel (Timecode) du déplacement + + + + Elapsed time since last reset + Temps écoulé depuis la dernière réinitialisation + + + + Elapsed time since last XRUN + Temps écoulé depuis la dernière désynchronisation (XRUN) + + + + Could not load active patchbay definition. + +Disabled. + Impossible de charger la définition de baie de brassage active. + +Désactivé. + + + + Patchbay activated. + Baie de brassage activée. + + + + Patchbay deactivated. + Baie de brassage désactivée. + + + + Statistics reset. + Réinitialisation des statistiques. + + + + msec + ms + + + Audio connection graph change. + Changement du graphique des connexions audio. + + + + XRUN callback (%1). + Récupération désynchronisation (XRUN) (%1). + + + + Buffer size change (%1). + Changement de la taille du tampon (%1). + + + + Shutdown notification. + Notification d'extinction. + + + MIDI connection graph change. + Changement du graphique des connexions MIDI. + + + Audio active patchbay scan + Balayage de la baie de brassage audio active + + + MIDI active patchbay scan + Balayage de la baie de brassage MIDI active + + + Audio connection change. + Changement des connexions audio. + + + MIDI connection change. + Changement des connexions MIDI. + + + + checked + vérifié + + + + connected + connecté + + + + disconnected + déconnecté + + + + failed + échoué + + + Could not connect to JACK server as client. + +Please check the messages window for more info. + Impossible de connecter le serveur JACK comme client. + +Veuillez consulter la fenêtre des messages pour plus d'informations. + + + + Server configuration saved to "%1". + Configuration du serveur enregistrée dans "%1". + + + + Client activated. + Client activé. + + + + Post-startup script... + Script post-démarrage... + + + + Post-startup script terminated + Script post-démarrage terminé + + + + Command line argument... + Argument de ligne de commande... + + + + Command line argument started + Argument de ligne de commande démarré + + + + Client deactivated. + Client désactivé. + + + + Transport rewind. + Déplacement en rembobinage. + + + + Transport backward. + Déplacement en marche arrière. + + + + + + Starting + Démarre + + + + Transport start. + Déplacement démarré. + + + + + Stopping + S'arrête + + + + Transport stop. + Déplacement arrêté. + + + + Transport forward. + Déplacement en marche avant. + + + + + Stopped + Arrêté + + + Hz + Hz + + + frames + échantillons + + + + Yes + Oui + + + + No + Non + + + + RT + TR + + + + Rolling + Défile + + + + Looping + Boucle + + + + XRUN callback (%1 skipped). + Récupération de désynchronisation (XRUN) (%1 sauté). + + + + Started + Démarré + + + + Active + Actif + + + + Activating + Activation + + + + Inactive + Inactif + + + + &Hide + Cac&her + + + + Mi&nimize + Mi&nimiser + + + + S&how + M&ontrer + + + + Rest&ore + R&estaurer + + + + &Stop + &Arrêter + + + + &Reset + Ré&initialiser + + + + &Presets + &Préréglages + + + + &Connections + &Connexions + + + + Patch&bay + &Brassage + + + + &Transport + Déplacemen&t + + + + Server settings will be only effective after +restarting the JACK audio server. + Les paramètres du serveur ne seront effectifs +qu'après avoir redémarré le serveur audio JACK. + + + OK + OK + + + + + Information + Information + + + + Some settings will be only effective +the next time you start this program. + Certain paramètres ne seront effectifs +qu'au prochain démarrage de ce programme. + + + + DSP Load + Charge DSP + + + + XRUN Count (notifications) + Décompte des désynchronisations (notification XRUN) + + + + JACK connection graph change. + Changement du graphique des connexions JACK. + + + + ALSA connection graph change. + Changement du graphique des connexions ALSA. + + + + JACK connection change. + Changement des connexions JACK. + + + + ALSA connection change. + Changement des connexions ALSA. + + + + JACK is currently running. + +Do you want to terminate the JACK audio server? + JACK fonctionne actuellement. + +Voulez-vous arrêter le serveur audio JACK? + + + + D-BUS: Service is available (%1 aka jackdbus). + + + + + D-BUS: Service not available (%1 aka jackdbus). + + + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" +in the context menu of the system tray icon. + + + + + Could not start JACK. + +Maybe JACK audio server is already started. + Impossible de démarrer JACK. + +Peut-être que le serveur audio JACK est déjà démarré. + + + + D-BUS: JACK server is starting... + + + + + D-BUS: JACK server could not be started. + +Sorry + + + + + Some client audio applications +are still active and connected. + +Do you want to stop the JACK audio server? + Certaines applications audio clientes +sont encore actives et connectées. + +Voulez-vous arrêter le serveur audio JACK? + + + + D-BUS: JACK server is stopping... + + + + + D-BUS: JACK server could not be stopped. + +Sorry + + + + + JACK was started with PID=%1. + JACK a été démarrer avec le PID=%1. + + + + D-BUS: JACK server was started (%1 aka jackdbus). + + + + + JACK is being forced... + JACK est forcé... + + + + D-BUS: JACK server was stopped (%1 aka jackdbus). + + + + + JACK has crashed. + JACK a planté. + + + + JACK timed out. + JACK n'a pas répondu à temps. + + + + JACK write error. + Erreur d'écriture JACK. + + + + JACK read error. + Erreur de lecture JACK. + + + + Unknown JACK error (%d). + Erreur JACK inconnue (%d). + + + + Overall operation failed. + L'opération a échoué. + + + + Invalid or unsupported option. + Option invalide ou non prise en charge. + + + + Client name not unique. + Nom de client non unique. + + + + Server is started. + Le serveur est démarré. + + + + Unable to connect to server. + Incapable de se connecter au serveur. + + + + Server communication error. + Erreur de communication serveur. + + + + Client does not exist. + Le client n'existe pas. + + + + Unable to load internal client. + Incapable de charger le client interne. + + + + Unable to initialize client. + Incapable d'initialiser le client. + + + + Unable to access shared memory. + Incapable d'accéder à la mémoire partagée. + + + + Client protocol version mismatch. + Mauvaise version du protocole client. + + + + Could not connect to JACK server as client. +- %1 +Please check the messages window for more info. + Impossible de connecter le serveur JACK comme client. +- %1 +Veuillez consulter la fenêtre des messages pour plus d'informations. + + + + %1 (%2%) + %1 (%2%) + + + + %1 % + %1 % + + + + %1 Hz + %1 Hz + + + + %1 frames + %1 échantillons + + + + %1 msec + %1 ms + + + + D-BUS: SetParameterValue('%1', '%2'): + +%3. +(%4) + + + + + D-BUS: ResetParameterValue('%1'): + +%2. +(%3) + + + + + D-BUS: GetParameterValue('%1'): + +%2. +(%3) + + + + + Could not open ALSA sequencer as a client. + +ALSA MIDI patchbay will be not available. + Impossible d'ouvrir le sequenceur ALSA comme client. + +La baie de brassage ALSA MIDI ne sera pas disponible. + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" in the context menu of the system tray entry. + Le programme continuera de s'exécuter dans la zone de notification système. + +Pour terminer le programme, merci de choisir "Quitter" dans le menu contextuel de la zone de notification système. + + + + JACK active patchbay scan + Balayage de la baie de brassage JACK active + + + + ALSA active patchbay scan + Balayage de la baie de brassage ALSA active + + + + A patchbay definition is currently active, +which is probable to redo this connection: + +%1 -> %2 + +Do you want to remove the patchbay connection? + Une définition de baie de brassage est actuellement active, +il est probable que cela refasse cette connexion : + +%1 -> %2 + +Voulez-vous enlever la connexion de la baie de brassage? + + + Remove + Enlever + + + + Alt+A + Alt+T + + + + Alt+O + Alt+S + + + + Shift+Space + Shift+Espace + + + + Space + Espace + + + + qjackctlMessagesForm + + + Messages - JACK Audio Connection Kit + Messages - Kit de Connexion Audio JACK + + + Messages log + Messages + + + + Messages output log + Journal des messages de sortie + + + + Logging stopped --- %1 --- + Journalisation arrêtée --- %1 --- + + + + Logging started --- %1 --- + Journalisation démarrée --- %1 --- + + + + qjackctlPatchbay + + + Warning + Attention + + + This will disconnect all sockets. + Cela va déconnecter toutes les prises. + + + Are you sure? + Êtes vous certain? + + + Yes + Oui + + + No + Non + + + + This will disconnect all sockets. + +Are you sure? + Cela va déconnecter toutes les prises. + +Êtes vous certain? + + + + qjackctlPatchbayForm + + + Patchbay - JACK Audio Connection Kit + Baie de brassage - Kit de Connexion Audio JACK + + + + &New + &Nouveau + + + + Alt+N + Alt+N + + + + Create a new patchbay profile + Créer un nouveau profil de baie de brassage + + + + &Load... + &Charger... + + + + Alt+L + Alt+C + + + + Load patchbay profile + Charger un profil de baie de brassage + + + + &Save... + &Enregistrer... + + + + Alt+S + Alt+E + + + + Save current patchbay profile + Enregistrer le profil actuel de la baie de brassage + + + + Current (recent) patchbay profile(s) + Profil(s) actuel(s) (récent(s)) de la baie de brassage + + + + Acti&vate + Acti&ver + + + + Alt+V + Alt+V + + + + Toggle activation of current patchbay profile + Basculer l'activation du profil actuel de baie de brassage + + + + &Connect + &Connecter + + + + Alt+C + Alt+C + + + + Connect currently selected sockets + Connecter les prises actuellement sélectionnés + + + + &Disconnect + &Déconnecter + + + + Alt+D + Alt+D + + + + Disconnect currently selected sockets + Déconnecter les prises actuellement sélectionnés + + + + Disconnect &All + &Tout déconnecter + + + + Alt+A + Alt+T + + + + Disconnect all currently connected sockets + Déconnecter les prises actuellement connectées + + + + &Refresh + &Rafraîchir + + + + Alt+R + Alt+R + + + + Refresh current patchbay view + Rafraîchir la vue actuelle de la baie de brassage + + + + + Down + Vers le Bas + + + + + Move currently selected output socket down one position + Déplacer d'une position vers le bas la prise de sortie actuellement sélectionnée + + + + + Add... + Ajouter... + + + + Create a new output socket + Créer une nouvelle prise de sortie + + + + + Edit... + Editer... + + + + Edit currently selected input socket properties + Editer les propriétés de la prise d'entrée actuellement sélectionnée + + + + + Up + Vers le haut + + + + + Move currently selected output socket up one position + Déplacer d'une position vers le haut la prise de sortie actuellement sélectionnée + + + + + Remove + Enlever + + + + Remove currently selected output socket + Enlever la prise de sortie actuellement sélectionnée + + + + + Copy... + Copier... + + + + Duplicate (copy) currently selected output socket + Dupliquer (copier) la prise de sortie actuellement sélectionnée + + + + Remove currently selected input socket + Enlever la prise d'entrée actuellement sélectionnée + + + + Duplicate (copy) currently selected input socket + Dupliquer (copier) la prise d'entrée actuellement sélectionnée + + + + Create a new input socket + Créer une nouvelle prise d'entrée + + + + Edit currently selected output socket properties + Editer les propriétés de la prise de sortie actuellement sélectionnée + + + + Warning + Attention + + + The patchbay definition has been changed: + La définition de baie de brassage a été changée: + + + Do you want to save the changes? + Voulez-vous enregistrer les changements? + + + Save + Enregistrer + + + Discard + Ignorer + + + Cancel + Annuler + + + modified + modifié + + + Untitled + Sans titre + + + + + Error + Erreur + + + Could not load patchbay definition file: + Impossible de charger le fichier de définition de baie de brassage: + + + Could not save patchbay definition file: + Impossible d'enregistrer le fichier de définition de baie de brassage: + + + + New Patchbay definition + Nouvelle définition de baie de brassage + + + Create patchbay definition as a snapshot + Prendre un cliché de toutes les connexions clientes actuelles + + + of all actual client connections? + pour créer une définition de baie de brassage? + + + Yes + Oui + + + No + Non + + + + + Patchbay Definition files + Fichiers de définition de baie de brassage + + + + Load Patchbay Definition + Charger une définition de baie de brassage + + + + Save Patchbay Definition + Enregistrer la définition de baie de brassage + + + + active + actif + + + + The patchbay definition has been changed: + +"%1" + +Do you want to save the changes? + La définition de baie de brassage a été changée : + +"%1" + +Voulez-vous enregistrer les changements? + + + + %1 [modified] + %1 [modifié] + + + + Untitled%1 + SansTitre%1 + + + + Could not load patchbay definition file: + +"%1" + Impossible de charger le fichier de définition de baie de brassage : + +"%1" + + + + Could not save patchbay definition file: + +"%1" + Impossible d'enregistrer le fichier de définition de baie de brassage : + +"%1" + + + + Create patchbay definition as a snapshot +of all actual client connections? + Prendre un cliché de toutes les connexions clientes actuelles +pour créer une définition de baie de brassage? + + + + qjackctlPatchbayView + + + Add... + Ajouter... + + + + Edit... + Editer... + + + + Copy... + Copier... + + + + Remove + Enlever + + + + Exclusive + Exclusif + + + + (None) + (Aucun) + + + + Forward + Renvoi + + + + Move Up + Vers le haut + + + + Move Down + Vers le bas + + + + &Connect + &Connecter + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Déconnecter + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + &Tout déconnecter + + + + Alt+A + Disconect All + Alt+T + + + + &Refresh + &Rafraîchir + + + + Alt+R + Refresh + Alt+R + + + + qjackctlSetupForm + + + Setup - JACK Audio Connection Kit + Réglages - Kit de Connexion Audio JACK + + + + Settings + Paramètres + + + + Preset &Name: + &Nom du préréglage : + + + + + + + + + + + + + + (default) + (par défaut) + + + + Settings preset name + Nom du préréglage des paramètres + + + + &Save + &Enregistrer + + + + + + Alt+S + Alt+E + + + + Save settings as current preset name + Enregistrer les paramètres sous le nom du préréglage actuel + + + + &Delete + E&ffacer + + + + + + + Alt+D + Alt+F + + + + Delete current settings preset + Effacer le préréglage des paramètres actuel + + + + Server + Serveur + + + + Server &Path: + &Chemin du serveur : + + + + jackstart + jackstart + + + + jackd + jackd + + + jackd-realtime + jackd-realtime + + + + The JACK Audio Connection Kit sound server path + Chemin du serveur de son du Kit de Connexion Audio JACK + + + + Driv&er: + Pilot&e : + + + + dummy + factice + + + + oss + oss + + + + alsa + alsa + + + + portaudio + portaudio + + + + coreaudio + coreaudio + + + + freebob + freebob + + + The software driver to use + Pilote logiciel à utiliser + + + + Parameters + Paramètres + + + + Number of periods in the hardware buffer + Nombre de périodes dans le tampon matériel + + + + Priorit&y: + Pri&orité : + + + + &Frames/Period: + &Échantillons/Période : + + + + + 16 + 16 + + + + + 32 + 32 + + + + + 64 + 64 + + + + + 128 + 128 + + + + + 256 + 256 + + + + + 512 + 512 + + + + + 1024 + 1024 + + + + 2048 + 2048 + + + + 4096 + 4096 + + + + Frames per period between process() calls + Échantillons par période entre appels de process() + + + + Port Ma&ximum: + Nombre de port ma&ximal : + + + &Channel: + &Canal: + + + + 21333 + 21333 + + + Number o microseconds to wait between engine processes (dummy) + Nombre de microsecondes à attendre entre les traitements du moteur (factice) + + + + 22050 + 22050 + + + + 32000 + 32000 + + + + 44100 + 44100 + + + + 48000 + 48000 + + + + 88200 + 88200 + + + + 96000 + 96000 + + + + 192000 + 192000 + + + + Sample rate in frames per second + Fréquence d'échantillonage en échantillons par seconde + + + + Scheduler priority when running realtime + Priorité de l'ordonnanceur quand fonctionne en temps réel + + + + &Word Length: + &Résolution (bit) : + + + + Periods/&Buffer: + Périodes/&Tampon : + + + + Word length + Résolution + + + + Maximum number of ports the JACK server can manage + Nombre maximal de ports que peut gérer le serveur JACK + + + + &Wait (usec): + &Attente (en µs) : + + + + Sample &Rate: + &Fréquence d'échantillonnage (Hz) : + + + PCM channel + Canal PCM + + + + &Timeout (msec): + &Décompte (en ms) : + + + + 200 + 200 + + + + + 500 + 500 + + + + + 1000 + 1000 + + + + 2000 + 2000 + + + + + 5000 + 5000 + + + + 10000 + 10000 + + + + Set client timeout limit in miliseconds + Régler le limite du décompte client en millisecondes + + + + &Realtime + Temps &réel + + + + + + Alt+R + Alt+R + + + + Use realtime scheduling + Utiliser ordonnancement temps réel + + + + No Memory Loc&k + P&as de verrouillage mémoire + + + + + + Alt+K + Alt+A + + + + Do not attempt to lock memory, even if in realtime mode + Ne pas essayer de verrouiller la mémoire même en mode temps-réel + + + + &Unlock Memory + &Déverrouiller la mémoire + + + + + + Alt+U + Alt+D + + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + Déverrouiller la mémoire des librairies d'interface communes (GTK+, QT, FLTK, Wine) + + + + So&ft Mode + Mode &logiciel + + + + + + + + Alt+F + Alt+L + + + + Ignore xruns reported by the backend driver + Ignorer les désynchronisations (XRUN) rapportées par le pilote principal + + + + &Monitor + &Écoute de contrôle + + + + + + Alt+M + Alt+E + + + + Provide output monitor ports + Fournir des ports de sortie d'écoute de contrôle + + + + Force &16bit + Forcer &16bit + + + + Alt+1 + Alt+1 + + + + Force 16bit mode instead of failing over 32bit (default) + Forcer mode 16bit au lieu d'échouer sur 32bit (par défaut) + + + + H/W M&onitor + Éc&oute de contrôle matérielle + + + + + Alt+O + Alt+O + + + + Enable hardware monitoring of capture ports + Activer l'écoute de contrôle matérielle des ports de capture + + + + H/&W Meter + Mes&ure matérielle + + + + Alt+W + Alt+U + + + + Enable hardware metering on cards that support it + Activer la mesure matérielle sur les cartes qui le reconnaissent + + + + &Ignore H/W + &Ignorer matériel + + + + + + Alt+I + Alt+I + + + + Ignore hardware period/buffer size + Ignore la taille des période/tampon matériels + + + + &Output Device: + Périphérique de s&ortie : + + + + &Output Channels: + Canaux de s&ortie : + + + + &Interface: + &Interface : + + + + Maximum input audio hardware channels to allocate + Nombre maximal de canaux d'entrée audio matériels à allouer + + + + &Audio: + &Audio : + + + + &Input Latency: + Laten&ce d'entrée : + + + + Dit&her: + Bruit de dispertion (dit&her) : + + + + External output latency (frames) + Latence de sortie externe (en échantillons) + + + + &Input Device: + Pér&iphérique d'entrée : + + + + Duplex + Duplex + + + + Capture Only + Capture seulement + + + + Playback Only + Reproduction seulement + + + + Provide either audio capture, playback or both + Fournir la capture audio, la reproduction audio ou les deux + + + default + par défaut + + + + + + hw:0 + hw:0 + + + hw:1 + hw:1 + + + + The PCM device name to use + Nom du périphérique PCM à utiliser + + + + + + + + + + > + > + + + + Select output device for playback + Sélectionner le périphérique de sortie pour la reproduction + + + + + + /dev/dsp + /dev/dsp + + + + Alternate input device for capture + Périphérique d'entrée alternatif pour la capture + + + + &Output Latency: + Laten&ce de sortie : + + + + Maximum output audio hardware channels to allocate + Nombre maximal de canaux de sortie audio matériels à allouer + + + + Alternate output device for playback + Périphérique de sortie alternatif pour la reproduction + + + + &Input Channels: + Canaux d'E&ntrée : + + + + Select input device for capture + Sélectionner le périphérique d'entrée pour la capture + + + + Select PCM device name + Sélectionner le nom du périphérique PCM + + + + External input latency (frames) + Latence d'entrée externe (en échantillons) + + + + None + Aucun + + + + Rectangular + Rectangulaire + + + + Shaped + Sinusoïdal + + + + Triangular + Triangulaire + + + + Set dither mode + Régler le mode du bruit de dispersion (dither) + + + &Verbose messages output + Sortie de messages ba&varde + + + + Alt+V + Alt+V + + + + Whether to give verbose output on messages + Donner une sortie bavarde sur les messages + + + + Start De&lay (secs): + &Retard du démarrage (en s) : + + + + Time in seconds that client is delayed after server startup + Temps en secondes dont le client est retardé après le démarrage du serveur + + + + Latency: + Latence : + + + + 0 + 0 + + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + Latence de sortie en millisecondes calculée à partir des réglages de la période, de la fréquence d'échantillonnage et du tampon + + + + Options + Options + + + + Scripting + Scripts + + + + Execute script on Start&up: + Exéc&uter un script au démarrage : + + + + Whether to execute a custom shell script before starting up the JACK audio server. + Exécuter un script de commande personnalisé avant de démarrer le serveur audio JACK. + + + + Execute script after &Startup: + Exécuter un &script après le démarrage : + + + + Whether to execute a custom shell script after starting up the JACK audio server. + Exécuter un script de commande personnalisé après avoir démarré le serveur audio JACK. + + + + Execute script on Shut&down: + Exécuter un script à l'extinctio&n : + + + + Whether to execute a custom shell script before shuting down the JACK audio server. + Exécuter un script de commande personnalisé avant d'éteindre le serveur audio JACK. + + + + Command line to be executed before starting up the JACK audio server + Ligne de commande à exécuter avant de démarrer le serveur audio JACK + + + + + + + Scripting argument meta-symbols + Méta-symboles des arguments de script + + + + + + + + + ... + ... + + + + Browse for script to be executed before starting up the JACK audio server + Pointer sur le script à éxécuter avant de démarrer le serveur audio JACK + + + + Command line to be executed after starting up the JACK audio server + Ligne de commande à exécuter après avoir démarré le serveur audio JACK + + + + Browse for script to be executed after starting up the JACK audio server + Pointer sur le script à éxécuter après avoir démarré le serveur audio JACK + + + + Browse for script to be executed before shutting down the JACK audio server + Pointer sur le script à éxécuter avant d'éteindre le serveur audio JACK + + + + Command line to be executed before shutting down the JACK audio server + Ligne de commande à exécuter avant d'éteindre le serveur audio JACK + + + + Execute script after Shu&tdown: + Exécuter un script après l'ex&tinction : + + + + + + Alt+T + Alt+T + + + + Whether to execute a custom shell script after shuting down the JACK audio server. + Exécuter un script de commande personnalisé après avoir éteint le serveur audio JACK. + + + + Browse for script to be executed after shutting down the JACK audio server + Pointer sur le script à éxécuter après avoir éteint le serveur audio JACK + + + + Command line to be executed after shutting down the JACK audio server + Ligne de commande à exécuter après avoir éteint le serveur audio JACK + + + + Statistics + Statistiques + + + + &Capture standard output + &Capturer la sortie standard + + + + + Alt+C + Alt+C + + + + Whether to capture standard output (stdout/stderr) into messages window + Capturer la sortie standard (stdout/stderr) dans la fenêtre de messages + + + + &XRUN detection regex: + Regex de détection des désynchronisations (&XRUN) : + + + + xrun of at least ([0-9|\.]+) msecs + désynchronisation (XRUN) d'au moins ([0-9|\.]+) ms + + + + Regular expression used to detect XRUNs on server output messages + Expression régulière utilisée pour détecter les désynchronisations (XRUN) dans les messages de sortie du serveur + + + + &Ignore first XRUN occurrence on statistics + &Ignorer la première occurence de désynchronisation (XRUN) dans les statistiques + + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + Ignorer la première désynchronisation (XRUN) au démarrage du serveur (susceptible de se produire sur les serveurs pre-0.80.0) + + + + Connections + Connexions + + + + 5 + 5 + + + + + 10 + 10 + + + + 20 + 20 + + + + 30 + 30 + + + + 60 + 60 + + + + 120 + 120 + + + + Time in seconds between each auto-refresh cycle + Temps en secondes entre chaque cycle de rafraîchissement automatique + + + + Patchbay definition file to be activated as connection persistence profile + Fichier de définition de baie de brassage à activer comme profil de persistance de connexion + + + + Browse for a patchbay definition file to be activated + Pointer sur un fichier de définition de baie de brassage à activer + + + + &Auto refresh connections Patchbay, every (secs): + Rafraîchir &automatiquement les connexions de la baie de brassage toute les (en s) : + + + + + Alt+A + Alt+A + + + + Whether to refresh the connections patchbay automatically + Rafraîchir automatiquement les connexions de la baie de brassage + + + + Activate &Patchbay persistence: + Activer la &persistance de baie de brassage : + + + + Alt+P + Alt+L + + + + Whether to activate a patchbay definition for connection persistence profile. + Activer une définition de baie de brassage pour le profil de persistance de connexion. + + + + Display + Affichage + + + + Time Display + Horloge + + + + Time F&ormat: + F&ormat du temps : + + + + hh:mm:ss + hh:mm:ss + + + + hh:mm:ss.d + hh:mm:ss.d + + + + hh:mm:ss.dd + hh:mm:ss.dd + + + + hh:mm:ss.ddd + hh:mm:ss.ddd + + + + The general time format on display + Format général du temps affiché + + + + Transport &Time Code + Code &temporel (Timecode) du déplacement + + + + Transport &BBT (bar:beat.ticks) + MT&B (mesure:temps.battement) du déplacement + + + + + + + Alt+B + Alt+D + + + + Elapsed time since last &Reset + Temps écoulé depuis la dernière &réinitialisation + + + + Elapsed time since last &XRUN + Temps écoulé depuis la dernière désynchronisation (&XRUN) + + + + Alt+X + Alt+X + + + + Sample front panel normal display font + Aperçu de l'affichage normal + + + + Sample big time display font + Aperçu de la grande horloge + + + + Big Time display: + Grande horloge : + + + + + + + &Font... + &Police... + + + + Select font for front panel normal display + Sélectionner la police pour l'affichage normal + + + + Select font for big time display + Sélectionner la police pour la grande horloge + + + + Normal display: + Affichage normal : + + + + &Display shiny glass light effect + &Afficher un effet de vitre éclairée brillante + + + + Whether to enable a shiny glass light effect on the main display + Activer un effet de vitre éclairée brillante sur l'affichage principal + + + + Messages Window + Fenêtre de messages + + + + Sample messages text font display + Aperçu de la police du texte des messages + + + + Select font for the messages text display + Sélectionner la police pour le texte des messages + + + + &Messages limit: + Limite des &messages : + + + + Whether to keep a maximum number of lines in the messages window + Garder un nombre maximal de lignes dans la fenêtre de messages + + + + 100 + 100 + + + + 250 + 250 + + + + 2500 + 2500 + + + + The maximum number of message lines to keep in view + Nombre maximal de ligne de messages à garder dans la vue + + + + Connections Window + Fenêtre de connexions + + + + Sample connections view font + Aperçu de la police de la vue des connexions + + + + Select font for the connections view + Sélectionner la police pour la vue des connexions + + + + &Icon size: + Taille des &icônes : + + + + 16 x 16 + 16 x 16 + + + + 32 x 32 + 32 x 32 + + + + 64 x 64 + 64 x 64 + + + + The icon size for each item of the connections view + Taille de l'icône pour chaque élément de la vue des connexions + + + + Ena&ble client/port aliases editing (rename) + Activer l'é&dition (renommage) des aliases de client/port + + + + Whether to enable in-place client/port name editing (rename) + Activer l'édition (renommage) en place des aliases de client/port + + + + E&nable client/port aliases + Activer les aliases de client/p&ort + + + + + Alt+N + Alt+O + + + + Whether to enable client/port name aliases on the connections window + Activer les aliases de client/port dans la fenêtre de connexions + + + + Draw connection and patchbay lines as Be&zier curves + Dessiner les lignes de connexion et de baie de brassage en courbes de Be&zier + + + + + Alt+Z + Alt+Z + + + + Whether to draw connection lines as cubic Bezier curves + Dessiner les lignes de connexion et de baie de brassage en courbes de Bezier cubiques + + + + Misc + Divers + + + + Other + Autres + + + + &Start JACK audio server on application startup + &Démarrer le serveur audio JACK au démarrage de l'application + + + + Whether to start JACK audio server immediately on application startup + Démarrer le serveur audio JACK immédiatement au démarrage de l'application + + + + &Confirm application close + &Confirmer la fermeture de l'application + + + + Whether to ask for confirmation on application exit + Demander une confimation lors de la sortie de l'application + + + + &Keep child windows always on top + &Garder les fenêtres filles au premier plan + + + + Whether to keep all child windows on top of the main window + Garder les fenêtres filles au dessus de la fenêtre principale + + + + &Enable system tray icon + Activ&er l'icône de notification système + + + + Alt+E + Alt+E + + + + Whether to enable the system tray icon + Activer l'icône de notification système + + + + &Delay window positioning at startup + &Retarder le positionnement de la fenêtre au démarrage + + + + Whether to delay window positioning at application startup + Retarder le positionnement de la fenêtre au démarrage de l'application + + + + S&ave JACK audio server configuration to: + &Enregistrer la configuration du serveur audio JACK dans : + + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + Enregistrer la configuration en ligne de commande du serveur JACK dans un fichier local (démarrage automatique) + + + + .jackdrc + .jackdrc + + + + The server configuration local file name (auto-start) + Nom du fichier local de configuration du serveur (démarrage automatique) + + + + C&onfigure as temporary server + C&onfigurer comme serveur temporaire + + + + Whether to exit once all clients have closed (auto-start) + Sortir dès que tous les clients ont fermé (démarrage automatique) + + + + Confirm server sh&utdown + Confirmer l'e&xtinction du serveur + + + + Whether to ask for confirmation on JACK audio server shutdown + Demander un confirmation à l'extinction du serveur audio JACK + + + + Buttons + Boutons + + + + Hide main window &Left buttons + Cacher les boutons de &gauche de la fenêtre principale + + + + Alt+L + Alt+G + + + + Whether to hide the left button group on the main window + Cacher le groupe de bouton de gauche sur la fenêtre principale + + + + Hide main window &Right buttons + Cacher les boutons de &droite de la fenêtre principale + + + + Whether to hide the right button group on the main window + Cacher le groupe de bouton de droite sur la fenêtre principale + + + + Hide main window &Transport buttons + Cacher les boutons de &déplacement de la fenêtre principale + + + + Whether to hide the transport button group on the main window + Cacher le groupe de bouton de déplacement sur la fenêtre principale + + + + Hide main window &button text labels + Cacher le texte des &boutons de la fenêtre principale + + + + Whether to hide the text labels on the main window buttons + Cacher le texte des boutons sur la fenêtre principale + + + + OK + OK + + + + Cancel + Annuler + + + + + + Warning + Attention + + + Some settings have been changed: + Des paramètres ont été changés: + + + Do you want to save the changes? + Voulez-vous enregistrer les changements? + + + Save + Enregistrer + + + Discard + Ignorer + + + Delete preset: + Effacer préréglage: + + + Are you sure? + Êtes vous certain? + + + + msec + ms + + + + n/a + n/a + + + + &Preset Name + &Nom du préréglage + + + + &Server Path + &Chemin du serveur + + + + &Driver + Pilot&e + + + + &Interface + &Interface + + + + Sample &Rate + &Fréquence d'échantillonnage + + + + &Frames/Period + &Échantillons/Période + + + + Periods/&Buffer + Périodes/&Tampon + + + + Startup Script + Script de démarrage + + + + Post-Startup Script + Script post-démarrage + + + + Shutdown Script + Script d'extinction + + + + Post-Shutdown Script + Script post-extinction + + + + Patchbay Definition files + Fichiers de définition de baie de brassage + + + + Active Patchbay Definition + Définition de baie de brassage à activer + + + Some settings have been changed. + Des paramètres ont été modifiés. + + + Do you want to apply the changes? + Voulez-vous appliquer les changements? + + + Apply + Appliquer + + + + The audio backend driver interface to use + Le pilote d'interface audio à utiliser + + + + &Verbose messages + Messages ba&vards + + + + MIDI Driv&er: + Pilot&e MIDI : + + + + none + aucun + + + + raw + brut + + + + seq + seq + + + + The ALSA MIDI backend driver to use + Le pilote ALSA MIDI à utiliser + + + + jackdmp + jackdmp + + + + firewire + firewire + + + + + + plughw:0 + plughw:0 + + + + Some settings have been changed: + +"%1" + +Do you want to save the changes? + Des paramètres ont été modifiés : + +"%1" + +Voulez-vous enregistrer les changements? + + + + Delete preset: + +"%1" + +Are you sure? + Effecer préréglage : + +"%1" + +Êtes vous certain? + + + + Some settings have been changed. + +Do you want to apply the changes? + Des paramètres ont été modifiés. + +Voulez-vous appliquer les changements? + + + + Messages Log + Journal des messages + + + + Log files + Fichiers du journal + + + + sun + sun + + + + netone + + + + + + + /dev/audio + /dev/audio + + + + &Channels: + &Canaux : + + + + Maximum number of audio channels to allocate + Nombre maximal de canaux audio à allouer + + + + Logging + Journalisation + + + + Messages log file + Fichier de journal des messages + + + + Browse for the messages log file location + Pointer sur l'emplacement du fichier de journal des messages + + + + Whether to activate a messages logging to file. + Activer la journalisation des messages dans un fichier. + + + + &Messages log file: + Fichier de journal des &messages : + + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + Activer le clignotement de l'indicateur de mode serveur (TR) + + + + Blin&k server mode indicator + &Clignotement de l'indicateur de mode serveur + + + + &JACK client/port aliases: + Alias de client/port &JACK : + + + + JACK client/port aliases display mode + Mode d'affichage des alias de client/port JACK + + + + Default + Par défaut + + + + First + Premier + + + + Second + Deuxième + + + + Whether to start minimized to system tray + Démarrer minimisé dans la zone de notification système + + + + Start minimi&zed to system tray + Démarrer minimisé dans la &zone de notification système + + + + Whether to restrict to one single application instance (X11) + + + + + Single application &instance + + + + + Whether to enable ALSA Sequencer (MIDI) support on startup + Activer la prise en charge du séquenceur ALSA (MIDI) au démarrage + + + + E&nable ALSA Sequencer support + Activer la prise e&n charge du séquenceur ALSA + + + + Defaults + Par défaut + + + + &Base font size: + Taille de police de &base : + + + + Base application font size (pt.) + Taille de base de police de l'application (pt.) + + + + 6 + 6 + + + + 7 + 7 + + + + 8 + 8 + + + + 9 + 9 + + + + 11 + 11 + + + + 12 + 12 + + + + net + net + + + + Whether to enable D-Bus interface + Activer l'interface D-Bus + + + + &Enable D-Bus interface + Activ&er l'interface D-Bus + + + + Number of microseconds to wait between engine processes (dummy) + Nombre de microsecondes à attendre entre les traitements du moteur (factice) + + + + qjackctlSocketForm + + + Socket - JACK Audio Connection Kit + Prise - Kit de Connexion Audio JACK + + + + OK + OK + + + + Cancel + Annuler + + + + &Socket + &Prise + + + + &Name (alias): + &Nom (alias) : + + + + Socket name (an alias for client name) + Nom de la prise (un alias pour le nom du client) + + + + Client name (regular expression) + Nom du client (expression régulière) + + + + Add P&lug + Ajouter une &fiche + + + + Alt+L + Alt+F + + + + Add plug to socket plug list + Ajouter la fiche à la liste des prises + + + + &Plug: + &Fiche : + + + + Port name (regular expression) + Nom du port (expression régulière) + + + + Socket Plugs / Ports + Prises / Ports + + + + Socket plug list + Liste des prises + + + + &Edit + &Éditer + + + + Alt+E + Alt+E + + + Edit currently selected plug/port + Éditer la fiche/le port actuellement sélectionné + + + + &Remove + Enleve&r + + + + Alt+R + Alt+R + + + + Remove currently selected plug from socket plug list + Enlever la fiche actuellement sélectionnée de la liste des prises + + + + &Client: + &Client : + + + + &Down + Vers le &bas + + + + Alt+D + Alt+B + + + Move down currently selected plug socket plugst + Déplacer vers le bas la fiche actuellement sélectionnée dans la liste des prises + + + + &Up + Vers le &haut + + + + Alt+U + Alt+H + + + Move up current selected plug socket plugst + Déplacer vers le haut la fiche actuellement sélectionnée dans la liste des prises + + + + E&xclusive + E&xclusif + + + + Alt+X + Alt+X + + + + Enforce only one exclusive cable connection + S'assurer de l'utilisation d'une seule connexion cablée exclusive + + + + &Forward: + Renvo&i : + + + + Forward (clone) all connections from this socket + Renvoyer (cloner) toutes les connexions depuis cette prise + + + + Type + Type + + + + &Audio + &Audio + + + + Alt+A + Alt+A + + + + Audio socket type (JACK) + Type de prise audio (JACK) + + + + &MIDI + &MIDI + + + + Alt+M + Alt+M + + + + MIDI socket type (ALSA) + Type de prise MIDI (ALSA) + + + + Plugs / Ports + Fiches / Ports + + + + Add Plug + Ajouter une Fiche + + + + Remove + Enlever + + + + Edit + Éditer + + + + Error + Erreur + + + + A socket named "%1" already exists. + + + + + Move Up + Vers le haut + + + + Move Down + Vers le bas + + + + (None) + (Aucun) + + + + Edit currently selected plug + Éditer la fiche actuellement sélectionnée + + + + Move down currently selected plug in socket plug list + Déplacer vers le bas la fiche actuellement sélectionnée dans la liste des prises + + + + Move up current selected plug in socket plug list + Déplacer vers le haut la fiche actuellement sélectionnée dans la liste des prises + + + + Warning + Attention + + + + Some settings have been changed. + +Do you want to apply the changes? + Des paramètres ont été modifiés.Voulez-vous appliquer les changements? + + + Apply + Appliquer + + + Discard + Ignorer + + + + MIDI socket type (JACK) + Type de prise midi (JACK) + + + + AL&SA + AL&SA + + + + Alt+S + Alt+S + + + + qjackctlSocketList + + + Output + Sortie + + + + Input + Entrée + + + + Socket + Prise + + + New + Nouvelle + + + + Warning + Attention + + + about to be removed + sur le point d'être enlevée + + + Are you sure? + Êtes-vous certain? + + + Yes + Oui + + + No + Non + + + Copy + Copie + + + + <New> - %1 + <Nouvelle> - %1 + + + + %1 about to be removed: + +"%2" + +Are you sure? + %1 sur le point d'être enlevée : + +"%2" +Êtes-vous certain? + + + + %1 <Copy> - %2 + %1 <Copie> - %2 + + + + qjackctlSocketListView + + Output Sockets + Prises de Sortie + + + Plugs + Fiches + + + Input Sockets + Prises d'Entrée + + + + Output Sockets / Plugs + Prises de Sortie / Fiches + + + + Input Sockets / Plugs + Prises d'Entrée / Fiches + + + + qjackctlStatusForm + + + Status - JACK Audio Connection Kit + Statut - Kit de Connexion Audio JACK + + + + Description + Description + + + + Value + Valeur + + + + Statistics since last server startup + Statistiques depuis le dernier démarrage du serveur + + + + Re&set + Réinitiali&ser + + + + Alt+S + Alt+S + + + + Reset XRUN statistic values + Réinitialiser les valeurs statistiques des désynchronisations (XRUN) + + + + &Refresh + &Rafraîchir + + + + Alt+R + Alt+R + + + + Refresh XRUN statistic values + Rafraîchir les valeurs statistiques des désynchronisations (XRUN) + + + + Time of last reset + Temps depuis la dernière réinitialisation + + + + Maximum scheduling delay + Délai d'ordonnancement maximal + + + + Server name + + + + + XRUN count since last server startup + Décompte des désynchronisations (XRUN) depuis le dernier démarrage du serveur + + + + XRUN total + Nombre total de désynchronisation (XRUN) + + + + XRUN average + Moyenne de désynchronisation (XRUN) + + + + XRUN minimum + Nombre minimal de désynchronisation (XRUN) + + + + XRUN maximum + Nombre maximal de désynchronisation (XRUN) + + + + XRUN last + Dernière désynchronisation (XRUN) + + + + XRUN last time detected + Horaire de la dernière désynchronisation (XRUN) détectée + + + + Transport state + État du déplacement + + + + Transport BPM + BPM du déplacement + + + + Transport BBT + MTB du déplacement + + + + Transport Timecode + Code temporel (Timecode) du déplacement + + + + Realtime Mode + Mode temps réel + + + + Buffer Size + Taille du tampon + + + + Sample Rate + Fréquence d'échantillonnage + + + CPU Load + Charge processeur + + + + Server state + État du serveur + + + + DSP Load + Charge DSP + + + diff -Nru qjackctl-0.3.4/translations/qjackctl_ru.ts qjackctl-0.3.6/translations/qjackctl_ru.ts --- qjackctl-0.3.4/translations/qjackctl_ru.ts 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/translations/qjackctl_ru.ts 2010-02-20 15:49:09.000000000 +0000 @@ -0,0 +1,4098 @@ + + + + + QObject + + + Show help about command line options + Показать справку по использованию параметров командной строки + + + + Start JACK audio server immediately + Немедленно запустить сервер JACK + + + + Show version information + Показать информацию о версии + + + + Option -p requires an argument (preset). + Ключ -p требует аргумента (пресет). + + + + (default) + (как обычно) + + + + Usage: %1 [options] [command-and-args] + Использование: %1 [ключи] [команда-и-аргументы] + + + + Options: + Параметры: + + + + Set default settings preset name + Указать название профиля с параметрами по умолчанию + + + + Set active patchbay definition file + Указать файл описания активного коммутатора + + + + Option -a requires an argument (path). + Ключу -a необходим аргумент (расположение) + + + + Qt: %1 + + Qt: %1 + + + + + Set default JACK audio server name + + + + + Option -n requires an argument (name). + + + + + qjackctlAboutForm + + + About Qt + О Qt + + + + &Close + &Закрыть + + + + Alt+C + Alt+C + + + + Version + Версия + + + + Build + Сборка + + + + Transport status control disabled. + Статус управления транспортом отключён. + + + + Realtime status disabled. + Статус режима реального времени отключён. + + + + Website + Домашняя страница + + + + This program is free software; you can redistribute it and/or modify it + Это программа является свободной; вы можете распространять +и/или изменять её без ограничений + + + + under the terms of the GNU General Public License version 2 or later. + на условиях лицензии GNU General Public License версии 2 или более новой. + + + + Debugging option enabled. + Параметр отладки включен. + + + + System tray disabled. + Область уведомления отключена. + + + + XRUN delay status disabled. + Статус задержки XRUN отключен. + + + + Maximum delay status disabled. + Статус максимальной задержки отключен. + + + + JACK MIDI support disabled. + Поддержка JACK MIDI отключена. + + + + ALSA/MIDI sequencer support disabled. + Поддержка секвенсера ALSA/MIDI отключена. + + + + About QjackCtl + о QJackCtl + + + + JACK Port aliases support disabled. + Поддержка алиасов портов JACK отключена. + + + + D-Bus interface support disabled. + Поддержка интерфейса D-Bus отключена. + + + + qjackctlClientListView + + + Readable Clients / Output Ports + Порты выхода + + + + Writable Clients / Input Ports + Порты входа + + + + &Connect + &Соединить + + + + Alt+C + Connect + Alt+с + + + + &Disconnect + &Рассоединить + + + + Alt+D + Disconnect + Alt+р + + + + Disconnect &All + Рассоединить &все + + + + Alt+A + Disconect All + Alt+в + + + + Re&name + Пере&именовать + + + + Alt+N + Rename + Alt+и + + + + &Refresh + &Обновить + + + + Alt+R + Refresh + Alt+о + + + + qjackctlConnect + + + Warning + Предупреждение + + + Yes + Да + + + No + Нет + + + + This will suspend sound processing +from all client applications. + +Are you sure? + Обработка звука от клиентских +приложений будет прекращена. + +Вы уверены? + + + + qjackctlConnectionsForm + + + Connections - JACK Audio Connection Kit + Соединения + + + + + + &Connect + &Соединить + + + + + + Alt+C + Alt+C + + + + + + Connect currently selected ports + Соединить выбранные сейчас порты + + + + + + &Disconnect + &Рассоединить + + + + + + Alt+D + Alt+D + + + + + + Disconnect currently selected ports + Рассоединить выбранные сейчас порты + + + + + + Disconnect &All + Рассоединить &все + + + + + + Alt+A + Alt+A + + + + + + Disconnect all currently connected ports + Рассоединить все соединённые сейчас порты + + + + + + &Refresh + &Обновить + + + + + + Alt+R + Alt+R + + + + + + Refresh current connections view + Обновить отображение текущих соединений + + + + Audio + Звук + + + + MIDI + MIDI + + + + Warning + Предупреждение + + + + The preset aliases have been changed: + +"%1" + +Do you want to save the changes? + Алиасы профилей изменились: + +"%1" + +Вы хотите сохранить изменения? + + + Save + Сохранить + + + Discard + Отказаться + + + Cancel + Отменить + + + + ALSA + ALSA + + + + qjackctlConnectorView + + + &Connect + &Соединить + + + + Alt+C + Connect + Alt+с + + + + &Disconnect + &Рассоединить + + + + Alt+D + Disconnect + Alt+р + + + + Disconnect &All + Рассоединить &все + + + + Alt+A + Disconect All + Alt+в + + + + &Refresh + &Обновить + + + + Alt+R + Refresh + Alt+о + + + + qjackctlMainForm + + + + &Start + &Запустить + + + + Start the JACK server + Запустить сервер JACK + + + + S&top + С&топ + + + + Stop the JACK server + Остановить сервер JACK + + + + + &Quit + В&ыход + + + + Quit processing and exit + Остановить сервер и выйти из программы + + + Stop + Остановка + + + Kill + Уничтожить + + + Cancel + Отменить + + + + JACK is starting... + JACK запускается ... + + + + JACK is stopping... + JACK останавливается ... + + + + msec + мс + + + + Error + Ошибка + + + + JACK server state + Состояние сервера JACK + + + + Sample rate + Частота сэмплирования + + + + Time display + Время + + + + Transport state + Состояние транспорта + + + + Transport BPM + BPM транспорта + + + + Transport time + Время транспорта + + + + Alt+Q + Alt+Q + + + + Alt+S + Alt+S + + + + Alt+T + Alt+T + + + + + &Play + &Воспроизвести + + + + Alt+P + Alt+P + + + + Start transport rolling + Запустить воспроизведение через транспорт + + + + + Pa&use + Пау&за + + + Alt+U + Alt+U + + + + Stop transport rolling + Остановить воспроизведение с транспорта + + + + + St&atus + С&татус + + + + Show/hide the extended status window + Показать/скрыть расширенное окно статуса + + + + + Ab&out... + О про&грамме... + + + + Show information about this application + Показать информацию о приложении + + + + + S&etup... + &Параметры + + + + Alt+E + Alt+E + + + + Show settings and options dialog + Показать диалог настройки программы + + + + + &Messages + С&ообщения + + + + Show/hide the messages log window + Показать/скрыть окно с журналом сообщений + + + + Patch&bay + &Коммутатор + + + + Alt+B + Alt+B + + + + Show/hide the patchbay editor window + Показать/скрыть окно коммутатора + + + + &Connections + Сое&динения + + + + Alt+C + Alt+C + + + + Show/hide the actual connections patchbay window + Показать/спрятать окно коммутатора с актуальными соединениями + + + OK + ОК + + + + successfully + успешно + + + + Activating + Активируется + + + + + + Starting + Запуск + + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" +in the context menu of the system tray icon. + + + + + Startup script... + Сценарий, выполняемый при запуске... + + + + Startup script terminated + Выполнение стартового сценария прекращено + + + + Started + Запущен + + + + + Stopping + Остановка + + + + JACK was stopped + Cервер JACK остановлен + + + + Shutdown script... + Послеостановочный сценарий... + + + + Shutdown script terminated + Выполнение послеостановочного сценария прекращено + + + + Inactive + Не активен + + + + Active + Активен + + + + + Stopped + Стоп + + + + Transport BBT (bar:beat.ticks) + BBT транспорта (такт:доля.тики) + + + + Statistics reset. + Перезапуск статистики + + + + Shutdown notification. + Уведомление об остановке + + + + checked + проверено + + + + connected + соединено + + + + failed + не удалось + + + + Client activated. + Клиент активирован + + + + Post-startup script... + Послестартовый сценарий... + + + + Post-startup script terminated + Выполнение послестартового сценария прекращено + + + + Client deactivated. + Клиент деактивирован + + + + Transport start. + Транспорт запущен + + + + Transport stop. + Транспорт остановлен + + + + Yes + Да + + + + No + Нет + + + + Rolling + Играет + + + + Looping + Петля + + + + Transport time code + Тайм-код транспорта + + + + Elapsed time since last reset + Времени с последней перезагрузки + + + + Elapsed time since last XRUN + Времени с последнего XRUN + + + + disconnected + рассоединено + + + Terminate + Завершить + + + + Command line argument... + Аргумент для командной строки... + + + + Command line argument started + + + + + + Information + Информация + + + + Some settings will be only effective +the next time you start this program. + Некоторые изменения вступят в силу +только при следующем запуске программы. + + + + JACK server mode + Режим сервера JACK + + + + Server settings will be only effective after +restarting the JACK audio server. + Параметры работы сервера JACK вступят в силу +только при следующем запуске сервера. + + + + RT + + + + + &Hide + С&крыть + + + + S&how + &Показать + + + + &Stop + &Стоп + + + + Could not open ALSA sequencer as a client. + +ALSA MIDI patchbay will be not available. + + + + + D-BUS: Service is available (%1 aka jackdbus). + + + + + D-BUS: Service not available (%1 aka jackdbus). + + + + The program will keep running in the system tray. + +To terminate the program, please choose "Quit" in the context menu of the system tray entry. + Программа будет скрыта в область уведомления. + +Для завершения работы с программой в контекстном меню значка программы в области уведомления выберите пункт «Выход». + + + + + + + + Warning + Предупреждение + + + + JACK is currently running. + +Do you want to terminate the JACK audio server? + Сервер JACK работает. + +Вы хотите остановить его? + + + + with exit status=%1 + со статусом выхода %1 + + + + Could not start JACK. + +Maybe JACK audio server is already started. + Не удалось запустить JACK. + +Возможно, звуковой сервер уже запущен. + + + + Could not load preset "%1". + +Retrying with default. + + + + + Could not load default preset. + +Sorry. + Не удалось запустить профиль по умолчанию. + +Извините. + + + + D-BUS: JACK server is starting... + + + + + D-BUS: JACK server could not be started. + +Sorry + + + + + Some client audio applications +are still active and connected. + +Do you want to stop the JACK audio server? + Некоторые клиентские звуковые приложения +всё ещё активны и подсоединены. + +Вы хотите остановить звуковой сервер JACK? + + + + D-BUS: JACK server is stopping... + + + + + D-BUS: JACK server could not be stopped. + +Sorry + + + + + + Post-shutdown script... + + + + + + Post-shutdown script terminated + + + + + JACK was started with PID=%1. + JACK был запущен с PID=%1. + + + + D-BUS: JACK server was started (%1 aka jackdbus). + + + + + JACK is being forced... + + + + + D-BUS: JACK server was stopped (%1 aka jackdbus). + + + + + Could not load active patchbay definition. + +Disabled. + + + + + Patchbay activated. + Коммутатор активирован. + + + + Patchbay deactivated. + Коммутатор деактивирован. + + + + JACK connection graph change. + Смена графа соединений JACK. + + + + XRUN callback (%1). + + + + + Buffer size change (%1). + Смена размера буфера (%1). + + + + Could not start JACK. + +Sorry. + Не удалось запустить JACK. + +Извините. + + + + JACK has crashed. + + + + + JACK timed out. + + + + + JACK write error. + Ошибка записи JACK. + + + + JACK read error. + Ошибка чтения JACK. + + + + Unknown JACK error (%d). + Неизвестная ошибка JACK (%d). + + + + ALSA connection graph change. + Смена графа соединений ALSA. + + + + JACK active patchbay scan + Сканирование активного коммутатора JACK. + + + + ALSA active patchbay scan + Сканирование активного коммутатора ALSA. + + + + JACK connection change. + Смена соединений JACK. + + + + ALSA connection change. + Смена соединений ALSA. + + + + A patchbay definition is currently active, +which is probable to redo this connection: + +%1 -> %2 + +Do you want to remove the patchbay connection? + + + + + D-BUS: SetParameterValue('%1', '%2'): + +%3. +(%4) + + + + + D-BUS: ResetParameterValue('%1'): + +%2. +(%3) + + + + + D-BUS: GetParameterValue('%1'): + +%2. +(%3) + + + + Remove + Удалить + + + + Overall operation failed. + Выполнение операции в целом неудачно. + + + + Invalid or unsupported option. + Некорректный или неподдерживаемый параметр + + + + Client name not unique. + Имя клиента не уникально. + + + + Server is started. + Сервер запущен. + + + + Unable to connect to server. + Не удалось соединиться с сервером. + + + + Server communication error. + Ошибка коммуникации с сервером. + + + + Client does not exist. + Клиент не существует. + + + + Unable to load internal client. + Не удалось загрузить внутренний клиент. + + + + Unable to initialize client. + Не удалось инициализировать клиент. + + + + Unable to access shared memory. + Не удалось получить доступ к разделяемой памяти. + + + + Client protocol version mismatch. + Несовпадение версии клиентского протокола + + + + Could not connect to JACK server as client. +- %1 +Please check the messages window for more info. + Не удалось соединиться с сервером JACK. +- %1 +Просмотрите вывод в окне сообщений. + + + + Server configuration saved to "%1". + Конфигурация сервера сохранена в "%1". + + + + Transport rewind. + Перемотка к началу + + + + Transport backward. + Перемотка назад + + + + Transport forward. + Перемотка вперёд + + + + %1 (%2%) + %1 (%2%) + + + + %1 % + %1% + + + + %1 Hz + %1Гц + + + + %1 frames + %1 выборок + + + + %1 msec + %1 мс + + + + XRUN callback (%1 skipped). + + + + + Mi&nimize + &Свернуть + + + + Rest&ore + &Восстановить + + + + &Reset + С&бросить + + + + &Presets + &Профили + + + + &Transport + &Транспорт + + + + + &Rewind + К &началу + + + + QjackCtl + QjackCtl + + + + Alt+M + Alt+M + + + + &Patchbay + &Коммутатор + + + + &Connect + &Соединения + + + + DSP Load + Загрузка DSP + + + + XRUN Count (notifications) + Число XRUN (уведомлений) + + + + Backward transport + Перемотать назад + + + + &Backward + Н&азад + + + + Forward transport + Перемотать вперёд + + + + &Forward + &Вперёд + + + + Alt+F + Alt+в + + + + Rewind transport + Перемотать к началу + + + + Alt+R + Alt+а + + + + Alt+A + + + + + Alt+O + Alt+к + + + + Shift+Space + + + + + Space + + + + + qjackctlMessagesForm + + + Messages - JACK Audio Connection Kit + Сообщения + + + + Logging stopped --- %1 --- + Журналирование остановлено --- %1 --- + + + + Logging started --- %1 --- + Журналирование запущено --- %1 --- + + + + Messages output log + Журнал выведенных сообщений + + + + qjackctlPatchbay + + + Warning + Предупреждение + + + Yes + Да + + + No + Нет + + + + This will disconnect all sockets. + +Are you sure? + Все сокеты будут рассоединены. + +Продолжить? + + + + qjackctlPatchbayForm + + + Patchbay - JACK Audio Connection Kit + Коммутатор + + + + &New + &Создать + + + + Alt+N + Alt+N + + + + Create a new patchbay profile + Создать новый профиль коммутатора + + + + &Load... + &Загрузить... + + + + Alt+L + Alt+L + + + + Load patchbay profile + Загрузить профиль коммутатора + + + + &Save... + &Сохранить... + + + + Alt+S + Alt+S + + + + Save current patchbay profile + Сохранить текущий профиль коммутатора + + + + Acti&vate + &Активировать + + + + Alt+V + Alt+V + + + + &Connect + &Соединить + + + + Alt+C + Alt+C + + + + Connect currently selected sockets + Соединить выбранные сейчас сокеты + + + + &Disconnect + &Рассоединить + + + + Alt+D + Alt+D + + + + Disconnect currently selected sockets + Рассоединить выбранные сейчас сокеты + + + + Disconnect &All + Рассоединить &все + + + + Alt+A + Alt+A + + + + Disconnect all currently connected sockets + Рассоединить все соединённые сейчас сокеты + + + + &Refresh + &Обновить + + + + Alt+R + Alt+R + + + + Refresh current patchbay view + Обновить текущий вид коммутатора + + + + + Down + Вниз + + + + + Move currently selected output socket down one position + Переместить выбранный сейчас сокет вниз на одну позицию + + + + + Add... + Добавить... + + + + Create a new output socket + Создать новый сокет выхода + + + + + Edit... + Изменить... + + + + Edit currently selected input socket properties + Изменить свойства выбранного сейчас сокета входа + + + + + Up + Вверх + + + + + Move currently selected output socket up one position + Переместить выбранный сейчас сокет вверх на одну позицию + + + + + Remove + Удалить + + + + Remove currently selected output socket + Удалить выбранный сейчас сокет выхода + + + + Remove currently selected input socket + Удалить выбранный сейчас сокет входа + + + + Create a new input socket + Создать новый сокет входа + + + + Edit currently selected output socket properties + Изменить свойства выбранного сейчас сокета выхода + + + + Warning + Предупреждение + + + Save + Сохранить + + + Discard + Отказаться + + + Cancel + Отменить + + + + active + активно + + + + New Patchbay definition + Новое описание коммутатора + + + Yes + Да + + + No + Нет + + + + + Patchbay Definition files + Файл описания коммутатора + + + + Load Patchbay Definition + Загрузить описание коммутатора + + + + Save Patchbay Definition + Сохранить описание коммутатора + + + + The patchbay definition has been changed: + +"%1" + +Do you want to save the changes? + Описание коммутатора изменилось: + +"%1" + +Вы хотите сохранить изменения? + + + + %1 [modified] + + + + + Untitled%1 + Без имени %1 + + + + + Error + Ошибка + + + + Could not load patchbay definition file: + +"%1" + Не удалось загрузить файл описания коммутатора: + +"%1" + + + + Could not save patchbay definition file: + +"%1" + Не удалось сохранить файл описания коммутатора: + +"%1" + + + + Create patchbay definition as a snapshot +of all actual client connections? + Создать описание коммутатора как +снимок активных соединений клиентов? + + + + Duplicate (copy) currently selected output socket + + + + + + Copy... + Скопировать... + + + + Duplicate (copy) currently selected input socket + + + + + Current (recent) patchbay profile(s) + + + + + Toggle activation of current patchbay profile + Переключить активность текущего профиля коммутатора + + + + qjackctlPatchbayView + + + Add... + Добавить... + + + + Edit... + Изменить... + + + + Remove + Удалить + + + + Move Up + Выше + + + + Move Down + Ниже + + + + &Connect + &Соединить + + + + Alt+C + Connect + Alt+C + + + + &Disconnect + &Рассоединить + + + + Alt+D + Disconnect + Alt+D + + + + Disconnect &All + Рассоединить &все + + + + Alt+A + Disconect All + Alt+A + + + + &Refresh + &Обновить + + + + Alt+R + Refresh + Alt+R + + + + Exclusive + + + + + Copy... + Скопировать... + + + + Forward + + + + + (None) + (Нет) + + + + qjackctlSetupForm + + + Setup - JACK Audio Connection Kit + Параметры + + + + OK + ОК + + + + Cancel + Отменить + + + + Settings + Общие + + + + Server + Сервер + + + + jackstart + jackstart + + + + jackd + jackd + + + jackd-realtime + jackd-realtime + + + + The JACK Audio Connection Kit sound server path + Путь к серверу JACK + + + + dummy + псевдо + + + + alsa + ALSA + + + + portaudio + PortAudio + + + + Parameters + Параметры + + + + 22050 + 22050 + + + + 32000 + 32000 + + + + 44100 + 44100 + + + + 48000 + 48000 + + + + 88200 + 88200 + + + + 96000 + 96000 + + + + Sample rate in frames per second + Частота дискретизации выборок в секунду) + + + + 0 + 0 + + + + 5 + 5 + + + + 6 + 6 + + + + 7 + 7 + + + + 8 + 8 + + + + 9 + 9 + + + + + 10 + 10 + + + + Scheduler priority when running realtime + Приоритет планировщика в режиме реального времени + + + + 21333 + 21333 + + + + + 16 + 16 + + + + + 32 + 32 + + + + Priorit&y: + П&риоритет: + + + + &Wait (usec): + О&жидание (мс): + + + + &Frames/Period: + &Выборок в буфере: + + + + + 64 + 64 + + + + + 128 + 128 + + + + + 256 + 256 + + + + + 512 + 512 + + + + + 1024 + 1024 + + + + 2048 + 2048 + + + + 4096 + 4096 + + + + Frames per period between process() calls + Выборок в период между вызовами process() + + + + Sample &Rate: + &Частота дискр.: + + + + H/&W Meter + Аппаратный &счётчик + + + + Alt+W + Alt+W + + + + None + Нет + + + + Rectangular + Прямоугольное + + + + Shaped + По очертаниям + + + + Triangular + Треугольное + + + + Duplex + Дуплекс + + + + Provide either audio capture, playback or both + Разрешить захват звука, его воспроизведение или всё сразу + + + + + + hw:0 + hw:0 + + + + &Timeout (msec): + &Тайм-аут (мс): + + + + Dit&her: + Подмешивание &шума: + + + + 200 + 200 + + + + + 500 + 500 + + + + + 1000 + 1000 + + + + 2000 + 2000 + + + + + 5000 + 5000 + + + + 10000 + 10000 + + + + Set client timeout limit in miliseconds + Установить тайм-аут для клиента в миллисекундах + + + + &Interface: + &Интерфейс: + + + + So&ft Mode + &Программный режим + + + + + + + + Alt+F + Alt+F + + + + &Monitor + &Контроль + + + + + + Alt+M + Alt+к + + + + Provide output monitor ports + Задействовать порты контроля выхода + + + + &Realtime + Режим &реал. времени + + + + + + Alt+R + Alt+R + + + + Use realtime scheduling + Использовать планирование в реал. времени + + + + + Alt+A + Alt+A + + + + + + + + + + + + + + (default) + (как обычно) + + + + Alt+V + Alt+V + + + + Whether to give verbose output on messages + Подробно ли выводить сообщения + + + + Latency: + Задержка: + + + + Output latency in milliseconds, calculated based on the period, rate and buffer settings + Задержка выхода в мс, расчитанных на основе настроек периода, частоты и буфера + + + + Options + Сценарии и журнал + + + + Scripting + Сценарии + + + + Execute script on Start&up: + Выполнять сценарий при &запуске: + + + + + + Alt+U + Alt+U + + + + Whether to execute a custom shell script before starting up the JACK audio server. + Выполнять ли собственный сценарий перед запуском сервера JACK. + + + + Execute script after &Startup: + Выполнять сценарий после з&апуска: + + + + + + Alt+S + Alt+S + + + + Whether to execute a custom shell script after starting up the JACK audio server. + Выполнять ли собственный сценарий после запуска сервера JACK. + + + + + + + Alt+D + Alt+D + + + + Whether to execute a custom shell script after shuting down the JACK audio server. + Выполнять ли собственный сценарий после остановки сервера JACK. + + + + Command line to be executed before starting up the JACK audio server + Команда, выполняемая перед запуском сервера JACK + + + + + + + + + ... + ... + + + + Browse for script to be executed before starting up the JACK audio server + Указать сценарий, выполняемый перед запуском сервера JACK + + + + Command line to be executed after starting up the JACK audio server + Команда, выполняемая после запуска сервера JACK + + + + Browse for script to be executed after starting up the JACK audio server + Указать сценарий, выполняемый после запуска сервера JACK + + + + Browse for script to be executed after shutting down the JACK audio server + Указать сценарий, выполняемый после остановки сервера JACK + + + + Command line to be executed after shutting down the JACK audio server + Команда, выполняемая после остановки сервера JACK + + + + Statistics + Статистика + + + + &XRUN detection regex: + &Рег.выражение для XRUN: + + + + xrun of at least ([0-9|\.]+) msecs + xrun of at least ([0-9|\.]+) msecs + + + + Regular expression used to detect XRUNs on server output messages + Регулярное выражение для определения рассинхронизаций +среди сообщений от сервера + + + + + + Alt+I + Alt+I + + + + Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) + Игнорировать ли первую рассинхронизацию при запуске сервера +(весьма вероятно в случае с JACK до версии 0.80.0) + + + + Connections + Соединения + + + + 20 + 20 + + + + 30 + 30 + + + + 60 + 60 + + + + 120 + 120 + + + + Time in seconds between each auto-refresh cycle + Время в секундах между каждым циклом автообновления + + + + Patchbay definition file to be activated as connection persistence profile + Файл описания коммутатора, активируемый как профиль постоянного соединения + + + + Browse for a patchbay definition file to be activated + Указать активируемый файл описания коммутатора + + + + &Auto refresh connections Patchbay, every (secs): + &Автоматически обновлять соединения в коммутатор, каждые (сек): + + + + Whether to refresh the connections patchbay automatically + Обновлять ли соединения в коммутаторе автоматически + + + + Activate &Patchbay persistence: + Активировать &постоянный коммутатор: + + + + Alt+P + Alt+P + + + + Whether to activate a patchbay definition for connection persistence profile. + Активировать ли описание коммутатора для профиля постоянного соединения. + + + + Display + Интерфейс + + + + + + Alt+T + Alt+T + + + + Transport &BBT (bar:beat.ticks) + &BBT транспорта (такт:доля.тики) + + + + + + + Alt+B + Alt+B + + + + Elapsed time since last &Reset + Время, прошедшее с последнего &сброса + + + + Elapsed time since last &XRUN + Время, пошедшее с последней &рассинхронизации + + + + Alt+X + Alt+X + + + + Messages Window + Окно сообщений + + + + Sample messages text font display + Каким будет шрифт для вывода сообщений сервера + + + + + + + &Font... + &Шрифт... + + + + Select font for the messages text display + Выберите шрифт для отображения сообщений сервера + + + + msec + мс + + + + n/a + н/д + + + + Patchbay Definition files + Файлы описания коммутатора + + + + Server &Path: + &Путь к серверу: + + + + Driv&er: + &Драйвер: + + + + Preset &Name: + Имя &профиля: + + + + Settings preset name + Имя профиля параметров + + + + &Save + &Сохранить + + + + Save settings as current preset name + Сохранить параметры в текущий профиль + + + + &Delete + &Удалить + + + + Delete current settings preset + Удалить текущий профиль + + + + &Audio: + &Звук: + + + + H/W M&onitor + Аппаратный &контроль + + + + + Alt+O + Alt+к + + + + Force &16bit + Принудительно &16 бит + + + + Alt+1 + Alt+1 + + + + Force 16bit mode instead of failing over 32bit (default) + Принудительно использовать 16бит-режим вместо 32бит (по умолчанию) + + + + Periods/&Buffer: + Периодов на &буфер: + + + + &Input Channels: + Каналов на &входе: + + + + &Output Channels: + Каналов на в&ыходе: + + + + Start De&lay (secs): + Задержка за&пуска (с): + + + + Time in seconds that client is delayed after server startup + Сколько секунд клиент ждёт после запуска сервера + + + + + + + + + + > + > + + + + + + + Scripting argument meta-symbols + Метасимволы аргументов в сценариях + + + + &Capture standard output + &Захватывать стандартный вывод + + + + + Alt+C + Alt+C + + + + Whether to capture standard output (stdout/stderr) into messages window + Захватывать ли стандартный вывод (stdout/stderr) + + + + hh:mm:ss + чч:мм:сс + + + + Other + Другое + + + + &Confirm application close + За&прашивать подтверждение на выход + + + + Whether to ask for confirmation on application exit + Спрашивать ли подтверждение на выход из программы + + + + &Preset Name + Имя &профиля + + + + &Server Path + &Путь к серверу + + + + &Driver + &Драйвер + + + + &Interface + &Интерфейс + + + + Sample &Rate + &Частота сэмпл. + + + + &Frames/Period + &Фреймов на период + + + + Periods/&Buffer + Периодов на &буфер + + + + oss + OSS + + + + Port Ma&ximum: + &Макс. кол-во портов: + + + + Maximum number of ports the JACK server can manage + Максимальное кол-во портов, обрабатываемых сервером JACK + + + + &Input Device: + Устройство &входа: + + + + &Output Device: + Устройство в&ыхода: + + + + + + /dev/dsp + /dev/dsp + + + + No Memory Loc&k + Б&ез блокировки памяти + + + + + + Alt+K + Alt+K + + + + Do not attempt to lock memory, even if in realtime mode + Не пытайтесь заблокировать память, даже в режиме реального времени + + + + &Ignore H/W + &Игнорировать апп. буфер и период + + + + &Word Length: + + + + + &Ignore first XRUN occurrence on statistics + &Игнорировать первую рассинхронизацию в статистике + + + + Time Display + Отображение времени + + + + Transport &Time Code + &Тайм-код транспорта + + + + Sample front panel normal display font + Пример текста в малом счётчике + + + + Sample big time display font + Пример текста в большом счётчике + + + + Normal display: + Малый счётчик: + + + + Big Time display: + Большой счётчик: + + + + Time F&ormat: + &Формат времени: + + + + hh:mm:ss.d + чч:мм:сс.д + + + + hh:mm:ss.dd + чч:мм:сс.дд + + + + hh:mm:ss.ddd + чч:мм:сс.ддд + + + + The general time format on display + Общий формат вывода времени на дисплей + + + + &Messages limit: + Предел кол-ва &сообщений: + + + + Whether to keep a maximum number of lines in the messages window + Ограничивать ли количество строк в окне сообщений + + + + 100 + 100 + + + + 250 + 250 + + + + 2500 + 2500 + + + + The maximum number of message lines to keep in view + Максимальное количество строк сообщений, доступное при просмотре + + + + &Start JACK audio server on application startup + &Запускать звуковой сервер JACK при старте программы + + + + Whether to start JACK audio server immediately on application startup + Запускать ли сервер JACK при старте QJackCtl + + + + &Keep child windows always on top + О&кна программы всегда наверху + + + + Whether to keep all child windows on top of the main window + + + + + &Enable system tray icon + &Включить область уведомления + + + + Alt+E + Alt+E + + + + Whether to enable the system tray icon + Включать ли область уведомления +(системный лоток, system tray) + + + + S&ave JACK audio server configuration to: + Со&хранять конфигурацию JACK в файл: + + + + Whether to save the JACK server command-line configuration into a local file (auto-start) + + + + + .jackdrc + .jackdrc + + + + The server configuration local file name (auto-start) + + + + + C&onfigure as temporary server + &Настроить как временный сервер + + + + Whether to exit once all clients have closed (auto-start) + Завершать ли работу при отсоединении все клиентов + + + + + + Warning + Предупреждение + + + Save + Сохранить + + + Discard + Отказаться + + + Apply + Учесть + + + + Some settings have been changed: + +"%1" + +Do you want to save the changes? + Некоторые параметры изменились: + +"%1" + +Вы хотите сохранить изменения? + + + + Delete preset: + +"%1" + +Are you sure? + Удалить профиль: + +"%1" + +Вы уверены? + + + + Startup Script + Сценарий, выполняемый при запуске + + + + Post-Startup Script + Сценарий, выполняемый после запуска + + + + Shutdown Script + Сценарий, выполняемый при выключении + + + + Post-Shutdown Script + Сценарий, выполняемый после выключения + + + + Active Patchbay Definition + Активное описание коммутатора + + + + Messages Log + Журнал сообщений + + + + Log files + Файлы журналов + + + + Some settings have been changed. + +Do you want to apply the changes? + Некоторые параметры были изменены. + +Применить эти изменения? + + + + jackdmp + jackdmp + + + + The audio backend driver interface to use + Используемый звуковой драйвер + + + + sun + sun + + + + coreaudio + coreaudio + + + + freebob + freebob + + + + firewire + firewire + + + + MIDI Driv&er: + &Драйвер MIDI: + + + + The ALSA MIDI backend driver to use + Используемый драйвер ALSA MIDI + + + + none + нет + + + + raw + raw + + + + seq + seq + + + + Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) + Разблокировать память основных библиотек интерфейсов (GTK+, QT, FLTK, Wine) + + + + &Unlock Memory + &Разблокировать память + + + + Ignore xruns reported by the backend driver + + + + + Enable hardware monitoring of capture ports + Включить аппаратный контроль портов захвата + + + + Enable hardware metering on cards that support it + Включить аппаратное измерение для поддерживающих эту функцию карт + + + + Ignore hardware period/buffer size + + + + + &Verbose messages + &Подробный вывод + + + + Maximum input audio hardware channels to allocate + Максимальное число резервируемых каналов входа + + + + &Input Latency: + &Задержка на входе + + + + External output latency (frames) + + + + + Capture Only + Только захват + + + + Playback Only + Только воспроизведение + + + + The PCM device name to use + Имя используемого устройства PCM + + + + + + plughw:0 + plughw:0 + + + + + + /dev/audio + /dev/audio + + + + Select output device for playback + Выберите устройство выхода для воспроизведения + + + + Alternate input device for capture + Выберите устройство входа для захвата + + + + &Output Latency: + Задержка на в&ыходе + + + + Maximum output audio hardware channels to allocate + Максимальное резервируемое число звуковых каналов устройства + + + + Alternate output device for playback + + + + + Select input device for capture + Выберите устройство входа для захвата + + + + Select PCM device name + Выберите имя устройства PCM + + + + External input latency (frames) + + + + + Set dither mode + Выберите способ подмешивания шума + + + + Number of periods in the hardware buffer + Количество периодов в аппаратном буфере + + + + &Channels: + &Каналов: + + + + 192000 + 192000 + + + + Word length + + + + + Maximum number of audio channels to allocate + Максимальное число резервируемых звуковых каналов + + + + Whether to execute a custom shell script before shuting down the JACK audio server. + + + + + Execute script on Shut&down: + В&ыполнять сценарий при выходе: + + + + Browse for script to be executed before shutting down the JACK audio server + + + + + Command line to be executed before shutting down the JACK audio server + + + + + Execute script after Shu&tdown: + Выполнять сценарий после &выключения: + + + + Logging + Журналирование + + + + Messages log file + Файл журнала сообщений + + + + Browse for the messages log file location + Указать расположение файла журнала + + + + Whether to activate a messages logging to file. + Сохранять ли протокол в файл журнала + + + + &Messages log file: + Файл &журнала: + + + + Select font for front panel normal display + Выбрать шрифт для малого счётчика + + + + Select font for big time display + Выбрать шрифт для большого счётчика + + + + Whether to enable a shiny glass light effect on the main display + Изображать ли блик на основном дисплее + + + + &Display shiny glass light effect + Включить эффект &блика на дисплее + + + + Whether to enable blinking (flashing) of the server mode (RT) indicator + + + + + Blin&k server mode indicator + &Мерцать индикатором режима сервера + + + + Connections Window + Окно соединений + + + + Sample connections view font + Шрифт для диалога управления соединениями + + + + Select font for the connections view + Выберите шрифт для просмотра соединений + + + + &Icon size: + &Размер значков: + + + + The icon size for each item of the connections view + Размер значка каждого элемента в окне соединений + + + + 16 x 16 + 16 × 16 + + + + 32 x 32 + 32 × 32 + + + + 64 x 64 + 64 × 64 + + + + Whether to enable in-place client/port name editing (rename) + + + + + Ena&ble client/port aliases editing (rename) + Ра&зрешить переименование алиасов клиентов/портов + + + + Whether to enable client/port name aliases on the connections window + + + + + E&nable client/port aliases + &Разрешить алиасы клиентов/портов + + + + + Alt+N + Alt+р + + + + Whether to draw connection lines as cubic Bezier curves + Рисовать ли соединительные линии в диалогах «Соединения» и «Коммутатор» как кубические кривые Безье + + + + Draw connection and patchbay lines as Be&zier curves + Рисовать линии соединения как кривые &Безье + + + + + Alt+Z + Alt+б + + + + Misc + Разное + + + + Whether to start minimized to system tray + Запускать ли приложение в области уведомления, скрывая основное окно + + + + Start minimi&zed to system tray + &Запускать убранным в область уведомления + + + + Whether to delay window positioning at application startup + + + + + &Delay window positioning at startup + За&держивать размещение окна при запуске + + + + Whether to ask for confirmation on JACK audio server shutdown + + + + + Confirm server sh&utdown + &Запраживать подтверждение на остановку сервера + + + + Whether to enable ALSA Sequencer (MIDI) support on startup + Включать ли при запуске поддержку MIDI-секвенсера ALSA + + + + E&nable ALSA Sequencer support + &Включить поддержку секвенсера ALSA + + + + Buttons + Кнопки + + + + Whether to hide the left button group on the main window + Скрывать ли группу кнопок в левой части основного окна + + + + Hide main window &Left buttons + Скрывать &левые кнопки основного окна + + + + Alt+L + Alt+л + + + + Whether to hide the right button group on the main window + Скрывать ли группу кнопок в правой части основного окна + + + + Hide main window &Right buttons + Скрывать прав&ые кнопки основного окна + + + + Whether to hide the transport button group on the main window + Скрывать ли группу кнопок управления транспортом в основном окне + + + + Hide main window &Transport buttons + Скрывать кнопки &транспорта + + + + Whether to hide the text labels on the main window buttons + Скрывать ли надписи на кнопках в основном окне + + + + Hide main window &button text labels + Скрывать по&дписи кнопок основного окна + + + + &JACK client/port aliases: + &Алиасы клиентов/портов JACK: + + + + JACK client/port aliases display mode + + + + + Default + По умолчанию + + + + First + Первый + + + + Second + Второй + + + + Defaults + Используемые по умолчанию параметры + + + + &Base font size: + &Кегль шрифта в интерфейсе: + + + + Base application font size (pt.) + + + + + 11 + 11 + + + + 12 + 12 + + + + net + + + + + Whether to enable D-Bus interface + Влючать ли интерфейс D-Bus + + + + &Enable D-Bus interface + Вклю&чить интерфейс D-Bus + + + + Number of microseconds to wait between engine processes (dummy) + + + + + netone + + + + + Whether to restrict to one single application instance (X11) + + + + + Single application &instance + + + + + qjackctlSocketForm + + + OK + ОК + + + + Cancel + Отменить + + + + &Socket + &Сокет + + + + &Client: + &Клиент: + + + + Socket name (an alias for client name) + Имя сокета (псевдоним имени клиента) + + + + &Name (alias): + &Имя (псевдоним): + + + + Socket Plugs / Ports + Сокетовые штепсели / Порты + + + + Socket plug list + Список штепселей сокета + + + + &Down + В&низ + + + + Alt+D + Alt+D + + + + &Up + В&верх + + + + Alt+U + Alt+U + + + + Alt+A + Alt+A + + + + Add plug to socket plug list + Добавить штепсель в список штепселей сокета + + + + &Plug: + &Штепсель: + + + + &Edit + И&зменить + + + + Alt+E + Alt+E + + + + &Remove + &Удалить + + + + Alt+R + Alt+R + + + + Remove currently selected plug from socket plug list + Удалить выбранный штепсель из списка штепселей сокета + + + + Plugs / Ports + Штепсели / Порты + + + + Error + Ошибка + + + + A socket named "%1" already exists. + + + + + Add Plug + Добавить штепсель + + + + Remove + Удалить + + + + Edit + Изменить + + + + Move Up + Переместить выше + + + + Move Down + Переместить ниже + + + + Client name (regular expression) + Имя клиента (регулярное выражение) + + + + Add P&lug + Добавить &штепсель + + + + Alt+L + Alt+L + + + + Port name (regular expression) + Имя порта (регулярное выражение) + + + + Alt+X + Alt+X + + + + Type + Тип + + + + &Audio + &Звук + + + + Audio socket type (JACK) + Тип звукового сокета (JACK) + + + + &MIDI + &MIDI + + + + Alt+M + Alt+M + + + + MIDI socket type (ALSA) + Тип MIDI-сокета (ALSA) + + + + E&xclusive + + + + + Enforce only one exclusive cable connection + Принудительно только одно кабельное соединение + + + + Warning + Предупреждение + + + + Some settings have been changed. + +Do you want to apply the changes? + Некоторые параметры были изменены. + +Применить эти изменения? + + + Apply + Учесть + + + Discard + Отказаться + + + + (None) + (Нет) + + + + Socket - JACK Audio Connection Kit + Сокет + + + + Edit currently selected plug + + + + + Move down currently selected plug in socket plug list + + + + + Move up current selected plug in socket plug list + + + + + &Forward: + + + + + Forward (clone) all connections from this socket + + + + + MIDI socket type (JACK) + + + + + AL&SA + AL&SA + + + + Alt+S + Alt+S + + + + qjackctlSocketList + + + Output + Выход + + + + Input + Вход + + + + Socket + Сокет + + + + Warning + Предупреждение + + + Yes + Да + + + No + Нет + + + + <New> - %1 + <Новый> - %1 + + + + %1 about to be removed: + +"%2" + +Are you sure? + %1 будет удален: + +"%2" + +Вы уверены? + + + + %1 <Copy> - %2 + %1 <Копия> - %2 + + + + qjackctlSocketListView + + + Output Sockets / Plugs + Гнезда наружу + + + + Input Sockets / Plugs + Гнезда внутрь + + + + qjackctlStatusForm + + + Status - JACK Audio Connection Kit + Статус + + + + Description + Описание + + + + Value + Значение + + + + Statistics since last server startup + Статистика с последнего запуска сервера + + + + Re&set + С&бросить + + + + Alt+S + Alt+S + + + + Reset XRUN statistic values + Обнулить статистику по рассинхронизации + + + + &Refresh + &Обновить + + + + Alt+R + Alt+R + + + + Refresh XRUN statistic values + Обновить статистику по рассинхронизации + + + + Time of last reset + Время последнего сброса + + + + XRUN count since last server startup + Рассинхронизаций с последнего запуска сервера + + + + XRUN total + Всего рассинхронизаций + + + + XRUN average + Средний размер рассинхронизаций + + + + XRUN minimum + Минимальная рассинхронизация + + + + XRUN maximum + Максимальная рассинхронизация + + + + XRUN last + Последняя рассинхронизация + + + + XRUN last time detected + Последняя обнаруженная рассинхронизация + + + + Transport state + Состояние транспорта + + + + Transport BPM + BPM транспорта + + + + Transport BBT + BBT транспорта + + + + Transport Timecode + Тайм-код транспорта + + + + Realtime Mode + Режим реального времени + + + + Buffer Size + Размер буфера + + + + Sample Rate + Частота сэмплирования + + + + Server state + Статус сервера + + + + DSP Load + Загрузка DSP + + + + Maximum scheduling delay + Максимальная задержка расписания + + + + Server name + + + + diff -Nru qjackctl-0.3.4/TRANSLATORS qjackctl-0.3.6/TRANSLATORS --- qjackctl-0.3.4/TRANSLATORS 1970-01-01 01:00:00.000000000 +0100 +++ qjackctl-0.3.6/TRANSLATORS 2009-10-06 09:03:08.000000000 +0100 @@ -0,0 +1,14 @@ +Czech (cs) + Pavel Fric + +German (de) + Guido Scholz + +Spanish (es) + Adrian Pardini + +French (fr) + Raphael Doursenaud + +Russian (ru) + Alexandre Prokoudine diff -Nru qjackctl-0.3.4/=unpacked-tar1=/AUTHORS qjackctl-0.3.6/=unpacked-tar1=/AUTHORS --- qjackctl-0.3.4/=unpacked-tar1=/AUTHORS 2003-07-21 22:23:55.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/AUTHORS 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Rui Nuno Capela diff -Nru qjackctl-0.3.4/=unpacked-tar1=/ChangeLog qjackctl-0.3.6/=unpacked-tar1=/ChangeLog --- qjackctl-0.3.4/=unpacked-tar1=/ChangeLog 2008-12-05 08:18:08.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/ChangeLog 1970-01-01 01:00:00.000000000 +0100 @@ -1,978 +0,0 @@ -QjackCtl - JACK Audio Connection Kit Qt GUI Interface ------------------------------------------------------ - -ChangeLog - -0.3.4 2008-12-05 Patchbay snapshot revamp. - -- Introducing the very first and complete translations in-package: - German (de), Spanish (es), French (fr) and Russian (ru); credits - in TRANSLATORS. - -- At last, after years of retarded procrastination, the old infamous - patchbay snapshot feature has been the subject of a almost complete - rewrite and it does try to give a way better mapping of all actual - and current running client/port connections, both JACK (audio, MIDI) - and ALSA MIDI, of course ;) - -- On Setup/Settings/Parameters dialog, all device selection options - are now reset to default when disabled interactively. - -- Grayed/disabled palette color group fix for dark color themes. - -- Qt Software logo update. - -- Fait-divers: desktop menu file touched to openSUSE conventions. - -- ALSA PCM devices now only listed/enumerated iif strictly compliant - with the audio mode criteria (Duplex, Capture-only or Playback-only) - as kindly suggested by Nedko Ardaunov. - -- JACK client/port aliases may now be displayed as a global user option - (see Setup/Display/Connections/JACK client/port aliases). - -- Lighten up the connections line and highlight colors, as seen to fit - best on some darker background themes. - -- Patchbay snapshot fixed to differentiate socket clients according - to its type (Audio, MIDI or ALSA-Seq), avoiding the mess and gross - mistake of hanging disparate type ports under the same client item. - -- JACK_DEFAULT_SERVER environment variable is now appended to the X11 - unique application identifier, allowing for having multiple instances - each controlling its own JACK server, besides the default one. - -- Due to some trouble with newer Qt >= 4.4 applications regarding font - size configuration, a new global user option is now available to the - rescue: Setup/Misc/Defaults/Base font size (default is no-op). - - -0.3.3 2008-06-07 Patchbay JACK-MIDI, file logging and X11 uniqueness. - -- Attempt to load Qt's own translation support and get rid of - the ever warning startup message, unless built in debug mode. - (transaction by Guido Scholz, while on qsynth-devel, thanks). - -- Messages file logging makes its first long overdue appearance, - with user configurable settings in Setup/Options/Logging. - -- Only one application instance is now allowed to be up and running, - with immediate but graceful termination upon startup iif an already - running instance is detected, which will see its main widget shown - up and the server started automatically (Qt/X11 platform only). - -- Finally, full JACK MIDI support sneaks into the patchbay; socket - types now differ in Audio, MIDI and ALSA, following the very same - nomenclature as found on the Connections widget tabs. - -- Sun driver support (by Jacob Meuser). - -- Delay window positioning at startup option is now being disabled, - on the Setup/Misc tab, when Minimize to system tray is enabled. - -- Cosmetic fix: Setup/Settings tab, 'Input Device' text label was - using a slightly smaller font than the rest of the application - (bug#1872545, reported by Jouni Rinne). - - -0.3.2 2007-12-20 Patchbay heads-up with season greetings. - -- Patchbay port matching has been slightly extended, this time - allowing for the multiple or as many-to-many connections between - socket plugs, provided these are specified in proper regex form - (after a patch proposed by Dave Moore, thanks). - -- A new option to start the program minimized when the system tray - icon is enabled, is now available from Setup/Misc/Start minimized - to system tray (as kindly suggested by Marc-Olivier Barre). - -- Regression from QSystemTrayIcon (Qt4 >= 4.2) implementation, at - least on X11 environments: while the main application widget was - minimized to the system-tray, closing any other top-level widget - was causing the immediate and unexpected application shutdown. - -- Some portaudio backend settings are now being enabled, specially - suited for the jackdmp flavouring. - -- Server mode display blinking, usually shown as the RT indicator, - is now an option (Setup/Display/Blink server mode indicator when - started). - -- Tool/child windows position and size preservation fixed. - -- The connections/patchbay auto-refresh option has been finally - removed due to several user requests, although deprecated for - quite some time now it has been the probable cause of some - periodic xrun occurrences due to graph-locking in jackd (while - making Geoff Beasley angry in the process:). - -- Messages line limit was not being checked, now honored. - -- Simple as it could ever be, the build executive summary report - is now given on configure. - -- Patchbay snapshot ot its socket and port ordering back. - -- ALSA Sequencer support is now an optional feature on setup, - preventing the annoying "MIDI patchbay will be not available" - warning message, ruining window placement on Linux systems - where the snd-midi-seq kernel module is not loaded or not - favorable (eg. OSS) at startup (by request from Jussi Laako). - -- Get configure to try and detect the correct qmake location and - insert it the search order, so let the qt4 tools take precedence - when --with-qt option is given and older qt3 ones coexist and - are found located ahead in the PATH. - -- The connections widget is now being properly refreshed, due to - some quirk in the QTreeWidget which was preventing some items, - specially the expanded ones, to disappear in the void. Meanwhile, - with a hand from Stephane Letz, the client/port lookup method was - changed to prevent duplicated, missing entries or worse, crashes - due to weird behaved windows applications. - -- The xrun count stats can now be reset simply by middle clicking - on the systray icon or the main window's display area (thanks to - patch sent by Dominic Sacre). - -- An improved version of the "shiny" background image was issued. - The original somehow looked like two different images put together, - probably most apparent on a bright TFT screen (by Dominic Sacre). - -- A warning is now being issued, asking whether one wants to remove - a corresponding Patchbay connection, when client/ports are being - disconnected over the Connections window, thus avoiding automatic - reconnection annoyance due to normal active Patchbay behavior. - -- The infamous "Keep child windows always on top" global option is - now supposed to behave a little better when disabled, layering - child windows as naturally as far the window manager dictates. - -- Input/Output Channel setting is now allowed to be greater than 32; - the special default text is now displayed, also on Input/Output - Latency and Priority settings spin-boxes. - -- Andreas Persson just sent a patch that makes it possible to compile - and run qjackctl with Qt version 4.1. Applied without hesitation, - thanks. - - -0.3.1a 2007-07-19 System-tray tooltip icon crash fix. - -- An immediate showstopper crash upon client start was irradicated, - which was affecting those with the system-tray icon disabled, - as is the default (thanks to Ken Ellinwood for first reporting - this sloppy one). - - -0.3.1 2007-07-18 Shallowed bug-fix release. - -- The current DSP load percentage activity is now also displayed on - the system-tray icon tooltip. - -- An illusive but nasty Connections/Patchbay item tooltip crash bug - has been hopefully fixed (Qt >= 4.3). - -- Now using QSystemTrayIcon class facility if available (Qt4 >= 4.2) - making the system-tray option available on most platforms, notably - on Windows and Mac OS X (EXPERIMENTAL). - -- Usage of QProcess class has been severely refactored, now using - QProcess::start() instead of QProcess::startDetached(), giving - much tighter control over the started jackd(mp) process. Downside - is that QjackCtl lost its ability and option to leave the process - detached upon quitting the application. Too bad. - -- A new eye-candy bit has sneaked in: server mode display, that is - the RT indicator, now blinks when server/client is started/active. - -- Combo-box setup history has been corrected on restore, which was - discarding the very initial default (factory) contents. - -- Now that Qt4 is accessible to open-source Windows appplications, - there's some experimental stuff sneaking in for jackdmp support - on win32 (http://www.grame.fr/~letz/jackdmp.html). - -- Connections list items were initially sorted in descending order - by default. Fixed. Client items are now naturally sorted, again. - - -0.3.0 2007-07-10 Qt4 migration was complete. - -- Qt4 migration was complete. Care must be taken with this new - configuration file and location: this release starts a new one - from scratch and won't reuse any of the previous existing ones, - although cut and paste might help if you know what you're doing :) - -- On a last-minute addition, the "firewire" audio backend driver - option has been also included, supporting the ffado.org project - which is evolving where "freebob" is leaving (thanks to Klaus - Zimmermann for this one). - - -0.2.23 2007-07-02 JACK MIDI support debut. - -- JACK MIDI support is now being introduced. Connections window - now has a brand new MIDI tab, the older being renamed to ALSA, - as for the ALSA/MIDI sequencer conveniency. The server settings - now include the MIDI driver setup option (ALSA backend only). - -- Application icon is now installed to ${prefix}/share/pixmaps; - application desktop entry file is now included in installation; - spec file (RPM) is now a bit more openSUSE compliant; initial - debianization. - -- Invalidation of the JACK client handle is now forced right on - jack_shutdown notification, preventing a most probable fatal - crash due to jack_deactivate and/or jack_client_close being - called after the jack_watchdog kicks in. - -- Default font option names were adjusted to "Sans Serif" and - "Monospace", wherever available. - -- The "keep child windows always on top" option is not set as - default anymore, because window focus behavior gets tricky - on some desktop environments (eg. Mac OS X, Gnome). - -- Autoconf (configure) scripting gets an update. - - -0.2.22 2007-03-31 Long overdue but better late than never. - -- Fixed default settings for the freebob backend (JACK >= 0.103.0). - -- CPU Load status label now says correctly DSP Load. - -- The most recently used patchbay definitions can now be correctly - selected in round-robin fashion from its drop-down list widget. - -- Avoid mixing JACK MIDI ports with regular audio ports on the - Connections and Patchbay widgets; strictly list only audio ports. - -- Added 192k sample rate to setup settings drop down list (as kindly - reminded by Klaus Zimmermann, thanks). - -- Most top-level widgets were missing the normal-widget flag, which - were causing some sticky size behavior on some window managers. - - -0.2.21 2006-10-07 Shrinking on screen real-estate. - -- GPL address update. - -- All window captions can now be set smaller as tool-widgets. This - option takes effect when child windows are kept always on top. - -- For the brave of heart, specially the ones brave enough to try with - Stephane Letz's jackdmp, a win32 build should be now possible. - -- The main window button text labels are now optional (after a kind - suggestion by Geoff Beasley, thanks). - -- Increse default maximum number of ports setting from 128 to 256. - -- Initial freebob backend driver support. Also changed the coreaudio - backend driver command line device name/id parameter (EXPERIMENTAL). - -- Closing the main window while not as an active JACK client, nor under - a server running state, will just quit the whole application, even - though the system-tray icon option is in effect. - -- The most relevant transport commands (Rewind, Play and Pause) are now - made available on the main window context popup menu. - -- The post-shutdown script is now also being called when using the Stop - button, whether the jackd server has been started internally or not. - The initial hard-coded default is now on and set to `killall jackd` - (as a workaround to an old request from Stephane Letz). - -- The main window buttons display are now optional. One can choose - whether the left, right and/or transport buttons are hidden, making - it for a total of six different modes for the main window presentation - (after a much simpler suggestion from Paul Davis and Stephane Letz). - -- Added configure support for x86_64 libraries (UNTESTED). - - -0.2.20 2006-03-05 Featuring patchbay socket forwarding. - -- Server path setting now accepts custom command line parameters - (after a kind suggestion from Jussi Laako). - -- The internal XRUN callback notification statistics and reporting has - been changed to be a bit less intrusive. - -- Patchbay socket dialog gets some more eye-candy as icons have been - added to the client and plug selection (combobox) widgets. - -- Connections and patchbay lines coloring has changed just slightly :) - -- New patchbay socket forwarding feature. Any patchbay socket can now - be set to have all its connections replicated (i.e. forwarded) to - another one, which will behave actively as a clone of the former. - Forward connections are shown by vertical directed colored lines, - and can be selected either on socket dialog or from context menu - (currently experimental, only applicable to input/writable sockets). - -- Optional specification of alternate JACK and/or ALSA installation - paths on configure time (after a patch from Lucas Brasilino, thanks). - - -0.2.19a 2005-11-28 MIDI aliases are back in town. - -- ALSA sequencer client/port name aliases are functional again; all - actual MIDI sequencer client/port numerical identifier prefixes are - also back in business. - - -0.2.19 2005-11-19 MRU patchbay selection, Mac OS X and other fixes. - -- Connections widget views are now properly refreshed after renaming - client/ports (aliases). - -- Disabled system tray and ALSA sequencer support on configure time, - whenever building for MacOSX as default. - -- Fixed the major issues with selecting an audio interface on Mac OSX; - the button the right of the interface combo is now much better - looking than it was before; input/output channel counts are also - updated automatically now (thanks to Jesse Chappell for the patch). - -- Prevent the setting of the coreaudio device id on the jackd command - line (-n) whenever the default interface is being selected. - -- The connections and patchbay windows are now allowed to have a wider - connection lines frame panel; splitter width sizes are now persistent - across application sessions (thanks to Filipe Tomas for the hint). - -- Activation toggling feedback on the patchbay widget has been fixed; - additionally and as found convenient, the most recently used patchbay - definitions can now be loaded immediately by selecting from a drop-down - list widget, which replaces the old static patchbay name status text, - and adds a lil'icon too :) - -- All widget captions changed to include proper application title prefix. - -- Attempt to bring those aging autoconf templates to date; sample SPEC file - for RPM build is now being included and generated at configure time. - -- The current selected device is now shown with a checkmark on the - device selection menu(s), while on the settings dialog. - -- Set to use QApplication::setMainWidget() instead of registering the - traditional lastWindowClosed() signal to quit() slot, just to let - the -geometry command line argument have some effect on X11. - - -0.2.18 2005-07-18 The mantra of bugfixes stays on. - -- A freezing and endless loop condition on the patchbay socket item - duplication (copy) has been fixed. - -- Fixed output disability when messages limit option is turned off - (thanks again to Wolfgang Woehl for spotting this one). - - -0.2.17 2005-06-17 Systemic I/O Latency settings are in. - -- Systemic I/O Latency settings are now featured for the alsa, oss and - coreaudio backends, letting you specify the known latency of external - hardware for client aware compensation purposes (thanks to Wolfgang Woehl, - for the reminder). - -- Update on last backstage changes to the coreaudio backend options - (due to Stephane Letz. Thanks). - - -0.2.16 2005-06-13 OSS device name selection and Mac OS X breakthrough. - -- ALSA sequencer client/port name changes are now properly detected on the - MIDI connections widget (as noted by Chris Cannam. Thanks). - -- Long overdue transport buttons (rewind, backward and forward) finally - landed onto the main control window, at last :). - -- Duplication (copy) of patchbay socket items was added. - -- Do not ever try to start the JACK server if there's one already found - running, on which case the client-only mode of operation is then activated - (as kindly suggested by Orm Finnendahl, thanks). - -- After several Mac OS X user requests, ALSA/MIDI sequencer support is - now an option, otherwise detected at configure time and conditionally - compiled in if, and only if, ALSA is found available (which has been - a primordial assumption on Linux systems:). Ah, and that just makes - for the blind inclusion of another backend driver option: coreaudio. - -- Actual OSS device selection menu now featured on setup dialog; these - adds to the device selection button menus for the OSS driver settings. - -- Delayed geometry setup of windows upon startup was added as an optional - workaround to subtle problems due to window decoration information not - being available at window creation time on some window managers (as patch - proposed by Dirk Jagdmann. Thanks). - -- Fixed some minor but rather old bug that was quitting the application - abruptly, when one switches off the system tray icon while the main - application widget is hidden. - -- Cancel is now an option when creating a new patchbay definition. - -- Context menus are finally littered with icons. - -- Minor configure and Makefile install fixes, as Debian and Mac OS X - specialties. Also, install does the right thing with target file modes - (thanks to Matt Flax and Ebrahim Mayat, for pointing these out). - - -0.2.15a 2005-02-09 Return of the paranoid. - -- Regression from 0.2.13, of the not so stupid pseudo-mutex guards on the - connections management framework, after fixing some crash reports from - Fernando Pablo Lopez-Lezcano and Dave Phillips (thanks!); it pays to be - such a paranoid after all :). - - -0.2.15 2005-02-06 Client/port names aliasing and other minors. - -- JACK/ALSA client and port name aliasing (renaming) is now an optional - feature for the connections window; all client/port aliases are saved - on a per preset basis (as proposed for Lionstracs' Mediastation). - -- Server state now shown (back gain) on the system tray icon tooltip; - speaking of which, tooltips are now also featured on connections, status - and patchbay windows. - -- New actual hardware device selection menu featured on setup dialog; these - new button menus are only available for the ALSA driver settings. - -- Server path factory default to jackd instead of jackstart; preset setup - button icons are back. - -- Fixed rare connection port item removal/disconnection dangling pointer bug. - - -0.2.14 2005-01-23 More progressive optimizations. - -- Put a limit on XRUN callback messages and statistics report rate, preventing - the potential hosing of the GUI due to a XRUN cascade storm. The maximum - reasonable report rate has been fixed to be one XRUN callback occurrence - per second. - -- Set to ignore the SIGPIPE ("Broken pipe") signal, where available, as the - default handler is usually fatal when a JACK client is zombified abruptly. - -- All conection view items are now sorted in natural case insensitive order, - not just as audio port names as was before. - -- Got rid of those nonsense paranoid and rather stupid pseudo-mutex guards on - the connections management framework and event notifications (nuff said :). - -- Optional confirmation warning on audio server shutdown, if there's some - audio clients still active and connected (as suggested by Sampo Savolainen). - -- Check for on configure time (as of JACK 0.99.42+ CVS). - -- "Unlock memory" server setup option was added, allowing the release - of memory used by common toolkit libraries (GTK+, Qt, FLTK, Wine) that - were being superfluously locked on every GUI JACK client; number of periods - has now the minimum allowed value of 2; server start delay widget converted - to spinbox; setup dialog layout slighly changed. - -- Removed stand-alone usx2y driver support. Since JACK 0.99.41+ CVS, the - special "rawusb" support on the Tascam US-122/224/428 USB Audio/MIDI - interface controllers have been merged and properly integrated into the - regular alsa backend driver. Being still experimental, this special mode - of operation is now triggered only when "hw:N,2" is specified as the alsa - device name (N = soundcard index of snd-usb-usx2y module). - -- Messages window limit is now enforced only when the line count exceeds - in one third the user configured line count maximum; if Qt 3.2.0+ is in use, - the QTextView widget is otherwise set to the optimized Qt::LogText format. - -- XRUN status items are kept double-dashed if none has been detected. - - -0.2.13 2004-11-21 Retouches and minor optimizations. - -- Main window is now properly minimized instead of simply hidden when - the system tray icon is not available nor opted in (as suggested - by Florian Schmidt). - -- Some informational status items are now updated 10 times less frequently - (e.g. CPU Load, Sample Rate, Buffer Size, Realtime Mode, etc.), lowering - the CPU burden of most probably redundant status updates. - -- XRUN detection and statistics are being conditionally included if - jack_get_xrun_delayed_usecs() is available (as of JACK 0.99.7+ CVS). - -- Fixed ancient bug on client shutdown event handling, which was - invoking the xrun notification handler by mistake. - -- Support for maximum scheduling delay status added (EXPERIMENTAL); - this relies on jack_get_max_delayed_usecs() function availability at - configure time, depending on a Lee Revell's non-official JACK patch. - -- Patchbay Activate button is now a toggle button widget, allowing the - deactivation of the current patchbay profile. - -- Reset-status icon has been changed to a simple red circle instead of - previous one which was much like a power-switch symbol. - -- Preset selection has been added to the context menu. - - -0.2.12a 2004-10-11 Audio connections now naturally sorted. - -- Client port list on audio connections are now hopefully fixed for good; - the sort comparison function now takes full natural order into account. - - -0.2.12 2004-10-08 Larger icons and font option on connections/patchbay. - -- Fixed some old and slow memory-leak due to redundand and repetitive call - to jack_port_by_name() (discovered and solved, thanks to Jesse Chappell); - some other free() and configure fixes were also applied. - -- Shiny display effect toggling has immediate feedback on setup dialog. - -- Added new usx2y driver support (EXPERIMENTAL). - -- New scaled connections/patchbay icons were added; meanwhile, all inline - XPM icons were removed and brainlessly converted to PNG format. - -- New setup options as for the connections/patchbay view apprearence: larger - icon sizes and font selection are now possible, to better ease manipulation - on a touchscreen (feature requested for Lionstracs' Mediastation). - -- Connection line width follows icon size in discrete proportion. - -- "Other" setup options moved to a new dialog tab, "Misc"; new extreme item - values, 32 and 16 frames, added to the drop-down list of the Frames/Buffer - setting (as suggested by Mark Knetch). - - -0.2.11 2004-09-10 Shiny display now optional and other fixes. - -- Fixed Input/Output channels settings, being now either enabled when - the ALSA driver is selected for Capture/Playback only. - -- Shiny display effect: after some conservative user complaints this - pure cosmetic feature is now made optional ;) - - -0.2.10 2004-09-04 Shiny display and curved connections. - -- New pre-shutdown script setup option, allowing to specify a shell-script - to be run before the JACK server daemon is shutted-down. This overrides - any previous shutdown script setting, which should be now moved onto the - existing post-shutdown script option, as to keep old procedural behaviour. - -- Avoid stopping JACK prematurely with QProcess::kill() (oneliner fix); - stopping JACK will now take a little bit longer, but hopefully will take - the time to cleanup properly (thanks to Kjetil Matheussen). - -- ALSA driver Duplex mode accepts alternate Input or Output device name. - -- Context menu reset option is now always enabled (yet another suggestion - from Sampo Savolainen). - -- Main display background gets shinny effect; adjusted system tray background - palette color mode. - -- Priority and setup control is now a spinbox ranging from 0..89 (as - suggested by Florian Schmidt). Same for Periods/Buffer. - -- Patchbay connection lines are now drawn correctly when items are - scrolled out of view. Additionally, the connection lines can now be - optionally drawn as bezier spline curves (big thanks to Wilfried Huss). - - -0.2.9 2004-07-04 Sloppy boy fixes and minor featuritis. - -- Patchbay socket dialog client and plug list option items are now - properly escaped as regular expressions. - -- JACK callbacks are now internally mapped to QCustomeEvent's instead - of using the traditional pipe notifications. - -- The system tray popup menu is now featured as a context menu on the - main application window too. - -- The reset status option is now included in the system tray popup menu. - -- Server stop command button now enabled during client startup interval; - this makes it possible to stop the server just in case the client - can't be activated for any reason. - -- Top level sub-windows are now always raised and set with active focus - when shown to visibility. - - -0.2.8 2004-04-30 System tray icon and menu option. - -- New option for system tray icon and menu, which is known to be effective - on KDE enabled desktops; support for freedesktop.org's system tray protocol - specification has been included so this maybe also effective on Gnome2. - -- Capture or Playback-only optional alternate device interface name may now - be specified for the ALSA audio driver server settings. - -- Maximum number of ports setting was added to server setup. - -- The dash (-) is now a legal character for preset names. - - -0.2.7b 2004-04-05 OSS driver setup fix. - -- OSS driver halfduplex setup operation is now fixed, thanks to - Jussi Laako. - - -0.2.7a 2004-04-05 Compilation fix for Qt 3.1. - -- QSplitter::setChildrenCollapsible call is now conditionally compiled, - applied only on Qt 3.2+. - - -0.2.7 2004-04-04 User-interface refinements and OSS driver support. - -- Connections and patchbay windows horizontal layout are now user - configurable via splitter widgets. - -- Refresh on connections window now take effect on both tabs, Audio - (JACK) and MIDI (ALSA). - -- OSS driver support and no-mlock option added to server settings, setup - dialog (as of JACK 0.95.7+). - -- Temporary server configuration option added, applicable to the auto-start - server feature on client applications, whether the server shall exit once - all clients are closed. - -- Server mode (RT) status display added. - -- Warning messages are now prompted to the user when there are any pending - changes not saved nor applied while on the setup dialog. - -- Translation support for the default preset name "(default)". - -- Messages window pops up whenever a critical error message is issued. - - -0.2.6 2004-02-29 More work in progress. - -- Message window line limit is now a configurable option on setup, as is - whether the command-line local configuration file gets saved at all; - the first argument of the command-line configuration is stuffed - to be the executable server command absolute path, when possible. - -- Warning message issued if ALSA sequencer is not available on startup; - also if server settings are changed while client is currently active. - -- Server autostart magic is locally disabled by forcing the environment - variable JACK_NO_START_SERVER at startup; with any luck this will - maintain qjackctl's behaviour whether the JACK server is already - started or not. - -- Makefile.cvs makes its late entrance on the build toolset. - - -0.2.5 2004-02-16 Server survival option and command-line wrapper feature. - -- New option on application exit for leaving the JACK server daemon running, - surviving the parent process; the confirmation prompt on application close - now features a "Terminate", "Leave" and "Cancel" button options. - -- New command-line wrapper feature for JACK client applications, thus - giving a convenient head start for the JACK audio server as needed - (as suggested by Fernando Pablo Lopez-Lezcano, of Planet CCRMA fame). - -- Messages, Status, Connections and Patchbay pop-up windows are not hinted - as dialogs anymore and thus are not centered relative to parent main window - which has become a strict Qt dialog widget behaviour (as of Qt 3.3+). - -- Patchbay window content changes are now properly updated, without the need - for a later manual refresh to redraw stalled connection lines. - -- The snapshot option for creating a new patchbay definition from current - actual connections now takes client and port names as regular expressions - and smart enough when regarding more than two contiguous decimal digits :) - -- Patchbay socket list view ordering is now properly preserved; socket - dialog gets plug list handling ehancements; active patchbay gets reloaded - when commited and saved to file; connections redraw on socket removal has - been fixed. - -- Server literal command-line is now saved into local configuration file - (~/.jackdrc) for convenience of future auto-start client applications. - -- New setup option on whether all child windows are kept on top of the main - window, or otherwise floating with probable taskbar entries of their own. - -- Setup changes that are only effective next time the program is run gets - an informational message box shown to the user. - - -0.2.4 2004-02-01 Exclusive patchbay sockets. - -- Patchbay definitions may now be configured with exclusive sockets; - this way, only one defined connection is allowed as soon as it's available, - being all others immediatelly disconnected whenever attempted. - -- On the connections view, current connected client ports are now slightly - highlighted (blue) whenever a client or port is selected on the opposite - column (as suggested by Lawrie Abbott). - -- Connections and patchbay drag and drop feature is now bilateral; you can - now drag and drop an item from right to left to establish the connection. - - -0.2.3a 2004-01-19 Time format combo-box tooltip fix. - -- A qt-designer copy-paste leftover has been fixed; sloppy boy I am ;) - - -0.2.3 2004-01-19 Tenths, hundredths, milliseconds, whatever. - -- Custom time format setup for all elapsed times, allowing the display - of tenths, hundredths or even milliseconds instead of just hundredths - of second for transport time code. - - -0.2.2 2004-01-16 Hundredths are back. - -- Transport time is now shown with hundredths of second (hh:mm:ss.dd), - as it was once before but not constant zero. - -- Client start delay now configurable on setup; this may be of help for - slow machines or unusual long server driver startups (e.g. portaudio). - -- Client-only mode restart has been fixed. - -- Messages color retouching. - -- Popup menus memory leak fixed. - - -0.2.1 2003-12-29 The fix of fixes. - -- Fixed jackstart/jackd command line parameter argument concatenation. - -- Front panel status display font can now be customized. - -- Some connection graph changes were being silently missed, now fixed. - -- Messages window fallback fix; stdout handling has been retouched to - be more line buffer oriented. - - -0.2.0 2003-12-12 ALSA sequencer patchbay entrance. - -- ALSA sequencer subscription patchbay feature, complementing current - audio service with a MIDI application connection graph, gracefuly - included on the same front-end. - -- Current preset name is shown on main window caption title. New button - and form icons. Messages window blankness rendering fix. - -- Immediate server startup option was made persistent and therefore - remembered across sessions. - -- Standard output/error stream capture setup option. - - -0.1.3 2003-11-26 Server settings profile/preset feature. - -- Server setup settings can now be profiled, named and saved as presets. - Command line preset name option and scripting argument meta-symbols are - also featured for convenience (kindly suggested by Sampo Savolainen). - -- New configure time argument debugging support (--enable-debug). - - -0.1.2 2003-11-16 More work in progress. - -- Qmake project file (qjackctl.pro) now generated by configure (autoconf), - introducing the explicit binding support to libqt-mt (multi-thread). - -- Main window is not hinted as a dialog anymore, giving room to the minimize - button on some other window managers; application close confirm warning is - now an option. - -- Removed deprecated settings options: temporary directory and ASIO mode; - new available settings for the ALSA driver: force 16bit format, maximum - input channels and output channels (as of JACK 0.90.x). - -- Transport time display looses static hundredth seconds decimal digits. - - -0.1.1a 2003-11-01 Whatever happened to OK button icons. - -- Restored missing OK button icons. - - -0.1.1 2003-10-29 Minor feature enhancements and bugfixes. - -- Main window display items are now made fixed in width, at least those more - prone to change frequently and thus caused some display jitter. - -- Messages, status, connections and patchbay module windows are now reopened - automagicaly on startup as they were on previous session. - -- New patchbay definition snapshot option from current actual connections; - current active patchbay filename status indication on title. - -- New icons patchbay editor window and socket dialogs; own stdout/stdin is - now properly captured and shown on messages log window. - -- Fixed an obvious patchbay connection scan freezing bug; default .xml file - extension enforcement on save. - - -0.1.0 2003-10-22 Major user interface redesign. - -- Main application window complete redesign, now more like a multimedia/LCD - control panel -- old main window dialog tabs are now splitted in separate - pop-up windows/dialogs; big time display options. In other words, this sums - up to a nice complete application rewrite. - -- Deprecated options for forcing aRTs and jackd daemons are no longer - available; this functionality can be officially superceded by the more - generic startup/shutdown script options. - -- Seamless support for externally started JACK server, providing a client-only - mode of operation; if the JACK daemon is already started, qjackctl enters in - client detached mode automagically. - -- Messages window font is configurable and saved across sessions (by Jack - O'Quin's humble request). Some colorization has been introduced on some - event messages. - -- Preliminary patchbay persistence feature is under way. A patchbay definition - editor is already included, following an alternative socket-plug patchbay - model that aliases and is a direct map to the client-port JACK connections - model. The patchbay definitions are stored as text/xml files. - -- New post-startup script option; immediate JACK server startup command line - option (as suggested by Kasper Souren). - - -0.0.9a 2003-10-03 Tiny bugfixes. - -- Startup/shutdown script options now correctly saved and restored. - -- Dummy driver wait parameter is now properly set on startup. - -- Confirmation warning on disconnecting all ports (as suggested by Robert - Jonsson). - - -0.0.9 2003-09-25 Work in progress. - -- New connection port item pixmaps that distinguishes physical from - logical ports. - -- History of most recently used values gets saved for some settings - and options comboboxes widgets. - -- New startup and shutdown script options, intended to supersede the - mess of forcing artsd and jackd itself, in a near future ;) this way, - one can also include the operation of the LADCCA daemon (following a - suggestion from Kasper Souren). - -- Connections command buttons are now shortly disabled after clicking, - avoiding accidental duplicated connections. - - -0.0.8 2003-09-19 Preliminary transport and buffer size status control. - -- Transport status and control introduced (requires JACK 0.80.0+); - -- Statistics tab renamed to Status, where the transport state info and - simple play/pause control buttons are now placed; - -- Buffer size status is yet another item on the list view. - - -0.0.7 2003-09-15 Minor bugfixes. - -- Inverse alphabetic ordering fixed on Connections port listing. - -- Verbose option added; messages view font size fix; about Qt dialog; - logo pixmap retouched. - -- Configure script now checks for Qt 3.1.1 or greater. - - -0.0.6 2003-09-12 Drag-n-drop and more feature enhancements and bufixes. - -- Patchbay connection user interface handling has been fairly rewritten; - (features new bugs while fixing old ones ;-) - -- Reset XRUN statistics button added; reset time recorded on statistics; - calculated latency is now shown on settings; ASIO mode disables - Periods/Buffer setting (all suggestions by Lawrie Abbott). - -- Context popup menu introduced for port connection handling; includes - new command for disconnecting all currently connected ports. - -- Closing the application while JACK is running, is now presented with a - warning confirmation message (preventing accidental Esc key press? :). - -- Patchbay port lists ordering are now more numerical-friendly than ever, - taking account for sub-numbering port names (following yet another - suggestion from Lawrie). - -- Connection drag-and-drop is now featured after many, many requests. - -- Corrected the configure script to properly recognize Qt 3.0.1 or greater. - - -0.0.5 2003-09-05 Minor feature enhancements and bugfixes. - -- Internationalization support added; future qjackctl_${LANG}.qm translation - files are located on ${prefix}/share/locale . - -- New dummy and portaudio driver support (as of JACK release 0.80.0+). - -- A couple of silent memory leak bugs have been corrected. - - -0.0.4 2003-08-29 Minor changes and bugfixes. - -- The patchbay port lists are now sorted in a more numerical friendly manner - (as suggested by Steve Harris); the sort code has been "borrowed" from - qjackconnect, yet again. - -- Patchbay port connection lines are now always visible, even if their - respective connected port items aren't. - -- Multiple simultaneous port connections can now be handled when a client - application item is selected for connection/disconnection (again, suggested - by Steve Harris), replicating and extending qjackconnect's similar behaviour. - -- An auto-refresh option for the patchbay connections is now available, - for those cases when client code just can't handle properly some callbacks. - -- Window positioning and sizing is now almost persistent across sessions; - as before, position is saved for the minimal view mode; but now, the details - dialog view mode gets its position and size independantly saved also. - - -0.0.3 2003-08-07 Integrated visual patchbay. - -- A patchbay for jack port connections is now integrated, much like the - greatest Mathias Nagorni's qjackconnect (http://www.suse.de/~mana/jack.html). - - -0.0.2 2003-08-02 Client code features introduced. - -- JACK library and header files are checked on configure. - -- Server CPU load, sample rate and time elapsed since last XRUN - detected, are now displayed on statistics. - - -0.0.1 2003-07-26 Initial release. - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/config.h.in qjackctl-0.3.6/=unpacked-tar1=/config.h.in --- qjackctl-0.3.4/=unpacked-tar1=/config.h.in 2008-12-05 18:31:37.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/config.h.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,109 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if ALSA/MIDI sequencer support is enabled. */ -#undef CONFIG_ALSA_SEQ - -/* Define if CoreAudio/CoreAudio.h is available (Mac OS X). */ -#undef CONFIG_COREAUDIO - -/* Define if debugging is enabled. */ -#undef CONFIG_DEBUG - -/* Define if jack_get_max_delayed_usecs is available. */ -#undef CONFIG_JACK_MAX_DELAY - -/* Define if JACK MIDI support is available. */ -#undef CONFIG_JACK_MIDI - -/* Define if jack_is_realtime is available. */ -#undef CONFIG_JACK_REALTIME - -/* Define if jack/statistics.h is available. */ -#undef CONFIG_JACK_STATISTICS - -/* Define if jack_tranport_query is available. */ -#undef CONFIG_JACK_TRANSPORT - -/* Define if jack_get_xrun_delayed_usecs is available. */ -#undef CONFIG_JACK_XRUN_DELAY - -/* Default installation prefix. */ -#undef CONFIG_PREFIX - -/* Define if round is available. */ -#undef CONFIG_ROUND - -/* Define if system tray is enabled. */ -#undef CONFIG_SYSTEM_TRAY - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `X11' library (-lX11). */ -#undef HAVE_LIBX11 - -/* Define to 1 if you have the `Xext' library (-lXext). */ -#undef HAVE_LIBXEXT - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `system' function. */ -#undef HAVE_SYSTEM - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS diff -Nru qjackctl-0.3.4/=unpacked-tar1=/configure qjackctl-0.3.6/=unpacked-tar1=/configure --- qjackctl-0.3.4/=unpacked-tar1=/configure 2008-12-05 18:31:38.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/configure 1970-01-01 01:00:00.000000000 +0100 @@ -1,7381 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for QjackCtl 0.3.4. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='QjackCtl' -PACKAGE_TARNAME='qjackctl' -PACKAGE_VERSION='0.3.4' -PACKAGE_STRING='QjackCtl 0.3.4' -PACKAGE_BUGREPORT='rncbc@rncbc.org' - -ac_unique_file="src/qjackctlMainForm.ui" -ac_default_prefix=/usr/local -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -ac_prefix -ac_debug -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXCPP -GREP -EGREP -ac_qmake -ac_moc -ac_uic -ac_lupdate -ac_lrelease -ac_libs -ac_incpath -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures QjackCtl 0.3.4 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/qjackctl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of QjackCtl 0.3.4:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-debug enable debugging (default=no) - --enable-system-tray enable system tray (default=yes) - --enable-jack-midi enable JACK MIDI support (default=yes) - --enable-alsa-seq enable ALSA/MIDI sequencer support (default=yes) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-qt=PATH use alternate Qt install path - --with-jack=PATH use alternate JACK install path - --with-alsa=PATH use alternate ALSA install path - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -QjackCtl configure 0.3.4 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by QjackCtl $as_me 0.3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_config_headers="$ac_config_headers config.h" - -ac_config_files="$ac_config_files Makefile qjackctl.pro qjackctl.spec qjackctl.desktop" - - -# Set default installation prefix. - -ac_prefix=$prefix -if test "x$ac_prefix" = "xNONE"; then - ac_prefix=$ac_default_prefix -fi - - -cat >>confdefs.h <<_ACEOF -#define CONFIG_PREFIX "$ac_prefix" -_ACEOF - - -# Enable debugging argument option. -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; ac_debug="$enableval" -fi - - -if test "x$ac_debug" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_DEBUG 1 -_ACEOF - - ac_debug="debug" -else - ac_debug="release" -fi - - -# Disable system tray argument option. -# Check whether --enable-system_tray was given. -if test "${enable_system_tray+set}" = set; then - enableval=$enable_system_tray; ac_system_tray="$enableval" -else - ac_system_tray="yes" -fi - - -# Disable JACK MIDI support option. -# Check whether --enable-jack_midi was given. -if test "${enable_jack_midi+set}" = set; then - enableval=$enable_jack_midi; ac_jack_midi="$enableval" -else - ac_jack_midi="yes" -fi - - -# Disable ALSA sequencer support option. -# Check whether --enable-alsa_seq was given. -if test "${enable_alsa_seq+set}" = set; then - enableval=$enable_alsa_seq; ac_alsa_seq="$enableval" -else - ac_alsa_seq="yes" -fi - - -# Standard installation base dirs. -ac_with_paths="/usr /usr/local" - -# Some a-la-debian alternatives... -for X in /usr/lib /usr/share; do - for Y in qt qt4; do - if test -d $X/$Y/bin; then - ac_with_paths="$ac_with_paths $X/$Y" - fi - done -done - -# Set for alternate Qt installation dir. - -# Check whether --with-qt was given. -if test "${with_qt+set}" = set; then - withval=$with_qt; ac_with_paths="$ac_with_paths $withval" -fi - - -# Set for alternate JACK installation dir. - -# Check whether --with-jack was given. -if test "${with_jack+set}" = set; then - withval=$with_jack; ac_with_paths="$ac_with_paths $withval" -fi - - -# Set for alternate ALSA installation dir. - -# Check whether --with-alsa was given. -if test "${with_alsa+set}" = set; then - withval=$with_alsa; ac_with_paths="$ac_with_paths $withval" -fi - - -# Checks for programs. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -if test $ac_cv_c_compiler_gnu = yes; then - { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - -# Checks for languages. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -# Prepend alternate dependencies paths. -ac_path=$PATH -for X in $ac_with_paths; do - if test -d $X/bin; then - ac_path="$X/bin:$ac_path" - fi - if test -x $X/qmake; then - ac_path="$X:$ac_path" - fi - if test -d $X/include; then - for Y in qt qt4; do - if test -d $X/include/$Y; then - CFLAGS="-I$X/include/$Y $CFLAGS" - CPPFLAGS="-I$X/include/$Y $CPPFLAGS" - ac_incpath="$X/include/$Y $ac_incpath" - fi - done - CFLAGS="-I$X/include $CFLAGS" - CPPFLAGS="-I$X/include $CPPFLAGS" - ac_incpath="$X/include $ac_incpath" - fi - if test -d $X/lib64; then - LIBS="-L$X/lib64 $LIBS" - ac_libs="-L$X/lib64 $ac_libs" - fi - if test -d $X/lib; then - LIBS="-L$X/lib $LIBS" - ac_libs="-L$X/lib $ac_libs" - fi -done - -# Check for proper Qt version. - -{ echo "$as_me:$LINENO: checking for Qt library version >= 4.1" >&5 -echo $ECHO_N "checking for Qt library version >= 4.1... $ECHO_C" >&6; } -if test "${ac_qtlib_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include "Qt/qglobal.h" -int -main () -{ - -#if QT_VERSION < 0x040100 -#error Qt library 4.1 or greater required. -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_qtlib_version="yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - echo "no; Qt 4.1 or greater is required" - exit - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ echo "$as_me:$LINENO: result: $ac_qtlib_version" >&5 -echo "${ECHO_T}$ac_qtlib_version" >&6; } - -# A common error message: -ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." - -# Check for Qt qmake utility. -# Extract the first word of "qmake", so it can be a program name with args. -set dummy qmake; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_qmake+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_qmake in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_qmake="$ac_qmake" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ac_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_qmake="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_qmake" && ac_cv_path_ac_qmake="no" - ;; -esac -fi -ac_qmake=$ac_cv_path_ac_qmake -if test -n "$ac_qmake"; then - { echo "$as_me:$LINENO: result: $ac_qmake" >&5 -echo "${ECHO_T}$ac_qmake" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test "x$ac_qmake" = "xno"; then - { { echo "$as_me:$LINENO: error: qmake $ac_errmsg" >&5 -echo "$as_me: error: qmake $ac_errmsg" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Check for Qt moc utility. -# Extract the first word of "moc", so it can be a program name with args. -set dummy moc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_moc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_moc in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_moc="$ac_moc" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ac_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_moc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_moc" && ac_cv_path_ac_moc="no" - ;; -esac -fi -ac_moc=$ac_cv_path_ac_moc -if test -n "$ac_moc"; then - { echo "$as_me:$LINENO: result: $ac_moc" >&5 -echo "${ECHO_T}$ac_moc" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test "x$ac_moc" = "xno"; then - { { echo "$as_me:$LINENO: error: moc $ac_errmsg" >&5 -echo "$as_me: error: moc $ac_errmsg" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Check for Qt uic utility. -# Extract the first word of "uic", so it can be a program name with args. -set dummy uic; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_uic+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_uic in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_uic="$ac_uic" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ac_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_uic="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_uic" && ac_cv_path_ac_uic="no" - ;; -esac -fi -ac_uic=$ac_cv_path_ac_uic -if test -n "$ac_uic"; then - { echo "$as_me:$LINENO: result: $ac_uic" >&5 -echo "${ECHO_T}$ac_uic" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test "x$ac_uic" = "xno"; then - { { echo "$as_me:$LINENO: error: uic $ac_errmsg" >&5 -echo "$as_me: error: uic $ac_errmsg" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Check for Qt lupdate utility. -# Extract the first word of "lupdate", so it can be a program name with args. -set dummy lupdate; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_lupdate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_lupdate in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_lupdate="$ac_lupdate" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ac_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_lupdate="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_lupdate" && ac_cv_path_ac_lupdate="no" - ;; -esac -fi -ac_lupdate=$ac_cv_path_ac_lupdate -if test -n "$ac_lupdate"; then - { echo "$as_me:$LINENO: result: $ac_lupdate" >&5 -echo "${ECHO_T}$ac_lupdate" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test "x$ac_lupdate" = "xno"; then - { { echo "$as_me:$LINENO: error: lupdate $ac_errmsg" >&5 -echo "$as_me: error: lupdate $ac_errmsg" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Check for Qt lrelease utility. -# Extract the first word of "lrelease", so it can be a program name with args. -set dummy lrelease; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_lrelease+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_lrelease in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_lrelease="$ac_lrelease" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ac_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_lrelease="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_lrelease" && ac_cv_path_ac_lrelease="no" - ;; -esac -fi -ac_lrelease=$ac_cv_path_ac_lrelease -if test -n "$ac_lrelease"; then - { echo "$as_me:$LINENO: result: $ac_lrelease" >&5 -echo "${ECHO_T}$ac_lrelease" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test "x$ac_release" = "xno"; then - { { echo "$as_me:$LINENO: error: lrelease $ac_errmsg" >&5 -echo "$as_me: error: lrelease $ac_errmsg" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Checks for libraries. - -{ echo "$as_me:$LINENO: checking for main in -lm" >&5 -echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_m_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 -echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } -if test $ac_cv_lib_m_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -{ echo "$as_me:$LINENO: checking for main in -lX11" >&5 -echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6; } -if test "${ac_cv_lib_X11_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lX11 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_X11_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_X11_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 -echo "${ECHO_T}$ac_cv_lib_X11_main" >&6; } -if test $ac_cv_lib_X11_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBX11 1 -_ACEOF - - LIBS="-lX11 $LIBS" - -fi - - -{ echo "$as_me:$LINENO: checking for main in -lXext" >&5 -echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xext_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xext_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xext_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 -echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } -if test $ac_cv_lib_Xext_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXEXT 1 -_ACEOF - - LIBS="-lXext $LIBS" - -fi - - -# Check for round math function. -{ echo "$as_me:$LINENO: checking for lroundf in -lm" >&5 -echo $ECHO_N "checking for lroundf in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_lroundf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lroundf (); -int -main () -{ -return lroundf (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_m_lroundf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_lroundf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_lroundf" >&5 -echo "${ECHO_T}$ac_cv_lib_m_lroundf" >&6; } -if test $ac_cv_lib_m_lroundf = yes; then - ac_round="yes" -else - ac_round="no" -fi - -if test "x$ac_round" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_ROUND 1 -_ACEOF - -fi - -# Check for JACK libraries. -{ echo "$as_me:$LINENO: checking for main in -ljack" >&5 -echo $ECHO_N "checking for main in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_main" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_main" >&6; } -if test $ac_cv_lib_jack_main = yes; then - ac_jack_lib="yes" -else - ac_jack_lib="no" -fi - -if test "x$ac_jack_lib" = "xno"; then - { { echo "$as_me:$LINENO: error: JACK library not found." >&5 -echo "$as_me: error: JACK library not found." >&2;} - { (exit 1); exit 1; }; } -fi -ac_libs="$ac_libs -ljack" - -# Check for ALSA libraries and primarily -# for ALSA/MIDI sequencer support. -if test "x$ac_alsa_seq" = "xyes"; then - { echo "$as_me:$LINENO: checking for main in -lasound" >&5 -echo $ECHO_N "checking for main in -lasound... $ECHO_C" >&6; } -if test "${ac_cv_lib_asound_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lasound $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_asound_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_asound_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_asound_main" >&5 -echo "${ECHO_T}$ac_cv_lib_asound_main" >&6; } -if test $ac_cv_lib_asound_main = yes; then - ac_alsa_lib="yes" -else - ac_alsa_lib="no" -fi - - if test "x$ac_alsa_lib" = "xno"; then - { echo "$as_me:$LINENO: WARNING: *** ALSA library not found." >&5 -echo "$as_me: WARNING: *** ALSA library not found." >&2;} - ac_alsa_seq="no" - else - ac_libs="$ac_libs -lasound" - fi -fi - - - - -# Checks for header files. - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_sys_wait_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - -for ac_header in fcntl.h sys/ioctl.h unistd.h poll.h signal.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Check for JACK headers. -if test "${ac_cv_header_jack_jack_h+set}" = set; then - { echo "$as_me:$LINENO: checking for jack/jack.h" >&5 -echo $ECHO_N "checking for jack/jack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_jack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_jack_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking jack/jack.h usability" >&5 -echo $ECHO_N "checking jack/jack.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking jack/jack.h presence" >&5 -echo $ECHO_N "checking jack/jack.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jack/jack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jack/jack.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jack/jack.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jack/jack.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jack/jack.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jack/jack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for jack/jack.h" >&5 -echo $ECHO_N "checking for jack/jack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_jack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_jack_jack_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_jack_h" >&6; } - -fi -if test $ac_cv_header_jack_jack_h = yes; then - ac_jack_h="yes" -else - ac_jack_h="no" -fi - - -if test "x$ac_jack_h" = "xno"; then - { { echo "$as_me:$LINENO: error: JACK headers not found." >&5 -echo "$as_me: error: JACK headers not found." >&2;} - { (exit 1); exit 1; }; } -fi - -# Check for jack/statistics.h header. -if test "${ac_cv_header_jack_statistics_h+set}" = set; then - { echo "$as_me:$LINENO: checking for jack/statistics.h" >&5 -echo $ECHO_N "checking for jack/statistics.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_statistics_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_statistics_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_statistics_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking jack/statistics.h usability" >&5 -echo $ECHO_N "checking jack/statistics.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking jack/statistics.h presence" >&5 -echo $ECHO_N "checking jack/statistics.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jack/statistics.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jack/statistics.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jack/statistics.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jack/statistics.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jack/statistics.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jack/statistics.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jack/statistics.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/statistics.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jack/statistics.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for jack/statistics.h" >&5 -echo $ECHO_N "checking for jack/statistics.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_statistics_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_jack_statistics_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_statistics_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_statistics_h" >&6; } - -fi -if test $ac_cv_header_jack_statistics_h = yes; then - ac_jack_statistics_h="yes" -else - ac_jack_statistics_h="no" -fi - - -if test "x$ac_jack_statistics_h" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_STATISTICS 1 -_ACEOF - -fi - -# Check for CoreAudio/CoreAudio.h header (MacOSX). -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - { echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5 -echo $ECHO_N "checking CoreAudio/CoreAudio.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5 -echo $ECHO_N "checking CoreAudio/CoreAudio.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: CoreAudio/CoreAudio.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5 -echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5 -echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6; } - -fi -if test $ac_cv_header_CoreAudio_CoreAudio_h = yes; then - ac_coreaudio="yes" -else - ac_coreaudio="no" -fi - - -if test "x$ac_coreaudio" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_COREAUDIO 1 -_ACEOF - - ac_alsa_seq="no" - ac_libs="-framework CoreAudio -framework CoreFoundation $ac_libs" -fi - -# Check for some JACK MIDI headers. -if test "x$ac_jack_midi" = "xyes"; then - if test "${ac_cv_header_jack_midiport_h+set}" = set; then - { echo "$as_me:$LINENO: checking for jack/midiport.h" >&5 -echo $ECHO_N "checking for jack/midiport.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_midiport_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_midiport_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_midiport_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking jack/midiport.h usability" >&5 -echo $ECHO_N "checking jack/midiport.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking jack/midiport.h presence" >&5 -echo $ECHO_N "checking jack/midiport.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: jack/midiport.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: jack/midiport.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: jack/midiport.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: jack/midiport.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: jack/midiport.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: jack/midiport.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jack/midiport.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: jack/midiport.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: jack/midiport.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for jack/midiport.h" >&5 -echo $ECHO_N "checking for jack/midiport.h... $ECHO_C" >&6; } -if test "${ac_cv_header_jack_midiport_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_jack_midiport_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_midiport_h" >&5 -echo "${ECHO_T}$ac_cv_header_jack_midiport_h" >&6; } - -fi -if test $ac_cv_header_jack_midiport_h = yes; then - ac_jack_midi="yes" -else - ac_jack_midi="no" -fi - - -fi - -# Check for ALSA headers and ultimately -# for ALSA/MIDI sequencer support. -if test "x$ac_alsa_seq" = "xyes"; then - if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 -echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking alsa/asoundlib.h usability" >&5 -echo $ECHO_N "checking alsa/asoundlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking alsa/asoundlib.h presence" >&5 -echo $ECHO_N "checking alsa/asoundlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to rncbc@rncbc.org ## -## ------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5 -echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_alsa_asoundlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6; } - -fi -if test $ac_cv_header_alsa_asoundlib_h = yes; then - ac_alsa_h="yes" -else - ac_alsa_h="no" -fi - - - if test "x$ac_alsa_h" = "xno"; then - { { echo "$as_me:$LINENO: error: ALSA headers not found." >&5 -echo "$as_me: error: ALSA headers not found." >&2;} - { (exit 1); exit 1; }; } - fi - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_ALSA_SEQ 1 -_ACEOF - -else - { echo "$as_me:$LINENO: WARNING: *** ALSA/MIDI sequencer support will be disabled." >&5 -echo "$as_me: WARNING: *** ALSA/MIDI sequencer support will be disabled." >&2;} -fi - -# Checks for typedefs, structures, and compiler characteristics. -# AC_C_CONST - -# Checks for library functions. - -for ac_func in system -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# Check for system-tray icon. -if test "x$ac_system_tray" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_SYSTEM_TRAY 1 -_ACEOF - -fi - -# Check for jack_transport_query function. -{ echo "$as_me:$LINENO: checking for jack_transport_query in -ljack" >&5 -echo $ECHO_N "checking for jack_transport_query in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_jack_transport_query+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jack_transport_query (); -int -main () -{ -return jack_transport_query (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_jack_transport_query=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_transport_query=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_transport_query" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_jack_transport_query" >&6; } -if test $ac_cv_lib_jack_jack_transport_query = yes; then - ac_jack_transport="yes" -else - ac_jack_transport="no" -fi - -if test "x$ac_jack_transport" = "xno"; then - { echo "$as_me:$LINENO: WARNING: *** jack_transport_query: function not found." >&5 -echo "$as_me: WARNING: *** jack_transport_query: function not found." >&2;} - { echo "$as_me:$LINENO: WARNING: *** JACK 0.80.0 or later may be required." >&5 -echo "$as_me: WARNING: *** JACK 0.80.0 or later may be required." >&2;} - { echo "$as_me:$LINENO: WARNING: *** Transport features will be disabled." >&5 -echo "$as_me: WARNING: *** Transport features will be disabled." >&2;} -else - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_TRANSPORT 1 -_ACEOF - -fi - -# Check for jack_is_realtime function. -{ echo "$as_me:$LINENO: checking for jack_is_realtime in -ljack" >&5 -echo $ECHO_N "checking for jack_is_realtime in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_jack_is_realtime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jack_is_realtime (); -int -main () -{ -return jack_is_realtime (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_jack_is_realtime=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_is_realtime=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_is_realtime" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_jack_is_realtime" >&6; } -if test $ac_cv_lib_jack_jack_is_realtime = yes; then - ac_jack_realtime="yes" -else - ac_jack_realtime="no" -fi - -if test "x$ac_jack_realtime" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_REALTIME 1 -_ACEOF - -fi - -# Check for jack_get_xrun_delayed_usecs function. -{ echo "$as_me:$LINENO: checking for jack_get_xrun_delayed_usecs in -ljack" >&5 -echo $ECHO_N "checking for jack_get_xrun_delayed_usecs in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_jack_get_xrun_delayed_usecs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jack_get_xrun_delayed_usecs (); -int -main () -{ -return jack_get_xrun_delayed_usecs (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_jack_get_xrun_delayed_usecs=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_get_xrun_delayed_usecs=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_get_xrun_delayed_usecs" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_jack_get_xrun_delayed_usecs" >&6; } -if test $ac_cv_lib_jack_jack_get_xrun_delayed_usecs = yes; then - ac_jack_xrun_delay="yes" -else - ac_jack_xrun_delay="no" -fi - -if test "x$ac_jack_xrun_delay" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_XRUN_DELAY 1 -_ACEOF - -fi - -# Check for jack_get_max_delayed_usecs function. -{ echo "$as_me:$LINENO: checking for jack_get_max_delayed_usecs in -ljack" >&5 -echo $ECHO_N "checking for jack_get_max_delayed_usecs in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_jack_get_max_delayed_usecs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jack_get_max_delayed_usecs (); -int -main () -{ -return jack_get_max_delayed_usecs (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_jack_get_max_delayed_usecs=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_get_max_delayed_usecs=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_get_max_delayed_usecs" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_jack_get_max_delayed_usecs" >&6; } -if test $ac_cv_lib_jack_jack_get_max_delayed_usecs = yes; then - ac_jack_max_delay="yes" -else - ac_jack_max_delay="no" -fi - -if test "x$ac_jack_max_delay" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_MAX_DELAY 1 -_ACEOF - -fi - -# Check for JACK MIDI library support. -if test "x$ac_jack_midi" = "xyes"; then - { echo "$as_me:$LINENO: checking for jack_midi_event_get in -ljack" >&5 -echo $ECHO_N "checking for jack_midi_event_get in -ljack... $ECHO_C" >&6; } -if test "${ac_cv_lib_jack_jack_midi_event_get+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jack_midi_event_get (); -int -main () -{ -return jack_midi_event_get (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_jack_jack_midi_event_get=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jack_jack_midi_event_get=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_jack_jack_midi_event_get" >&5 -echo "${ECHO_T}$ac_cv_lib_jack_jack_midi_event_get" >&6; } -if test $ac_cv_lib_jack_jack_midi_event_get = yes; then - ac_jack_midi="yes" -else - ac_jack_midi="no" -fi - - if test "x$ac_jack_midi" = "xno"; then - { echo "$as_me:$LINENO: WARNING: *** jack_midi_event_get: function not found." >&5 -echo "$as_me: WARNING: *** jack_midi_event_get: function not found." >&2;} - { echo "$as_me:$LINENO: WARNING: *** JACK 0.103.0 or later may be required." >&5 -echo "$as_me: WARNING: *** JACK 0.103.0 or later may be required." >&2;} - { echo "$as_me:$LINENO: WARNING: *** JACK MIDI support will be disabled." >&5 -echo "$as_me: WARNING: *** JACK MIDI support will be disabled." >&2;} - else - -cat >>confdefs.h <<\_ACEOF -#define CONFIG_JACK_MIDI 1 -_ACEOF - - fi -fi - -# Finally produce a configure header file and the main makefile. -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by QjackCtl $as_me 0.3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -QjackCtl config.status 0.3.4 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "qjackctl.pro") CONFIG_FILES="$CONFIG_FILES qjackctl.pro" ;; - "qjackctl.spec") CONFIG_FILES="$CONFIG_FILES qjackctl.spec" ;; - "qjackctl.desktop") CONFIG_FILES="$CONFIG_FILES qjackctl.desktop" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -ac_prefix!$ac_prefix$ac_delim -ac_debug!$ac_debug$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXCPP!$CXXCPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -ac_qmake!$ac_qmake$ac_delim -ac_moc!$ac_moc$ac_delim -ac_uic!$ac_uic$ac_delim -ac_lupdate!$ac_lupdate$ac_delim -ac_lrelease!$ac_lrelease$ac_delim -ac_libs!$ac_libs$ac_delim -ac_incpath!$ac_incpath$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" - ;; - - - esac - -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - -# make clean > /dev/null 2>&1 - -# Output summary message - -echo -echo " $PACKAGE_NAME $PACKAGE_VERSION" -echo -echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" -echo -echo " JACK Audio Connection Kit support . . . . . . . .: $ac_jack_lib" -echo " JACK Realtime support . . . . . . . . . . . . . .: $ac_jack_realtime" -echo " JACK Transport support . . . . . . . . . . . . . .: $ac_jack_transport" -echo " JACK XRUN delay support . . . . . . . . . . . . .: $ac_jack_xrun_delay" -echo " JACK Maximum scheduling delay support . . . . . .: $ac_jack_max_delay" -echo " JACK MIDI support . . . . . . . . . . . . . . . .: $ac_jack_midi" -echo " ALSA MIDI Sequencer support . . . . . . . . . . .: $ac_alsa_seq" -echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" -echo -echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" -echo -echo "Now type 'make', followed by 'make install' as root." -echo diff -Nru qjackctl-0.3.4/=unpacked-tar1=/configure.ac qjackctl-0.3.6/=unpacked-tar1=/configure.ac --- qjackctl-0.3.4/=unpacked-tar1=/configure.ac 2008-12-05 08:18:08.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/configure.ac 1970-01-01 01:00:00.000000000 +0100 @@ -1,319 +0,0 @@ -# Process this file with autoconf to produce a configure script. -AC_INIT(QjackCtl, 0.3.4, rncbc@rncbc.org, qjackctl) - -AC_CONFIG_SRCDIR(src/qjackctlMainForm.ui) -AC_CONFIG_HEADERS(config.h) -AC_CONFIG_FILES(Makefile qjackctl.pro qjackctl.spec qjackctl.desktop) - -# Set default installation prefix. -AC_PREFIX_DEFAULT(/usr/local) -ac_prefix=$prefix -if test "x$ac_prefix" = "xNONE"; then - ac_prefix=$ac_default_prefix -fi -AC_SUBST(ac_prefix) -AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) - -# Enable debugging argument option. -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), - [ac_debug="$enableval"]) - -if test "x$ac_debug" = "xyes"; then - AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) - ac_debug="debug" -else - ac_debug="release" -fi -AC_SUBST(ac_debug) - -# Disable system tray argument option. -AC_ARG_ENABLE(system_tray, - AC_HELP_STRING([--enable-system-tray], [enable system tray (default=yes)]), - [ac_system_tray="$enableval"], - [ac_system_tray="yes"]) - -# Disable JACK MIDI support option. -AC_ARG_ENABLE(jack_midi, - AC_HELP_STRING([--enable-jack-midi], [enable JACK MIDI support (default=yes)]), - [ac_jack_midi="$enableval"], - [ac_jack_midi="yes"]) - -# Disable ALSA sequencer support option. -AC_ARG_ENABLE(alsa_seq, - AC_HELP_STRING([--enable-alsa-seq], [enable ALSA/MIDI sequencer support (default=yes)]), - [ac_alsa_seq="$enableval"], - [ac_alsa_seq="yes"]) - -# Standard installation base dirs. -ac_with_paths="/usr /usr/local" - -# Some a-la-debian alternatives... -for X in /usr/lib /usr/share; do - for Y in qt qt4; do - if test -d $X/$Y/bin; then - ac_with_paths="$ac_with_paths $X/$Y" - fi - done -done - -# Set for alternate Qt installation dir. -AC_ARG_WITH(qt, - AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), - [ac_with_paths="$ac_with_paths $withval"]) - -# Set for alternate JACK installation dir. -AC_ARG_WITH(jack, - AC_HELP_STRING([--with-jack=PATH], [use alternate JACK install path]), - [ac_with_paths="$ac_with_paths $withval"]) - -# Set for alternate ALSA installation dir. -AC_ARG_WITH(alsa, - AC_HELP_STRING([--with-alsa=PATH], [use alternate ALSA install path]), - [ac_with_paths="$ac_with_paths $withval"]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_CXXCPP -AC_PROG_GCC_TRADITIONAL - -# Checks for languages. -AC_LANG_C -AC_LANG_CPLUSPLUS - -# Prepend alternate dependencies paths. -ac_path=$PATH -for X in $ac_with_paths; do - if test -d $X/bin; then - ac_path="$X/bin:$ac_path" - fi - if test -x $X/qmake; then - ac_path="$X:$ac_path" - fi - if test -d $X/include; then - for Y in qt qt4; do - if test -d $X/include/$Y; then - CFLAGS="-I$X/include/$Y $CFLAGS" - CPPFLAGS="-I$X/include/$Y $CPPFLAGS" - ac_incpath="$X/include/$Y $ac_incpath" - fi - done - CFLAGS="-I$X/include $CFLAGS" - CPPFLAGS="-I$X/include $CPPFLAGS" - ac_incpath="$X/include $ac_incpath" - fi - if test -d $X/lib64; then - LIBS="-L$X/lib64 $LIBS" - ac_libs="-L$X/lib64 $ac_libs" - fi - if test -d $X/lib; then - LIBS="-L$X/lib $LIBS" - ac_libs="-L$X/lib $ac_libs" - fi -done - -# Check for proper Qt version. -AC_CACHE_CHECK([for Qt library version >= 4.1], - ac_qtlib_version, [ - AC_TRY_LINK([#include "Qt/qglobal.h"], [ -#if QT_VERSION < 0x040100 -#error Qt library 4.1 or greater required. -#endif - ], - ac_qtlib_version="yes", [ - echo "no; Qt 4.1 or greater is required" - exit - ]) -]) - -# A common error message: -ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." - -# Check for Qt qmake utility. -AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path) -if test "x$ac_qmake" = "xno"; then - AC_MSG_ERROR([qmake $ac_errmsg]) -fi -AC_SUBST(ac_qmake) - -# Check for Qt moc utility. -AC_PATH_PROG(ac_moc, moc, [no], $ac_path) -if test "x$ac_moc" = "xno"; then - AC_MSG_ERROR([moc $ac_errmsg]) -fi -AC_SUBST(ac_moc) - -# Check for Qt uic utility. -AC_PATH_PROG(ac_uic, uic, [no], $ac_path) -if test "x$ac_uic" = "xno"; then - AC_MSG_ERROR([uic $ac_errmsg]) -fi -AC_SUBST(ac_uic) - -# Check for Qt lupdate utility. -AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) -if test "x$ac_lupdate" = "xno"; then - AC_MSG_ERROR([lupdate $ac_errmsg]) -fi -AC_SUBST(ac_lupdate) - -# Check for Qt lrelease utility. -AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) -if test "x$ac_release" = "xno"; then - AC_MSG_ERROR([lrelease $ac_errmsg]) -fi -AC_SUBST(ac_lrelease) - -# Checks for libraries. -AC_CHECK_LIB(m, main) -AC_CHECK_LIB(X11, main) -AC_CHECK_LIB(Xext, main) - -# Check for round math function. -AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"]) -if test "x$ac_round" = "xyes"; then - AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) -fi - -# Check for JACK libraries. -AC_CHECK_LIB(jack, main, [ac_jack_lib="yes"], [ac_jack_lib="no"]) -if test "x$ac_jack_lib" = "xno"; then - AC_MSG_ERROR([JACK library not found.]) -fi -ac_libs="$ac_libs -ljack" - -# Check for ALSA libraries and primarily -# for ALSA/MIDI sequencer support. -if test "x$ac_alsa_seq" = "xyes"; then - AC_CHECK_LIB(asound, main, [ac_alsa_lib="yes"], [ac_alsa_lib="no"]) - if test "x$ac_alsa_lib" = "xno"; then - AC_MSG_WARN([*** ALSA library not found.]) - ac_alsa_seq="no" - else - ac_libs="$ac_libs -lasound" - fi -fi - -AC_SUBST(ac_libs) -AC_SUBST(ac_incpath) - -# Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h poll.h signal.h) - -# Check for JACK headers. -AC_CHECK_HEADER(jack/jack.h, [ac_jack_h="yes"], [ac_jack_h="no"]) -if test "x$ac_jack_h" = "xno"; then - AC_MSG_ERROR([JACK headers not found.]) -fi - -# Check for jack/statistics.h header. -AC_CHECK_HEADER(jack/statistics.h, [ac_jack_statistics_h="yes"], [ac_jack_statistics_h="no"]) -if test "x$ac_jack_statistics_h" = "xyes"; then - AC_DEFINE(CONFIG_JACK_STATISTICS, 1, [Define if jack/statistics.h is available.]) -fi - -# Check for CoreAudio/CoreAudio.h header (MacOSX). -AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ac_coreaudio="yes"], [ac_coreaudio="no"]) -if test "x$ac_coreaudio" = "xyes"; then - AC_DEFINE(CONFIG_COREAUDIO, 1, [Define if CoreAudio/CoreAudio.h is available (Mac OS X).]) - ac_alsa_seq="no" - ac_libs="-framework CoreAudio -framework CoreFoundation $ac_libs" -fi - -# Check for some JACK MIDI headers. -if test "x$ac_jack_midi" = "xyes"; then - AC_CHECK_HEADER(jack/midiport.h, [ac_jack_midi="yes"], [ac_jack_midi="no"]) -fi - -# Check for ALSA headers and ultimately -# for ALSA/MIDI sequencer support. -if test "x$ac_alsa_seq" = "xyes"; then - AC_CHECK_HEADER(alsa/asoundlib.h, [ac_alsa_h="yes"], [ac_alsa_h="no"]) - if test "x$ac_alsa_h" = "xno"; then - AC_MSG_ERROR([ALSA headers not found.]) - fi - AC_DEFINE(CONFIG_ALSA_SEQ, 1, [Define if ALSA/MIDI sequencer support is enabled.]) -else - AC_MSG_WARN([*** ALSA/MIDI sequencer support will be disabled.]) -fi - -# Checks for typedefs, structures, and compiler characteristics. -# AC_C_CONST - -# Checks for library functions. -AC_CHECK_FUNCS(system) - -# Check for system-tray icon. -if test "x$ac_system_tray" = "xyes"; then - AC_DEFINE(CONFIG_SYSTEM_TRAY, 1, [Define if system tray is enabled.]) -fi - -# Check for jack_transport_query function. -AC_CHECK_LIB(jack, jack_transport_query, [ac_jack_transport="yes"], [ac_jack_transport="no"]) -if test "x$ac_jack_transport" = "xno"; then - AC_MSG_WARN([*** jack_transport_query: function not found.]) - AC_MSG_WARN([*** JACK 0.80.0 or later may be required.]) - AC_MSG_WARN([*** Transport features will be disabled.]) -else - AC_DEFINE(CONFIG_JACK_TRANSPORT, 1, [Define if jack_tranport_query is available.]) -fi - -# Check for jack_is_realtime function. -AC_CHECK_LIB(jack, jack_is_realtime, [ac_jack_realtime="yes"], [ac_jack_realtime="no"]) -if test "x$ac_jack_realtime" = "xyes"; then - AC_DEFINE(CONFIG_JACK_REALTIME, 1, [Define if jack_is_realtime is available.]) -fi - -# Check for jack_get_xrun_delayed_usecs function. -AC_CHECK_LIB(jack, jack_get_xrun_delayed_usecs, [ac_jack_xrun_delay="yes"], [ac_jack_xrun_delay="no"]) -if test "x$ac_jack_xrun_delay" = "xyes"; then - AC_DEFINE(CONFIG_JACK_XRUN_DELAY, 1, [Define if jack_get_xrun_delayed_usecs is available.]) -fi - -# Check for jack_get_max_delayed_usecs function. -AC_CHECK_LIB(jack, jack_get_max_delayed_usecs, [ac_jack_max_delay="yes"], [ac_jack_max_delay="no"]) -if test "x$ac_jack_max_delay" = "xyes"; then - AC_DEFINE(CONFIG_JACK_MAX_DELAY, 1, [Define if jack_get_max_delayed_usecs is available.]) -fi - -# Check for JACK MIDI library support. -if test "x$ac_jack_midi" = "xyes"; then - AC_CHECK_LIB(jack, jack_midi_event_get, [ac_jack_midi="yes"], [ac_jack_midi="no"]) - if test "x$ac_jack_midi" = "xno"; then - AC_MSG_WARN([*** jack_midi_event_get: function not found.]) - AC_MSG_WARN([*** JACK 0.103.0 or later may be required.]) - AC_MSG_WARN([*** JACK MIDI support will be disabled.]) - else - AC_DEFINE(CONFIG_JACK_MIDI, 1, [Define if JACK MIDI support is available.]) - fi -fi - -# Finally produce a configure header file and the main makefile. -AC_OUTPUT - -# make clean > /dev/null 2>&1 - -# Output summary message - -echo -echo " $PACKAGE_NAME $PACKAGE_VERSION" -echo -echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" -echo -echo " JACK Audio Connection Kit support . . . . . . . .: $ac_jack_lib" -echo " JACK Realtime support . . . . . . . . . . . . . .: $ac_jack_realtime" -echo " JACK Transport support . . . . . . . . . . . . . .: $ac_jack_transport" -echo " JACK XRUN delay support . . . . . . . . . . . . .: $ac_jack_xrun_delay" -echo " JACK Maximum scheduling delay support . . . . . .: $ac_jack_max_delay" -echo " JACK MIDI support . . . . . . . . . . . . . . . .: $ac_jack_midi" -echo " ALSA MIDI Sequencer support . . . . . . . . . . .: $ac_alsa_seq" -echo " System tray icon support . . . . . . . . . . . . .: $ac_system_tray" -echo -echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" -echo -echo "Now type 'make', followed by 'make install' as root." -echo diff -Nru qjackctl-0.3.4/=unpacked-tar1=/COPYING qjackctl-0.3.6/=unpacked-tar1=/COPYING --- qjackctl-0.3.4/=unpacked-tar1=/COPYING 2006-09-24 13:29:31.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/COPYING 1970-01-01 01:00:00.000000000 +0100 @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/changelog qjackctl-0.3.6/=unpacked-tar1=/debian/changelog --- qjackctl-0.3.4/=unpacked-tar1=/debian/changelog 2008-12-05 08:18:08.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/changelog 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -qjackctl (0.3.4-1) unstable; urgency=low - - * Patchbay snapshot revamp. - - -- Rui Nuno Capela Fri, 5 Dec 2008 18:48:00 +0100 - -qjackctl (0.3.3-1) unstable; urgency=low - - * Patchbay JACK-MIDI, file logging and X11 uniqueness. - - -- Rui Nuno Capela Sat, 7 Jun 2008 14:51:06 +0100 - -qjackctl (0.3.2-1) unstable; urgency=low - - * Patchbay heads-up with season greetings. - - -- Rui Nuno Capela Thu, 20 Dec 2007 10:15:01 +0100 - -qjackctl (0.3.1a-1) unstable; urgency=low - - * System-tray tooltip icon crash fix. - - -- Rui Nuno Capela Thu, 19 Jul 2007 08:38:05 +0100 - -qjackctl (0.3.1-1) unstable; urgency=low - - * Shallowed bug-fix release. - - -- Rui Nuno Capela Wed, 18 Jul 2007 17:12:03 +0100 - -qjackctl (0.3.0-1) unstable; urgency=low - - * Qt migration was complete. - - -- Rui Nuno Capela Tue, 10 Jul 2007 16:01:20 +0100 - -qjackctl (0.2.23-1) unstable; urgency=low - - * Initial debianization - - -- Rui Nuno Capela Mon, 25 Jun 2007 10:42:40 +0100 - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/compat qjackctl-0.3.6/=unpacked-tar1=/debian/compat --- qjackctl-0.3.4/=unpacked-tar1=/debian/compat 2007-06-25 10:08:04.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/compat 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -5 diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/control qjackctl-0.3.6/=unpacked-tar1=/debian/control --- qjackctl-0.3.4/=unpacked-tar1=/debian/control 2007-09-20 15:19:14.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/control 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -Source: qjackctl -Section: sound -Priority: extra -Maintainer: Rui Nuno Capela -Build-Depends: debhelper (>= 5), libqt4-dev, libjack-dev, libasound-dev -Standards-Version: 3.7.2 - -Package: qjackctl -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: JACK Audio Connection Kit Qt GUI Interface. - QjackCtl is a simple Qt application to control the JACK sound server - (http://jackaudio.org), for the Linux Audio infrastructure. - Written in C++ around the Qt4 toolkit for X11, most exclusively using - Qt Designer. Provides a simple GUI dialog for setting several JACK - server parameters, which are properly saved between sessions, and - a way control of the status of the audio server. With time, this - primordial interface has become richer by including a enhanced - patchbay and connection control features. - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/copyright qjackctl-0.3.6/=unpacked-tar1=/debian/copyright --- qjackctl-0.3.4/=unpacked-tar1=/debian/copyright 2008-12-05 08:18:08.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/copyright 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -This package was debianized by Rui Nuno Capela on -Mon, 25 Jun 2007 10:42:40 +0100. - -It was downloaded from http://qjackctl.sourceforge.net - -Upstream Author: Rui Nuno Capela - -Copyright: - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - -License: - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -The Debian packaging is (C) 2008, Rui Nuno Capela and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/docs qjackctl-0.3.6/=unpacked-tar1=/debian/docs --- qjackctl-0.3.4/=unpacked-tar1=/debian/docs 2007-06-25 10:08:04.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/docs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -README -TODO diff -Nru qjackctl-0.3.4/=unpacked-tar1=/debian/rules qjackctl-0.3.6/=unpacked-tar1=/debian/rules --- qjackctl-0.3.4/=unpacked-tar1=/debian/rules 2007-06-25 10:08:04.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/debian/rules 1970-01-01 01:00:00.000000000 +0100 @@ -1,100 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - - # Add here commands to configure the package. - -$(MAKE) -f Makefile.cvs - - ./configure --prefix=/usr - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - #docbook-to-man debian/qjackctl.sgml > qjackctl.1 - - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) -f Makefile.cvs clean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/qjackctl. - $(MAKE) DESTDIR=$(CURDIR)/debian/qjackctl install - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/about1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/about1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/accept1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/accept1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aclienti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aclienti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aclienti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aclienti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aclienti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aclienti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/acliento_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/acliento_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/acliento_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/acliento_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/acliento.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/acliento.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/add1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/add1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlni_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlni_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlni_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlni_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlni.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlni.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlno_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlno_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlno_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlno_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlno.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlno.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportlto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportlto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpni_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpni_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpni_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpni_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpni.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpni.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpno_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpno_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpno_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpno_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpno.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpno.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/aportpto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/aportpto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/apply1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/apply1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/asocketi.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/asocketi.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/asocketo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/asocketo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/backward1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/backward1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/connect1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/connect1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/connections1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/connections1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/copy1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/copy1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/disconnect1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/disconnect1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/disconnectall1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/disconnectall1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/displaybg1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/displaybg1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/down1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/down1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/edit1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/edit1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/forward1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/forward1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mclienti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mclienti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mclienti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mclienti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mclienti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mclienti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mcliento_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mcliento_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mcliento_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mcliento_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mcliento.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mcliento.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/messages1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/messages1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporti_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporti_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporti_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporti_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporti.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporti.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporto_32x32.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporto_32x32.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporto_64x64.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporto_64x64.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/mporto.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/mporto.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/msocketi.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/msocketi.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/msocketo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/msocketo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/new1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/new1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/open1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/open1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/patchbay1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/patchbay1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/pause1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/pause1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/play1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/play1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/qjackctl.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/qjackctl.png differ diff -Nru qjackctl-0.3.4/=unpacked-tar1=/icons/qjackctl.qrc qjackctl-0.3.6/=unpacked-tar1=/icons/qjackctl.qrc --- qjackctl-0.3.4/=unpacked-tar1=/icons/qjackctl.qrc 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/icons/qjackctl.qrc 1970-01-01 01:00:00.000000000 +0100 @@ -1,92 +0,0 @@ - - - qjackctl.png - about1.png - accept1.png - aclienti.png - aclienti_32x32.png - aclienti_64x64.png - acliento.png - acliento_32x32.png - acliento_64x64.png - add1.png - aportlni.png - aportlni_32x32.png - aportlni_64x64.png - aportlno.png - aportlno_32x32.png - aportlno_64x64.png - aportlti.png - aportlti_32x32.png - aportlti_64x64.png - aportlto.png - aportlto_32x32.png - aportlto_64x64.png - aportpni.png - aportpni_32x32.png - aportpni_64x64.png - aportpno.png - aportpno_32x32.png - aportpno_64x64.png - aportpti.png - aportpti_32x32.png - aportpti_64x64.png - aportpto.png - aportpto_32x32.png - aportpto_64x64.png - apply1.png - asocketi.png - asocketo.png - backward1.png - connect1.png - connections1.png - copy1.png - disconnect1.png - disconnectall1.png - displaybg1.png - down1.png - edit1.png - forward1.png - mclienti.png - mclienti_32x32.png - mclienti_64x64.png - mcliento.png - mcliento_32x32.png - mcliento_64x64.png - messages1.png - mporti.png - mporti_32x32.png - mporti_64x64.png - mporto.png - mporto_32x32.png - mporto_64x64.png - msocketi.png - msocketo.png - new1.png - open1.png - patchbay1.png - pause1.png - play1.png - quit1.png - refresh1.png - remove1.png - reset1.png - rewind1.png - save1.png - setup1.png - socket1.png - start1.png - status1.png - stop1.png - up1.png - xactivating1.png - xactive1.png - xinactive1.png - xsocket1.png - xstarted1.png - xstarting1.png - xstopped1.png - xstopping1.png - qtlogo.png - - Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/qtlogo.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/qtlogo.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/quit1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/quit1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/refresh1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/refresh1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/remove1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/remove1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/reset1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/reset1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/rewind1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/rewind1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/save1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/save1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/setup1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/setup1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/socket1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/socket1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/start1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/start1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/status1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/status1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/stop1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/stop1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/up1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/up1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xactivating1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xactivating1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xactive1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xactive1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xinactive1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xinactive1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xsocket1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xsocket1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xstarted1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xstarted1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xstarting1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xstarting1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xstopped1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xstopped1.png differ Binary files /tmp/pIo51TJOsv/qjackctl-0.3.4/=unpacked-tar1=/icons/xstopping1.png and /tmp/xtkBrD3mXL/qjackctl-0.3.6/=unpacked-tar1=/icons/xstopping1.png differ diff -Nru qjackctl-0.3.4/=unpacked-tar1=/INSTALL qjackctl-0.3.6/=unpacked-tar1=/INSTALL --- qjackctl-0.3.4/=unpacked-tar1=/INSTALL 2003-07-21 22:23:55.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/INSTALL 1970-01-01 01:00:00.000000000 +0100 @@ -1,167 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes a while. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Type `make install' to install the programs and any data files and - documentation. - - 4. You can remove the program binaries and object files from the - source code directory by typing `make clean'. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/Makefile.cvs qjackctl-0.3.6/=unpacked-tar1=/Makefile.cvs --- qjackctl-0.3.4/=unpacked-tar1=/Makefile.cvs 2007-07-14 01:10:34.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/Makefile.cvs 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -all: configure - -configure: Makefile.in configure.ac - @autoheader - @autoconf - @rm -rf *.cache - -clean: - @if [ -f Makefile ]; then make clean; fi || true - @rm -rvf Makefile configure config.* - @rm -rvf *.cache *.log *.status *.pro *.spec *.desktop diff -Nru qjackctl-0.3.4/=unpacked-tar1=/Makefile.in qjackctl-0.3.6/=unpacked-tar1=/Makefile.in --- qjackctl-0.3.4/=unpacked-tar1=/Makefile.in 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/Makefile.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,106 +0,0 @@ -prefix = @ac_prefix@ -qmake = @ac_qmake@ -lupdate = @ac_lupdate@ -lrelease = @ac_lrelease@ - -name = qjackctl - -headers = config.h \ - src/qjackctlAbout.h \ - src/qjackctlAlsaConnect.h \ - src/qjackctlConnect.h \ - src/qjackctlConnectAlias.h \ - src/qjackctlJackConnect.h \ - src/qjackctlPatchbay.h \ - src/qjackctlPatchbayFile.h \ - src/qjackctlPatchbayRack.h \ - src/qjackctlSetup.h \ - src/qjackctlStatus.h \ - src/qjackctlSystemTray.h \ - src/qjackctlAboutForm.h \ - src/qjackctlConnectionsForm.h \ - src/qjackctlMainForm.h \ - src/qjackctlMessagesForm.h \ - src/qjackctlPatchbayForm.h \ - src/qjackctlSetupForm.h \ - src/qjackctlSocketForm.h \ - src/qjackctlStatusForm.h - -sources = src/main.cpp \ - src/qjackctlAlsaConnect.cpp \ - src/qjackctlConnect.cpp \ - src/qjackctlConnectAlias.cpp \ - src/qjackctlJackConnect.cpp \ - src/qjackctlPatchbay.cpp \ - src/qjackctlPatchbayFile.cpp \ - src/qjackctlPatchbayRack.cpp \ - src/qjackctlSetup.cpp \ - src/qjackctlSystemTray.cpp \ - src/qjackctlAboutForm.cpp \ - src/qjackctlConnectionsForm.cpp \ - src/qjackctlMainForm.cpp \ - src/qjackctlMessagesForm.cpp \ - src/qjackctlPatchbayForm.cpp \ - src/qjackctlSetupForm.cpp \ - src/qjackctlSocketForm.cpp \ - src/qjackctlStatusForm.cpp - -forms = \ - src/qjackctlAboutForm.ui \ - src/qjackctlConnectionsForm.ui \ - src/qjackctlMainForm.ui \ - src/qjackctlMessagesForm.ui \ - src/qjackctlPatchbayForm.ui \ - src/qjackctlSetupForm.ui \ - src/qjackctlSocketForm.ui \ - src/qjackctlStatusForm.ui - -translations_sources = \ - translations/qjackctl_de.ts \ - translations/qjackctl_es.ts \ - translations/qjackctl_fr.ts \ - translations/qjackctl_ru.ts - -translations_targets = \ - translations/qjackctl_de.qm \ - translations/qjackctl_es.qm \ - translations/qjackctl_fr.qm \ - translations/qjackctl_ru.qm - -all: $(name) - -$(name).mak: $(name).pro - @$(qmake) -o $(name).mak $(name).pro - -$(name): $(name).mak $(sources) $(headers) $(forms) - @make -f $(name).mak - -%.ts: $(name).pro $(sources) $(headers) $(forms) - @$(lupdate) -verbose $(name).pro - -%.qm: %.ts - @$(lrelease) -verbose $< -qm $@ - -install: $(name) icons/$(name).png $(translations_targets) - @install -d -v -m 0755 $(DESTDIR)$(prefix)/bin - @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/pixmaps - @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/applications - @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/locale - @install -v -m 0755 $(name) $(DESTDIR)$(prefix)/bin/$(name) - @install -v -m 0644 icons/$(name).png $(DESTDIR)$(prefix)/share/pixmaps/$(name).png - @install -v -m 0644 $(name).desktop $(DESTDIR)$(prefix)/share/applications/$(name).desktop - @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/locale - -uninstall: $(DESTDIR)$(prefix)/bin/$(name) - @rm -vf $(DESTDIR)$(prefix)/bin/$(name) - @rm -vf $(DESTDIR)$(prefix)/share/pixmaps/$(name).png - @rm -vf $(DESTDIR)$(prefix)/share/applications/$(name).desktop - @rm -vf $(DESTDIR)$(prefix)/share/locale/$(translations_targets) - @for x in $(translations_targets); do \ - rm -vf $(DESTDIR)$(prefix)/share/locale/`basename $$x`; done - -clean: $(name).mak - @make -f $(name).mak clean - @rm -f $(name) $(name).mak - @rm -rf *.cache *.log *.status $(translations_targets) - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/qjackctl.desktop.in qjackctl-0.3.6/=unpacked-tar1=/qjackctl.desktop.in --- qjackctl-0.3.4/=unpacked-tar1=/qjackctl.desktop.in 2008-10-21 15:44:48.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/qjackctl.desktop.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=QjackCtl -GenericName=JACK Control -Comment=QjackCtl is a JACK Audio Connection Kit Qt GUI Interface -Exec=@ac_prefix@/bin/qjackctl -Icon=@ac_prefix@/share/pixmaps/qjackctl.png -Categories=Audio;AudioVideo;MIDI;JACK;ALSA;Qt; -Terminal=false -Type=Application -X-SuSE-translate=true diff -Nru qjackctl-0.3.4/=unpacked-tar1=/qjackctl.pro.in qjackctl-0.3.6/=unpacked-tar1=/qjackctl.pro.in --- qjackctl-0.3.4/=unpacked-tar1=/qjackctl.pro.in 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/qjackctl.pro.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,67 +0,0 @@ -INCPATH += ./src - -HEADERS += src/qjackctlAbout.h \ - src/qjackctlAlsaConnect.h \ - src/qjackctlConnect.h \ - src/qjackctlConnectAlias.h \ - src/qjackctlJackConnect.h \ - src/qjackctlPatchbay.h \ - src/qjackctlPatchbayFile.h \ - src/qjackctlPatchbayRack.h \ - src/qjackctlSetup.h \ - src/qjackctlStatus.h \ - src/qjackctlSystemTray.h \ - src/qjackctlAboutForm.h \ - src/qjackctlConnectionsForm.h \ - src/qjackctlMainForm.h \ - src/qjackctlMessagesForm.h \ - src/qjackctlPatchbayForm.h \ - src/qjackctlSetupForm.h \ - src/qjackctlSocketForm.h \ - src/qjackctlStatusForm.h - -SOURCES += src/main.cpp \ - src/qjackctlAlsaConnect.cpp \ - src/qjackctlConnect.cpp \ - src/qjackctlConnectAlias.cpp \ - src/qjackctlJackConnect.cpp \ - src/qjackctlPatchbay.cpp \ - src/qjackctlPatchbayFile.cpp \ - src/qjackctlPatchbayRack.cpp \ - src/qjackctlSetup.cpp \ - src/qjackctlSystemTray.cpp \ - src/qjackctlAboutForm.cpp \ - src/qjackctlConnectionsForm.cpp \ - src/qjackctlMainForm.cpp \ - src/qjackctlMessagesForm.cpp \ - src/qjackctlPatchbayForm.cpp \ - src/qjackctlSetupForm.cpp \ - src/qjackctlSocketForm.cpp \ - src/qjackctlStatusForm.cpp - -FORMS = src/qjackctlAboutForm.ui \ - src/qjackctlConnectionsForm.ui \ - src/qjackctlMainForm.ui \ - src/qjackctlMessagesForm.ui \ - src/qjackctlPatchbayForm.ui \ - src/qjackctlSetupForm.ui \ - src/qjackctlSocketForm.ui \ - src/qjackctlStatusForm.ui - -RESOURCES += icons/qjackctl.qrc - -TEMPLATE = app -CONFIG += qt thread warn_on @ac_debug@ -LANGUAGE = C++ - -TRANSLATIONS = \ - translations/qjackctl_de.ts \ - translations/qjackctl_es.ts \ - translations/qjackctl_fr.ts \ - translations/qjackctl_ru.ts - -LIBS += @ac_libs@ -INCPATH += @ac_incpath@ - -# XML/DOM support -QT += xml diff -Nru qjackctl-0.3.4/=unpacked-tar1=/qjackctl.spec.in qjackctl-0.3.6/=unpacked-tar1=/qjackctl.spec.in --- qjackctl-0.3.4/=unpacked-tar1=/qjackctl.spec.in 2008-12-05 18:30:12.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/qjackctl.spec.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,78 +0,0 @@ -%define name @PACKAGE_TARNAME@ -%define version @PACKAGE_VERSION@ -%define release 10 -%define prefix @ac_prefix@ - -Summary: JACK Audio Connection Kit Qt GUI Interface. -Name: %{name} -Version: %{version} -Release: %{release} -Prefix: %{prefix} -License: GPL -Group: Productivity/Multimedia/Sound/Utilities -Source0: %{name}-%{version}.tar.gz -URL: http://qjackctl.sourceforge.net/ - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot - -Requires: qt >= 4.1 -Requires: jack >= 0.100.0 -Requires: alsa - -BuildRequires: qt-devel >= 4.1 -BuildRequires: libjack-devel >= 0.100.0 -BuildRequires: alsa-devel - -%description -JACK Audio Connection Kit - Qt GUI Interface: A simple Qt application -to control the JACK server. Written in C++ around the Qt4 toolkit -for X11, most exclusively using Qt Designer. Provides a simple GUI -dialog for setting several JACK server parameters, which are properly -saved between sessions, and a way control of the status of the audio -server. With time, this primordial interface has become richer by -including a enhanced patchbay and connection control features. - -%prep -%setup -[ -f Makefile.cvs ] && %__make -f Makefile.cvs - -%build -%configure -%__make - -%install -%makeinstall - -%clean -[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot} - -%files -%defattr(-,root,root) -%doc AUTHORS COPYING ChangeLog README TODO -%{_bindir}/%{name} -%{_datadir}/applications/%{name}.desktop -%{_datadir}/pixmaps/%{name}.png -%{_datadir}/locale/%{name}_*.qm - -%changelog -* Fri Dec 05 2008 Rui Nuno Capela -- Patchbay snapshot revamp. -* Sat Jun 07 2008 Rui Nuno Capela -- Patchbay JACK-MIDI, file logging and X11 uniqueness. -* Thu Dec 20 2007 Rui Nuno Capela -- Patchbay heads-up with season greetings. -* Thu Jul 19 2007 Rui Nuno Capela -- System-tray tooltip icon crash fix. -* Wed Jul 18 2007 Rui Nuno Capela -- Shallowed bug-fix release.. -* Tue Jul 10 2007 Rui Nuno Capela -- Qt4 migration was complete. -* Mon Jun 25 2007 Rui Nuno Capela -- Application icon is now installed to (prefix)/share/pixmaps. -- Declared fundamental build and run-time requirements. -- Destination install directory prefix is now in spec. -- Spec is now a bit more openSUSE compliant. -* Wed May 31 2006 Rui Nuno Capela -- Changed copyright to license attribute -* Wed Aug 24 2005 Rui Nuno Capela -- Created initial qjackctl.spec diff -Nru qjackctl-0.3.4/=unpacked-tar1=/README qjackctl-0.3.6/=unpacked-tar1=/README --- qjackctl-0.3.4/=unpacked-tar1=/README 2008-12-05 08:34:20.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,142 +0,0 @@ -QjackCtl - JACK Audio Connection Kit Qt GUI Interface ------------------------------------------------------ - -QjackCtl is a simple Qt application to control the JACK sound server -(http://jackaudio.org), for the Linux Audio infrastructure. - -Written in C++ around the Qt4 toolkit for X11, most exclusively using -Qt Designer. - -Provides a simple GUI dialog for setting several JACK server parameters, -which are properly saved between sessions, and a way control of the -status of the audio server. With time, this primordial interface has -become richer by including a enhanced patchbay and connection control -features. - -Homepage: http://qjackctl.sourceforge.net - -License: GNU General Public License (GPL) - - -Requirements ------------- - -The software requirements for build and runtime are listed as follows: - - Mandatory: - - - Qt4 (core, gui, xml), C++ class library and tools for - crossplatform development and internationalization - http://www.trolltech.org/products/qt/ - - - JACK Audio Connection Kit - http://jackaudio.org/ - - Optional (opted-in at build time): - - - ALSA, Advanced Linux Sound Architecture - http://www.alsa-project.org/ - - -Installation ------------- - -The installation procedure follows the standard for source distributions: - - ./configure [--prefix=/usr/local] - make - -and optionally as root: - - make install - -This procedure will end installing the following couple of files: - - ${prefix}/bin/qjackctl - ${prefix}/share/pixmaps/qjackctl.png - ${prefix}/share/applications/qjackctl.desktop - -Just launch ${prefix}/bin/qjackctl and you're off (hopefully). - -If you're checking out from CVS, you'll have to prepare the configure -script just before you proceed with the above instructions: - - make -f Makefile.cvs - - -Configuration -------------- - -QjackCtl holds its settings and configuration state per user, in a file -located as $HOME/.config/rncbc.org/QjackCtl.conf . Normally, there's no -need to edit this file, as it is recreated and rewritten everytime -qjackctl is run. - - -Bugs ----- - -Probably plenty still, but QjackCtl it's now considered on beta stage -already. It has been locally tested since JACK release 0.98.0, on SuSE 9.1, -Mandrake 10.0 and Fedora Core 1, with custom 2.4 kernels with low-latency, -preemptible and capabilities enabling patches. As for 2.6 kernels, the -capabilities patch may also apply but the emergence of the Realtime Linux -Security Module (LSM) and Ingo Molnar's Realtime Preemption kernel patch -it's being now recommended for your taking benefit of the realtime and -low-latency audio pleasure JACK can give. - - -Support -------- - -QjackCtl is open source free software. For bug reports, feature -requests, discussion forums, mailling lists, or any other matter -related to the development of this piece of software, please use the -Sourceforge project page (http://sourceforge.net/projects/qjackctl). - -You can also find timely and closer contact information on my personal -web site (http://www.rncbc.org). - - -Acknowledgments ---------------- - -QjackCtl's user interface layout (and the whole idea for that matter) -was partially borrowed from origoinal Lawrie Abbott's jacko project, -which was taken from wxWindow/Python into the Qt/C++ arena. - -Since 2003-08-06, qjackctl has been included in the awesome Planet CCRMA -(http://ccrma-www.stanford.edu/planetccrma/software/) software collection. -Thanks a lot Fernando! - -Here are some people who helped this project in one way or another, -and in fair and strict alphabetic order: - - Alexandre Prokoudine Kasper Souren - Andreas Persson Kjetil Matheussen - Austin Acton Ken Ellinwood - Ben Powers Lawrie Abbott - Chris Cannam Lee Revell - Dan Nigrin Lucas Brasilino - Dave Moore Marc-Olivier Barre - Dave Phillips Mark Knecht - Dirk Jagdmann Matthias Nagorni - Dominic Sacre Melanie - Fernando Pablo Lopez-Lezcano Nedko Ardaunov - Filipe Tomas Orm Finnendahl - Florian Schmidt Paul Davis - Fons Adriaensen Robert Jonsson - Geoff Beasley Sampo Savolainen - Jack O'Quin Stephane Letz - Jacob Meuser Steve Harris - Jesse Chappell Taybin Rutkin - Joachim Deguara Wilfried Huss - Jussi Laako Wolfgang Woehl - Karsten Wiese - -A special mention should go to the translators of QjackCtl (see TRANSLATORS). - -Thanks to you all. --- -rncbc aka Rui Nuno Capela -rncbc@rncbc.org diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/main.cpp qjackctl-0.3.6/=unpacked-tar1=/src/main.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/main.cpp 2008-10-26 15:37:55.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/main.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,329 +0,0 @@ -// main.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlSetup.h" -#include "qjackctlMainForm.h" - -#include -#include -#include -#include - -#if QT_VERSION < 0x040300 -#define lighter(x) light(x) -#define darker(x) dark(x) -#endif - - -//------------------------------------------------------------------------- -// Singleton application instance stuff (Qt/X11 only atm.) -// - -#if defined(Q_WS_X11) - -#include - -#include -#include - -#define QJACKCTL_XUNIQUE "qjackctlApplication" - -#endif - -class qjackctlApplication : public QApplication -{ -public: - - // Constructor. - qjackctlApplication(int& argc, char **argv) : QApplication(argc, argv), - m_pQtTranslator(0), m_pMyTranslator(0), m_pWidget(0) - { - // Load translation support. - QLocale loc; - if (loc.language() != QLocale::C) { - // Try own Qt translation... - m_pQtTranslator = new QTranslator(this); - QString sLocName = "qt_" + loc.name(); - QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); - if (m_pQtTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pQtTranslator); - } else { - delete m_pQtTranslator; - m_pQtTranslator = 0; - #ifdef CONFIG_DEBUG - qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", - loc.name().toUtf8().constData(), - sLocPath.toUtf8().constData(), - sLocName.toUtf8().constData()); - #endif - } - // Try own application translation... - m_pMyTranslator = new QTranslator(this); - sLocName = "qjackctl_" + loc.name(); - if (m_pMyTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pMyTranslator); - } else { - sLocPath = CONFIG_PREFIX "/share/locale"; - if (m_pMyTranslator->load(sLocName, sLocPath)) { - QApplication::installTranslator(m_pMyTranslator); - } else { - delete m_pMyTranslator; - m_pMyTranslator = 0; - #ifdef CONFIG_DEBUG - qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", - loc.name().toUtf8().constData(), - sLocPath.toUtf8().constData(), - sLocName.toUtf8().constData()); - #endif - } - } - } - #if defined(Q_WS_X11) - m_pDisplay = QX11Info::display(); - QString sUnique = QJACKCTL_XUNIQUE; - const char *pszServerName = ::getenv("JACK_DEFAULT_SERVER"); - if (pszServerName) { - sUnique += '_'; - sUnique += pszServerName; - } - m_aUnique = XInternAtom(m_pDisplay, sUnique.toUtf8().constData(), false); - XGrabServer(m_pDisplay); - m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); - XUngrabServer(m_pDisplay); - #endif - } - - // Destructor. - ~qjackctlApplication() - { - if (m_pMyTranslator) delete m_pMyTranslator; - if (m_pQtTranslator) delete m_pQtTranslator; - } - - // Main application widget accessors. - void setMainWidget(QWidget *pWidget) - { - m_pWidget = pWidget; - #if defined(Q_WS_X11) - XGrabServer(m_pDisplay); - m_wOwner = m_pWidget->winId(); - XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); - XUngrabServer(m_pDisplay); - #endif - } - - QWidget *mainWidget() const { return m_pWidget; } - - // Check if another instance is running, - // and raise its proper main widget... - bool setup() - { - #if defined(Q_WS_X11) - if (m_wOwner != None) { - // First, notify any freedesktop.org WM - // that we're about to show the main widget... - Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay); - int iScreen = XScreenNumberOfScreen(pScreen); - XEvent ev; - memset(&ev, 0, sizeof(ev)); - ev.xclient.type = ClientMessage; - ev.xclient.display = m_pDisplay; - ev.xclient.window = m_wOwner; - ev.xclient.message_type = XInternAtom(m_pDisplay, "_NET_ACTIVE_WINDOW", false); - ev.xclient.format = 32; - ev.xclient.data.l[0] = 0; // Source indication. - ev.xclient.data.l[1] = 0; // Timestamp. - ev.xclient.data.l[2] = 0; // Requestor's currently active window (none) - ev.xclient.data.l[3] = 0; - ev.xclient.data.l[4] = 0; - XSelectInput(m_pDisplay, m_wOwner, StructureNotifyMask); - XSendEvent(m_pDisplay, RootWindow(m_pDisplay, iScreen), false, - (SubstructureNotifyMask | SubstructureRedirectMask), &ev); - XSync(m_pDisplay, false); - XRaiseWindow(m_pDisplay, m_wOwner); - // And then, let it get caught on destination - // by QApplication::x11EventFilter... - QByteArray value = QJACKCTL_XUNIQUE; - XChangeProperty( - m_pDisplay, - m_wOwner, - m_aUnique, - m_aUnique, 8, - PropModeReplace, - (unsigned char *) value.data(), - value.length()); - // Done. - return true; - } - #endif - return false; - } - -#if defined(Q_WS_X11) - bool x11EventFilter(XEvent *pEv) - { - if (m_pWidget && m_wOwner != None - && pEv->type == PropertyNotify - && pEv->xproperty.window == m_wOwner - && pEv->xproperty.state == PropertyNewValue) { - // Always check whether our property-flag is still around... - Atom aType; - int iFormat = 0; - unsigned long iItems = 0; - unsigned long iAfter = 0; - unsigned char *pData = 0; - if (XGetWindowProperty( - m_pDisplay, - m_wOwner, - m_aUnique, - 0, 1024, - false, - m_aUnique, - &aType, - &iFormat, - &iItems, - &iAfter, - &pData) == Success - && aType == m_aUnique && iItems > 0 && iAfter == 0) { - // Avoid repeating it-self... - XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); - // Just make it always shows up fine... - m_pWidget->show(); - m_pWidget->raise(); - m_pWidget->activateWindow(); - // FIXME: Do our best speciality, although it should be - // done iif configuration says so, we'll do it anyway! - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->startJack(); - } - // Free any left-overs... - if (iItems > 0 && pData) - XFree(pData); - } - return QApplication::x11EventFilter(pEv); - } -#endif - -private: - - // Translation support. - QTranslator *m_pQtTranslator; - QTranslator *m_pMyTranslator; - - // Instance variables. - QWidget *m_pWidget; - -#if defined(Q_WS_X11) - Display *m_pDisplay; - Atom m_aUnique; - Window m_wOwner; -#endif -}; - - -//------------------------------------------------------------------------- -// main - The main program trunk. -// - -int main ( int argc, char **argv ) -{ - qjackctlApplication app(argc, argv); - - // Construct default settings; override with command line arguments. - qjackctlSetup settings; - if (!settings.parse_args(app.argc(), app.argv())) { - app.quit(); - return 1; - } - - // Check if we'll just start an external program... - if (!settings.sCmdLine.isEmpty()) { - jack_client_t *pJackClient - = jack_client_open("qjackctl-start", JackNoStartServer, NULL); - if (pJackClient) { - jack_client_close(pJackClient); - int iExitStatus = ::system(settings.sCmdLine.toUtf8().constData()); - app.quit(); - return iExitStatus; - } - } - - // Have another instance running? - if (app.setup()) { - app.quit(); - return 2; - } - - // Dark themes grayed/disabled color group fix... - QPalette pal(app.palette()); - if (pal.base().color().value() < 0x7f) { - pal.setColorGroup(QPalette::Disabled, - pal.windowText().color().darker(), - pal.button(), - pal.light(), - pal.dark(), - pal.mid(), - pal.text().color().darker(), - pal.text().color().lighter(), - pal.base(), - pal.window()); - app.setPalette(pal); - } - - // Set default base font... - int iBaseFontSize = app.font().pointSize(); - if (settings.iBaseFontSize > 0) - iBaseFontSize = settings.iBaseFontSize; - app.setFont(QFont(app.font().family(), iBaseFontSize)); - - // What style do we create these forms? - Qt::WindowFlags wflags = Qt::Window -#if QT_VERSION >= 0x040200 - | Qt::CustomizeWindowHint -#endif - | Qt::WindowTitleHint - | Qt::WindowSystemMenuHint - | Qt::WindowMinMaxButtonsHint; - if (settings.bKeepOnTop) - wflags |= Qt::Tool; - // Construct the main form, and show it to the world. - qjackctlMainForm w(0, wflags); -// app.setMainWidget(&w); - w.setup(&settings); - // If we have a systray icon, we'll skip this. - if (!settings.bSystemTray) { - w.show(); - w.adjustSize(); - } - - // Settle this one as application main widget... - app.setMainWidget(&w); - - // Register the quit signal/slot. - // app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); - app.setQuitOnLastWindowClosed(false); - - return app.exec(); -} - -// end of main.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.cpp 2007-07-19 21:37:38.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,133 +0,0 @@ -// qjackctlAboutForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlAboutForm.h" - -#include - - -//---------------------------------------------------------------------------- -// qjackctlAboutForm -- UI wrapper form. - -// Constructor. -qjackctlAboutForm::qjackctlAboutForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QDialog(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - // Stuff the about box... - QString sText = "


\n"; - sText += "" + tr(QJACKCTL_SUBTITLE) + "
\n"; - sText += "
\n"; - sText += tr("Version") + ": " QJACKCTL_VERSION "
\n"; - sText += tr("Build") + ": " __DATE__ " " __TIME__ "
\n"; -#ifdef CONFIG_DEBUG - sText += ""; - sText += tr("Debugging option enabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_SYSTEM_TRAY - sText += ""; - sText += tr("System tray disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_JACK_TRANSPORT - sText += ""; - sText += tr("Transport status control disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_JACK_REALTIME - sText += ""; - sText += tr("Realtime status disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_JACK_XRUN_DELAY - sText += ""; - sText += tr("XRUN delay status disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_JACK_MAX_DELAY - sText += ""; - sText += tr("Maximum delay status disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_JACK_MIDI - sText += ""; - sText += tr("JACK MIDI support disabled."); - sText += "
\n"; - sText += "
"; -#endif -#ifndef CONFIG_ALSA_SEQ -#if !defined(WIN32) - sText += ""; - sText += tr("ALSA/MIDI sequencer support disabled."); - sText += "
\n"; - sText += "
"; -#endif -#endif - sText += "
\n"; - sText += tr("Website") + ": " QJACKCTL_WEBSITE "
\n"; - sText += "
\n"; - sText += ""; - sText += QJACKCTL_COPYRIGHT "
\n"; - sText += "
\n"; - sText += tr("This program is free software; you can redistribute it and/or modify it") + "
\n"; - sText += tr("under the terms of the GNU General Public License version 2 or later."); - sText += "
"; - sText += "

\n"; -#if QT_VERSION >= 0x040200 - m_ui.AboutTextView->setText(sText); -#else - m_ui.AboutTextView->setHtml(sText); -#endif - // UI connections... - QObject::connect(m_ui.AboutQtButton, - SIGNAL(clicked()), - SLOT(aboutQt())); - QObject::connect(m_ui.ClosePushButton, - SIGNAL(clicked()), - SLOT(close())); -} - - -// Destructor. -qjackctlAboutForm::~qjackctlAboutForm (void) -{ -} - - -// About Qt request. -void qjackctlAboutForm::aboutQt() -{ - QMessageBox::aboutQt(this); -} - - -// end of qjackctlAboutForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.h 2007-07-19 21:48:23.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,62 +0,0 @@ -// qjackctlAboutForm.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlAboutForm_h -#define __qjackctlAboutForm_h - -#include - -#if QT_VERSION < 0x040200 -#define setOpenExternalLinks(x) parent() -#endif - -#include "ui_qjackctlAboutForm.h" - - -//---------------------------------------------------------------------------- -// qjackctlAboutForm -- UI wrapper form. - -class qjackctlAboutForm : public QDialog -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlAboutForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlAboutForm(); - -public slots: - - void aboutQt(); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlAboutForm m_ui; -}; - - -#endif // __qjackctlAboutForm_h - - -// end of qjackctlAboutForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAboutForm.ui 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAboutForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,147 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlAboutForm - - - - 0 - 0 - 520 - 280 - - - - - - - About QjackCtl - - - :/icons/about1.png - - - true - - - - 4 - - - 4 - - - - - Qt::Horizontal - - - - 8 - 8 - - - - - - - - &Close - - - Alt+C - - - - - - - Qt::TabFocus - - - About Qt - - - - - - :/icons/qtlogo.png - - - - - - - Qt::Vertical - - - - 8 - 8 - - - - - - - - 1 - - - false - - - true - - - true - - - - - - - :/icons/qjackctl.png - - - Qt::AlignCenter - - - false - - - 2 - - - - - - - - AboutTextView - AboutQtButton - ClosePushButton - - - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAbout.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAbout.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAbout.h 2008-01-16 08:54:36.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAbout.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -// qjackctlAbout.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlAbout_h -#define __qjackctlAbout_h - -#include "config.h" - -#define QJACKCTL_TITLE PACKAGE_NAME -#define QJACKCTL_VERSION PACKAGE_VERSION - -#define QJACKCTL_SUBTITLE0 "JACK" -#define QJACKCTL_SUBTITLE1 QJACKCTL_SUBTITLE0 " Audio Connection Kit" -#define QJACKCTL_SUBTITLE2 "Qt GUI Interface" - -#define QJACKCTL_SUBTITLE QJACKCTL_SUBTITLE1 " - " QJACKCTL_SUBTITLE2 -#define QJACKCTL_WEBSITE "http://qjackctl.sourceforge.net" -#define QJACKCTL_COPYRIGHT "Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved." - -#define QJACKCTL_DOMAIN "rncbc.org" - -#endif // __qjackctlAbout_h - -// end of qjackctlAbout.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAlsaConnect.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAlsaConnect.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAlsaConnect.cpp 2007-09-20 08:56:37.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAlsaConnect.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,443 +0,0 @@ -// qjackctlAlsaConnect.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAlsaConnect.h" - -#include - - -//---------------------------------------------------------------------- -// class qjackctlAlsaPort -- Alsa port list item. -// - -// Constructor. -qjackctlAlsaPort::qjackctlAlsaPort ( qjackctlAlsaClient *pClient, - const QString& sPortName, int iAlsaPort ) - : qjackctlPortItem(pClient, /* QString::number(iAlsaPort) + ":" + */ sPortName) -{ - m_iAlsaPort = iAlsaPort; - - qjackctlAlsaConnect *pAlsaConnect - = static_cast ( - ((pClient->clientList())->listView())->binding()); - - if (pAlsaConnect) { - if (pClient->isReadable()) { - QTreeWidgetItem::setIcon(0, - QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_PORTO))); - } else { - QTreeWidgetItem::setIcon(0, - QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_PORTI))); - } - } -} - -// Default destructor. -qjackctlAlsaPort::~qjackctlAlsaPort (void) -{ -} - - -// Alsa handles accessors. -int qjackctlAlsaPort::alsaClient (void) const -{ - return (static_cast (client()))->alsaClient(); -} - -int qjackctlAlsaPort::alsaPort (void) const -{ - return m_iAlsaPort; -} - - -//---------------------------------------------------------------------- -// class qjackctlAlsaClient -- Alsa client list item. -// - -// Constructor. -qjackctlAlsaClient::qjackctlAlsaClient ( qjackctlAlsaClientList *pClientList, - const QString& sClientName, int iAlsaClient ) - : qjackctlClientItem(pClientList, /* QString::number(iAlsaClient) + ":" + */ sClientName) -{ - m_iAlsaClient = iAlsaClient; - - qjackctlAlsaConnect *pAlsaConnect - = static_cast ( - (pClientList->listView())->binding()); - - if (pAlsaConnect) { - if (pClientList->isReadable()) { - QTreeWidgetItem::setIcon(0, - QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_CLIENTO))); - } else { - QTreeWidgetItem::setIcon(0, - QIcon(pAlsaConnect->pixmap(QJACKCTL_ALSA_CLIENTI))); - } - } -} - -// Default destructor. -qjackctlAlsaClient::~qjackctlAlsaClient (void) -{ -} - - -// Jack client accessor. -int qjackctlAlsaClient::alsaClient (void) const -{ - return m_iAlsaClient; -} - - -// Derived port finder. -qjackctlAlsaPort *qjackctlAlsaClient::findPort ( int iAlsaPort ) -{ - QListIterator iter(ports()); - while (iter.hasNext()) { - qjackctlAlsaPort *pPort - = static_cast (iter.next()); - if (iAlsaPort == pPort->alsaPort()) - return pPort; - } - - return NULL; -} - - -//---------------------------------------------------------------------- -// qjackctlAlsaClientList -- Jack client list. -// - -// Constructor. -qjackctlAlsaClientList::qjackctlAlsaClientList ( - qjackctlClientListView *pListView, - snd_seq_t *pAlsaSeq, bool bReadable ) - : qjackctlClientList(pListView, bReadable) -{ - m_pAlsaSeq = pAlsaSeq; -} - -// Default destructor. -qjackctlAlsaClientList::~qjackctlAlsaClientList (void) -{ -} - - -// Alsa sequencer accessor. -snd_seq_t *qjackctlAlsaClientList::alsaSeq (void) const -{ - return m_pAlsaSeq; -} - - -// Client finder by id. -qjackctlAlsaClient *qjackctlAlsaClientList::findClient ( int iAlsaClient ) -{ - QListIterator iter(clients()); - while (iter.hasNext()) { - qjackctlAlsaClient *pClient - = static_cast (iter.next()); - if (iAlsaClient == pClient->alsaClient()) - return pClient; - } - - return NULL; -} - - -// Client port finder by id. -qjackctlAlsaPort *qjackctlAlsaClientList::findClientPort ( int iAlsaClient, - int iAlsaPort ) -{ - qjackctlAlsaClient *pClient = findClient(iAlsaClient); - if (pClient == NULL) - return NULL; - - return pClient->findPort(iAlsaPort); -} - - -// Client:port refreshner. -int qjackctlAlsaClientList::updateClientPorts (void) -{ - if (m_pAlsaSeq == NULL) - return 0; - - int iDirtyCount = 0; - - markClientPorts(0); - -#ifdef CONFIG_ALSA_SEQ - - unsigned int uiAlsaFlags; - if (isReadable()) - uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; - else - uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; - - snd_seq_client_info_t *pClientInfo; - snd_seq_port_info_t *pPortInfo; - - snd_seq_client_info_alloca(&pClientInfo); - snd_seq_port_info_alloca(&pPortInfo); - snd_seq_client_info_set_client(pClientInfo, -1); - - while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { - - int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); - if (iAlsaClient > 0) { - qjackctlAlsaClient *pClient = findClient(iAlsaClient); - snd_seq_port_info_set_client(pPortInfo, iAlsaClient); - snd_seq_port_info_set_port(pPortInfo, -1); - while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { - unsigned int uiPortCapability - = snd_seq_port_info_get_capability(pPortInfo); - if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && - ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { - QString sClientName = QString::number(iAlsaClient) + ':'; - sClientName += snd_seq_client_info_get_name(pClientInfo); - qjackctlAlsaPort *pPort = 0; - int iAlsaPort = snd_seq_port_info_get_port(pPortInfo); - if (pClient == 0) { - pClient = new qjackctlAlsaClient(this, - sClientName, iAlsaClient); - iDirtyCount++; - } else { - pPort = pClient->findPort(iAlsaPort); - if (sClientName != pClient->clientName()) { - pClient->setClientName(sClientName); - iDirtyCount++; - } - } - if (pClient) { - QString sPortName = QString::number(iAlsaPort) + ':'; - sPortName += snd_seq_port_info_get_name(pPortInfo); - if (pPort == 0) { - pPort = new qjackctlAlsaPort(pClient, - sPortName, iAlsaPort); - iDirtyCount++; - } else if (sPortName != pPort->portName()) { - pPort->setPortName(sPortName); - iDirtyCount++; - } - } - if (pPort) - pPort->markClientPort(1); - } - } - } - } - -#endif // CONFIG_ALSA_SEQ - - iDirtyCount += cleanClientPorts(0); - - return iDirtyCount; -} - - -//---------------------------------------------------------------------- -// qjackctlAlsaConnect -- Output-to-Input client/ports connection object. -// - -// Constructor. -qjackctlAlsaConnect::qjackctlAlsaConnect ( - qjackctlConnectView *pConnectView, snd_seq_t *pAlsaSeq ) - : qjackctlConnect(pConnectView) -{ - createIconPixmaps(); - - setOClientList(new qjackctlAlsaClientList( - connectView()->OListView(), pAlsaSeq, true)); - setIClientList(new qjackctlAlsaClientList( - connectView()->IListView(), pAlsaSeq, false)); - - m_pAlsaSeq = pAlsaSeq; -} - -// Default destructor. -qjackctlAlsaConnect::~qjackctlAlsaConnect (void) -{ - deleteIconPixmaps(); -} - - -// Common pixmap accessor (static). -const QPixmap& qjackctlAlsaConnect::pixmap ( int iPixmap ) const -{ - return *m_apPixmaps[iPixmap]; -} - - -// Local pixmap-set janitor methods. -void qjackctlAlsaConnect::createIconPixmaps (void) -{ - m_apPixmaps[QJACKCTL_ALSA_CLIENTI] = createIconPixmap("mclienti"); - m_apPixmaps[QJACKCTL_ALSA_CLIENTO] = createIconPixmap("mcliento"); - m_apPixmaps[QJACKCTL_ALSA_PORTI] = createIconPixmap("mporti"); - m_apPixmaps[QJACKCTL_ALSA_PORTO] = createIconPixmap("mporto"); -} - -void qjackctlAlsaConnect::deleteIconPixmaps (void) -{ - for (int i = 0; i < QJACKCTL_ALSA_PIXMAPS; i++) { - if (m_apPixmaps[i]) - delete m_apPixmaps[i]; - m_apPixmaps[i] = NULL; - } -} - - -// Alsa sequencer accessor. -snd_seq_t *qjackctlAlsaConnect::alsaSeq (void) const -{ - return m_pAlsaSeq; -} - - -// Connection primitive. -bool qjackctlAlsaConnect::connectPorts ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - qjackctlAlsaPort *pOAlsa = static_cast (pOPort); - qjackctlAlsaPort *pIAlsa = static_cast (pIPort); - - snd_seq_port_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_port_subscribe_alloca(&pAlsaSubs); - - seq_addr.client = pOAlsa->alsaClient(); - seq_addr.port = pOAlsa->alsaPort(); - snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); - - seq_addr.client = pIAlsa->alsaClient(); - seq_addr.port = pIAlsa->alsaPort(); - snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); - - return (snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs) >= 0); - -#else - - return false; - -#endif // CONFIG_ALSA_SEQ -} - - -// Disconnection primitive. -bool qjackctlAlsaConnect::disconnectPorts ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - qjackctlAlsaPort *pOAlsa = static_cast (pOPort); - qjackctlAlsaPort *pIAlsa = static_cast (pIPort); - - snd_seq_port_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_port_subscribe_alloca(&pAlsaSubs); - - seq_addr.client = pOAlsa->alsaClient(); - seq_addr.port = pOAlsa->alsaPort(); - snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); - - seq_addr.client = pIAlsa->alsaClient(); - seq_addr.port = pIAlsa->alsaPort(); - snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); - - return (snd_seq_unsubscribe_port(m_pAlsaSeq, pAlsaSubs) >= 0); - -#else - - return false; - -#endif // CONFIG_ALSA_SEQ -} - - -// Update port connection references. -void qjackctlAlsaConnect::updateConnections (void) -{ -#ifdef CONFIG_ALSA_SEQ - - snd_seq_query_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_query_subscribe_alloca(&pAlsaSubs); - - // Proper type casts. - qjackctlAlsaClientList *pOClientList - = static_cast (OClientList()); - qjackctlAlsaClientList *pIClientList - = static_cast (IClientList()); - - // For each output client item... - QListIterator oclient(pOClientList->clients()); - while (oclient.hasNext()) { - qjackctlClientItem *pOClient = oclient.next(); - // For each output port item... - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - // Are there already any connections? - if (pOPort->connects().count() > 0) - continue; - // Hava a proper type cast. - qjackctlAlsaPort *pOAlsa - = static_cast (pOPort); - // Get port connections... - snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_READ); - snd_seq_query_subscribe_set_index(pAlsaSubs, 0); - seq_addr.client = pOAlsa->alsaClient(); - seq_addr.port = pOAlsa->alsaPort(); - snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); - while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { - seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); - qjackctlPortItem *pIPort - = pIClientList->findClientPort( - seq_addr.client, seq_addr.port); - if (pIPort) { - pOPort->addConnect(pIPort); - pIPort->addConnect(pOPort); - } - snd_seq_query_subscribe_set_index(pAlsaSubs, - snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); - } - } - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Update icon size implementation. -void qjackctlAlsaConnect::updateIconPixmaps (void) -{ - deleteIconPixmaps(); - createIconPixmaps(); -} - - -// end of qjackctlAlsaConnect.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAlsaConnect.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAlsaConnect.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlAlsaConnect.h 2007-08-27 15:46:02.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlAlsaConnect.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,170 +0,0 @@ -// qjackctlAlsaConnect.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlAlsaConnect_h -#define __qjackctlAlsaConnect_h - -#include "qjackctlAbout.h" -#include "qjackctlConnect.h" - -#ifdef CONFIG_ALSA_SEQ -#include -#else -typedef void snd_seq_t; -#endif - -// Forward declarations. -class qjackctlAlsaPort; -class qjackctlAlsaClient; -class qjackctlAlsaClientList; -class qjackctlAlsaConnect; - -// Pixmap-set array indexes. -#define QJACKCTL_ALSA_CLIENTO 0 // Output client item pixmap. -#define QJACKCTL_ALSA_CLIENTI 1 // Input client item pixmap. -#define QJACKCTL_ALSA_PORTO 2 // Output port pixmap. -#define QJACKCTL_ALSA_PORTI 3 // Input port pixmap. -#define QJACKCTL_ALSA_PIXMAPS 4 // Number of pixmaps in local array. - - -// Jack port list item. -class qjackctlAlsaPort : public qjackctlPortItem -{ -public: - - // Constructor. - qjackctlAlsaPort(qjackctlAlsaClient *pClient, - const QString& sPortName, int iAlsaPort); - // Default destructor. - ~qjackctlAlsaPort(); - - // Jack handles accessors. - int alsaClient() const; - int alsaPort() const; - -private: - - // Instance variables. - int m_iAlsaPort; -}; - - -// Jack client list item. -class qjackctlAlsaClient : public qjackctlClientItem -{ -public: - - // Constructor. - qjackctlAlsaClient(qjackctlAlsaClientList *pClientList, - const QString& sClientName, int iAlsaClient); - // Default destructor. - ~qjackctlAlsaClient(); - - // Jack client accessors. - int alsaClient() const; - - // Port finder by id. - qjackctlAlsaPort *findPort(int iAlsaPort); - -private: - - // Instance variables. - int m_iAlsaClient; -}; - - -// Jack client list. -class qjackctlAlsaClientList : public qjackctlClientList -{ -public: - - // Constructor. - qjackctlAlsaClientList(qjackctlClientListView *pListView, - snd_seq_t *pAlsaSeq, bool bReadable); - // Default destructor. - ~qjackctlAlsaClientList(); - - // Alsa sequencer accessor. - snd_seq_t *alsaSeq() const; - - // Client finder by id. - qjackctlAlsaClient *findClient(int iAlsaClient); - // Client port finder by id. - qjackctlAlsaPort *findClientPort(int iAlsaClient, int iAlsaPort); - - // Client:port refreshner (return newest item count). - int updateClientPorts(); - -private: - - // Instance variables. - snd_seq_t *m_pAlsaSeq; -}; - - -//---------------------------------------------------------------------------- -// qjackctlAlsaConnect -- Connections model integrated object. - -class qjackctlAlsaConnect : public qjackctlConnect -{ -public: - - // Constructor. - qjackctlAlsaConnect(qjackctlConnectView *pConnectView, - snd_seq_t *pAlsaSeq); - // Default destructor. - ~qjackctlAlsaConnect(); - - // Alsa sequencer accessor. - snd_seq_t *alsaSeq() const; - - // Common pixmap accessor. - const QPixmap& pixmap(int iPixmap) const; - -protected: - - // Virtual Connect/Disconnection primitives. - bool connectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - bool disconnectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - - // Update port connection references. - void updateConnections(); - - // Update icon size implementation. - void updateIconPixmaps(); - -private: - - // Local pixmap-set janitor methods. - void createIconPixmaps(); - void deleteIconPixmaps(); - - // Instance variables. - snd_seq_t *m_pAlsaSeq; - - // Local pixmap-set array. - QPixmap *m_apPixmaps[QJACKCTL_ALSA_PIXMAPS]; -}; - - -#endif // __qjackctlAlsaConnect_h - -// end of qjackctlAlsaConnect.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectAlias.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectAlias.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectAlias.cpp 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectAlias.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,275 +0,0 @@ -// qjackctlConnectAlias.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlConnectAlias.h" - -#include - - -//---------------------------------------------------------------------- -// class qjackctlClientAlias -- Client item alias map. - -// Constructor. -qjackctlClientAlias::qjackctlClientAlias ( const QString& sClientName, - const QString& sClientAlias ) -{ - if (sClientAlias.isEmpty()) { - m_rxClientName.setPattern(escapeRegExpDigits(sClientName)); - m_sClientAlias = sClientName; - } else { - m_rxClientName.setPattern(sClientName); - m_sClientAlias = sClientAlias; - } -} - -// Default destructor. -qjackctlClientAlias::~qjackctlClientAlias (void) -{ - m_ports.clear(); -} - - -// Client name method. -QString qjackctlClientAlias::clientName (void) const -{ - return m_rxClientName.pattern(); -} - - -// Client name matcher. -bool qjackctlClientAlias::matchClientName ( const QString& sClientName ) -{ - return m_rxClientName.exactMatch(sClientName); -} - - -// Client aliasing methods. -const QString& qjackctlClientAlias::clientAlias (void) const -{ - return m_sClientAlias; -} - -void qjackctlClientAlias::setClientAlias ( const QString& sClientAlias ) -{ - m_sClientAlias = sClientAlias; -} - - -// Port aliasing methods. -QString qjackctlClientAlias::portAlias ( const QString& sPortName ) const -{ - QString sPortAlias = m_ports[sPortName]; - if (sPortAlias.isEmpty()) - sPortAlias = sPortName; - return sPortAlias; -} - -void qjackctlClientAlias::setPortAlias ( const QString& sPortName, - const QString& sPortAlias ) -{ - m_ports[sPortName] = sPortAlias; -} - - -// Save client/port aliases definitions. -void qjackctlClientAlias::saveSettings ( QSettings& settings, - const QString& sClientKey ) -{ - settings.beginGroup(sClientKey); - settings.setValue("/Name", m_rxClientName.pattern()); - settings.setValue("/Alias", m_sClientAlias); - int iPort = 0; - QMap::ConstIterator iter = m_ports.begin(); - while (iter != m_ports.end()) { - settings.beginGroup("/Port" + QString::number(++iPort)); - settings.setValue("/Name", iter.key()); - settings.setValue("/Alias", iter.value()); - settings.endGroup(); - ++iter; - } - settings.endGroup(); -} - - -// Escape and format a string as a regular expresion. -QString qjackctlClientAlias::escapeRegExpDigits ( const QString& s, - int iThreshold ) -{ - QString sDigits; - QString sResult; - QString sEscape = QRegExp::escape(s); - int iDigits = 0; - - for (int i = 0; i < sEscape.length(); i++) { - const QChar& ch = sEscape.at(i); - if (ch.isDigit()) { - if (iDigits < iThreshold) - sDigits += ch; - else - sDigits = "[0-9]+"; - iDigits++; - } else { - if (iDigits > 0) { - sResult += sDigits; - sDigits = QString::null; - iDigits = 0; - } - sResult += ch; - } - } - - if (iDigits > 0) - sResult += sDigits; - - return sResult; -} - - -// Need for generid sort. -bool qjackctlClientAlias::operator< ( const qjackctlClientAlias& other ) -{ - return (m_sClientAlias < other.clientAlias()); -} - - -//---------------------------------------------------------------------- -// class qjackctlConnectAlias -- Client list alias map. - -// Constructor. -qjackctlConnectAlias::qjackctlConnectAlias (void) -{ -} - -// Default destructor. -qjackctlConnectAlias::~qjackctlConnectAlias (void) -{ - qDeleteAll(*this); - clear(); -} - - -// Client finders. -qjackctlClientAlias *qjackctlConnectAlias::findClientName ( - const QString& sClientName ) -{ - QListIterator iter(*this); - while (iter.hasNext()) { - qjackctlClientAlias *pClient = iter.next(); - if (pClient->matchClientName(sClientName)) - return pClient; - } - - return NULL; -} - -// Client aliasing methods. -void qjackctlConnectAlias::setClientAlias ( const QString& sClientName, - const QString& sClientAlias ) -{ - qjackctlClientAlias *pClient = findClientName(sClientName); - if (pClient == NULL) { - pClient = new qjackctlClientAlias(sClientName); - append(pClient); - } - pClient->setClientAlias(sClientAlias); -} - -QString qjackctlConnectAlias::clientAlias ( const QString& sClientName ) -{ - qjackctlClientAlias *pClient = findClientName(sClientName); - if (pClient == NULL) - return sClientName; - - return pClient->clientAlias(); -} - - -// Client/port aliasing methods. -void qjackctlConnectAlias::setPortAlias ( const QString& sClientName, - const QString& sPortName, const QString& sPortAlias ) -{ - qjackctlClientAlias *pClient = findClientName(sClientName); - if (pClient == NULL) { - pClient = new qjackctlClientAlias(sClientName); - append(pClient); - } - pClient->setPortAlias(sPortName, sPortAlias); -} - -QString qjackctlConnectAlias::portAlias ( const QString& sClientName, - const QString& sPortName ) -{ - qjackctlClientAlias *pClient = findClientName(sClientName); - if (pClient == NULL) - return sPortName; - - return pClient->portAlias(sPortName); -} - - -// Load/save aliases definitions. -void qjackctlConnectAlias::loadSettings ( QSettings& settings, - const QString& sAliasesKey ) -{ - clear(); - - settings.beginGroup(sAliasesKey); - QStringListIterator iter(settings.childGroups()); - while (iter.hasNext()) { - QString sClientKey = iter.next(); - QString sClientName = settings.value(sClientKey + "/Name").toString(); - QString sClientAlias = settings.value(sClientKey + "/Alias").toString(); - if (!sClientName.isEmpty() && !sClientAlias.isEmpty()) { - qjackctlClientAlias *pClient = - new qjackctlClientAlias(sClientName, sClientAlias); - append(pClient); - settings.beginGroup(sClientKey); - QStringListIterator it(settings.childGroups()); - while (it.hasNext()) { - QString sPortKey = it.next(); - QString sPortName = settings.value(sPortKey + "/Name").toString(); - QString sPortAlias = settings.value(sPortKey + "/Alias").toString(); - if (!sPortName.isEmpty() && !sPortAlias.isEmpty()) - pClient->setPortAlias(sPortName, sPortAlias); - } - settings.endGroup(); - } - } - settings.endGroup(); -} - -void qjackctlConnectAlias::saveSettings ( QSettings& settings, - const QString& sAliasesKey ) -{ - qSort(*this); - - settings.beginGroup(sAliasesKey); - int iClient = 0; - QListIterator iter(*this); - while (iter.hasNext()) { - (iter.next())->saveSettings(settings, - "Client" + QString::number(++iClient)); - } - settings.endGroup(); -} - - -// end of qjackctlConnectAlias.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectAlias.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectAlias.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectAlias.h 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectAlias.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,112 +0,0 @@ -// qjackctlConnectAlias.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlConnectAlias_h -#define __qjackctlConnectAlias_h - -#include -#include -#include - - -// Client item alias map. -class qjackctlClientAlias -{ -public: - - // Constructor. - qjackctlClientAlias (const QString& sClientName, - const QString& sClientAlias = QString::null); - - // Default destructor. - ~qjackctlClientAlias(); - - // Client name accessor. - QString clientName() const; - - // Client name matcher. - bool matchClientName(const QString& sClientName); - - // Client aliasing methods. - const QString& clientAlias() const; - void setClientAlias(const QString& sClientAlias); - - // Port aliasing methods. - QString portAlias (const QString& sPortName) const; - void setPortAlias (const QString& sPortName, - const QString& sPortAlias); - - // Save client/port aliases definitions. - void saveSettings(QSettings& settings, const QString& sClientKey); - - // Need for generid sort. - bool operator< (const qjackctlClientAlias& other); - - // Escape and format a string as a regular expresion. - static QString escapeRegExpDigits(const QString& s, int iThreshold = 3); - -private: - - // Client name regexp. - QRegExp m_rxClientName; - // Client alias. - QString m_sClientAlias; - - // Port aliases map. - QMap m_ports; -}; - - -// Client list alias map. -class qjackctlConnectAlias : public QList -{ -public: - - // Constructor. - qjackctlConnectAlias (); - // Default destructor. - ~qjackctlConnectAlias (); - - // Client aliasing methods. - QString clientAlias (const QString& sClientName); - void setClientAlias (const QString& sClientName, - const QString& sClientAlias); - - // Port aliasing methods. - QString portAlias (const QString& sClientName, - const QString& sPortName); - void setPortAlias (const QString& sClientName, - const QString& sPortName, const QString& sPortAlias); - - // Load/save aliases definitions. - void loadSettings(QSettings& settings, const QString& sAliasesKey); - void saveSettings(QSettings& settings, const QString& sAliasesKey); - -private: - - // Client item finder. - qjackctlClientAlias *findClientName (const QString& sClientName); -}; - - -#endif // __qjackctlConnectAlias_h - -// end of qjackctlConnectAlias.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnect.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnect.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnect.cpp 2008-09-21 19:27:58.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnect.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1872 +0,0 @@ -// qjackctlConnect.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlConnect.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -//---------------------------------------------------------------------- -// class qjackctlPortItem -- Port list item. -// - -// Constructor. -qjackctlPortItem::qjackctlPortItem ( qjackctlClientItem *pClient, - const QString& sPortName ) - : QTreeWidgetItem(pClient, QJACKCTL_PORTITEM) -{ - m_pClient = pClient; - m_sPortName = sPortName; - m_iPortMark = 0; - m_bHilite = false; - - m_pClient->ports().append(this); - - // Check aliasing... - qjackctlConnectAlias *pAliases - = ((pClient->clientList())->listView())->aliases(); - if (pAliases) { - QTreeWidgetItem::setText(0, - pAliases->portAlias(pClient->clientName(), sPortName)); - if (((pClient->clientList())->listView())->renameEnabled()) { - QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() - | Qt::ItemIsEditable); - } - } else { - QTreeWidgetItem::setText(0, sPortName); - } -} - -// Default destructor. -qjackctlPortItem::~qjackctlPortItem (void) -{ - int iPort = m_pClient->ports().indexOf(this); - if (iPort >= 0) - m_pClient->ports().removeAt(iPort); - - QListIterator iter(m_connects); - while (iter.hasNext()) - (iter.next())->removeConnect(this); - - m_connects.clear(); -} - - -// Instance accessors. -void qjackctlPortItem::setPortName ( const QString& sPortName ) -{ - QTreeWidgetItem::setText(0, sPortName); - - m_sPortName = sPortName; -} - -const QString& qjackctlPortItem::clientName (void) const -{ - return m_pClient->clientName(); -} - -const QString& qjackctlPortItem::portName (void) const -{ - return m_sPortName; -} - - -// Complete client:port name helper. -QString qjackctlPortItem::clientPortName (void) const -{ - return m_pClient->clientName() + ':' + m_sPortName; -} - - -// Connect client item accessor. -qjackctlClientItem *qjackctlPortItem::client (void) const -{ - return m_pClient; -} - - -// Client:port set housekeeping marker. -void qjackctlPortItem::markPort ( int iMark ) -{ - setHilite(false); - m_iPortMark = iMark; - if (iMark > 0) - m_connects.clear(); -} - -void qjackctlPortItem::markClientPort ( int iMark ) -{ - markPort(iMark); - - m_pClient->markClient(iMark); -} - -int qjackctlPortItem::portMark (void) const -{ - return m_iPortMark; -} - - -// Connected port list primitives. -void qjackctlPortItem::addConnect ( qjackctlPortItem *pPort ) -{ - m_connects.append(pPort); -} - -void qjackctlPortItem::removeConnect ( qjackctlPortItem *pPort ) -{ - pPort->setHilite(false); - - int iPort = m_connects.indexOf(pPort); - if (iPort >= 0) - m_connects.removeAt(iPort); -} - - -// Connected port finder. -qjackctlPortItem *qjackctlPortItem::findConnect ( const QString& sClientPortName ) -{ - QListIterator iter(m_connects); - while (iter.hasNext()) { - qjackctlPortItem *pPort = iter.next(); - if (sClientPortName == pPort->clientPortName()) - return pPort; - } - - return NULL; -} - -qjackctlPortItem *qjackctlPortItem::findConnectPtr ( qjackctlPortItem *pPortPtr ) -{ - QListIterator iter(m_connects); - while (iter.hasNext()) { - qjackctlPortItem *pPort = iter.next(); - if (pPortPtr == pPort) - return pPort; - } - - return NULL; -} - - -// Connection cache list accessor. -const QList& qjackctlPortItem::connects (void) const -{ - return m_connects; -} - - -// Connectiopn highlight methods. -bool qjackctlPortItem::isHilite (void) const -{ - return m_bHilite; -} - -void qjackctlPortItem::setHilite ( bool bHilite ) -{ - // Update the port highlightning if changed... - if ((m_bHilite && !bHilite) || (!m_bHilite && bHilite)) { - m_bHilite = bHilite; - // Propagate this to the parent... - m_pClient->setHilite(bHilite); - } - - // Set the new color. - const QPalette& pal = QTreeWidgetItem::treeWidget()->palette(); - QTreeWidgetItem::setTextColor(0, m_bHilite - ? (pal.base().color().value() < 0x7f ? Qt::cyan : Qt::blue) - : pal.text().color()); -} - - -// Proxy sort override method. -// - Natural decimal sorting comparator. -bool qjackctlPortItem::operator< ( const QTreeWidgetItem& other ) const -{ - return qjackctlClientList::lessThan(*this, other); -} - - -//---------------------------------------------------------------------- -// class qjackctlClientItem -- Jack client list item. -// - -// Constructor. -qjackctlClientItem::qjackctlClientItem ( qjackctlClientList *pClientList, - const QString& sClientName ) - : QTreeWidgetItem(pClientList->listView(), QJACKCTL_CLIENTITEM) -{ - m_pClientList = pClientList; - m_sClientName = sClientName; - m_iClientMark = 0; - m_iHilite = 0; - - m_pClientList->clients().append(this); - - // Check aliasing... - qjackctlConnectAlias *pAliases - = (pClientList->listView())->aliases(); - if (pAliases) { - QTreeWidgetItem::setText(0, - pAliases->clientAlias(sClientName)); - if ((pClientList->listView())->renameEnabled()) { - QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() - | Qt::ItemIsEditable); - } - } else { - QTreeWidgetItem::setText(0, sClientName); - } -} - -// Default destructor. -qjackctlClientItem::~qjackctlClientItem (void) -{ - qDeleteAll(m_ports); - m_ports.clear(); - - int iClient = m_pClientList->clients().indexOf(this); - if (iClient >= 0) - m_pClientList->clients().removeAt(iClient); -} - - -// Port finder. -qjackctlPortItem *qjackctlClientItem::findPort (const QString& sPortName) -{ - QListIterator iter(m_ports); - while (iter.hasNext()) { - qjackctlPortItem *pPort = iter.next(); - if (sPortName == pPort->portName()) - return pPort; - } - - return NULL; -} - - -// Client list accessor. -qjackctlClientList *qjackctlClientItem::clientList (void) const -{ - return m_pClientList; -} - - -// Port list accessor. -QList& qjackctlClientItem::ports (void) -{ - return m_ports; -} - - -// Instance accessors. -void qjackctlClientItem::setClientName ( const QString& sClientName ) -{ - QTreeWidgetItem::setText(0, sClientName); - - m_sClientName = sClientName; -} - -const QString& qjackctlClientItem::clientName (void) const -{ - return m_sClientName; -} - - -// Readable flag client accessor. -bool qjackctlClientItem::isReadable (void) const -{ - return m_pClientList->isReadable(); -} - - -// Client:port set housekeeping marker. -void qjackctlClientItem::markClient ( int iMark ) -{ - setHilite(false); - m_iClientMark = iMark; -} - -void qjackctlClientItem::markClientPorts ( int iMark ) -{ - markClient(iMark); - - QListIterator iter(m_ports); - while (iter.hasNext()) - (iter.next())->markPort(iMark); -} - -int qjackctlClientItem::cleanClientPorts ( int iMark ) -{ - int iDirtyCount = 0; - - QMutableListIterator iter(m_ports); - while (iter.hasNext()) { - qjackctlPortItem *pPort = iter.next(); - if (pPort->portMark() == iMark) { - iter.remove(); - delete pPort; - iDirtyCount++; - } - } - - return iDirtyCount; -} - -int qjackctlClientItem::clientMark (void) const -{ - return m_iClientMark; -} - - -// Connectiopn highlight methods. -bool qjackctlClientItem::isHilite (void) const -{ - return (m_iHilite > 0); -} - -void qjackctlClientItem::setHilite ( bool bHilite ) -{ - if (bHilite) - m_iHilite++; - else - if (m_iHilite > 0) - m_iHilite--; - - // Set the new color. - const QPalette& pal = QTreeWidgetItem::treeWidget()->palette(); - QTreeWidgetItem::setTextColor(0, m_iHilite > 0 - ? (pal.base().color().value() < 0x7f ? Qt::darkCyan : Qt::darkBlue) - : pal.text().color()); -} - - -// Socket item openness status. -void qjackctlClientItem::setOpen ( bool bOpen ) -{ -#if QT_VERSION >= 0x040201 - QTreeWidgetItem::setExpanded(bOpen); -#else - QTreeWidgetItem::treeWidget()->setItemExpanded(this, bOpen); -#endif -} - - -bool qjackctlClientItem::isOpen (void) const -{ -#if QT_VERSION >= 0x040201 - return QTreeWidgetItem::isExpanded(); -#else - return QTreeWidgetItem::treeWidget()->isItemExpanded(this); -#endif -} - - -// Proxy sort override method. -// - Natural decimal sorting comparator. -bool qjackctlClientItem::operator< ( const QTreeWidgetItem& other ) const -{ - return qjackctlClientList::lessThan(*this, other); -} - - -//---------------------------------------------------------------------- -// qjackctlClientList -- Client list. -// - -// Constructor. -qjackctlClientList::qjackctlClientList ( - qjackctlClientListView *pListView, bool bReadable ) -{ - m_pListView = pListView; - m_bReadable = bReadable; - - m_pHiliteItem = 0; -} - -// Default destructor. -qjackctlClientList::~qjackctlClientList (void) -{ - qDeleteAll(m_clients); - m_clients.clear(); -} - - -// Client finder. -qjackctlClientItem *qjackctlClientList::findClient ( - const QString& sClientName ) -{ - QListIterator iter(m_clients); - while (iter.hasNext()) { - qjackctlClientItem *pClient = iter.next(); - if (sClientName == pClient->clientName()) - return pClient; - } - - return NULL; -} - -// Client:port finder. -qjackctlPortItem *qjackctlClientList::findClientPort ( - const QString& sClientPort ) -{ - qjackctlPortItem *pPort = 0; - int iColon = sClientPort.indexOf(':'); - if (iColon >= 0) { - qjackctlClientItem *pClient = findClient(sClientPort.left(iColon)); - if (pClient) { - pPort = pClient->findPort( - sClientPort.right(sClientPort.length() - iColon - 1)); - } - } - return pPort; -} - - -// Client list accessor. -QList& qjackctlClientList::clients (void) -{ - return m_clients; -} - - -// List view accessor. -qjackctlClientListView *qjackctlClientList::listView (void) const -{ - return m_pListView; -} - - -// Readable flag client accessor. -bool qjackctlClientList::isReadable (void) const -{ - return m_bReadable; -} - - -// Client:port set housekeeping marker. -void qjackctlClientList::markClientPorts ( int iMark ) -{ - m_pHiliteItem = 0; - - QListIterator iter(m_clients); - while (iter.hasNext()) - (iter.next())->markClientPorts(iMark); -} - -int qjackctlClientList::cleanClientPorts ( int iMark ) -{ - int iDirtyCount = 0; - - QMutableListIterator iter(m_clients); - while (iter.hasNext()) { - qjackctlClientItem *pClient = iter.next(); - if (pClient->clientMark() == iMark) { - iter.remove(); - delete pClient; - iDirtyCount++; - } else { - iDirtyCount += pClient->cleanClientPorts(iMark); - } - } - - return iDirtyCount; -} - -// Client:port hilite update stabilization. -void qjackctlClientList::hiliteClientPorts (void) -{ - qjackctlClientItem *pClient; - qjackctlPortItem *pPort; - - QTreeWidgetItem *pItem = m_pListView->currentItem(); - - // Dehilite the previous selected items. - if (m_pHiliteItem && pItem != m_pHiliteItem) { - if (m_pHiliteItem->type() == QJACKCTL_CLIENTITEM) { - pClient = static_cast (m_pHiliteItem); - QListIterator iter(pClient->ports()); - while (iter.hasNext()) { - pPort = iter.next(); - QListIterator it(pPort->connects()); - while (it.hasNext()) - (it.next())->setHilite(false); - } - } else { - pPort = static_cast (m_pHiliteItem); - QListIterator it(pPort->connects()); - while (it.hasNext()) - (it.next())->setHilite(false); - } - } - - // Hilite the now current selected items. - if (pItem) { - if (pItem->type() == QJACKCTL_CLIENTITEM) { - pClient = static_cast (pItem); - QListIterator iter(pClient->ports()); - while (iter.hasNext()) { - pPort = iter.next(); - QListIterator it(pPort->connects()); - while (it.hasNext()) - (it.next())->setHilite(true); - } - } else { - pPort = static_cast (pItem); - QListIterator it(pPort->connects()); - while (it.hasNext()) - (it.next())->setHilite(true); - } - } - - // Do remember this one, ever. - m_pHiliteItem = pItem; -} - - -// Natural decimal sorting comparator. -bool qjackctlClientList::lessThan ( - const QTreeWidgetItem& i1, const QTreeWidgetItem& i2 ) -{ - const QString& s1 = i1.text(0); - const QString& s2 = i2.text(0); - - int ich1, ich2; - - int cch1 = s1.length(); - int cch2 = s2.length(); - - for (ich1 = ich2 = 0; ich1 < cch1 && ich2 < cch2; ich1++, ich2++) { - - // Skip (white)spaces... - while (s1.at(ich1).isSpace()) - ich1++; - while (s2.at(ich2).isSpace()) - ich2++; - - // Normalize (to uppercase) the next characters... - QChar ch1 = s1.at(ich1).toUpper(); - QChar ch2 = s2.at(ich2).toUpper(); - - if (ch1.isDigit() && ch2.isDigit()) { - // Find the whole length numbers... - int iDigits1 = ich1++; - while (ich1 < cch1 && s1.at(ich1).isDigit()) - ich1++; - int iDigits2 = ich2++; - while (ich2 < cch2 && s2.at(ich2).isDigit()) - ich2++; - // Compare as natural decimal-numbers... - int n1 = s1.mid(iDigits1, ich1 - iDigits1).toInt(); - int n2 = s2.mid(iDigits2, ich2 - iDigits2).toInt(); - if (n1 != n2) - return (n1 < n2); - // Never go out of bounds... - if (ich1 >= cch1 || ich1 >= cch2) - break; - // Go on with this next char... - ch1 = s1.at(ich1).toUpper(); - ch2 = s2.at(ich2).toUpper(); - } - - // Compare this char... - if (ch1 != ch2) - return (ch1 < ch2); - } - - // Probable exact match. - return false; -} - - -// Do proper contents refresh/update. -void qjackctlClientList::refresh (void) -{ - QHeaderView *pHeader = m_pListView->header(); - m_pListView->sortItems( - pHeader->sortIndicatorSection(), - pHeader->sortIndicatorOrder()); -} - - -//---------------------------------------------------------------------------- -// qjackctlClientListView -- Client list view, supporting drag-n-drop. - -// Constructor. -qjackctlClientListView::qjackctlClientListView ( - qjackctlConnectView *pConnectView, bool bReadable ) - : QTreeWidget(pConnectView) -{ - m_pConnectView = pConnectView; - - m_pAutoOpenTimer = 0; - m_iAutoOpenTimeout = 0; - - m_pDragItem = NULL; - m_pDragItem = NULL; - - m_pAliases = NULL; - m_bRenameEnabled = false; - - QHeaderView *pHeader = QTreeWidget::header(); -// pHeader->setResizeMode(QHeaderView::Custom); - pHeader->setDefaultAlignment(Qt::AlignLeft); -// pHeader->setDefaultSectionSize(120); - pHeader->setMovable(false); - pHeader->setClickable(true); - pHeader->setSortIndicatorShown(true); - pHeader->setStretchLastSection(true); - - QTreeWidget::setRootIsDecorated(true); - QTreeWidget::setUniformRowHeights(true); -// QTreeWidget::setDragEnabled(true); - QTreeWidget::setAcceptDrops(true); - QTreeWidget::setDropIndicatorShown(true); - QTreeWidget::setAutoScroll(true); - QTreeWidget::setSelectionMode(QAbstractItemView::SingleSelection); - QTreeWidget::setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - QTreeWidget::setSortingEnabled(true); - QTreeWidget::setMinimumWidth(120); - QTreeWidget::setColumnCount(1); - - QString sText; - if (bReadable) - sText = tr("Readable Clients / Output Ports"); - else - sText = tr("Writable Clients / Input Ports"); - QTreeWidget::headerItem()->setText(0, sText); - QTreeWidget::sortItems(0, Qt::AscendingOrder); - QTreeWidget::setToolTip(sText); - - // Trap for help/tool-tips events. - QTreeWidget::viewport()->installEventFilter(this); - - QObject::connect(QTreeWidget::itemDelegate(), - SIGNAL(commitData(QWidget*)), - SLOT(renamedSlot())); - - setAutoOpenTimeout(800); -} - -// Default destructor. -qjackctlClientListView::~qjackctlClientListView (void) -{ - setAutoOpenTimeout(0); -} - - -// Binding indirect accessor. -qjackctlConnect *qjackctlClientListView::binding() const -{ - return m_pConnectView->binding(); -} - - -// Auto-open timeout method. -void qjackctlClientListView::setAutoOpenTimeout ( int iAutoOpenTimeout ) -{ - m_iAutoOpenTimeout = iAutoOpenTimeout; - - if (m_pAutoOpenTimer) - delete m_pAutoOpenTimer; - m_pAutoOpenTimer = NULL; - - if (m_iAutoOpenTimeout > 0) { - m_pAutoOpenTimer = new QTimer(this); - QObject::connect(m_pAutoOpenTimer, - SIGNAL(timeout()), - SLOT(timeoutSlot())); - } -} - - -// Auto-open timeout accessor. -int qjackctlClientListView::autoOpenTimeout (void) const -{ - return m_iAutoOpenTimeout; -} - - -// Aliasing support methods. -void qjackctlClientListView::setAliases ( qjackctlConnectAlias *pAliases, bool bRenameEnabled ) -{ - m_pAliases = pAliases; - m_bRenameEnabled = bRenameEnabled; - - // For each client item, if any. - int iItemCount = QTreeWidget::topLevelItemCount(); - for (int iItem = 0; iItem < iItemCount; ++iItem) { - QTreeWidgetItem *pItem = QTreeWidget::topLevelItem(iItem); - if (pItem->type() != QJACKCTL_CLIENTITEM) - continue; - qjackctlClientItem *pClientItem - = static_cast (pItem); - if (pClientItem == NULL) - continue; - if (m_pAliases) { - pClientItem->setText(0, - m_pAliases->clientAlias(pClientItem->clientName())); - pClientItem->setFlags( - pClientItem->flags() | Qt::ItemIsEditable); - } else { - pClientItem->setText(0, pClientItem->clientName()); - pClientItem->setFlags( - pClientItem->flags() & ~Qt::ItemIsEditable); - } - // For each port item... - int iChildCount = pClientItem->childCount(); - for (int iChild = 0; iChild < iChildCount; ++iChild) { - QTreeWidgetItem *pChildItem = pClientItem->child(iChild); - if (pChildItem->type() != QJACKCTL_PORTITEM) - continue; - qjackctlPortItem *pPortItem - = static_cast (pChildItem); - if (pPortItem == NULL) - continue; - if (m_pAliases) { - pPortItem->setText(0, m_pAliases->portAlias( - pPortItem->clientName(), pPortItem->portName())); - pPortItem->setFlags( - pClientItem->flags() | Qt::ItemIsEditable); - } else { - pPortItem->setText(0, pPortItem->portName()); - pPortItem->setFlags( - pPortItem->flags() & ~Qt::ItemIsEditable); - } - } - } -} - -qjackctlConnectAlias *qjackctlClientListView::aliases (void) const -{ - return m_pAliases; -} - -bool qjackctlClientListView::renameEnabled (void) const -{ - return m_bRenameEnabled; -} - - -// In-place aliasing slot. -void qjackctlClientListView::startRenameSlot (void) -{ - QTreeWidgetItem *pItem = QTreeWidget::currentItem(); - if (pItem) - QTreeWidget::editItem(pItem, 0); -} - - -// In-place aliasing slot. -void qjackctlClientListView::renamedSlot (void) -{ - if (m_pAliases == NULL) - return; - - QTreeWidgetItem *pItem = QTreeWidget::currentItem(); - if (pItem == NULL) - return; - - const QString& sText = pItem->text(0); - if (pItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pClientItem - = static_cast (pItem); - m_pAliases->setClientAlias( - pClientItem->clientName(), sText); - if (sText.isEmpty()) - pClientItem->setText(0, pClientItem->clientName()); - } else { - qjackctlPortItem *pPortItem - = static_cast (pItem); - m_pAliases->setPortAlias( - pPortItem->clientName(), pPortItem->portName(), sText); - if (sText.isEmpty()) - pPortItem->setText(0, pPortItem->portName()); - } - m_pConnectView->setDirty(true); -} - - -// Auto-open timer slot. -void qjackctlClientListView::timeoutSlot (void) -{ - if (m_pAutoOpenTimer) { - m_pAutoOpenTimer->stop(); - if (m_pDropItem && m_pDropItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pClientItem - = static_cast (m_pDropItem); - if (pClientItem && !pClientItem->isOpen()) - pClientItem->setOpen(true); - } - } -} - - -// Trap for help/tool-tip events. -bool qjackctlClientListView::eventFilter ( QObject *pObject, QEvent *pEvent ) -{ - QWidget *pViewport = QTreeWidget::viewport(); - if (static_cast (pObject) == pViewport - && pEvent->type() == QEvent::ToolTip) { - QHelpEvent *pHelpEvent = static_cast (pEvent); - if (pHelpEvent) { - QTreeWidgetItem *pItem = QTreeWidget::itemAt(pHelpEvent->pos()); - if (pItem && pItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pClientItem - = static_cast (pItem); - if (pClientItem) { - QToolTip::showText(pHelpEvent->globalPos(), - pClientItem->clientName(), pViewport); - return true; - } - } - else - if (pItem && pItem->type() == QJACKCTL_PORTITEM) { - qjackctlPortItem *pPortItem - = static_cast (pItem); - if (pPortItem) { - QToolTip::showText(pHelpEvent->globalPos(), - pPortItem->portName(), pViewport); - return true; - } - } - } - } - - // Not handled here. - return QTreeWidget::eventFilter(pObject, pEvent); -} - - -// Drag-n-drop stuff. -QTreeWidgetItem *qjackctlClientListView::dragDropItem ( const QPoint& pos ) -{ - QTreeWidgetItem *pItem = QTreeWidget::itemAt(pos); - if (pItem) { - if (m_pDropItem != pItem) { - QTreeWidget::setCurrentItem(pItem); - m_pDropItem = pItem; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->start(m_iAutoOpenTimeout); - qjackctlConnect *pConnect = m_pConnectView->binding(); - if ((pItem->flags() & Qt::ItemIsDropEnabled) == 0 - || pConnect == NULL || !pConnect->canConnectSelected()) - pItem = NULL; - } - } else { - m_pDropItem = NULL; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->stop(); - } - - return pItem; -} - -void qjackctlClientListView::dragEnterEvent ( QDragEnterEvent *pDragEnterEvent ) -{ - if (pDragEnterEvent->source() != this && - pDragEnterEvent->mimeData()->hasText() && - dragDropItem(pDragEnterEvent->pos())) { - pDragEnterEvent->accept(); - } else { - pDragEnterEvent->ignore(); - } -} - - -void qjackctlClientListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent ) -{ - if (pDragMoveEvent->source() != this && - pDragMoveEvent->mimeData()->hasText() && - dragDropItem(pDragMoveEvent->pos())) { - pDragMoveEvent->accept(); - } else { - pDragMoveEvent->ignore(); - } -} - - -void qjackctlClientListView::dragLeaveEvent ( QDragLeaveEvent * ) -{ - m_pDropItem = 0; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->stop(); -} - - -void qjackctlClientListView::dropEvent( QDropEvent *pDropEvent ) -{ - if (pDropEvent->source() != this && - pDropEvent->mimeData()->hasText() && - dragDropItem(pDropEvent->pos())) { - const QString sText = pDropEvent->mimeData()->text(); - qjackctlConnect *pConnect = m_pConnectView->binding(); - if (!sText.isEmpty() && pConnect) - pConnect->connectSelected(); - } - - dragLeaveEvent(0); -} - - -// Handle mouse events for drag-and-drop stuff. -void qjackctlClientListView::mousePressEvent ( QMouseEvent *pMouseEvent ) -{ - QTreeWidget::mousePressEvent(pMouseEvent); - - if (pMouseEvent->button() == Qt::LeftButton) { - m_posDrag = pMouseEvent->pos(); - m_pDragItem = QTreeWidget::itemAt(m_posDrag); - } -} - - -void qjackctlClientListView::mouseMoveEvent ( QMouseEvent *pMouseEvent ) -{ - QTreeWidget::mouseMoveEvent(pMouseEvent); - - if ((pMouseEvent->buttons() & Qt::LeftButton) && m_pDragItem - && ((pMouseEvent->pos() - m_posDrag).manhattanLength() - >= QApplication::startDragDistance())) { - // We'll start dragging something alright... - QMimeData *pMimeData = new QMimeData(); - pMimeData->setText(m_pDragItem->text(0)); - QDrag *pDrag = new QDrag(this); - pDrag->setMimeData(pMimeData); - pDrag->setPixmap(m_pDragItem->icon(0).pixmap(16)); - pDrag->setHotSpot(QPoint(-4, -12)); - pDrag->start(Qt::LinkAction); - // We've dragged and maybe dropped it by now... - m_pDragItem = NULL; - } -} - - -// Context menu request event handler. -void qjackctlClientListView::contextMenuEvent ( QContextMenuEvent *pContextMenuEvent ) -{ - qjackctlConnect *pConnect = m_pConnectView->binding(); - if (pConnect == 0) - return; - - QMenu menu(this); - QAction *pAction; - - pAction = menu.addAction(QIcon(":/icons/connect1.png"), - tr("&Connect"), pConnect, SLOT(connectSelected()), - tr("Alt+C", "Connect")); - pAction->setEnabled(pConnect->canConnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), - tr("&Disconnect"), pConnect, SLOT(disconnectSelected()), - tr("Alt+D", "Disconnect")); - pAction->setEnabled(pConnect->canDisconnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), - tr("Disconnect &All"), pConnect, SLOT(disconnectAll()), - tr("Alt+A", "Disconect All")); - pAction->setEnabled(pConnect->canDisconnectAll()); - if (m_bRenameEnabled) { - menu.addSeparator(); - pAction = menu.addAction(QIcon(":/icons/edit1.png"), - tr("Re&name"), this, SLOT(startRenameSlot()), - tr("Alt+N", "Rename")); - QTreeWidgetItem *pItem = QTreeWidget::currentItem(); - pAction->setEnabled(pItem && (pItem->flags() & Qt::ItemIsEditable)); - } - menu.addSeparator(); - pAction = menu.addAction(QIcon(":/icons/refresh1.png"), - tr("&Refresh"), pConnect, SLOT(refresh()), - tr("Alt+R", "Refresh")); - - menu.exec(pContextMenuEvent->globalPos()); -} - - - -//---------------------------------------------------------------------- -// qjackctlConnectorView -- Jack port connector widget. -// - -// Constructor. -qjackctlConnectorView::qjackctlConnectorView ( - qjackctlConnectView *pConnectView ) - : QWidget(pConnectView) -{ - m_pConnectView = pConnectView; - - QWidget::setMinimumWidth(20); -// QWidget::setMaximumWidth(120); - QWidget::setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); -} - -// Default destructor. -qjackctlConnectorView::~qjackctlConnectorView (void) -{ -} - - -// Legal client/port item position helper. -int qjackctlConnectorView::itemY ( QTreeWidgetItem *pItem ) const -{ - QRect rect; - QTreeWidget *pList = pItem->treeWidget(); - QTreeWidgetItem *pParent = pItem->parent(); - qjackctlClientItem *pClientItem = NULL; - if (pParent && pParent->type() == QJACKCTL_CLIENTITEM) - pClientItem = static_cast (pParent); - if (pClientItem && !pClientItem->isOpen()) { - rect = pList->visualItemRect(pClientItem); - } else { - rect = pList->visualItemRect(pItem); - } - return rect.top() + rect.height() / 2; -} - - -// Draw visible port connection relation lines -void qjackctlConnectorView::drawConnectionLine ( QPainter *pPainter, - int x1, int y1, int x2, int y2, int h1, int h2 ) -{ - // Account for list view headers. - y1 += h1; - y2 += h2; - - // Invisible output ports don't get a connecting dot. - if (y1 > h1) - pPainter->drawLine(x1, y1, x1 + 4, y1); - - // How do we'll draw it? - if (m_pConnectView->isBezierLines()) { - // Setup control points - QPolygon spline(4); - int cp = int(float(x2 - x1 - 8) * 0.4f); - spline.putPoints(0, 4, - x1 + 4, y1, x1 + 4 + cp, y1, - x2 - 4 - cp, y2, x2 - 4, y2); - // The connection line, it self. - QPainterPath path; - path.moveTo(spline.at(0)); - path.cubicTo(spline.at(1), spline.at(2), spline.at(3)); - pPainter->strokePath(path, pPainter->pen()); - } - else pPainter->drawLine(x1 + 4, y1, x2 - 4, y2); - - // Invisible input ports don't get a connecting dot. - if (y2 > h2) - pPainter->drawLine(x2 - 4, y2, x2, y2); -} - - -// Draw visible port connection relation arrows. -void qjackctlConnectorView::paintEvent ( QPaintEvent * ) -{ - if (m_pConnectView == NULL) - return; - if (m_pConnectView->OListView() == NULL || - m_pConnectView->IListView() == NULL) - return; - - qjackctlClientListView *pOListView = m_pConnectView->OListView(); - qjackctlClientListView *pIListView = m_pConnectView->IListView(); - - int yc = QWidget::pos().y(); - int yo = pOListView->pos().y(); - int yi = pIListView->pos().y(); - - QPainter painter(this); - int x1, y1, h1; - int x2, y2, h2; - int i, rgb[3] = { 0x33, 0x66, 0x99 }; - - // Inline adaptive to draker background themes... - if (QWidget::palette().window().color().value() < 0x7f) - for (i = 0; i < 3; ++i) rgb[i] += 0x33; - - // Initialize color changer. - i = 0; - // Almost constants. - x1 = 0; - x2 = QWidget::width(); - h1 = (pOListView->header())->sizeHint().height(); - h2 = (pIListView->header())->sizeHint().height(); - // For each output client item... - int iItemCount = pOListView->topLevelItemCount(); - for (int iItem = 0; iItem < iItemCount; ++iItem) { - QTreeWidgetItem *pItem = pOListView->topLevelItem(iItem); - if (pItem->type() != QJACKCTL_CLIENTITEM) - continue; - qjackctlClientItem *pOClient - = static_cast (pItem); - if (pOClient == NULL) - continue; - // Set new connector color. - ++i; - painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); - // For each port item - int iChildCount = pOClient->childCount(); - for (int iChild = 0; iChild < iChildCount; ++iChild) { - QTreeWidgetItem *pChild = pOClient->child(iChild); - if (pChild->type() != QJACKCTL_PORTITEM) - continue; - qjackctlPortItem *pOPort - = static_cast (pChild); - if (pOPort) { - // Get starting connector arrow coordinates. - y1 = itemY(pOPort) + (yo - yc); - // Get port connections... - QListIterator iter(pOPort->connects()); - while (iter.hasNext()) { - qjackctlPortItem *pIPort = iter.next(); - // Obviously, should be a connection - // from pOPort to pIPort items: - y2 = itemY(pIPort) + (yi - yc); - drawConnectionLine(&painter, x1, y1, x2, y2, h1, h2); - } - } - } - } -} - - -// Context menu request event handler. -void qjackctlConnectorView::contextMenuEvent ( - QContextMenuEvent *pContextMenuEvent ) -{ - qjackctlConnect *pConnect = m_pConnectView->binding(); - if (pConnect == 0) - return; - - QMenu menu(this); - QAction *pAction; - - pAction = menu.addAction(QIcon(":/icons/connect1.png"), - tr("&Connect"), pConnect, SLOT(connectSelected()), - tr("Alt+C", "Connect")); - pAction->setEnabled(pConnect->canConnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), - tr("&Disconnect"), pConnect, SLOT(disconnectSelected()), - tr("Alt+D", "Disconnect")); - pAction->setEnabled(pConnect->canDisconnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), - tr("Disconnect &All"), pConnect, SLOT(disconnectAll()), - tr("Alt+A", "Disconect All")); - pAction->setEnabled(pConnect->canDisconnectAll()); - - menu.addSeparator(); - pAction = menu.addAction(QIcon(":/icons/refresh1.png"), - tr("&Refresh"), pConnect, SLOT(refresh()), - tr("Alt+R", "Refresh")); - - menu.exec(pContextMenuEvent->globalPos()); -} - - -// Widget event slots... -void qjackctlConnectorView::contentsChanged (void) -{ - QWidget::update(); -} - - -//---------------------------------------------------------------------------- -// qjackctlConnectView -- Integrated connections view widget. - -// Constructor. -qjackctlConnectView::qjackctlConnectView ( QWidget *pParent ) - : QSplitter(Qt::Horizontal, pParent) -{ - m_pOListView = new qjackctlClientListView(this, true); - m_pConnectorView = new qjackctlConnectorView(this); - m_pIListView = new qjackctlClientListView(this, false); - - m_pConnect = NULL; - - m_bBezierLines = false; - m_iIconSize = 0; - - QObject::connect(m_pOListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pOListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pOListView->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pOListView->header(), SIGNAL(sectionClicked(int)), - m_pConnectorView, SLOT(contentsChanged())); - - QObject::connect(m_pIListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pIListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pIListView->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pConnectorView, SLOT(contentsChanged())); - QObject::connect(m_pIListView->header(), SIGNAL(sectionClicked(int)), - m_pConnectorView, SLOT(contentsChanged())); - - m_bDirty = false; -} - - -// Default destructor. -qjackctlConnectView::~qjackctlConnectView (void) -{ -} - - -// Connect binding methods. -void qjackctlConnectView::setBinding ( qjackctlConnect *pConnect ) -{ - m_pConnect = pConnect; -} - -qjackctlConnect *qjackctlConnectView::binding (void) const -{ - return m_pConnect; -} - - -// Connect client list accessors. -qjackctlClientList *qjackctlConnectView::OClientList (void) const -{ - if (m_pConnect) - return m_pConnect->OClientList(); - else - return NULL; -} - -qjackctlClientList *qjackctlConnectView::IClientList (void) const -{ - if (m_pConnect) - return m_pConnect->OClientList(); - else - return NULL; -} - - -// Connector line style accessors. -void qjackctlConnectView::setBezierLines ( bool bBezierLines ) -{ - m_bBezierLines = bBezierLines; -} - -bool qjackctlConnectView::isBezierLines (void) const -{ - return m_bBezierLines; -} - - -// Common icon size methods. -void qjackctlConnectView::setIconSize ( int iIconSize ) -{ - // Update only if changed. - if (iIconSize == m_iIconSize) - return; - - // Go for it... - m_iIconSize = iIconSize; - - // Call binding descendant implementation, - // and do a complete content reset... - if (m_pConnect) - m_pConnect->updateContents(true); -} - -int qjackctlConnectView::iconSize (void) const -{ - return m_iIconSize; -} - - -// Dirty flag methods. -void qjackctlConnectView::setDirty ( bool bDirty ) -{ - m_bDirty = bDirty; - if (bDirty) - emit contentsChanged(); -} - -bool qjackctlConnectView::isDirty (void) const -{ - return m_bDirty; -} - - -//---------------------------------------------------------------------- -// qjackctlConnect -- Output-to-Input client/ports connection object. -// - -// Constructor. -qjackctlConnect::qjackctlConnect ( qjackctlConnectView *pConnectView ) -{ - m_pConnectView = pConnectView; - - m_pOClientList = NULL; - m_pIClientList = NULL; - - m_iMutex = 0; - - m_pConnectView->setBinding(this); -} - -// Default destructor. -qjackctlConnect::~qjackctlConnect (void) -{ - // Force end of works here. - m_iMutex++; - - m_pConnectView->setBinding(NULL); - - if (m_pOClientList) - delete m_pOClientList; - if (m_pIClientList) - delete m_pIClientList; - - m_pOClientList = NULL; - m_pIClientList = NULL; - - m_pConnectView->ConnectorView()->update(); -} - - -// These must be accessed by the descendant constructor. -qjackctlConnectView *qjackctlConnect::connectView (void) const -{ - return m_pConnectView; -} - -void qjackctlConnect::setOClientList ( qjackctlClientList *pOClientList ) -{ - m_pOClientList = pOClientList; -} - -void qjackctlConnect::setIClientList ( qjackctlClientList *pIClientList ) -{ - m_pIClientList = pIClientList; -} - - -// Connection primitive. -bool qjackctlConnect::connectPortsEx ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - if (pOPort->findConnectPtr(pIPort) != NULL) - return false; - - emit connecting(pOPort, pIPort); - - if (!connectPorts(pOPort, pIPort)) - return false; - - pOPort->addConnect(pIPort); - pIPort->addConnect(pOPort); - return true; -} - -// Disconnection primitive. -bool qjackctlConnect::disconnectPortsEx ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - if (pOPort->findConnectPtr(pIPort) == NULL) - return false; - - emit disconnecting(pOPort, pIPort); - - if (!disconnectPorts(pOPort, pIPort)) - return false; - - pOPort->removeConnect(pIPort); - pIPort->removeConnect(pOPort); - return true; -} - - -// Test if selected ports are connectable. -bool qjackctlConnect::canConnectSelected (void) -{ - bool bResult = false; - - if (startMutex()) { - bResult = canConnectSelectedEx(); - endMutex(); - } - - return bResult; -} - -bool qjackctlConnect::canConnectSelectedEx (void) -{ - // Take this opportunity to highlight any current selections. - m_pOClientList->hiliteClientPorts(); - m_pIClientList->hiliteClientPorts(); - - // Now with our predicate work... - QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - if (pOItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pOClient - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // Each-to-each connections... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - QListIterator iport(pIClient->ports()); - while (oport.hasNext() && iport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - qjackctlPortItem *pIPort = iport.next(); - if (pOPort->findConnectPtr(pIPort) == NULL) - return true; - } - } else { - // Many(all)-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - if (pOPort->findConnectPtr(pIPort) == NULL) - return true; - } - } - } else { - qjackctlPortItem *pOPort - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // One-to-many(all) connection... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator iport(pIClient->ports()); - while (iport.hasNext()) { - qjackctlPortItem *pIPort = iport.next(); - if (pOPort->findConnectPtr(pIPort) == NULL) - return true; - } - } else { - // One-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - return (pOPort->findConnectPtr(pIPort) == NULL); - } - } - - return false; -} - - -// Connect current selected ports. -bool qjackctlConnect::connectSelected (void) -{ - bool bResult = false; - - if (startMutex()) { - bResult = connectSelectedEx(); - endMutex(); - } - - m_pConnectView->ConnectorView()->update(); - - if (bResult) - emit connectChanged(); - - return bResult; -} - -bool qjackctlConnect::connectSelectedEx (void) -{ - QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - if (pOItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pOClient - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // Each-to-each connections... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - QListIterator iport(pIClient->ports()); - while (oport.hasNext() && iport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - qjackctlPortItem *pIPort = iport.next(); - connectPortsEx(pOPort, pIPort); - } - } else { - // Many(all)-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - connectPortsEx(pOPort, pIPort); - } - } - } else { - qjackctlPortItem *pOPort - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // One-to-many(all) connection... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator iport(pIClient->ports()); - while (iport.hasNext()) { - qjackctlPortItem *pIPort = iport.next(); - connectPortsEx(pOPort, pIPort); - } - } else { - // One-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - connectPortsEx(pOPort, pIPort); - } - } - - return true; -} - - -// Test if selected ports are disconnectable. -bool qjackctlConnect::canDisconnectSelected (void) -{ - bool bResult = false; - - if (startMutex()) { - bResult = canDisconnectSelectedEx(); - endMutex(); - } - - return bResult; -} - -bool qjackctlConnect::canDisconnectSelectedEx (void) -{ - QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); - if (!pOItem) - return false; - - QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); - if (!pIItem) - return false; - - if (pOItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pOClient - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // Each-to-each connections... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - QListIterator iport(pIClient->ports()); - while (oport.hasNext() && iport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - qjackctlPortItem *pIPort = iport.next(); - if (pOPort->findConnectPtr(pIPort) != NULL) - return true; - } - } else { - // Many(all)-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - if (pOPort->findConnectPtr(pIPort) != NULL) - return true; - } - } - } else { - qjackctlPortItem *pOPort - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // One-to-many(all) connection... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator iport(pIClient->ports()); - while (iport.hasNext()) { - qjackctlPortItem *pIPort = iport.next(); - if (pOPort->findConnectPtr(pIPort) != NULL) - return true; - } - } else { - // One-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - return (pOPort->findConnectPtr(pIPort) != NULL); - } - } - - return false; -} - - -// Disconnect current selected ports. -bool qjackctlConnect::disconnectSelected (void) -{ - bool bResult = false; - - if (startMutex()) { - bResult = disconnectSelectedEx(); - endMutex(); - } - - m_pConnectView->ConnectorView()->update(); - - if (bResult) - emit connectChanged(); - - return bResult; -} - -bool qjackctlConnect::disconnectSelectedEx (void) -{ - QTreeWidgetItem *pOItem = (m_pOClientList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pIClientList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - if (pOItem->type() == QJACKCTL_CLIENTITEM) { - qjackctlClientItem *pOClient - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // Each-to-each connections... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - QListIterator iport(pIClient->ports()); - while (oport.hasNext() && iport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - qjackctlPortItem *pIPort = iport.next(); - disconnectPortsEx(pOPort, pIPort); - } - } else { - // Many(all)-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - disconnectPortsEx(pOPort, pIPort); - } - } - } else { - qjackctlPortItem *pOPort - = static_cast (pOItem); - if (pIItem->type() == QJACKCTL_CLIENTITEM) { - // One-to-many(all) connection... - qjackctlClientItem *pIClient - = static_cast (pIItem); - QListIterator iport(pIClient->ports()); - while (iport.hasNext()) { - qjackctlPortItem *pIPort = iport.next(); - disconnectPortsEx(pOPort, pIPort); - } - } else { - // One-to-one connection... - qjackctlPortItem *pIPort - = static_cast (pIItem); - disconnectPortsEx(pOPort, pIPort); - } - } - - return true; -} - - -// Test if any port is disconnectable. -bool qjackctlConnect::canDisconnectAll (void) -{ - bool bResult = false; - - if (startMutex()) { - bResult = canDisconnectAllEx(); - endMutex(); - } - - return bResult; -} - -bool qjackctlConnect::canDisconnectAllEx (void) -{ - QListIterator iter(m_pOClientList->clients()); - while (iter.hasNext()) { - qjackctlClientItem *pOClient = iter.next(); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - if (pOPort->connects().count() > 0) - return true; - } - } - return false; -} - - -// Disconnect all ports. -bool qjackctlConnect::disconnectAll (void) -{ - if (QMessageBox::warning(m_pConnectView, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("This will suspend sound processing\n" - "from all client applications.\n\nAre you sure?"), - tr("Yes"), tr("No")) > 0) { - return false; - } - - bool bResult = false; - - if (startMutex()) { - bResult = disconnectAllEx(); - endMutex(); - } - - m_pConnectView->ConnectorView()->update(); - - if (bResult) - emit connectChanged(); - - return bResult; -} - -bool qjackctlConnect::disconnectAllEx (void) -{ - QListIterator iter(m_pOClientList->clients()); - while (iter.hasNext()) { - qjackctlClientItem *pOClient = iter.next(); - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - QListIterator iport(pOPort->connects()); - while (iport.hasNext()) { - qjackctlPortItem *pIPort = iport.next(); - disconnectPortsEx(pOPort, pIPort); - } - } - } - return true; -} - - -// Complete/incremental contents rebuilder; check dirty status if incremental. -void qjackctlConnect::updateContents ( bool bClear ) -{ - int iDirtyCount = 0; - - if (startMutex()) { - // Do we do a complete rebuild? - if (bClear) { - (m_pOClientList->listView())->clear(); - (m_pIClientList->listView())->clear(); - updateIconPixmaps(); - } - // Add (newer) client:ports and respective connections... - if (m_pOClientList->updateClientPorts() > 0) { - m_pOClientList->refresh(); - iDirtyCount++; - } - if (m_pIClientList->updateClientPorts() > 0) { - m_pIClientList->refresh(); - iDirtyCount++; - } - updateConnections(); - endMutex(); - } - - (m_pConnectView->ConnectorView())->update(); - - if (!bClear && iDirtyCount > 0) - emit connectChanged(); -} - - -// Incremental contents rebuilder; check dirty status. -void qjackctlConnect::refresh (void) -{ - updateContents(false); -} - - -// Dunno. But this may avoid some conflicts. -bool qjackctlConnect::startMutex (void) -{ - bool bMutex = (m_iMutex == 0); - if (bMutex) - m_iMutex++; - return bMutex; -} - -void qjackctlConnect::endMutex (void) -{ - if (m_iMutex > 0) - m_iMutex--; -} - - -// Connect client list accessors. -qjackctlClientList *qjackctlConnect::OClientList (void) const -{ - return m_pOClientList; -} - -qjackctlClientList *qjackctlConnect::IClientList (void) const -{ - return m_pIClientList; -} - - -// Common pixmap factory-method. -QPixmap *qjackctlConnect::createIconPixmap ( const QString& sIconName ) -{ - QString sName = sIconName; - int iSize = m_pConnectView->iconSize() * 32; - - if (iSize > 0) - sName += QString("_%1x%2").arg(iSize).arg(iSize); - - return new QPixmap(":/icons/" + sName + ".png"); -} - - -// end of qjackctlConnect.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnect.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnect.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnect.h 2008-09-21 19:16:06.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnect.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,508 +0,0 @@ -// qjackctlConnect.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlConnect_h -#define __qjackctlConnect_h - -#include "qjackctlConnectAlias.h" - -#include -#include - - -// QListViewItem::rtti return values. -#define QJACKCTL_CLIENTITEM 1001 -#define QJACKCTL_PORTITEM 1002 - - -// Forward declarations. -class qjackctlPortItem; -class qjackctlClientItem; -class qjackctlClientList; -class qjackctlClientListView; -class qjackctlConnectorView; -class qjackctlConnectView; -class qjackctlConnect; - - -// Port list item. -class qjackctlPortItem : public QTreeWidgetItem -{ -public: - - // Constructor. - qjackctlPortItem(qjackctlClientItem *pClient, const QString& sPortName); - // Default destructor. - ~qjackctlPortItem(); - - // Instance accessors. - void setPortName(const QString& sPortName); - const QString& clientName() const; - const QString& portName() const; - - // Complete client:port name helper. - QString clientPortName() const; - - // Connections client item accessor. - qjackctlClientItem *client() const; - - // Client port cleanup marker. - void markPort(int iMark); - void markClientPort(int iMark); - - int portMark() const; - - // Connected port list primitives. - void addConnect(qjackctlPortItem *pPort); - void removeConnect(qjackctlPortItem *pPort); - - // Connected port finders. - qjackctlPortItem *findConnect(const QString& sClientPortName); - qjackctlPortItem *findConnectPtr(qjackctlPortItem *pPortPtr); - - // Connection list accessor. - const QList& connects() const; - - // Connectiopn highlight methods. - bool isHilite() const; - void setHilite (bool bHilite); - - // Proxy sort override method. - // - Natural decimal sorting comparator. - bool operator< (const QTreeWidgetItem& other) const; - -private: - - // Instance variables. - qjackctlClientItem *m_pClient; - - QString m_sPortName; - int m_iPortMark; - bool m_bHilite; - - // Connection cache list. - QList m_connects; -}; - - -// Client list item. -class qjackctlClientItem : public QTreeWidgetItem -{ -public: - - // Constructor. - qjackctlClientItem(qjackctlClientList *pClientList, - const QString& sClientName); - // Default destructor. - ~qjackctlClientItem(); - - // Port list primitive methods. - void addPort(qjackctlPortItem *pPort); - void removePort(qjackctlPortItem *pPort); - - // Port finder. - qjackctlPortItem *findPort(const QString& sPortName); - - // Instance accessors. - void setClientName(const QString& sClientName); - const QString& clientName() const; - - // Readable flag accessor. - bool isReadable() const; - - // Client list accessor. - qjackctlClientList *clientList() const; - - // Port list accessor. - QList& ports(); - - // Client port cleanup marker. - void markClient(int iMark); - void markClientPorts(int iMark); - int cleanClientPorts(int iMark); - int clientMark() const; - - // Connectiopn highlight methods. - bool isHilite() const; - void setHilite (bool bHilite); - - // Client item openness status. - void setOpen(bool bOpen); - bool isOpen() const; - - // Proxy sort override method. - // - Natural decimal sorting comparator. - bool operator< (const QTreeWidgetItem& other) const; - -private: - - // Instance variables. - qjackctlClientList *m_pClientList; - - QString m_sClientName; - int m_iClientMark; - int m_iHilite; - - QList m_ports; -}; - - -// Jack client list. -class qjackctlClientList : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlClientList(qjackctlClientListView *pListView, bool bReadable); - // Default destructor. - ~qjackctlClientList(); - - // Client list primitive methods. - void addClient(qjackctlClientItem *pClient); - void removeClient(qjackctlClientItem *pClient); - - // Client finder. - qjackctlClientItem *findClient(const QString& sClientName); - // Client:port finder. - qjackctlPortItem *findClientPort(const QString& sClientPort); - - // List view accessor. - qjackctlClientListView *listView() const; - - // Readable flag accessor. - bool isReadable() const; - - // Client list accessor. - QList& clients(); - - // Client ports cleanup marker. - void markClientPorts(int iMark); - int cleanClientPorts(int iMark); - - // Client:port refreshner (return newest item count). - virtual int updateClientPorts() = 0; - - // Client:port hilite update stabilization. - void hiliteClientPorts (void); - - // Do proper contents refresh/update. - void refresh(); - - // Natural decimal sorting comparator. - static bool lessThan(const QTreeWidgetItem& i1, const QTreeWidgetItem& i2); - -private: - - // Instance variables. - qjackctlClientListView *m_pListView; - bool m_bReadable; - - QList m_clients; - - QTreeWidgetItem *m_pHiliteItem; -}; - - -//---------------------------------------------------------------------------- -// qjackctlClientListView -- Client list view, supporting drag-n-drop. - -class qjackctlClientListView : public QTreeWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlClientListView(qjackctlConnectView *pConnectView, bool bReadable); - // Default destructor. - ~qjackctlClientListView(); - - // Auto-open timer methods. - void setAutoOpenTimeout(int iAutoOpenTimeout); - int autoOpenTimeout() const; - - // Aliasing support methods. - void setAliases(qjackctlConnectAlias *pAliases, bool bRenameEnabled); - qjackctlConnectAlias *aliases() const; - bool renameEnabled() const; - - // Binding indirect accessor. - qjackctlConnect *binding() const; - -protected slots: - - // In-place aliasing slots. - void startRenameSlot(); - void renamedSlot(); - // Auto-open timeout slot. - void timeoutSlot(); - -protected: - - // Trap for help/tool-tip events. - bool eventFilter(QObject *pObject, QEvent *pEvent); - - // Drag-n-drop stuff. - QTreeWidgetItem *dragDropItem(const QPoint& pos); - - // Drag-n-drop stuff -- reimplemented virtual methods. - void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); - void dragMoveEvent(QDragMoveEvent *pDragMoveEvent); - void dragLeaveEvent(QDragLeaveEvent *); - void dropEvent(QDropEvent *pDropEvent); - - // Handle mouse events for drag-and-drop stuff. - void mousePressEvent(QMouseEvent *pMouseEvent); - void mouseMoveEvent(QMouseEvent *pMouseEvent); - - // Context menu request event handler. - void contextMenuEvent(QContextMenuEvent *); - -private: - - // Bindings. - qjackctlConnectView *m_pConnectView; - - // Auto-open timer. - int m_iAutoOpenTimeout; - QTimer *m_pAutoOpenTimer; - - // Items we'll eventually drop something. - QTreeWidgetItem *m_pDragItem; - QTreeWidgetItem *m_pDropItem; - // The point from where drag started. - QPoint m_posDrag; - - // Aliasing support. - qjackctlConnectAlias *m_pAliases; - bool m_bRenameEnabled; -}; - - -//---------------------------------------------------------------------------- -// qjackctlConnectorView -- Jack port connector widget. - -class qjackctlConnectorView : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlConnectorView(qjackctlConnectView *pConnectView); - // Default destructor. - ~qjackctlConnectorView(); - -public slots: - - // Useful slots (should this be protected?). - void contentsChanged(); - -protected: - - // Draw visible port connection relation arrows. - void paintEvent(QPaintEvent *); - - // Context menu request event handler. - virtual void contextMenuEvent(QContextMenuEvent *); - -private: - - // Legal client/port item position helper. - int itemY(QTreeWidgetItem *pItem) const; - - // Drawing methods. - void drawConnectionLine(QPainter *pPainter, - int x1, int y1, int x2, int y2, int h1, int h2); - - // Local instance variables. - qjackctlConnectView *m_pConnectView; -}; - - -//---------------------------------------------------------------------------- -// qjackctlConnectView -- Connections view integrated widget. - -class qjackctlConnectView : public QSplitter -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlConnectView(QWidget *pParent = 0); - // Default destructor. - ~qjackctlConnectView(); - - // Widget accesors. - qjackctlClientListView *OListView() const - { return m_pOListView; } - qjackctlClientListView *IListView() const - { return m_pIListView; } - qjackctlConnectorView *ConnectorView() const - { return m_pConnectorView; } - - // Connections object binding methods. - void setBinding(qjackctlConnect *pConnect); - qjackctlConnect *binding() const; - - // Client list accessors. - qjackctlClientList *OClientList() const; - qjackctlClientList *IClientList() const; - - // Connector line style accessors. - void setBezierLines(bool bBezierLines); - bool isBezierLines() const; - - // Common icon size pixmap accessors. - void setIconSize (int iIconSize); - int iconSize (void) const; - - // Dirty flag accessors. - void setDirty (bool bDirty); - bool isDirty() const; - -signals: - - // Contents change signal. - void contentsChanged(); - -private: - - // Child controls. - qjackctlClientListView *m_pOListView; - qjackctlClientListView *m_pIListView; - qjackctlConnectorView *m_pConnectorView; - - // The main binding object. - qjackctlConnect *m_pConnect; - - // How we'll draw connector lines. - bool m_bBezierLines; - - // How large will be those icons. - // 0 = 16x16 (default), 1 = 32x32, 2 = 64x64. - int m_iIconSize; - - // The obnoxious dirty flag. - bool m_bDirty; -}; - - -//---------------------------------------------------------------------------- -// qjackctlConnect -- Connections model integrated object. - -class qjackctlConnect : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlConnect(qjackctlConnectView *pConnectView); - // Default destructor. - ~qjackctlConnect(); - - // Explicit connection tests. - bool canConnectSelected(); - bool canDisconnectSelected(); - bool canDisconnectAll(); - - // Client list accessors. - qjackctlClientList *OClientList() const; - qjackctlClientList *IClientList() const; - -public slots: - - // Incremental contents refreshner; check dirty status. - void refresh(); - - // Explicit connection slots. - bool connectSelected(); - bool disconnectSelected(); - bool disconnectAll(); - - // Complete/incremental contents rebuilder; check dirty status if incremental. - void updateContents(bool bClear); - -signals: - - // Connection change signal. - void connectChanged(); - - // Pre-notification of (dis)connection. - void connecting(qjackctlPortItem *, qjackctlPortItem *); - void disconnecting(qjackctlPortItem *, qjackctlPortItem *); - -protected: - - // Connect/Disconnection primitives. - virtual bool connectPorts( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort) = 0; - virtual bool disconnectPorts( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort) = 0; - - // Update port connection references. - virtual void updateConnections() = 0; - - // These must be accessed by the descendant constructor. - qjackctlConnectView *connectView() const; - void setOClientList(qjackctlClientList *pOClientList); - void setIClientList(qjackctlClientList *pIClientList); - - // Common pixmap factory helper-method. - QPixmap *createIconPixmap (const QString& sIconName); - - // Update icon size implementation. - virtual void updateIconPixmaps() = 0; - -private: - - // Dunno. But this may avoid some conflicts. - bool startMutex(); - void endMutex(); - - // Connection methods (unguarded). - bool canConnectSelectedEx(); - bool canDisconnectSelectedEx(); - bool canDisconnectAllEx(); - bool connectSelectedEx(); - bool disconnectSelectedEx(); - bool disconnectAllEx(); - - // Connect/Disconnection local primitives. - bool connectPortsEx(qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - bool disconnectPortsEx(qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - - // Instance variables. - qjackctlConnectView *m_pConnectView; - // These must be created on the descendant constructor. - qjackctlClientList *m_pOClientList; - qjackctlClientList *m_pIClientList; - int m_iMutex; -}; - - -#endif // __qjackctlConnect_h - -// end of qjackctlConnect.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.cpp 2008-04-27 17:42:17.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,728 +0,0 @@ -// qjackctlConnectionsForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlConnectionsForm.h" - -#include "qjackctlSetup.h" - -#include "qjackctlMainForm.h" -#include "qjackctlPatchbay.h" - -#include - -#include -#include - - -//---------------------------------------------------------------------------- -// qjackctlConnectionsForm -- UI wrapper form. - -// Constructor. -qjackctlConnectionsForm::qjackctlConnectionsForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QWidget(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - m_pJackClient = NULL; - m_pAudioConnect = NULL; - m_pMidiConnect = NULL; - - m_pAlsaSeq = NULL; - m_pAlsaConnect = NULL; - - m_pSetup = NULL; - - // UI connections... - - QObject::connect(m_ui.AudioConnectPushButton, - SIGNAL(clicked()), - SLOT(audioConnectSelected())); - QObject::connect(m_ui.AudioDisconnectPushButton, - SIGNAL(clicked()), - SLOT(audioDisconnectSelected())); - QObject::connect(m_ui.AudioDisconnectAllPushButton, - SIGNAL(clicked()), - SLOT(audioDisconnectAll())); - QObject::connect(m_ui.AudioRefreshPushButton, - SIGNAL(clicked()), - SLOT(audioRefresh())); - - QObject::connect(m_ui.MidiConnectPushButton, - SIGNAL(clicked()), - SLOT(midiConnectSelected())); - QObject::connect(m_ui.MidiDisconnectPushButton, - SIGNAL(clicked()), - SLOT(midiDisconnectSelected())); - QObject::connect(m_ui.MidiDisconnectAllPushButton, - SIGNAL(clicked()), - SLOT(midiDisconnectAll())); - QObject::connect(m_ui.MidiRefreshPushButton, - SIGNAL(clicked()), - SLOT(midiRefresh())); - - QObject::connect(m_ui.AlsaConnectPushButton, - SIGNAL(clicked()), - SLOT(alsaConnectSelected())); - QObject::connect(m_ui.AlsaDisconnectPushButton, - SIGNAL(clicked()), - SLOT(alsaDisconnectSelected())); - QObject::connect(m_ui.AlsaDisconnectAllPushButton, - SIGNAL(clicked()), - SLOT(alsaDisconnectAll())); - QObject::connect(m_ui.AlsaRefreshPushButton, - SIGNAL(clicked()), - SLOT(alsaRefresh())); - - // Connect it to some UI feedback slots. - QObject::connect(m_ui.AudioConnectView->OListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(audioStabilize())); - QObject::connect(m_ui.AudioConnectView->IListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(audioStabilize())); - QObject::connect(m_ui.MidiConnectView->OListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(midiStabilize())); - QObject::connect(m_ui.MidiConnectView->IListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(midiStabilize())); - QObject::connect(m_ui.AlsaConnectView->OListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(alsaStabilize())); - QObject::connect(m_ui.AlsaConnectView->IListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(alsaStabilize())); - - // Dirty dispatcher (refresh deferral). - QObject::connect(m_ui.AudioConnectView, - SIGNAL(contentsChanged()), - SLOT(audioRefresh())); - QObject::connect(m_ui.MidiConnectView, - SIGNAL(contentsChanged()), - SLOT(midiRefresh())); - QObject::connect(m_ui.AlsaConnectView, - SIGNAL(contentsChanged()), - SLOT(alsaRefresh())); - -#ifndef CONFIG_JACK_MIDI - m_ui.ConnectionsTabWidget->setTabEnabled(1, false); -#endif -#ifndef CONFIG_ALSA_SEQ -// m_ui.ConnectionsTabWidget->setTabEnabled(2, false); - m_ui.ConnectionsTabWidget->removeTab(2); -#endif -} - - -// Destructor. -qjackctlConnectionsForm::~qjackctlConnectionsForm (void) -{ - // Destroy our connections view... - setJackClient(NULL); - setAlsaSeq(NULL); -} - - -// Notify our parent that we're emerging. -void qjackctlConnectionsForm::showEvent ( QShowEvent *pShowEvent ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); - - audioRefresh(); - midiRefresh(); - - alsaRefresh(); - - QWidget::showEvent(pShowEvent); -} - -// Notify our parent that we're closing. -void qjackctlConnectionsForm::hideEvent ( QHideEvent *pHideEvent ) -{ - QWidget::hideEvent(pHideEvent); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - -// Just about to notify main-window that we're closing. -void qjackctlConnectionsForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) -{ - QWidget::hide(); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - - -// Set reference to global options, mostly needed for the -// initial sizes of the main splitter views and those -// client/port aliasing feature. -void qjackctlConnectionsForm::setup ( qjackctlSetup *pSetup ) -{ - m_pSetup = pSetup; - - // Load some splitter sizes... - if (m_pSetup) { - QList sizes; - sizes.append(180); - sizes.append(60); - sizes.append(180); - m_pSetup->loadSplitterSizes(m_ui.AudioConnectView, sizes); - m_pSetup->loadSplitterSizes(m_ui.MidiConnectView, sizes); - m_pSetup->loadSplitterSizes(m_ui.AlsaConnectView, sizes); -#ifdef CONFIG_ALSA_SEQ - if (!m_pSetup->bAlsaSeqEnabled) { - // m_ui.ConnectionsTabWidget->setTabEnabled(2, false); - m_ui.ConnectionsTabWidget->removeTab(2); - } -#endif - } - - // Update initial client/port aliases... - updateAliases(); -} - - -// Connector view accessors. -qjackctlConnectView *qjackctlConnectionsForm::audioConnectView (void) const -{ - return m_ui.AudioConnectView; -} - -qjackctlConnectView *qjackctlConnectionsForm::midiConnectView (void) const -{ - return m_ui.MidiConnectView; -} - -qjackctlConnectView *qjackctlConnectionsForm::alsaConnectView (void) const -{ - return m_ui.AlsaConnectView; -} - - -// Window close event handlers. -bool qjackctlConnectionsForm::queryClose (void) -{ - bool bQueryClose = true; - - if (m_pSetup - && (m_ui.AudioConnectView->isDirty() || - m_ui.MidiConnectView->isDirty() || - m_ui.AlsaConnectView->isDirty())) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("The preset aliases have been changed:\n\n" - "\"%1\"\n\nDo you want to save the changes?") - .arg(m_sPreset), - tr("Save"), tr("Discard"), tr("Cancel"))) { - case 0: // Save... - saveAliases(); - // Fall thru.... - case 1: // Discard - break; - default: // Cancel. - bQueryClose = false; - } - } - - // Save some splitter sizes... - if (m_pSetup && bQueryClose) { - m_pSetup->saveSplitterSizes(m_ui.AudioConnectView); - m_pSetup->saveSplitterSizes(m_ui.MidiConnectView); - m_pSetup->saveSplitterSizes(m_ui.AlsaConnectView); - } - - return bQueryClose; -} - - -// Load aliases from current preset. -bool qjackctlConnectionsForm::loadAliases (void) -{ - bool bResult = false; - - if (m_pSetup && queryClose()) { - m_sPreset = m_pSetup->sDefPreset; - bResult = m_pSetup->loadAliases(m_sPreset); - if (bResult) { - m_ui.AudioConnectView->setDirty(false); - m_ui.MidiConnectView->setDirty(false); - m_ui.AlsaConnectView->setDirty(false); - } - } - - return bResult; -} - - -// Save aliases to current preset. -bool qjackctlConnectionsForm::saveAliases (void) -{ - bool bResult = false; - - if (m_pSetup) { - bResult = m_pSetup->saveAliases(m_sPreset); - if (bResult) { - m_ui.AudioConnectView->setDirty(false); - m_ui.MidiConnectView->setDirty(false); - m_ui.AlsaConnectView->setDirty(false); - } - } - - return bResult; -} - - -// Connections view font accessors. -QFont qjackctlConnectionsForm::connectionsFont (void) const -{ - // Elect one list view to retrieve current font. - return m_ui.AudioConnectView->OListView()->font(); -} - -void qjackctlConnectionsForm::setConnectionsFont ( const QFont & font ) -{ - // Set fonts of all listviews... - m_ui.AudioConnectView->OListView()->setFont(font); - m_ui.AudioConnectView->IListView()->setFont(font); - m_ui.MidiConnectView->OListView()->setFont(font); - m_ui.MidiConnectView->IListView()->setFont(font); - m_ui.AlsaConnectView->OListView()->setFont(font); - m_ui.AlsaConnectView->IListView()->setFont(font); -} - - -// Connections view icon size accessor. -void qjackctlConnectionsForm::setConnectionsIconSize ( int iIconSize ) -{ - // Set icon sizes of all views... - m_ui.AudioConnectView->setIconSize(iIconSize); - m_ui.MidiConnectView->setIconSize(iIconSize); - m_ui.AlsaConnectView->setIconSize(iIconSize); -} - - -// (Un)Bind a JACK client to this form. -void qjackctlConnectionsForm::setJackClient ( jack_client_t *pJackClient ) -{ - m_pJackClient = pJackClient; - - if (pJackClient == NULL) { - if (m_pAudioConnect) { - delete m_pAudioConnect; - m_pAudioConnect = NULL; - } - if (m_pMidiConnect) { - delete m_pMidiConnect; - m_pMidiConnect = NULL; - } - } - - if (pJackClient) { - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (m_pAudioConnect == NULL && pMainForm) { - m_pAudioConnect = new qjackctlJackConnect( - m_ui.AudioConnectView, pJackClient, QJACKCTL_JACK_AUDIO); - QObject::connect(m_pAudioConnect, SIGNAL(connectChanged()), - pMainForm, SLOT(jackConnectChanged())); - QObject::connect(m_pAudioConnect, - SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), - SLOT(audioDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); - } - if (m_pMidiConnect == NULL && pMainForm) { - m_pMidiConnect = new qjackctlJackConnect( - m_ui.MidiConnectView, pJackClient, QJACKCTL_JACK_MIDI); - QObject::connect(m_pMidiConnect, SIGNAL(connectChanged()), - pMainForm, SLOT(jackConnectChanged())); - QObject::connect(m_pMidiConnect, - SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), - SLOT(midiDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); - } - } - - stabilizeAudio(pJackClient != NULL); - stabilizeMidi(pJackClient != NULL); -} - - -// (Un)Bind a ALSA sequencer descriptor to this form. -void qjackctlConnectionsForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) -{ - m_pAlsaSeq = pAlsaSeq; - - if (pAlsaSeq == NULL && m_pAlsaConnect) { - delete m_pAlsaConnect; - m_pAlsaConnect = NULL; - } - - if (pAlsaSeq && m_pAlsaConnect == NULL) { - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - m_pAlsaConnect = new qjackctlAlsaConnect(m_ui.AlsaConnectView, pAlsaSeq); - if (pMainForm) { - QObject::connect(m_pAlsaConnect, SIGNAL(connectChanged()), - pMainForm, SLOT(alsaConnectChanged())); - QObject::connect(m_pAlsaConnect, - SIGNAL(disconnecting(qjackctlPortItem *, qjackctlPortItem *)), - SLOT(alsaDisconnecting(qjackctlPortItem *, qjackctlPortItem *))); - } - } - - stabilizeAlsa(pAlsaSeq != NULL); -} - - -// Check if there's JACK audio connections. -bool qjackctlConnectionsForm::isAudioConnected (void) const -{ - bool bIsAudioConnected = false; - - if (m_pAudioConnect) - bIsAudioConnected = m_pAudioConnect->canDisconnectAll(); - - return bIsAudioConnected; -} - - -// Connect current selected JACK audio ports. -void qjackctlConnectionsForm::audioConnectSelected (void) -{ - if (m_pAudioConnect) { - if (m_pAudioConnect->connectSelected()) - refreshAudio(false); - } -} - - -// Disconnect current selected JACK audio ports. -void qjackctlConnectionsForm::audioDisconnectSelected (void) -{ - if (m_pAudioConnect) { - if (m_pAudioConnect->disconnectSelected()) - refreshAudio(false); - } -} - - -// Disconnect all connected JACK audio ports. -void qjackctlConnectionsForm::audioDisconnectAll (void) -{ - if (m_pAudioConnect) { - if (m_pAudioConnect->disconnectAll()) - refreshAudio(false); - } -} - - -// JACK audio ports disconnecting. -void qjackctlConnectionsForm::audioDisconnecting ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_JACK_AUDIO); -} - - -// Refresh JACK audio form by notifying the parent form. -void qjackctlConnectionsForm::audioRefresh (void) -{ - refreshAudio(false); -} - - -// A JACK audio helper stabilization slot. -void qjackctlConnectionsForm::audioStabilize (void) -{ - stabilizeAudio(true); -} - - -// Connect current selected JACK MIDI ports. -void qjackctlConnectionsForm::midiConnectSelected (void) -{ - if (m_pMidiConnect) { - if (m_pMidiConnect->connectSelected()) - refreshMidi(false); - } -} - - -// Check if there's JACK MIDI connections. -bool qjackctlConnectionsForm::isMidiConnected (void) const -{ - bool bIsMidiConnected = false; - - if (m_pMidiConnect) - bIsMidiConnected = m_pMidiConnect->canDisconnectAll(); - - return bIsMidiConnected; -} - - -// Disconnect current selected JACK MIDI ports. -void qjackctlConnectionsForm::midiDisconnectSelected (void) -{ - if (m_pMidiConnect) { - if (m_pMidiConnect->disconnectSelected()) - refreshMidi(false); - } -} - - -// Disconnect all connected JACK MIDI ports. -void qjackctlConnectionsForm::midiDisconnectAll (void) -{ - if (m_pMidiConnect) { - if (m_pMidiConnect->disconnectAll()) - refreshMidi(false); - } -} - - -// JACK MIDI ports disconnecting. -void qjackctlConnectionsForm::midiDisconnecting ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_JACK_MIDI); -} - - -// Refresh JACK MIDI form by notifying the parent form. -void qjackctlConnectionsForm::midiRefresh (void) -{ - refreshMidi(false); -} - - -// A JACK MIDI helper stabilization slot. -void qjackctlConnectionsForm::midiStabilize (void) -{ - stabilizeMidi(true); -} - - -// Check if there's ALSA MIDI connections. -bool qjackctlConnectionsForm::isAlsaConnected (void) const -{ - bool bIsConnected = false; - - if (m_pAlsaConnect) - bIsConnected = m_pAlsaConnect->canDisconnectAll(); - - return bIsConnected; -} - - -// Connect current selected ALSA MIDI ports. -void qjackctlConnectionsForm::alsaConnectSelected (void) -{ - if (m_pAlsaConnect) { - if (m_pAlsaConnect->connectSelected()) - refreshAlsa(false); - } -} - - -// Disconnect current selected ALSA MIDI ports. -void qjackctlConnectionsForm::alsaDisconnectSelected (void) -{ - if (m_pAlsaConnect) { - if (m_pAlsaConnect->disconnectSelected()) - refreshAlsa(false); - } -} - - -// Disconnect all connected ALSA MIDI ports. -void qjackctlConnectionsForm::alsaDisconnectAll (void) -{ - if (m_pAlsaConnect) { - if (m_pAlsaConnect->disconnectAll()) - refreshAlsa(false); - } -} - - -// ALSA MIDI ports disconnecting. -void qjackctlConnectionsForm::alsaDisconnecting ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->queryDisconnect(pOPort, pIPort, QJACKCTL_SOCKETTYPE_ALSA_MIDI); -} - - -// Refresh complete form by notifying the parent form. -void qjackctlConnectionsForm::alsaRefresh (void) -{ - refreshAlsa(false); -} - - -// A helper stabilization slot. -void qjackctlConnectionsForm::alsaStabilize (void) -{ - stabilizeAlsa(true); -} - - -// Either rebuild all connections now -// or notify main form for doing that later. -void qjackctlConnectionsForm::refreshAudio ( bool bEnabled ) -{ - if (m_pAudioConnect == NULL) - return; - - if (bEnabled) { - m_pAudioConnect->refresh(); - stabilizeAudio(true); - } else { - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->refreshJackConnections(); - } -} - -void qjackctlConnectionsForm::refreshMidi ( bool bEnabled ) -{ - if (m_pMidiConnect == NULL) - return; - - if (bEnabled) { - m_pMidiConnect->refresh(); - stabilizeMidi(true); - } else { - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->refreshJackConnections(); - } -} - -void qjackctlConnectionsForm::refreshAlsa ( bool bEnabled ) -{ - if (m_pAlsaConnect == NULL) - return; - - if (bEnabled) { - m_pAlsaConnect->refresh(); - stabilizeAlsa(true); - } else { - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->refreshAlsaConnections(); - } -} - - -// Proper enablement of connections command controls. -void qjackctlConnectionsForm::stabilizeAudio ( bool bEnabled ) -{ - if (m_pAudioConnect && bEnabled) { - m_ui.AudioConnectPushButton->setEnabled( - m_pAudioConnect->canConnectSelected()); - m_ui.AudioDisconnectPushButton->setEnabled( - m_pAudioConnect->canDisconnectSelected()); - m_ui.AudioDisconnectAllPushButton->setEnabled( - m_pAudioConnect->canDisconnectAll()); - m_ui.AudioRefreshPushButton->setEnabled(true); - } else { - m_ui.AudioConnectPushButton->setEnabled(false); - m_ui.AudioDisconnectPushButton->setEnabled(false); - m_ui.AudioDisconnectAllPushButton->setEnabled(false); - m_ui.AudioRefreshPushButton->setEnabled(false); - } -} - -void qjackctlConnectionsForm::stabilizeMidi ( bool bEnabled ) -{ - if (m_pMidiConnect && bEnabled) { - m_ui.MidiConnectPushButton->setEnabled( - m_pMidiConnect->canConnectSelected()); - m_ui.MidiDisconnectPushButton->setEnabled( - m_pMidiConnect->canDisconnectSelected()); - m_ui.MidiDisconnectAllPushButton->setEnabled( - m_pMidiConnect->canDisconnectAll()); - m_ui.MidiRefreshPushButton->setEnabled(true); - } else { - m_ui.MidiConnectPushButton->setEnabled(false); - m_ui.MidiDisconnectPushButton->setEnabled(false); - m_ui.MidiDisconnectAllPushButton->setEnabled(false); - m_ui.MidiRefreshPushButton->setEnabled(false); - } -} - -void qjackctlConnectionsForm::stabilizeAlsa ( bool bEnabled ) -{ - if (m_pAlsaConnect && bEnabled) { - m_ui.AlsaConnectPushButton->setEnabled(m_pAlsaConnect->canConnectSelected()); - m_ui.AlsaDisconnectPushButton->setEnabled(m_pAlsaConnect->canDisconnectSelected()); - m_ui.AlsaDisconnectAllPushButton->setEnabled(m_pAlsaConnect->canDisconnectAll()); - m_ui.AlsaRefreshPushButton->setEnabled(true); - } else { - m_ui.AlsaConnectPushButton->setEnabled(false); - m_ui.AlsaDisconnectPushButton->setEnabled(false); - m_ui.AlsaDisconnectAllPushButton->setEnabled(false); - m_ui.AlsaRefreshPushButton->setEnabled(false); - } -} - - -// Client/port aliasing feature update. -void qjackctlConnectionsForm::updateAliases (void) -{ - // Set alias maps for all listviews... - if (m_pSetup && m_pSetup->bAliasesEnabled) { - bool bRenameEnabled = m_pSetup->bAliasesEditing; - m_ui.AudioConnectView->OListView()->setAliases( - &(m_pSetup->aliasAudioOutputs), bRenameEnabled); - m_ui.AudioConnectView->IListView()->setAliases( - &(m_pSetup->aliasAudioInputs), bRenameEnabled); - m_ui.MidiConnectView->OListView()->setAliases( - &(m_pSetup->aliasMidiOutputs), bRenameEnabled); - m_ui.MidiConnectView->IListView()->setAliases( - &(m_pSetup->aliasMidiInputs), bRenameEnabled); - m_ui.AlsaConnectView->OListView()->setAliases( - &(m_pSetup->aliasAlsaOutputs), bRenameEnabled); - m_ui.AlsaConnectView->IListView()->setAliases( - &(m_pSetup->aliasAlsaInputs), bRenameEnabled); - } else { - m_ui.AudioConnectView->OListView()->setAliases(NULL, false); - m_ui.AudioConnectView->IListView()->setAliases(NULL, false); - m_ui.MidiConnectView->OListView()->setAliases(NULL, false); - m_ui.MidiConnectView->IListView()->setAliases(NULL, false); - m_ui.AlsaConnectView->OListView()->setAliases(NULL, false); - m_ui.AlsaConnectView->IListView()->setAliases(NULL, false); - } -} - - -// end of qjackctlConnectionsForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.h 2007-10-29 10:52:04.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,132 +0,0 @@ -// qjackctlConnectionsForm.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlConnectionsForm_h -#define __qjackctlConnectionsForm_h - -#include "ui_qjackctlConnectionsForm.h" - -#include "qjackctlJackConnect.h" -#include "qjackctlAlsaConnect.h" - -// Forward declarations. -class qjackctlSetup; - - -//---------------------------------------------------------------------------- -// qjackctlConnectionsForm -- UI wrapper form. - -class qjackctlConnectionsForm : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlConnectionsForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlConnectionsForm(); - - void setup(qjackctlSetup *pSetup); - - qjackctlConnectView *audioConnectView() const; - qjackctlConnectView *midiConnectView() const; - qjackctlConnectView *alsaConnectView() const; - - bool queryClose(); - - QFont connectionsFont() const; - void setConnectionsFont(const QFont& font); - - void setConnectionsIconSize(int iIconSize); - - void setJackClient(jack_client_t * pJackClient); - void setAlsaSeq(snd_seq_t * pAlsaSeq); - - bool isAudioConnected() const; - bool isMidiConnected() const; - bool isAlsaConnected() const; - - void refreshAudio(bool bEnabled); - void refreshMidi(bool bEnabled); - void refreshAlsa(bool bEnabled); - - void stabilizeAudio(bool bEnabled); - void stabilizeMidi(bool bEnabled); - void stabilizeAlsa(bool bEnabled); - - void setupAliases(qjackctlSetup *pSetup); - void updateAliases(); - bool loadAliases(); - bool saveAliases(); - -public slots: - - void audioConnectSelected(); - void audioDisconnectSelected(); - void audioDisconnectAll(); - void audioRefresh(); - void audioStabilize(); - - void midiConnectSelected(); - void midiDisconnectSelected(); - void midiDisconnectAll(); - void midiRefresh(); - void midiStabilize(); - - void alsaConnectSelected(); - void alsaDisconnectSelected(); - void alsaDisconnectAll(); - void alsaRefresh(); - void alsaStabilize(); - -protected slots: - - void audioDisconnecting(qjackctlPortItem *, qjackctlPortItem *); - void midiDisconnecting(qjackctlPortItem *, qjackctlPortItem *); - void alsaDisconnecting(qjackctlPortItem *, qjackctlPortItem *); - -protected: - - void showEvent(QShowEvent *); - void hideEvent(QHideEvent *); - void closeEvent(QCloseEvent *); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlConnectionsForm m_ui; - - // Instance variables. - jack_client_t *m_pJackClient; - snd_seq_t *m_pAlsaSeq; - qjackctlJackConnect *m_pAudioConnect; - qjackctlJackConnect *m_pMidiConnect; - qjackctlAlsaConnect *m_pAlsaConnect; - qjackctlSetup *m_pSetup; - QString m_sPreset; -}; - - -#endif // __qjackctlConnectionsForm_h - - -// end of qjackctlConnectionsForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlConnectionsForm.ui 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlConnectionsForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,449 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlConnectionsForm - - - - 0 - 0 - 407 - 250 - - - - - 1 - 1 - 0 - 0 - - - - - - - Connections - JACK Audio Connection Kit - - - :/icons/connections1.png - - - - 4 - - - 4 - - - - - 0 - - - - Audio - - - - 4 - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - Qt::TabFocus - - - - - - - 4 - - - 4 - - - - - Connect currently selected ports - - - &Connect - - - :/icons/connect1.png - - - Alt+C - - - - - - - Disconnect currently selected ports - - - &Disconnect - - - :/icons/disconnect1.png - - - Alt+D - - - - - - - Disconnect all currently connected ports - - - Disconnect &All - - - :/icons/disconnectall1.png - - - Alt+A - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 87 - 8 - - - - - - - - Refresh current connections view - - - &Refresh - - - :/icons/refresh1.png - - - Alt+R - - - - - - - - - - MIDI - - - - 4 - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - Qt::TabFocus - - - - - - - 4 - - - 4 - - - - - Connect currently selected ports - - - &Connect - - - :/icons/connect1.png - - - Alt+C - - - - - - - Disconnect currently selected ports - - - &Disconnect - - - :/icons/disconnect1.png - - - Alt+D - - - - - - - Disconnect all currently connected ports - - - Disconnect &All - - - :/icons/disconnectall1.png - - - Alt+A - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 87 - 8 - - - - - - - - Refresh current connections view - - - &Refresh - - - :/icons/refresh1.png - - - Alt+R - - - - - - - - - - ALSA - - - - 4 - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - Qt::TabFocus - - - - - - - 4 - - - 4 - - - - - Connect currently selected ports - - - &Connect - - - :/icons/connect1.png - - - Alt+C - - - - - - - Disconnect currently selected ports - - - &Disconnect - - - :/icons/disconnect1.png - - - Alt+D - - - - - - - Disconnect all currently connected ports - - - Disconnect &All - - - :/icons/disconnectall1.png - - - Alt+A - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 87 - 8 - - - - - - - - Refresh current connections view - - - &Refresh - - - :/icons/refresh1.png - - - Alt+R - - - - - - - - - - - - - - - qjackctlConnectView - QWidget -
qjackctlConnect.h
-
-
- - ConnectionsTabWidget - AudioConnectView - AudioConnectPushButton - AudioDisconnectPushButton - AudioDisconnectAllPushButton - AudioRefreshPushButton - MidiConnectView - MidiConnectPushButton - MidiDisconnectPushButton - MidiDisconnectAllPushButton - MidiRefreshPushButton - AlsaConnectView - AlsaConnectPushButton - AlsaDisconnectPushButton - AlsaDisconnectAllPushButton - AlsaRefreshPushButton - - - - - -
diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlJackConnect.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlJackConnect.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlJackConnect.cpp 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlJackConnect.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,434 +0,0 @@ -// qjackctlJackConnect.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlJackConnect.h" - -#include - - -//---------------------------------------------------------------------- -// class qjackctlJackPort -- Jack port list item. -// - -// Constructor. -qjackctlJackPort::qjackctlJackPort ( qjackctlJackClient *pClient, - const QString& sPortName, jack_port_t *pJackPort ) - : qjackctlPortItem(pClient, sPortName) -{ - m_pJackPort = pJackPort; - - qjackctlJackConnect *pJackConnect - = static_cast ( - ((pClient->clientList())->listView())->binding()); - - if (pJackConnect) { - unsigned long ulPortFlags = jack_port_flags(m_pJackPort); - if (ulPortFlags & JackPortIsInput) { - if (ulPortFlags & JackPortIsTerminal) { - QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( - ulPortFlags & JackPortIsPhysical - ? QJACKCTL_JACK_PORTPTI : QJACKCTL_JACK_PORTLTI))); - } else { - QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( - ulPortFlags & JackPortIsPhysical - ? QJACKCTL_JACK_PORTPNI : QJACKCTL_JACK_PORTLNI))); - } - } else if (ulPortFlags & JackPortIsOutput) { - if (ulPortFlags & JackPortIsTerminal) { - QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( - ulPortFlags & JackPortIsPhysical - ? QJACKCTL_JACK_PORTPTO : QJACKCTL_JACK_PORTLTO))); - } else { - QTreeWidgetItem::setIcon(0, QIcon(pJackConnect->pixmap( - ulPortFlags & JackPortIsPhysical - ? QJACKCTL_JACK_PORTPNO : QJACKCTL_JACK_PORTLNO))); - } - } - } -} - -// Default destructor. -qjackctlJackPort::~qjackctlJackPort (void) -{ -} - - -// Jack handles accessors. -jack_client_t *qjackctlJackPort::jackClient (void) const -{ - return ((qjackctlJackClient *) client())->jackClient(); -} - -jack_port_t *qjackctlJackPort::jackPort (void) const -{ - return m_pJackPort; -} - - -//---------------------------------------------------------------------- -// class qjackctlJackClient -- Jack client list item. -// - -// Constructor. -qjackctlJackClient::qjackctlJackClient ( qjackctlJackClientList *pClientList, - const QString& sClientName ) - : qjackctlClientItem(pClientList, sClientName) -{ - qjackctlJackConnect *pJackConnect - = static_cast ( - (pClientList->listView())->binding()); - - if (pJackConnect) { - if (pClientList->isReadable()) { - QTreeWidgetItem::setIcon(0, - QIcon(pJackConnect->pixmap(QJACKCTL_JACK_CLIENTO))); - } else { - QTreeWidgetItem::setIcon(0, - QIcon(pJackConnect->pixmap(QJACKCTL_JACK_CLIENTI))); - } - } -} - -// Default destructor. -qjackctlJackClient::~qjackctlJackClient (void) -{ -} - - -// Jack client accessor. -jack_client_t *qjackctlJackClient::jackClient (void) const -{ - return ((qjackctlJackClientList *) clientList())->jackClient(); -} - - -// Jack port lookup. -qjackctlJackPort *qjackctlJackClient::findJackPort ( jack_port_t *pJackPort ) -{ - QListIterator iter(ports()); - while (iter.hasNext()) { - qjackctlJackPort *pPort - = static_cast (iter.next()); - if (pPort && pPort->jackPort() == pJackPort) - return pPort; - } - - return NULL; -} - - -//---------------------------------------------------------------------- -// qjackctlJackClientList -- Jack client list. -// - -// Constructor. -qjackctlJackClientList::qjackctlJackClientList ( - qjackctlClientListView *pListView, - jack_client_t *pJackClient, bool bReadable ) - : qjackctlClientList(pListView, bReadable) -{ - m_pJackClient = pJackClient; -} - -// Default destructor. -qjackctlJackClientList::~qjackctlJackClientList (void) -{ -} - - -// Jack client accessor. -jack_client_t *qjackctlJackClientList::jackClient (void) const -{ - return m_pJackClient; -} - - -// Jack port lookup. -qjackctlJackPort *qjackctlJackClientList::findJackClientPort ( jack_port_t *pJackPort ) -{ - QListIterator iter(clients()); - while (iter.hasNext()) { - qjackctlJackClient *pClient - = static_cast (iter.next()); - if (pClient) { - qjackctlJackPort *pPort = pClient->findJackPort(pJackPort); - if (pPort) - return pPort; - } - } - - return NULL; -} - - -// Client:port refreshner. -int qjackctlJackClientList::updateClientPorts (void) -{ - if (m_pJackClient == 0) - return 0; - - qjackctlJackConnect *pJackConnect - = static_cast (listView()->binding()); - if (pJackConnect == 0) - return 0; - - const char *pszJackType = JACK_DEFAULT_AUDIO_TYPE; -#ifdef CONFIG_JACK_MIDI - if (pJackConnect->jackType() == QJACKCTL_JACK_MIDI) - pszJackType = JACK_DEFAULT_MIDI_TYPE; -#endif - - char *aliases[2]; - if (g_iJackClientPortAlias > 0) { - unsigned short alias_size = jack_port_name_size() + 1; - aliases[0] = new char [alias_size]; - aliases[1] = new char [alias_size]; - } - - int iDirtyCount = 0; - - markClientPorts(0); - - const char **ppszClientPorts = jack_get_ports(m_pJackClient, 0, - pszJackType, isReadable() ? JackPortIsOutput : JackPortIsInput); - if (ppszClientPorts) { - int iClientPort = 0; - while (ppszClientPorts[iClientPort]) { - QString sClientPort = ppszClientPorts[iClientPort]; - qjackctlJackClient *pClient = 0; - qjackctlJackPort *pPort = 0; - jack_port_t *pJackPort = jack_port_by_name(m_pJackClient, - ppszClientPorts[iClientPort]); - if (g_iJackClientPortAlias > 0 && - jack_port_get_aliases(pJackPort, aliases) >= g_iJackClientPortAlias) - sClientPort = aliases[g_iJackClientPortAlias - 1]; - int iColon = sClientPort.indexOf(':'); - if (pJackPort && iColon >= 0) { - QString sClientName = sClientPort.left(iColon); - QString sPortName = sClientPort.right(sClientPort.length() - iColon - 1); - pClient = static_cast (findClient(sClientName)); - if (pClient) - pPort = pClient->findJackPort(pJackPort); - if (pClient == 0) { - pClient = new qjackctlJackClient(this, sClientName); - iDirtyCount++; - } - if (pClient && pPort == 0) { - pPort = new qjackctlJackPort(pClient, sPortName, pJackPort); - iDirtyCount++; - } - if (pPort) - pPort->markClientPort(1); - } - iClientPort++; - } - ::free(ppszClientPorts); - } - - iDirtyCount += cleanClientPorts(0); - - if (g_iJackClientPortAlias > 0) { - delete [] aliases[0]; - delete [] aliases[1]; - } - - return iDirtyCount; -} - - -// Jack client port aliases mode. -int qjackctlJackClientList::g_iJackClientPortAlias = 0; - -void qjackctlJackClientList::setJackClientPortAlias ( int iJackClientPortAlias ) -{ - g_iJackClientPortAlias = iJackClientPortAlias; -} - -int qjackctlJackClientList::jackClientPortAlias (void) -{ - return g_iJackClientPortAlias; -} - - -//---------------------------------------------------------------------- -// qjackctlJackConnect -- Output-to-Input client/ports connection object. -// - -// Constructor. -qjackctlJackConnect::qjackctlJackConnect ( qjackctlConnectView *pConnectView, - jack_client_t *pJackClient, int iJackType ) - : qjackctlConnect(pConnectView) -{ - m_iJackType = iJackType; - - createIconPixmaps(); - - setOClientList(new qjackctlJackClientList( - connectView()->OListView(), pJackClient, true)); - setIClientList(new qjackctlJackClientList( - connectView()->IListView(), pJackClient, false)); -} - -// Default destructor. -qjackctlJackConnect::~qjackctlJackConnect (void) -{ - deleteIconPixmaps(); -} - - -// Connection type accessors. -int qjackctlJackConnect::jackType (void) const -{ - return m_iJackType; -} - - -// Local pixmap-set janitor methods. -void qjackctlJackConnect::createIconPixmaps (void) -{ - switch (m_iJackType) { - case QJACKCTL_JACK_MIDI: - m_apPixmaps[QJACKCTL_JACK_CLIENTI] = createIconPixmap("mclienti"); - m_apPixmaps[QJACKCTL_JACK_CLIENTO] = createIconPixmap("mcliento"); - m_apPixmaps[QJACKCTL_JACK_PORTPTI] = createIconPixmap("mporti"); - m_apPixmaps[QJACKCTL_JACK_PORTPTO] = createIconPixmap("mporto"); - m_apPixmaps[QJACKCTL_JACK_PORTPNI] = createIconPixmap("mporti"); - m_apPixmaps[QJACKCTL_JACK_PORTPNO] = createIconPixmap("mporto"); - m_apPixmaps[QJACKCTL_JACK_PORTLTI] = createIconPixmap("mporti"); - m_apPixmaps[QJACKCTL_JACK_PORTLTO] = createIconPixmap("mporto"); - m_apPixmaps[QJACKCTL_JACK_PORTLNI] = createIconPixmap("mporti"); - m_apPixmaps[QJACKCTL_JACK_PORTLNO] = createIconPixmap("mporto"); - break; - case QJACKCTL_JACK_AUDIO: - default: - m_apPixmaps[QJACKCTL_JACK_CLIENTI] = createIconPixmap("aclienti"); - m_apPixmaps[QJACKCTL_JACK_CLIENTO] = createIconPixmap("acliento"); - m_apPixmaps[QJACKCTL_JACK_PORTPTI] = createIconPixmap("aportpti"); - m_apPixmaps[QJACKCTL_JACK_PORTPTO] = createIconPixmap("aportpto"); - m_apPixmaps[QJACKCTL_JACK_PORTPNI] = createIconPixmap("aportpni"); - m_apPixmaps[QJACKCTL_JACK_PORTPNO] = createIconPixmap("aportpno"); - m_apPixmaps[QJACKCTL_JACK_PORTLTI] = createIconPixmap("aportlti"); - m_apPixmaps[QJACKCTL_JACK_PORTLTO] = createIconPixmap("aportlto"); - m_apPixmaps[QJACKCTL_JACK_PORTLNI] = createIconPixmap("aportlni"); - m_apPixmaps[QJACKCTL_JACK_PORTLNO] = createIconPixmap("aportlno"); - break; - } -} - -void qjackctlJackConnect::deleteIconPixmaps (void) -{ - for (int i = 0; i < QJACKCTL_JACK_PIXMAPS; i++) { - if (m_apPixmaps[i]) - delete m_apPixmaps[i]; - m_apPixmaps[i] = NULL; - } -} - - -// Common pixmap accessor (static). -const QPixmap& qjackctlJackConnect::pixmap ( int iPixmap ) const -{ - return *m_apPixmaps[iPixmap]; -} - - -// Connection primitive. -bool qjackctlJackConnect::connectPorts ( qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - qjackctlJackPort *pOJack = static_cast (pOPort); - qjackctlJackPort *pIJack = static_cast (pIPort); - - return (jack_connect(pOJack->jackClient(), - pOJack->clientPortName().toUtf8().constData(), - pIJack->clientPortName().toUtf8().constData()) == 0); -} - - -// Disconnection primitive. -bool qjackctlJackConnect::disconnectPorts ( qjackctlPortItem *pOPort, qjackctlPortItem *pIPort ) -{ - qjackctlJackPort *pOJack = static_cast (pOPort); - qjackctlJackPort *pIJack = static_cast (pIPort); - - return (jack_disconnect(pOJack->jackClient(), - pOJack->clientPortName().toUtf8().constData(), - pIJack->clientPortName().toUtf8().constData()) == 0); -} - - -// Update port connection references. -void qjackctlJackConnect::updateConnections (void) -{ - qjackctlJackClientList *pIClientList - = static_cast (IClientList()); - if (pIClientList == NULL) - return; - - // For each output client item... - QListIterator oclient(OClientList()->clients()); - while (oclient.hasNext()) { - qjackctlClientItem *pOClient = oclient.next(); - // For each output port item... - QListIterator oport(pOClient->ports()); - while (oport.hasNext()) { - qjackctlPortItem *pOPort = oport.next(); - // Are there already any connections? - if (pOPort->connects().count() > 0) - continue; - // Hava a proper type cast. - qjackctlJackPort *pOJack - = static_cast (pOPort); - // Get port connections... - const char **ppszClientPorts - = jack_port_get_all_connections( - pOJack->jackClient(), pOJack->jackPort()); - if (ppszClientPorts) { - // Now, for each input client port... - int iClientPort = 0; - while (ppszClientPorts[iClientPort]) { - jack_port_t *pJackPort = jack_port_by_name(pOJack->jackClient(), - ppszClientPorts[iClientPort]); - if (pJackPort) { - qjackctlPortItem *pIPort - = pIClientList->findJackClientPort(pJackPort); - if (pIPort) { - pOPort->addConnect(pIPort); - pIPort->addConnect(pOPort); - } - } - iClientPort++; - } - ::free(ppszClientPorts); - } - } - } -} - - -// Update icon size implementation. -void qjackctlJackConnect::updateIconPixmaps (void) -{ - deleteIconPixmaps(); - createIconPixmaps(); -} - - -// end of qjackctlJackConnect.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlJackConnect.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlJackConnect.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlJackConnect.h 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlJackConnect.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,175 +0,0 @@ -// qjackctlJackConnect.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlJackConnect_h -#define __qjackctlJackConnect_h - -#include "qjackctlAbout.h" -#include "qjackctlConnect.h" - -#include - -// Forward declarations. -class qjackctlJackPort; -class qjackctlJackClient; -class qjackctlJackClientList; -class qjackctlJackConnect; - -// Connection port type. -#define QJACKCTL_JACK_AUDIO 0 -#define QJACKCTL_JACK_MIDI 1 - -// Pixmap-set array indexes/types. -#define QJACKCTL_JACK_CLIENTI 0 // Input client item pixmap. -#define QJACKCTL_JACK_CLIENTO 1 // Output client item pixmap. -#define QJACKCTL_JACK_PORTPTI 2 // Physcal Terminal Input port pixmap. -#define QJACKCTL_JACK_PORTPTO 3 // Physical Terminal Output port pixmap. -#define QJACKCTL_JACK_PORTPNI 4 // Physical Non-terminal Input port pixmap. -#define QJACKCTL_JACK_PORTPNO 5 // Physical Non-terminal Output port pixmap. -#define QJACKCTL_JACK_PORTLTI 6 // Logical Terminal Input port pixmap. -#define QJACKCTL_JACK_PORTLTO 7 // Logical Terminal Output port pixmap. -#define QJACKCTL_JACK_PORTLNI 8 // Logical Non-terminal Input port pixmap. -#define QJACKCTL_JACK_PORTLNO 9 // Logical Non-terminal Output port pixmap. -#define QJACKCTL_JACK_PIXMAPS 10 // Number of pixmaps in array. - - -// Jack port list item. -class qjackctlJackPort : public qjackctlPortItem -{ -public: - - // Constructor. - qjackctlJackPort(qjackctlJackClient *pClient, - const QString& sPortName, jack_port_t *pJackPort); - // Default destructor. - ~qjackctlJackPort(); - - // Jack handles accessors. - jack_client_t *jackClient() const; - jack_port_t *jackPort() const; - -private: - - // Instance variables. - jack_port_t *m_pJackPort; -}; - - -// Jack client list item. -class qjackctlJackClient : public qjackctlClientItem -{ -public: - - // Constructor. - qjackctlJackClient(qjackctlJackClientList *pClientList, - const QString& sClientName); - // Default destructor. - ~qjackctlJackClient(); - - // Jack client accessors. - jack_client_t *jackClient() const; - - // Jack port lookup. - qjackctlJackPort *findJackPort(jack_port_t *pJackPort); -}; - - -// Jack client list. -class qjackctlJackClientList : public qjackctlClientList -{ -public: - - // Constructor. - qjackctlJackClientList(qjackctlClientListView *pListView, jack_client_t *pJackClient, bool bReadable); - // Default destructor. - ~qjackctlJackClientList(); - - // Jack client accessors. - jack_client_t *jackClient() const; - - // Jack port lookup. - qjackctlJackPort *findJackClientPort(jack_port_t *pJackPort); - - // Client:port refreshner (return newest item count). - int updateClientPorts(); - - // Jack client port aliases mode. - static void setJackClientPortAlias(int iJackClientPortAlias); - static int jackClientPortAlias(); - -private: - - // Instance variables. - jack_client_t *m_pJackClient; - - // Jack client port aliases mode. - static int g_iJackClientPortAlias; -}; - - -//---------------------------------------------------------------------------- -// qjackctlJackConnect -- Connections model integrated object. - -class qjackctlJackConnect : public qjackctlConnect -{ -public: - - // Constructor. - qjackctlJackConnect(qjackctlConnectView *pConnectView, - jack_client_t *pJackClient, int iJackType); - // Default destructor. - ~qjackctlJackConnect(); - - // Connection type accessors. - int jackType() const; - - // Common pixmap accessor. - const QPixmap& pixmap (int iPixmap) const; - -protected: - - // Virtual Connect/Disconnection primitives. - bool connectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - bool disconnectPorts (qjackctlPortItem *pOPort, qjackctlPortItem *pIPort); - - // Update port connection references. - void updateConnections(); - - // Update icon size implementation. - void updateIconPixmaps(); - -private: - - // Local pixmap-set janitor methods. - void createIconPixmaps(); - void deleteIconPixmaps(); - - // Local variables. - int m_iJackType; - - // Local pixmap-set array. - QPixmap *m_apPixmaps[QJACKCTL_JACK_PIXMAPS]; -}; - - -#endif // __qjackctlJackConnect_h - -// end of qjackctlJackConnect.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.cpp 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,3053 +0,0 @@ -// qjackctlMainForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlMainForm.h" - -#include "qjackctlStatus.h" - -#include "qjackctlPatchbay.h" -#include "qjackctlPatchbayFile.h" - -#include "qjackctlMessagesForm.h" -#include "qjackctlStatusForm.h" -#include "qjackctlConnectionsForm.h" -#include "qjackctlPatchbayForm.h" -#include "qjackctlSetupForm.h" -#include "qjackctlAboutForm.h" -#include "qjackctlSystemTray.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef CONFIG_JACK_STATISTICS -#include -#endif - -// Timer constant stuff. -#define QJACKCTL_TIMER_MSECS 200 - -// Status refresh cycle (~2 secs) -#define QJACKCTL_STATUS_CYCLE 10 - -// Server display enumerated states. -#define QJACKCTL_INACTIVE 0 -#define QJACKCTL_ACTIVATING 1 -#define QJACKCTL_ACTIVE 2 -#define QJACKCTL_STARTING 3 -#define QJACKCTL_STARTED 4 -#define QJACKCTL_STOPPING 5 -#define QJACKCTL_STOPPED 6 - -#if defined(WIN32) -#include -#undef HAVE_POLL_H -#undef HAVE_SIGNAL_H -#else -#include -// Notification pipes descriptors -#define QJACKCTL_FDNIL -1 -#define QJACKCTL_FDREAD 0 -#define QJACKCTL_FDWRITE 1 -static int g_fdStdout[2] = { QJACKCTL_FDNIL, QJACKCTL_FDNIL }; -#endif - -#ifdef HAVE_POLL_H -#include -#endif - -#ifdef HAVE_SIGNAL_H -#include -#endif - - -// Custom event types. -#define QJACKCTL_PORT_EVENT QEvent::Type(QEvent::User + 1) -#define QJACKCTL_XRUN_EVENT QEvent::Type(QEvent::User + 2) -#define QJACKCTL_BUFF_EVENT QEvent::Type(QEvent::User + 3) -#define QJACKCTL_SHUT_EVENT QEvent::Type(QEvent::User + 4) -#define QJACKCTL_EXIT_EVENT QEvent::Type(QEvent::User + 5) - - -//---------------------------------------------------------------------------- -// qjackctl -- Static callback posters. - -// To have clue about current buffer size (in frames). -static jack_nframes_t g_nframes = 0; - -static QProcess::ProcessError g_error = QProcess::UnknownError; - -// Jack port registration callback funtion, called -// whenever a jack port is registered or unregistered. -static void qjackctl_port_registration_callback ( jack_port_id_t, int, void * ) -{ - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_PORT_EVENT)); -} - - -// Jack graph order callback function, called -// whenever the processing graph is reordered. -static int qjackctl_graph_order_callback ( void * ) -{ - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_PORT_EVENT)); - - return 0; -} - - -// Jack XRUN callback function, called -// whenever there is a xrun. -static int qjackctl_xrun_callback ( void * ) -{ - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_XRUN_EVENT)); - - return 0; -} - -// Jack buffer size function, called -// whenever the server changes buffer size. -static int qjackctl_buffer_size_callback ( jack_nframes_t nframes, void * ) -{ - // Update our global static variable. - g_nframes = nframes; - - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_BUFF_EVENT)); - - return 0; -} - - -// Jack shutdown function, called -// whenever the server terminates this client. -static void qjackctl_on_shutdown ( void * ) -{ - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_SHUT_EVENT)); -} - - -// Jack process exit function, called -// whenever the server terminates abnormally. -static void qjackctl_on_error ( QProcess::ProcessError error ) -{ - g_error = error; - - QApplication::postEvent( - qjackctlMainForm::getInstance(), - new QEvent(QJACKCTL_EXIT_EVENT)); -} - - -//---------------------------------------------------------------------------- -// qjackctlMainForm -- UI wrapper form. - -// Kind of singleton reference. -qjackctlMainForm *qjackctlMainForm::g_pMainForm = NULL; - -// Constructor. -qjackctlMainForm::qjackctlMainForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QWidget(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - // Pseudo-singleton reference setup. - g_pMainForm = this; - - m_pSetup = NULL; - - m_iServerState = QJACKCTL_INACTIVE; - - m_pJack = NULL; - m_pJackClient = NULL; - m_bJackDetach = false; - m_bJackShutdown = false; - m_pAlsaSeq = NULL; - m_iStartDelay = 0; - m_iTimerDelay = 0; - m_iTimerRefresh = 0; - m_iJackRefresh = 0; - m_iAlsaRefresh = 0; - m_iJackDirty = 0; - m_iAlsaDirty = 0; - - m_iStatusRefresh = 0; - m_iStatusBlink = 0; - - m_iPatchbayRefresh = 0; - - m_pStdoutNotifier = NULL; - - m_pAlsaNotifier = NULL; - - // All forms are to be created later on setup. - m_pMessagesForm = NULL; - m_pStatusForm = NULL; - m_pConnectionsForm = NULL; - m_pPatchbayForm = NULL; - - // Patchbay rack can be readily created. - m_pPatchbayRack = new qjackctlPatchbayRack(); - - // The eventual system tray widget. - m_pSystemTray = NULL; - - // We're not quitting so early :) - m_bQuitForce = false; - - // Transport skip accelerate factor. - m_fSkipAccel = 1.0; - - // Whether we've Qt::Tool flag (from bKeepOnTop), - // this is actually the main last application window... - QWidget::setAttribute(Qt::WA_QuitOnClose); - -#ifdef HAVE_SIGNAL_H - // Set to ignore any fatal "Broken pipe" signals. - signal(SIGPIPE, SIG_IGN); -#endif - -#if 0 - // FIXME: Iterate for every child text label... - m_ui.StatusDisplayFrame->setAutoFillBackground(true); - QList labels = m_ui.StatusDisplayFrame->findChildren (); - QListIterator iter(labels); - while (iter.hasNext()) - iter.next()->setAutoFillBackground(false); -#endif - - // UI connections... - - QObject::connect(m_ui.StartToolButton, - SIGNAL(clicked()), - SLOT(startJack())); - QObject::connect(m_ui.StopToolButton, - SIGNAL(clicked()), - SLOT(stopJack())); - QObject::connect(m_ui.MessagesToolButton, - SIGNAL(clicked()), - SLOT(toggleMessagesForm())); - QObject::connect(m_ui.StatusToolButton, - SIGNAL(clicked()), - SLOT(toggleStatusForm())); - QObject::connect(m_ui.ConnectionsToolButton, - SIGNAL(clicked()), - SLOT(toggleConnectionsForm())); - QObject::connect(m_ui.PatchbayToolButton, - SIGNAL(clicked()), - SLOT(togglePatchbayForm())); - - QObject::connect(m_ui.QuitToolButton, - SIGNAL(clicked()), - SLOT(quitMainForm())); - QObject::connect(m_ui.SetupToolButton, - SIGNAL(clicked()), - SLOT(showSetupForm())); - QObject::connect(m_ui.AboutToolButton, - SIGNAL(clicked()), - SLOT(showAboutForm())); - - QObject::connect(m_ui.RewindToolButton, - SIGNAL(clicked()), - SLOT(transportRewind())); - QObject::connect(m_ui.BackwardToolButton, - SIGNAL(clicked()), - SLOT(transportBackward())); - QObject::connect(m_ui.PlayToolButton, - SIGNAL(toggled(bool)), - SLOT(transportPlay(bool))); - QObject::connect(m_ui.PauseToolButton, - SIGNAL(clicked()), - SLOT(transportStop())); - QObject::connect(m_ui.ForwardToolButton, - SIGNAL(clicked()), - SLOT(transportForward())); -} - - -// Destructor. -qjackctlMainForm::~qjackctlMainForm (void) -{ - // Stop server, if not already... - stopJackServer(); - - // Terminate local ALSA sequencer interface. - if (m_pAlsaNotifier) - delete m_pAlsaNotifier; -#ifdef CONFIG_ALSA_SEQ - if (m_pAlsaSeq) - snd_seq_close(m_pAlsaSeq); -#endif - m_pAlsaNotifier = NULL; - m_pAlsaSeq = NULL; - - // Finally drop any popup widgets around... - if (m_pMessagesForm) - delete m_pMessagesForm; - if (m_pStatusForm) - delete m_pStatusForm; - if (m_pConnectionsForm) - delete m_pConnectionsForm; - if (m_pPatchbayForm) - delete m_pPatchbayForm; - - // Quit off system tray widget. - if (m_pSystemTray) - delete m_pSystemTray; - - // Patchbay rack is also dead. - if (m_pPatchbayRack) - delete m_pPatchbayRack; - - // Pseudo-singleton reference shut-down. - g_pMainForm = NULL; -} - - - -// Kind of singleton reference. -qjackctlMainForm *qjackctlMainForm::getInstance (void) -{ - return g_pMainForm; -} - - -// Make and set a proper setup step. -bool qjackctlMainForm::setup ( qjackctlSetup *pSetup ) -{ - // Finally, fix settings descriptor - // and stabilize the form. - m_pSetup = pSetup; - - // To avoid any background flickering, - // we'll hide the main display. - m_ui.StatusDisplayFrame->hide(); - updateButtons(); - - // What style do we create these forms? - QWidget *pParent = NULL; - Qt::WindowFlags wflags = Qt::Window -#if QT_VERSION >= 0x040200 - | Qt::CustomizeWindowHint -#endif - | Qt::WindowTitleHint - | Qt::WindowSystemMenuHint - | Qt::WindowMinMaxButtonsHint; - if (m_pSetup->bKeepOnTop) { - pParent = this; - wflags |= Qt::Tool; - } - // All forms are to be created right now. - m_pMessagesForm = new qjackctlMessagesForm (pParent, wflags); - m_pStatusForm = new qjackctlStatusForm (pParent, wflags); - m_pConnectionsForm = new qjackctlConnectionsForm (pParent, wflags); - m_pPatchbayForm = new qjackctlPatchbayForm (pParent, wflags); - // Setup appropriately... - m_pMessagesForm->setLogging(m_pSetup->bMessagesLog, m_pSetup->sMessagesLogPath); - m_pConnectionsForm->setup(m_pSetup); - m_pPatchbayForm->setup(m_pSetup); - - // Set the patchbay cable connection notification signal/slot. - QObject::connect(m_pPatchbayRack, SIGNAL(cableConnected(const QString&, const QString&, unsigned int)), - this, SLOT(cableConnectSlot(const QString&, const QString&, unsigned int))); - - // Try to restore old window positioning and appearence. - m_pSetup->loadWidgetGeometry(this, m_pSetup->bStartMinimized); - - // Make it final show... - m_ui.StatusDisplayFrame->show(); - - // Set other defaults... - updateDisplayEffect(); - updateTimeDisplayFonts(); - updateTimeDisplayToolTips(); - updateTimeFormat(); - updateMessagesFont(); - updateMessagesLimit(); - updateConnectionsFont(); - updateConnectionsIconSize(); - updateJackClientPortAlias(); - updateBezierLines(); - updateActivePatchbay(); - updateSystemTray(); - - // And for the whole widget gallore... - m_pSetup->loadWidgetGeometry(m_pMessagesForm); - m_pSetup->loadWidgetGeometry(m_pStatusForm); - m_pSetup->loadWidgetGeometry(m_pConnectionsForm); - m_pSetup->loadWidgetGeometry(m_pPatchbayForm); - - // Initial XRUN statistics reset. - resetXrunStats(); - - // Check if we can redirect our own stdout/stderr... -#if !defined(WIN32) - if (m_pSetup->bStdoutCapture && ::pipe(g_fdStdout) == 0) { - ::dup2(g_fdStdout[QJACKCTL_FDWRITE], STDOUT_FILENO); - ::dup2(g_fdStdout[QJACKCTL_FDWRITE], STDERR_FILENO); - m_pStdoutNotifier = new QSocketNotifier(g_fdStdout[QJACKCTL_FDREAD], QSocketNotifier::Read, this); - QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), this, SLOT(stdoutNotifySlot(int))); - } -#endif -#ifdef CONFIG_ALSA_SEQ - if (m_pSetup->bAlsaSeqEnabled) { - // Start our ALSA sequencer interface. - if (snd_seq_open(&m_pAlsaSeq, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) - m_pAlsaSeq = NULL; - if (m_pAlsaSeq) { - snd_seq_port_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - struct pollfd pfd[1]; - int iPort = snd_seq_create_simple_port( - m_pAlsaSeq, "qjackctl", - SND_SEQ_PORT_CAP_WRITE - | SND_SEQ_PORT_CAP_SUBS_WRITE - | SND_SEQ_PORT_CAP_NO_EXPORT, - SND_SEQ_PORT_TYPE_APPLICATION - ); - if (iPort >= 0) { - snd_seq_port_subscribe_alloca(&pAlsaSubs); - seq_addr.client = SND_SEQ_CLIENT_SYSTEM; - seq_addr.port = SND_SEQ_PORT_SYSTEM_ANNOUNCE; - snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); - seq_addr.client = snd_seq_client_id(m_pAlsaSeq); - seq_addr.port = iPort; - snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); - snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs); - snd_seq_poll_descriptors(m_pAlsaSeq, pfd, 1, POLLIN); - m_pAlsaNotifier - = new QSocketNotifier(pfd[0].fd, QSocketNotifier::Read); - QObject::connect(m_pAlsaNotifier, - SIGNAL(activated(int)), - SLOT(alsaNotifySlot(int))); - } - } - // Could we start without it? - if (m_pAlsaSeq) { - // Rather obvious setup. - if (m_pConnectionsForm) - m_pConnectionsForm->setAlsaSeq(m_pAlsaSeq); - if (m_pPatchbayForm) - m_pPatchbayForm->setAlsaSeq(m_pAlsaSeq); - } else { - appendMessagesError( - tr("Could not open ALSA sequencer as a client.\n\n" - "ALSA MIDI patchbay will be not available.")); - } - } -#endif - - // Load patchbay form recent paths... - if (m_pPatchbayForm) { - m_pPatchbayForm->setRecentPatchbays(m_pSetup->patchbays); - if (!m_pSetup->sPatchbayPath.isEmpty()) - m_pPatchbayForm->loadPatchbayFile(m_pSetup->sPatchbayPath); - m_pPatchbayForm->updateRecentPatchbays(); - m_pPatchbayForm->stabilizeForm(); - } - - // Try to find if we can start in detached mode (client-only) - // just in case there's a JACK server already running. - startJackClient(true); - // Final startup stabilization... - stabilizeForm(); - jackCleanup(); - - // Look for immediate server startup?... - if (m_pSetup->bStartJack || !m_pSetup->sCmdLine.isEmpty()) - startJack(); - - // Register the first timer slot. - QTimer::singleShot(QJACKCTL_TIMER_MSECS, this, SLOT(timerSlot())); - - // We're ready to go... - return true; -} - - -// Window close event handlers. -bool qjackctlMainForm::queryClose (void) -{ - bool bQueryClose = true; - -#ifdef CONFIG_SYSTEM_TRAY - // If we're not quitting explicitly and there's an - // active system tray icon, then just hide ourselves. - if (!m_bQuitForce && isVisible() - && m_pSetup->bSystemTray && m_pSystemTray) { - m_pSetup->saveWidgetGeometry(this); - QMessageBox::information(this, - tr("Information") + " - " QJACKCTL_SUBTITLE1, - tr("The program will keep running in the system tray.\n\n" - "To terminate the program, please choose \"Quit\" " - "in the context menu of the system tray entry.")); - hide(); - bQueryClose = false; - } -#endif - - // Check if JACK daemon is currently running... - if (bQueryClose && m_pJack && m_pJack->state() == QProcess::Running - && (m_pSetup->bQueryClose || m_pSetup->bQueryShutdown)) { - bQueryClose = (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("JACK is currently running.\n\n" - "Do you want to terminate the JACK audio server?"), - tr("Terminate"), tr("Cancel")) == 0); - } - - // Try to save current aliases default settings. - if (bQueryClose && m_pConnectionsForm) - bQueryClose = m_pConnectionsForm->queryClose(); - - // Try to save current patchbay default settings. - if (bQueryClose && m_pPatchbayForm) { - bQueryClose = m_pPatchbayForm->queryClose(); - if (bQueryClose && !m_pPatchbayForm->patchbayPath().isEmpty()) - m_pSetup->sPatchbayPath = m_pPatchbayForm->patchbayPath(); - } - - // Some windows default fonts are here on demand too. - if (bQueryClose && m_pMessagesForm) - m_pSetup->sMessagesFont = m_pMessagesForm->messagesFont().toString(); - - // Try to save current positioning. - if (bQueryClose) { - m_pSetup->saveWidgetGeometry(m_pMessagesForm); - m_pSetup->saveWidgetGeometry(m_pStatusForm); - m_pSetup->saveWidgetGeometry(m_pConnectionsForm); - m_pSetup->saveWidgetGeometry(m_pPatchbayForm); - m_pSetup->saveWidgetGeometry(this); - // Close popup widgets. - if (m_pMessagesForm) - m_pMessagesForm->close(); - if (m_pStatusForm) - m_pStatusForm->close(); - if (m_pConnectionsForm) - m_pConnectionsForm->close(); - if (m_pPatchbayForm) - m_pPatchbayForm->close(); - // And the system tray icon too. - if (m_pSystemTray) - m_pSystemTray->close(); - // Stop any service out there... - stopJackServer(); - } - -#ifdef CONFIG_SYSTEM_TRAY - // Whether we're really quitting. - m_bQuitForce = bQueryClose; -#endif - - return bQueryClose; -} - - -void qjackctlMainForm::closeEvent ( QCloseEvent *pCloseEvent ) -{ - // Let's be sure about that... - if (queryClose()) { - pCloseEvent->accept(); - QApplication::quit(); - } else { - pCloseEvent->ignore(); - } -} - - -void qjackctlMainForm::customEvent ( QEvent *pEvent ) -{ - switch (pEvent->type()) { - case QJACKCTL_PORT_EVENT: - portNotifyEvent(); - break; - case QJACKCTL_XRUN_EVENT: - xrunNotifyEvent(); - break; - case QJACKCTL_BUFF_EVENT: - buffNotifyEvent(); - break; - case QJACKCTL_SHUT_EVENT: - shutNotifyEvent(); - break; - case QJACKCTL_EXIT_EVENT: - exitNotifyEvent(); - break; - default: - QWidget::customEvent(pEvent); - break; - } -} - - -// Common exit status text formatter... -QString qjackctlMainForm::formatExitStatus ( int iExitStatus ) const -{ - QString sTemp = " "; - - if (iExitStatus == 0) - sTemp += tr("successfully"); - else - sTemp += tr("with exit status=%1").arg(iExitStatus); - - return sTemp + "."; -} - - -// Common shell script executive, with placeholder substitution... -void qjackctlMainForm::shellExecute ( const QString& sShellCommand, const QString& sStartMessage, const QString& sStopMessage ) -{ - QString sTemp = sShellCommand; - - sTemp.replace("%P", m_pSetup->sDefPreset); - - sTemp.replace("%s", m_preset.sServer); - sTemp.replace("%d", m_preset.sDriver); - sTemp.replace("%i", m_preset.sInterface); - sTemp.replace("%r", QString::number(m_preset.iSampleRate)); - sTemp.replace("%p", QString::number(m_preset.iFrames)); - sTemp.replace("%n", QString::number(m_preset.iPeriods)); - - appendMessages(sStartMessage); - appendMessagesColor(sTemp.trimmed(), "#990099"); - stabilize(QJACKCTL_TIMER_MSECS); - - // Execute and set exit status message... - sTemp = sStopMessage + formatExitStatus( - ::system(sTemp.toUtf8().constData())); - - // Wait a litle bit before continue... - stabilize(QJACKCTL_TIMER_MSECS); - // Final log message... - appendMessages(sTemp); -} - - -// Start jack audio server... -void qjackctlMainForm::startJack (void) -{ - // If can't be already a client, are we? - if (m_pJackClient) - return; - - // Is the server process instance still here? - if (m_pJack) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Could not start JACK.\n\n" - "Maybe JACK audio server is already started."), - tr("Stop"), tr("Kill"), tr("Cancel"))) { - case 0: - m_pJack->terminate(); - break; - case 1: - m_pJack->kill(); - break; - } - return; - } - - // Stabilize emerging server state... - QPalette pal; - pal.setColor(QPalette::Foreground, Qt::yellow); - m_ui.ServerStateTextLabel->setPalette(pal); - m_ui.StartToolButton->setEnabled(false); - updateServerState(QJACKCTL_ACTIVATING); - - // Reset our timer counters... - m_iStartDelay = 0; - m_iTimerDelay = 0; - m_iJackRefresh = 0; - - // If we ain't to be the server master, maybe we'll start - // detached as client only (jackd server already running?) - if (startJackClient(true)) { - m_ui.StopToolButton->setEnabled(true); - return; - } - - // Now we're sure it ain't detached. - updateServerState(QJACKCTL_STARTING); - m_bJackShutdown = false; - m_bJackDetach = false; - - // Load primary/default server preset... - if (!m_pSetup->loadPreset(m_preset, m_pSetup->sDefPreset)) { - appendMessagesError(tr("Could not load preset \"%1\".\n\nRetrying with default.").arg(m_pSetup->sDefPreset)); - m_pSetup->sDefPreset = m_pSetup->sDefPresetName; - if (!m_pSetup->loadPreset(m_preset, m_pSetup->sDefPreset)) { - appendMessagesError(tr("Could not load default preset.\n\nSorry.")); - jackCleanup(); - return; - } - } - - // Do we have any startup script?... - if (m_pSetup->bStartupScript - && !m_pSetup->sStartupScriptShell.isEmpty()) { - shellExecute(m_pSetup->sStartupScriptShell, - tr("Startup script..."), - tr("Startup script terminated")); - } - - // OK. Let's build the startup process... - m_pJack = new QProcess(this); - - // Setup stdout/stderr capture... - if (m_pSetup->bStdoutCapture) { -#if QT_VERSION >= 0x040200 - m_pJack->setProcessChannelMode(QProcess::ForwardedChannels); -#endif - QObject::connect(m_pJack, - SIGNAL(readyReadStandardOutput()), - SLOT(readStdout())); - QObject::connect(m_pJack, - SIGNAL(readyReadStandardError()), - SLOT(readStdout())); - } - - // The unforgiveable signal communication... - QObject::connect(m_pJack, - SIGNAL(started()), - SLOT(jackStarted())); - QObject::connect(m_pJack, - SIGNAL(error(QProcess::ProcessError)), - SLOT(jackError(QProcess::ProcessError))); - QObject::connect(m_pJack, - SIGNAL(finished(int, QProcess::ExitStatus)), - SLOT(jackFinished())); - - // Split the server path into arguments... - QStringList args = m_preset.sServer.split(' '); - // Look for the executable in the search path; - // this enforces the server command to be an - // executable absolute path whenever possible. - QString sCommand = args[0]; - QFileInfo fi(sCommand); - if (fi.isRelative()) { -#if defined(WIN32) - const char chPathSep = ';'; - if (fi.suffix().isEmpty()) - sCommand += ".exe"; -#else - const char chPathSep = ':'; -#endif - const QString sPath = ::getenv("PATH"); - QStringList paths = sPath.split(chPathSep); - QStringListIterator iter(paths); - while (iter.hasNext()) { - const QString& sDirectory = iter.next(); - fi.setFile(QDir(sDirectory), sCommand); - if (fi.isExecutable()) { - sCommand = fi.filePath(); - break; - } - } - } - // Now that we got a command, remove it from args list... - args.removeAt(0); - - // Build process arguments... - bool bDummy = (m_preset.sDriver == "dummy"); - bool bSun = (m_preset.sDriver == "sun"); - bool bOss = (m_preset.sDriver == "oss"); - bool bAlsa = (m_preset.sDriver == "alsa"); - bool bPortaudio = (m_preset.sDriver == "portaudio"); - bool bCoreaudio = (m_preset.sDriver == "coreaudio"); - bool bFreebob = (m_preset.sDriver == "freebob"); - bool bFirewire = (m_preset.sDriver == "firewire"); - bool bNet = (m_preset.sDriver == "net"); - if (m_preset.bVerbose) - args.append("-v"); - if (m_preset.bRealtime) { - args.append("-R"); - if (m_preset.iPriority > 0 && !bCoreaudio) - args.append("-P" + QString::number(m_preset.iPriority)); - } - if (m_preset.iPortMax > 0 && m_preset.iPortMax != 256) - args.append("-p" + QString::number(m_preset.iPortMax)); - if (m_preset.iTimeout > 0 && m_preset.iTimeout != 500) - args.append("-t" + QString::number(m_preset.iTimeout)); - if (m_preset.bNoMemLock) - args.append("-m"); - else if (m_preset.bUnlockMem) - args.append("-u"); - args.append("-d" + m_preset.sDriver); - if (bAlsa && (m_preset.iAudio != QJACKCTL_DUPLEX || - m_preset.sInDevice.isEmpty() || m_preset.sOutDevice.isEmpty())) { - QString sInterface = m_preset.sInterface; - if (sInterface.isEmpty()) - sInterface = "hw:0"; - args.append("-d" + sInterface); - } - if (bPortaudio && m_preset.iChan > 0) - args.append("-c" + QString::number(m_preset.iChan)); - if ((bCoreaudio || bFreebob || bFirewire) && !m_preset.sInterface.isEmpty()) - args.append("-d" + m_preset.sInterface); - if (m_preset.iSampleRate > 0) - args.append("-r" + QString::number(m_preset.iSampleRate)); - if (m_preset.iFrames > 0) - args.append("-p" + QString::number(m_preset.iFrames)); - if (bAlsa || bSun || bOss || bFreebob || bFirewire) { - if (m_preset.iPeriods > 0) - args.append("-n" + QString::number(m_preset.iPeriods)); - } - if (bAlsa) { - switch (m_preset.iAudio) { - case QJACKCTL_DUPLEX: - if (!m_preset.sInDevice.isEmpty() || !m_preset.sOutDevice.isEmpty()) - args.append("-D"); - if (!m_preset.sInDevice.isEmpty()) - args.append("-C" + m_preset.sInDevice); - if (!m_preset.sOutDevice.isEmpty()) - args.append("-P" + m_preset.sOutDevice); - break; - case QJACKCTL_CAPTURE: - args.append("-C" + m_preset.sInDevice); - break; - case QJACKCTL_PLAYBACK: - args.append("-P" + m_preset.sOutDevice); - break; - } - if (m_preset.bSoftMode) - args.append("-s"); - if (m_preset.bMonitor) - args.append("-m"); - if (m_preset.bShorts) - args.append("-S"); - if (m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK) - args.append("-i" + QString::number(m_preset.iInChannels)); - if (m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE) - args.append("-o" + QString::number(m_preset.iOutChannels)); -#ifdef CONFIG_JACK_MIDI - if (!m_preset.sMidiDriver.isEmpty()) - args.append("-X" + m_preset.sMidiDriver); -#endif - } - else if (bOss || bSun) { - if (m_preset.bIgnoreHW) - args.append("-b"); - if (m_preset.iWordLength > 0) - args.append("-w" + QString::number(m_preset.iWordLength)); - if (!m_preset.sInDevice.isEmpty() && m_preset.iAudio != QJACKCTL_PLAYBACK) - args.append("-C" + m_preset.sInDevice); - if (!m_preset.sOutDevice.isEmpty() && m_preset.iAudio != QJACKCTL_CAPTURE) - args.append("-P" + m_preset.sOutDevice); - if (m_preset.iAudio == QJACKCTL_PLAYBACK) - args.append("-i0"); - else if (m_preset.iInChannels > 0) - args.append("-i" + QString::number(m_preset.iInChannels)); - if (m_preset.iAudio == QJACKCTL_CAPTURE) - args.append("-o0"); - else if (m_preset.iOutChannels > 0) - args.append("-o" + QString::number(m_preset.iOutChannels)); - } - else if (bCoreaudio || bPortaudio || bFirewire || bNet) { - if (m_preset.iInChannels > 0 && m_preset.iAudio != QJACKCTL_PLAYBACK) - args.append("-i" + QString::number(m_preset.iInChannels)); - if (m_preset.iOutChannels > 0 && m_preset.iAudio != QJACKCTL_CAPTURE) - args.append("-o" + QString::number(m_preset.iOutChannels)); - } - else if (bFreebob) { - switch (m_preset.iAudio) { - case QJACKCTL_DUPLEX: - args.append("-D"); - break; - case QJACKCTL_CAPTURE: - args.append("-C"); - args.append("-o0"); - break; - case QJACKCTL_PLAYBACK: - args.append("-P"); - args.append("-i0"); - break; - } - } - if (bDummy && m_preset.iWait > 0 && m_preset.iWait != 21333) - args.append("-w" + QString::number(m_preset.iWait)); - if (bAlsa || bPortaudio) { - switch (m_preset.iDither) { - case 0: - // args.append("-z-"); - break; - case 1: - args.append("-zr"); - break; - case 2: - args.append("-zs"); - break; - case 3: - args.append("-zt"); - break; - } - } - if (bAlsa) { - if (m_preset.bHWMon) - args.append("-H"); - if (m_preset.bHWMeter) - args.append("-M"); - } - if (bAlsa || bSun || bOss || bCoreaudio || bPortaudio || bFreebob) { - if (m_preset.iInLatency > 0) - args.append("-I" + QString::number(m_preset.iInLatency)); - if (m_preset.iOutLatency > 0) - args.append("-O" + QString::number(m_preset.iOutLatency)); - } - - appendMessages(tr("JACK is starting...")); - m_sJackCmdLine = sCommand + ' ' + args.join(" ").trimmed(); - appendMessagesColor(m_sJackCmdLine, "#990099"); - -#if defined(WIN32) - const QString& sCurrentDir = QFileInfo(sCommand).dir().absolutePath(); - m_pJack->setWorkingDirectory(sCurrentDir); -// QDir::setCurrent(sCurrentDir); -#endif - - // Go jack, go... - m_pJack->start(sCommand, args); -} - - -// Stop jack audio server... -void qjackctlMainForm::stopJack (void) -{ - // Check if we're allowed to stop (shutdown)... - if (m_pSetup->bQueryShutdown && m_pJack - && m_pJack->state() == QProcess::Running - && m_pConnectionsForm - && (m_pConnectionsForm->isAudioConnected() || - m_pConnectionsForm->isMidiConnected()) - && QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Some client audio applications\n" - "are still active and connected.\n\n" - "Do you want to stop the JACK audio server?"), - tr("Stop"), tr("Cancel")) > 0) { - return; - } - - // Stop the server unconditionally. - stopJackServer(); -} - - -// Stop jack audio server... -void qjackctlMainForm::stopJackServer (void) -{ - // Clear timer counters... - m_iStartDelay = 0; - m_iTimerDelay = 0; - m_iJackRefresh = 0; - - // Stop client code. - stopJackClient(); - - // And try to stop server. - if (m_pJack && m_pJack->state() == QProcess::Running) { - appendMessages(tr("JACK is stopping...")); - updateServerState(QJACKCTL_STOPPING); - // Do we have any pre-shutdown script?... - if (m_pSetup->bShutdownScript - && !m_pSetup->sShutdownScriptShell.isEmpty()) { - shellExecute(m_pSetup->sShutdownScriptShell, - tr("Shutdown script..."), - tr("Shutdown script terminated")); - } - // Now it's the time to real try stopping the server daemon... - if (!m_bJackShutdown) { -#if defined(WIN32) - // Try harder... - m_pJack->kill(); -#else - // Try softly... - m_pJack->terminate(); -#endif - // Give it some time to terminate gracefully and stabilize... - stabilize(QJACKCTL_TIMER_MSECS); - // Keep on, if not exiting for good. - return; - } - } - - // If we have a post-shutdown script enabled it must be called, - // despite we've not started the server before... - if (m_bJackDetach && m_pSetup->bPostShutdownScript - && !m_pSetup->sPostShutdownScriptShell.isEmpty()) { - shellExecute(m_pSetup->sPostShutdownScriptShell, - tr("Post-shutdown script..."), - tr("Post-shutdown script terminated")); - } - - // Do final processing anyway. - jackCleanup(); -} - - -// Stdout handler... -void qjackctlMainForm::readStdout (void) -{ - appendStdoutBuffer(m_pJack->readAllStandardOutput()); -} - - -// Stdout buffer handler -- now splitted by complete new-lines... -void qjackctlMainForm::appendStdoutBuffer ( const QString& s ) -{ - m_sStdoutBuffer.append(s); - - int iLength = m_sStdoutBuffer.lastIndexOf('\n') + 1; - if (iLength > 0) { - QString sTemp = m_sStdoutBuffer.left(iLength); - m_sStdoutBuffer.remove(0, iLength); - QStringListIterator iter(sTemp.split('\n')); - while (iter.hasNext()) { - sTemp = iter.next(); - if (!sTemp.isEmpty()) - appendMessagesText(detectXrun(sTemp)); - } - } -} - - -// Stdout flusher -- show up any unfinished line... -void qjackctlMainForm::flushStdoutBuffer (void) -{ - if (!m_sStdoutBuffer.isEmpty()) { - appendMessagesText(detectXrun(m_sStdoutBuffer)); - m_sStdoutBuffer.truncate(0); - } -} - - -// Jack audio server startup. -void qjackctlMainForm::jackStarted (void) -{ - // Show startup results... - appendMessages(tr("JACK was started with PID=%1.") - .arg(long(m_pJack->pid()))); - - // Sloppy boy fix: may the serve be stopped, just in case - // the client will nerver make it... - m_ui.StopToolButton->setEnabled(true); - - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - m_iStatusBlink = 0; - - // Reset (yet again) the timer counters... - m_iStartDelay = 1 + (m_preset.iStartDelay * 1000); - m_iTimerDelay = 0; - m_iJackRefresh = 0; -} - - -// Jack audio server got an error. -void qjackctlMainForm::jackError ( QProcess::ProcessError error ) -{ - qjackctl_on_error(error); -} - - -// Jack audio server finish. -void qjackctlMainForm::jackFinished (void) -{ - // Force client code cleanup. - if (!m_bJackShutdown) - jackCleanup(); -} - - -// Jack audio server cleanup. -void qjackctlMainForm::jackCleanup (void) -{ - // Force client code cleanup. - if (!m_bJackDetach) - stopJackClient(); - - // Flush anything that maybe pending... - flushStdoutBuffer(); - - if (m_pJack) { - if (m_pJack->state() != QProcess::NotRunning) { - appendMessages(tr("JACK is being forced...")); - // Force final server shutdown... - m_pJack->kill(); - // Give it some time to terminate gracefully and stabilize... - stabilize(QJACKCTL_TIMER_MSECS); - } - // Force final server shutdown... - appendMessages(tr("JACK was stopped") - + formatExitStatus(m_pJack->exitCode())); - // Destroy it. - delete m_pJack; - m_pJack = NULL; - // Do we have any post-shutdown script?... - // (this will be always called, despite we've started the server or not) - if (m_pSetup->bPostShutdownScript - && !m_pSetup->sPostShutdownScriptShell.isEmpty()) { - shellExecute(m_pSetup->sPostShutdownScriptShell, - tr("Post-shutdown script..."), - tr("Post-shutdown script terminated")); - } - } - - // Stabilize final server state... - QPalette pal; - pal.setColor(QPalette::Foreground, - m_pJackClient == NULL ? Qt::darkYellow : Qt::yellow); - m_ui.ServerStateTextLabel->setPalette(pal); - m_ui.StartToolButton->setEnabled(m_pJackClient == NULL); - m_ui.StopToolButton->setEnabled(m_pJackClient != NULL); - m_ui.RewindToolButton->setEnabled(false); - m_ui.BackwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setEnabled(false); - m_ui.PauseToolButton->setEnabled(false); - m_ui.ForwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setChecked(false); - int iServerState; - if (m_bJackDetach) - iServerState = (m_pJackClient ? QJACKCTL_ACTIVE : QJACKCTL_INACTIVE); - else - iServerState = QJACKCTL_STOPPED; - updateServerState(iServerState); -} - - -// XRUN detection routine. -QString& qjackctlMainForm::detectXrun ( QString& s ) -{ - if (m_iXrunSkips > 1) - return s; - QRegExp rx(m_pSetup->sXrunRegex); - int iPos = rx.indexIn(s); - if (iPos >= 0) { - s.insert(iPos + rx.matchedLength(), ""); - s.insert(iPos, ""); -#ifndef CONFIG_JACK_XRUN_DELAY - m_tXrunLast.restart(); - updateXrunStats(rx.cap(1).toFloat()); -#endif - } - return s; -} - - -// Update the XRUN last delay and immediate statistical values (in msecs). -void qjackctlMainForm::updateXrunStats ( float fXrunLast ) -{ - if (m_iXrunStats > 0 || !m_pSetup->bXrunIgnoreFirst) { - m_fXrunLast = fXrunLast; - m_fXrunTotal += m_fXrunLast; - if (m_fXrunLast < m_fXrunMin || m_iXrunCount == 0) - m_fXrunMin = m_fXrunLast; - if (m_fXrunLast > m_fXrunMax || m_iXrunCount == 0) - m_fXrunMax = m_fXrunLast; - m_iXrunCount++; - // refreshXrunStats(); - } - m_iXrunStats++; -} - - -// Own stdout/stderr socket notifier slot. -void qjackctlMainForm::stdoutNotifySlot ( int fd ) -{ - char achBuffer[1024]; - int cchBuffer = ::read(fd, achBuffer, sizeof(achBuffer) - 1); - if (cchBuffer > 0) { - achBuffer[cchBuffer] = (char) 0; - appendStdoutBuffer(achBuffer); - } -} - - -// Messages output methods. -void qjackctlMainForm::appendMessages( const QString& s ) -{ - if (m_pMessagesForm) - m_pMessagesForm->appendMessages(s); -} - -void qjackctlMainForm::appendMessagesColor( const QString& s, const QString& c ) -{ - if (m_pMessagesForm) - m_pMessagesForm->appendMessagesColor(s, c); -} - -void qjackctlMainForm::appendMessagesText( const QString& s ) -{ - if (m_pMessagesForm) - m_pMessagesForm->appendMessagesText(s); -} - -void qjackctlMainForm::appendMessagesError( const QString& s ) -{ - if (m_pMessagesForm) - m_pMessagesForm->show(); - - appendMessagesColor(s.simplified(), "#ff0000"); - - QMessageBox::critical(this, - tr("Error") + " - " QJACKCTL_SUBTITLE1, s, tr("Cancel")); -} - - -// Force update of the messages font. -void qjackctlMainForm::updateMessagesFont (void) -{ - if (m_pSetup == NULL) - return; - - if (m_pMessagesForm && !m_pSetup->sMessagesFont.isEmpty()) { - QFont font; - if (font.fromString(m_pSetup->sMessagesFont)) - m_pMessagesForm->setMessagesFont(font); - } -} - - -// Update messages window line limit. -void qjackctlMainForm::updateMessagesLimit (void) -{ - if (m_pSetup == NULL) - return; - - if (m_pMessagesForm) { - if (m_pSetup->bMessagesLimit) - m_pMessagesForm->setMessagesLimit(m_pSetup->iMessagesLimitLines); - else - m_pMessagesForm->setMessagesLimit(-1); - } -} - - -// Force update of the connections font. -void qjackctlMainForm::updateConnectionsFont (void) -{ - if (m_pSetup == NULL) - return; - - if (m_pConnectionsForm && !m_pSetup->sConnectionsFont.isEmpty()) { - QFont font; - if (font.fromString(m_pSetup->sConnectionsFont)) - m_pConnectionsForm->setConnectionsFont(font); - } -} - - -// Update of the connections view icon size. -void qjackctlMainForm::updateConnectionsIconSize (void) -{ - if (m_pSetup == NULL) - return; - - if (m_pConnectionsForm) - m_pConnectionsForm->setConnectionsIconSize(m_pSetup->iConnectionsIconSize); -} - - -// Update of JACK client/port alias display mode. -void qjackctlMainForm::updateJackClientPortAlias (void) -{ - if (m_pSetup == NULL) - return; - - qjackctlJackClientList::setJackClientPortAlias(m_pSetup->iJackClientPortAlias); - - refreshJackConnections(); -} - - -// Update the connection and patchbay line style. -void qjackctlMainForm::updateBezierLines (void) -{ - if (m_pSetup == NULL) - return; - - if (m_pConnectionsForm) { - m_pConnectionsForm->audioConnectView()->setBezierLines(m_pSetup->bBezierLines); - m_pConnectionsForm->midiConnectView()->setBezierLines(m_pSetup->bBezierLines); - m_pConnectionsForm->alsaConnectView()->setBezierLines(m_pSetup->bBezierLines); - m_pConnectionsForm->audioConnectView()->ConnectorView()->update(); - m_pConnectionsForm->midiConnectView()->ConnectorView()->update(); - m_pConnectionsForm->alsaConnectView()->ConnectorView()->update(); - } - - if (m_pPatchbayForm) { - m_pPatchbayForm->patchbayView()->setBezierLines(m_pSetup->bBezierLines); - m_pPatchbayForm->patchbayView()->PatchworkView()->update(); - } -} - - -// Update main display background effect. -void qjackctlMainForm::updateDisplayEffect (void) -{ - if (m_pSetup == NULL) - return; - - // Set the main background... - QPalette pal; - if (m_pSetup->bDisplayEffect) { - QPixmap pm(":/icons/displaybg1.png"); - pal.setBrush(QPalette::Background, QBrush(pm)); - } else { - pal.setColor(QPalette::Background, Qt::black); - } - m_ui.StatusDisplayFrame->setPalette(pal); -} - - -// Force update of big time display related fonts. -void qjackctlMainForm::updateTimeDisplayFonts (void) -{ - QFont font; - if (!m_pSetup->sDisplayFont1.isEmpty() && font.fromString(m_pSetup->sDisplayFont1)) - m_ui.TimeDisplayTextLabel->setFont(font); - if (!m_pSetup->sDisplayFont2.isEmpty() && font.fromString(m_pSetup->sDisplayFont2)) { - m_ui.ServerStateTextLabel->setFont(font); - m_ui.ServerModeTextLabel->setFont(font); - m_ui.DspLoadTextLabel->setFont(font); - m_ui.SampleRateTextLabel->setFont(font); - m_ui.XrunCountTextLabel->setFont(font); - m_ui.TransportStateTextLabel->setFont(font); - m_ui.TransportBPMTextLabel->setFont(font); - font.setBold(true); - m_ui.TransportTimeTextLabel->setFont(font); - } -} - - -// Force update of big time display related tooltips. -void qjackctlMainForm::updateTimeDisplayToolTips (void) -{ - QString sTimeDisplay = tr("Transport BBT (bar:beat.ticks)"); - QString sTransportTime = tr("Transport time code"); - - switch (m_pSetup->iTimeDisplay) { - case DISPLAY_TRANSPORT_TIME: - { - QString sTemp = sTimeDisplay; - sTimeDisplay = sTransportTime; - sTransportTime = sTemp; - break; - } - case DISPLAY_RESET_TIME: - sTimeDisplay = tr("Elapsed time since last reset"); - break; - case DISPLAY_XRUN_TIME: - sTimeDisplay = tr("Elapsed time since last XRUN"); - break; - } - - m_ui.TimeDisplayTextLabel->setToolTip(sTimeDisplay); - m_ui.TransportTimeTextLabel->setToolTip(sTransportTime); -} - - -// Force update of time format dependant stuff. -void qjackctlMainForm::updateTimeFormat (void) -{ - // Time dashes format helper. - m_sTimeDashes = "--:--:--"; - switch (m_pSetup->iTimeFormat) { - case 1: // Tenths of second. - m_sTimeDashes += ".-"; - break; - case 2: // Hundredths of second. - m_sTimeDashes += ".--"; - break; - case 3: // Raw milliseconds - m_sTimeDashes += ".---"; - break; - } -} - - -// Update the connections client/port aliases. -void qjackctlMainForm::updateAliases (void) -{ - if (m_pConnectionsForm) - m_pConnectionsForm->updateAliases(); -} - - -// Update the main form buttons display. -void qjackctlMainForm::updateButtons (void) -{ - updateTitleStatus(); - - if (m_pSetup->bLeftButtons) { - m_ui.StartToolButton->show(); - m_ui.StopToolButton->show(); - m_ui.MessagesToolButton->show(); - m_ui.StatusToolButton->show(); - m_ui.ConnectionsToolButton->show(); - m_ui.PatchbayToolButton->show(); - } else { - m_ui.StartToolButton->hide(); - m_ui.StopToolButton->hide(); - m_ui.MessagesToolButton->hide(); - m_ui.StatusToolButton->hide(); - m_ui.ConnectionsToolButton->hide(); - m_ui.PatchbayToolButton->hide(); - } - - if (m_pSetup->bRightButtons) { - m_ui.QuitToolButton->show(); - m_ui.SetupToolButton->show(); - } else { - m_ui.QuitToolButton->hide(); - m_ui.SetupToolButton->hide(); - } - - if (m_pSetup->bRightButtons && - (m_pSetup->bLeftButtons || m_pSetup->bTransportButtons)) { - m_ui.AboutToolButton->show(); - } else { - m_ui.AboutToolButton->hide(); - } - - if (m_pSetup->bLeftButtons || m_pSetup->bTransportButtons) { - m_ui.RewindToolButton->show(); - m_ui.BackwardToolButton->show(); - m_ui.PlayToolButton->show(); - m_ui.PauseToolButton->show(); - m_ui.ForwardToolButton->show(); - } else { - m_ui.RewindToolButton->hide(); - m_ui.BackwardToolButton->hide(); - m_ui.PlayToolButton->hide(); - m_ui.PauseToolButton->hide(); - m_ui.ForwardToolButton->hide(); - } - - Qt::ToolButtonStyle toolButtonStyle = (m_pSetup->bTextLabels - ? Qt::ToolButtonTextBesideIcon : Qt::ToolButtonIconOnly); - m_ui.StartToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.StopToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.MessagesToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.StatusToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.ConnectionsToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.PatchbayToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.QuitToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.SetupToolButton->setToolButtonStyle(toolButtonStyle); - m_ui.AboutToolButton->setToolButtonStyle(toolButtonStyle); - - adjustSize(); -} - - -// Force update of active patchbay definition profile, if applicable. -bool qjackctlMainForm::isActivePatchbay ( const QString& sPatchbayPath ) const -{ - bool bActive = false; - - if (m_pSetup && m_pSetup->bActivePatchbay && !m_pSetup->sActivePatchbayPath.isEmpty()) - bActive = (m_pSetup->sActivePatchbayPath == sPatchbayPath); - - return bActive; -} - - -// Force update of active patchbay definition profile, if applicable. -void qjackctlMainForm::updateActivePatchbay (void) -{ - if (m_pSetup == NULL) - return; - - // Time to load the active patchbay rack profiler? - if (m_pSetup->bActivePatchbay && !m_pSetup->sActivePatchbayPath.isEmpty()) { - if (!qjackctlPatchbayFile::load(m_pPatchbayRack, m_pSetup->sActivePatchbayPath)) { - appendMessagesError(tr("Could not load active patchbay definition.\n\nDisabled.")); - m_pSetup->bActivePatchbay = false; - } else { - appendMessages(tr("Patchbay activated.")); - // If we're up and running, make it dirty :) - if (m_pJackClient) - m_iJackDirty++; - if (m_pAlsaSeq) - m_iAlsaDirty++; - } - } // We're sure there's no active patchbay... - else appendMessages(tr("Patchbay deactivated.")); - - // Should refresh anyway. - m_iPatchbayRefresh++; -} - -// Toggle active patchbay setting. -void qjackctlMainForm::setActivePatchbay ( const QString& sPatchbayPath ) -{ - if (m_pSetup == NULL) - return; - - if (sPatchbayPath.isEmpty()) { - m_pSetup->bActivePatchbay = false; - } else { - m_pSetup->bActivePatchbay = true; - m_pSetup->sActivePatchbayPath = sPatchbayPath; - } - - updateActivePatchbay(); -} - - -// Reset the MRU patchbay list. -void qjackctlMainForm::setRecentPatchbays ( const QStringList& patchbays ) -{ - m_pSetup->patchbays = patchbays; -} - - -// Stabilize current form toggle buttons that may be astray. -void qjackctlMainForm::stabilizeForm (void) -{ - m_ui.MessagesToolButton->setChecked( - m_pMessagesForm && m_pMessagesForm->isVisible()); - m_ui.StatusToolButton->setChecked( - m_pStatusForm && m_pStatusForm->isVisible()); - m_ui.ConnectionsToolButton->setChecked( - m_pConnectionsForm && m_pConnectionsForm->isVisible()); - m_ui.PatchbayToolButton->setChecked( - m_pPatchbayForm && m_pPatchbayForm->isVisible()); -} - - -// Stabilize current business over the application event loop. -void qjackctlMainForm::stabilize ( int msecs ) -{ - QTime t; - t.start(); - while (t.elapsed() < msecs) - QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); -} - - -// Reset XRUN cache items. -void qjackctlMainForm::resetXrunStats (void) -{ - m_tResetLast = QTime::currentTime(); - - m_iXrunStats = 0; - m_iXrunCount = 0; - m_fXrunTotal = 0.0f; - m_fXrunMin = 0.0f; - m_fXrunMax = 0.0f; - m_fXrunLast = 0.0f; - - m_tXrunLast.setHMS(0, 0, 0); - - m_iXrunCallbacks = 0; - m_iXrunSkips = 0; - -#ifdef CONFIG_JACK_MAX_DELAY - if (m_pJackClient) - jack_reset_max_delayed_usecs(m_pJackClient); -#endif - - refreshXrunStats(); - - appendMessages(tr("Statistics reset.")); - - // Make sure all status(es) will be updated ASAP. - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; -} - - -// Update the XRUN count/callbacks item. -void qjackctlMainForm::updateXrunCount (void) -{ - // We'll change XRUN status colors here! - QColor color = (m_pJackClient ? Qt::green : Qt::darkGreen); - if ((m_iXrunCount + m_iXrunCallbacks) > 0) { - if (m_iXrunCallbacks > 0) - color = (m_pJackClient ? Qt::red : Qt::darkRed); - else - color = (m_pJackClient ? Qt::yellow : Qt::darkYellow); - // Change the system tray icon background color! - if (m_pSystemTray) - m_pSystemTray->setBackground(color); - } // Reset the system tray icon background! - else if (m_pSystemTray) - m_pSystemTray->setBackground(Qt::transparent); - - QPalette pal; - pal.setColor(QPalette::Foreground, color); - m_ui.XrunCountTextLabel->setPalette(pal); - - QString sText = QString::number(m_iXrunCount); - sText += " ("; - sText += QString::number(m_iXrunCallbacks); - sText += ")"; - updateStatusItem(STATUS_XRUN_COUNT, sText); -} - -// Convert whole elapsed seconds to hh:mm:ss time format. -QString qjackctlMainForm::formatTime ( float secs ) const -{ - unsigned int hh, mm, ss; - - hh = mm = ss = 0; - if (secs >= 3600.0f) { - hh = (unsigned int) (secs / 3600.0f); - secs -= (float) hh * 3600.0f; - } - if (secs >= 60.0f) { - mm = (unsigned int) (secs / 60.0f); - secs -= (float) mm * 60.0f; - } - if (secs >= 0.0) { - ss = (unsigned int) secs; - secs -= (float) ss; - } - - QString sTemp; - switch (m_pSetup->iTimeFormat) { - case 1: // Tenths of second. - sTemp.sprintf("%02u:%02u:%02u.%u", hh, mm, ss, - (unsigned int) (secs * 10.0f)); - break; - case 2: // Hundredths of second. - sTemp.sprintf("%02u:%02u:%02u.%02u", hh, mm, ss, - (unsigned int) (secs * 100.0f)); - break; - case 3: // Raw milliseconds - sTemp.sprintf("%02u:%02u:%02u.%03u", hh, mm, ss, - (unsigned int) (secs * 1000.0f)); - break; - default: // No second decimation. - sTemp.sprintf("%02u:%02u:%02u", hh, mm, ss); - break; - } - - return sTemp; -} - - -// Update the XRUN last/elapsed time item. -QString qjackctlMainForm::formatElapsedTime ( int iStatusItem, - const QTime& t, bool bElapsed ) const -{ - QString sTemp = m_sTimeDashes; - QString sText; - - // Compute and format elapsed time. - if (t.isNull()) { - sText = sTemp; - } else { - sText = t.toString(); - if (m_pJackClient) { - float secs = float(t.elapsed()) / 1000.0f; - if (bElapsed && secs > 0) { - sTemp = formatTime(secs); - sText += " (" + sTemp + ")"; - } - } - } - - // Display elapsed time as big time? - if ((iStatusItem == STATUS_RESET_TIME - && m_pSetup->iTimeDisplay == DISPLAY_RESET_TIME) || - (iStatusItem == STATUS_XRUN_TIME - && m_pSetup->iTimeDisplay == DISPLAY_XRUN_TIME)) { - m_ui.TimeDisplayTextLabel->setText(sTemp); - } - - return sText; -} - - -// Update the XRUN last/elapsed time item. -void qjackctlMainForm::updateElapsedTimes (void) -{ - // Display time remaining on start delay... - if (m_iTimerDelay < m_iStartDelay) - m_ui.TimeDisplayTextLabel->setText(formatTime( - float(m_iStartDelay - m_iTimerDelay) / 1000.0f)); - else { - updateStatusItem(STATUS_RESET_TIME, - formatElapsedTime(STATUS_RESET_TIME, - m_tResetLast, true)); - updateStatusItem(STATUS_XRUN_TIME, - formatElapsedTime(STATUS_XRUN_TIME, - m_tXrunLast, ((m_iXrunCount + m_iXrunCallbacks) > 0))); - } -} - - -// Update the XRUN list view items. -void qjackctlMainForm::refreshXrunStats (void) -{ - updateXrunCount(); - - if (m_fXrunTotal < 0.001f) { - QString n = "--"; - updateStatusItem(STATUS_XRUN_TOTAL, n); - updateStatusItem(STATUS_XRUN_MIN, n); - updateStatusItem(STATUS_XRUN_MAX, n); - updateStatusItem(STATUS_XRUN_AVG, n); - updateStatusItem(STATUS_XRUN_LAST, n); - } else { - float fXrunAverage = 0.0f; - if (m_iXrunCount > 0) - fXrunAverage = (m_fXrunTotal / m_iXrunCount); - QString s = " " + tr("msec"); - updateStatusItem(STATUS_XRUN_TOTAL, QString::number(m_fXrunTotal) + s); - updateStatusItem(STATUS_XRUN_MIN, QString::number(m_fXrunMin) + s); - updateStatusItem(STATUS_XRUN_MAX, QString::number(m_fXrunMax) + s); - updateStatusItem(STATUS_XRUN_AVG, QString::number(fXrunAverage) + s); - updateStatusItem(STATUS_XRUN_LAST, QString::number(m_fXrunLast) + s); - } - - updateElapsedTimes(); -} - - -// Jack socket notifier port/graph callback funtion. -void qjackctlMainForm::portNotifyEvent (void) -{ - // Log some message here, if new. - if (m_iJackRefresh == 0) - appendMessagesColor(tr("JACK connection graph change."), "#cc9966"); - // Do what has to be done. - refreshJackConnections(); - // We'll be dirty too... - m_iJackDirty++; -} - - -// Jack socket notifier XRUN callback funtion. -void qjackctlMainForm::xrunNotifyEvent (void) -{ - // Just increment callback counter. - m_iXrunCallbacks++; - - // Skip this one? Maybe we're under some kind of storm... - m_iXrunSkips++; - - // Report rate must be under one second... - if (m_tXrunLast.restart() < 1000) - return; - -#ifdef CONFIG_JACK_XRUN_DELAY - // We have an official XRUN delay value (convert usecs to msecs)... - updateXrunStats(0.001f * jack_get_xrun_delayed_usecs(m_pJackClient)); -#endif - - // Just log this single event... - appendMessagesColor(tr("XRUN callback (%1).") - .arg(m_iXrunCallbacks), "#cc66cc"); -} - - -// Jack buffer size notifier callback funtion. -void qjackctlMainForm::buffNotifyEvent (void) -{ - // Don't need to nothing, it was handled on qjackctl_buffer_size_callback; - // just log this event as routine. - appendMessagesColor(tr("Buffer size change (%1).") - .arg((int) g_nframes), "#996633"); -} - - -// Jack socket notifier callback funtion. -void qjackctlMainForm::shutNotifyEvent (void) -{ - // Log this event. - appendMessagesColor(tr("Shutdown notification."), "#cc6666"); - // SHUTDOWN: JACK client handle is not valid anymore... - m_bJackShutdown = true; - m_pJackClient = NULL; - // Do what has to be done. - stopJackServer(); - // We're not detached anymore, anyway. - m_bJackDetach = false; -} - - -// Process error slot -void qjackctlMainForm::exitNotifyEvent (void) -{ - // Poor-mans read, copy, update (RCU) - QProcess::ProcessError error = g_error; - g_error = QProcess::UnknownError; - - switch (error) { - case QProcess::FailedToStart: - appendMessagesError(tr("Could not start JACK.\n\nSorry.")); - jackFinished(); - break; - case QProcess::Crashed: - appendMessagesColor(tr("JACK has crashed."), "#cc3366"); - break; - case QProcess::Timedout: - appendMessagesColor(tr("JACK timed out."), "#cc3366"); - break; - case QProcess::WriteError: - appendMessagesColor(tr("JACK write error."), "#cc3366"); - break; - case QProcess::ReadError: - appendMessagesColor(tr("JACK read error."), "#cc3366"); - break; - case QProcess::UnknownError: - default: - appendMessagesColor(tr("Unknown JACK error (%d).") - .arg(int(error)), "#990099"); - break; - } -} - - -// ALSA announce slot. -void qjackctlMainForm::alsaNotifySlot ( int /*fd*/ ) -{ -#ifdef CONFIG_ALSA_SEQ - snd_seq_event_t *pAlsaEvent; - snd_seq_event_input(m_pAlsaSeq, &pAlsaEvent); - snd_seq_free_event(pAlsaEvent); -#endif - // Log some message here, if new. - if (m_iAlsaRefresh == 0) - appendMessagesColor(tr("ALSA connection graph change."), "#66cc99"); - // Do what has to be done. - refreshAlsaConnections(); - // We'll be dirty too... - m_iAlsaDirty++; -} - - -// Timer callback funtion. -void qjackctlMainForm::timerSlot (void) -{ - // Is it the first shot on server start after a few delay? - if (m_iTimerDelay < m_iStartDelay) { - m_iTimerDelay += QJACKCTL_TIMER_MSECS; - if (m_iTimerDelay >= m_iStartDelay) { - // If we cannot start it now, maybe a lil'mo'later ;) - if (!startJackClient(false) && m_pJack) { - m_iStartDelay += m_iTimerDelay; - m_iTimerDelay = 0; - } - } - } - - // Is the connection patchbay dirty enough? - if (m_pConnectionsForm) { - const QString sEllipsis = "..."; - // Are we about to enforce an audio connections persistence profile? - if (m_iJackDirty > 0) { - m_iJackDirty = 0; - if (m_pSetup->bActivePatchbay) { - appendMessagesColor( - tr("JACK active patchbay scan") + sEllipsis, "#6699cc"); - m_pPatchbayRack->connectJackScan(m_pJackClient); - } - refreshJackConnections(); - } - // Or is it from the MIDI field? - if (m_iAlsaDirty > 0) { - m_iAlsaDirty = 0; - if (m_pSetup->bActivePatchbay) { - appendMessagesColor( - tr("ALSA active patchbay scan") + sEllipsis, "#99cc66"); - m_pPatchbayRack->connectAlsaScan(m_pAlsaSeq); - } - refreshAlsaConnections(); - } -#ifdef CONFIG_AUTO_REFRESH - // Shall we refresh connections now and then? - if (m_pSetup->bAutoRefresh) { - m_iTimerRefresh += QJACKCTL_TIMER_MSECS; - if (m_iTimerRefresh >= (m_pSetup->iTimeRefresh * 1000)) { - m_iTimerRefresh = 0; - refreshConnections(); - } - } -#endif - // Are we about to refresh it, really? - if (m_iJackRefresh > 0) { - m_iJackRefresh = 0; - m_pConnectionsForm->refreshAudio(true); - m_pConnectionsForm->refreshMidi(true); - } - if (m_iAlsaRefresh > 0) { - m_iAlsaRefresh = 0; - m_pConnectionsForm->refreshAlsa(true); - } - } - - // Is the patchbay dirty enough? - if (m_pPatchbayForm && m_iPatchbayRefresh > 0) { - m_iPatchbayRefresh = 0; - m_pPatchbayForm->refreshForm(); - } - - // Update some statistical fields, directly. - refreshStatus(); - - // Register the next timer slot. - QTimer::singleShot(QJACKCTL_TIMER_MSECS, this, SLOT(timerSlot())); -} - - -// JACK connection notification slot. -void qjackctlMainForm::jackConnectChanged (void) -{ - // Just shake the audio connections status quo. - if (++m_iJackDirty == 1) - appendMessagesColor(tr("JACK connection change."), "#9999cc"); -} - - -// ALSA connection notification slot. -void qjackctlMainForm::alsaConnectChanged (void) -{ - // Just shake the MIDI connections status quo. - if (++m_iAlsaDirty == 1) - appendMessagesColor(tr("ALSA connection change."), "#cccc99"); -} - - -// Cable connection notification slot. -void qjackctlMainForm::cableConnectSlot ( - const QString& sOutputPort, const QString& sInputPort, - unsigned int ulCableFlags ) -{ - QString sText = QFileInfo(m_pSetup->sActivePatchbayPath).baseName() + ": "; - QString sColor; - - sText += sOutputPort; - sText += " -> "; - sText += sInputPort; - sText += " "; - - switch (ulCableFlags) { - case QJACKCTL_CABLE_CHECKED: - sText += tr("checked"); - sColor = "#99cccc"; - break; - case QJACKCTL_CABLE_CONNECTED: - sText += tr("connected"); - sColor = "#669999"; - break; - case QJACKCTL_CABLE_DISCONNECTED: - sText += tr("disconnected"); - sColor = "#cc9999"; - break; - case QJACKCTL_CABLE_FAILED: - default: - sText += tr("failed"); - sColor = "#cc6699"; - break; - } - - appendMessagesColor(sText + '.', sColor); -} - - -// Patchbay (dis)connection slot. -void qjackctlMainForm::queryDisconnect ( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort, int iSocketType ) -{ - if (m_pSetup->bActivePatchbay) { - qjackctlPatchbayCable *pCable = m_pPatchbayRack->findCable( - pOPort->clientName(), pOPort->portName(), - pIPort->clientName(), pIPort->portName(), iSocketType); - if (pCable && QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("A patchbay definition is currently active,\n" - "which is probable to redo this connection:\n\n" - "%1 -> %2\n\n" - "Do you want to remove the patchbay connection?") - .arg(pCable->outputSocket()->name()) - .arg(pCable->inputSocket()->name()), - tr("Remove"), tr("Ignore")) == 0) { - m_pPatchbayRack->removeCable(pCable); - if (m_pPatchbayForm - && isActivePatchbay(m_pPatchbayForm->patchbayPath())) - m_pPatchbayForm->loadPatchbayRack(m_pPatchbayRack); - } - } -} - - -// Start our jack audio control client... -bool qjackctlMainForm::startJackClient ( bool bDetach ) -{ - // If can't be already started, are we? - if (m_pJackClient) - return true; - - // Have it a setup? - if (m_pSetup == NULL) - return false; - - // Time to (re)load current preset aliases? - if (m_pConnectionsForm && !m_pConnectionsForm->loadAliases()) - return false; - - // Make sure all status(es) will be updated ASAP. - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - m_iStatusBlink = 0; - - // Are we about to start detached? - if (bDetach) { - // To fool timed client initialization delay. - m_iTimerDelay += (m_iStartDelay + 1); - // Refresh status (with dashes?) - refreshStatus(); - } - - // Create the jack client handle, using a distinct identifier (PID?) - jack_status_t status = JackFailure; - m_pJackClient = jack_client_open("qjackctl", JackNoStartServer, &status); - if (m_pJackClient == NULL) { - if (!bDetach) { - QStringList errs; - if (status & JackFailure) - errs << tr("Overall operation failed."); - if (status & JackInvalidOption) - errs << tr("Invalid or unsupported option."); - if (status & JackNameNotUnique) - errs << tr("Client name not unique."); - if (status & JackServerStarted) - errs << tr("Server is started."); - if (status & JackServerFailed) - errs << tr("Unable to connect to server."); - if (status & JackServerError) - errs << tr("Server communication error."); - if (status & JackNoSuchClient) - errs << tr("Client does not exist."); - if (status & JackLoadFailure) - errs << tr("Unable to load internal client."); - if (status & JackInitFailure) - errs << tr("Unable to initialize client."); - if (status & JackShmFailure) - errs << tr("Unable to access shared memory."); - if (status & JackVersionError) - errs << tr("Client protocol version mismatch."); - appendMessagesError( - tr("Could not connect to JACK server as client.\n" - "- %1\nPlease check the messages window for more info.") - .arg(errs.join("\n- "))); - } - return false; - } - - // Set notification callbacks. - jack_set_graph_order_callback(m_pJackClient, - qjackctl_graph_order_callback, this); - jack_set_port_registration_callback(m_pJackClient, - qjackctl_port_registration_callback, this); - jack_set_xrun_callback(m_pJackClient, - qjackctl_xrun_callback, this); - jack_set_buffer_size_callback(m_pJackClient, - qjackctl_buffer_size_callback, this); - jack_on_shutdown(m_pJackClient, - qjackctl_on_shutdown, this); - - // First knowledge about buffer size. - g_nframes = jack_get_buffer_size(m_pJackClient); - - // Reconstruct our connections patchbay... - if (m_pConnectionsForm) - m_pConnectionsForm->setJackClient(m_pJackClient); - if (m_pPatchbayForm) - m_pPatchbayForm->setJackClient(m_pJackClient); - - // Save server configuration file. - if (m_pSetup->bServerConfig && !m_sJackCmdLine.isEmpty()) { - QString sJackCmdLine = m_sJackCmdLine; - if (m_pSetup->bServerConfigTemp) { - int iPos = sJackCmdLine.indexOf(' '); - if (iPos > 0) - sJackCmdLine = sJackCmdLine.insert(iPos, " -T"); - } - QString sFilename = ::getenv("HOME"); - sFilename += '/' + m_pSetup->sServerConfigName; - QFile file(sFilename); - if (file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { - QTextStream(&file) << sJackCmdLine << endl; - file.close(); - appendMessagesColor( - tr("Server configuration saved to \"%1\".") - .arg(sFilename), "#999933"); - } - } - - // Do not forget to reset XRUN stats variables. - if (!bDetach) - resetXrunStats(); - else // We'll flag that we've been detached! - m_bJackDetach = true; - - // Activate us as a client... - jack_activate(m_pJackClient); - - // Remember to schedule an initial connection refreshment. - refreshConnections(); - - // All displays are highlighted from now on. - QPalette pal; - pal.setColor(QPalette::Foreground, Qt::yellow); - m_ui.ServerStateTextLabel->setPalette(pal); - m_ui.DspLoadTextLabel->setPalette(pal); - m_ui.ServerModeTextLabel->setPalette(pal); - pal.setColor(QPalette::Foreground, Qt::darkYellow); - m_ui.SampleRateTextLabel->setPalette(pal); - pal.setColor(QPalette::Foreground, Qt::green); - m_ui.TimeDisplayTextLabel->setPalette(pal); - m_ui.TransportStateTextLabel->setPalette(pal); - m_ui.TransportBPMTextLabel->setPalette(pal); - m_ui.TransportTimeTextLabel->setPalette(pal); - - // Whether we've started detached, just change active status. - updateServerState(m_bJackDetach ? QJACKCTL_ACTIVE : QJACKCTL_STARTED); - m_ui.StopToolButton->setEnabled(true); - - // Log success here. - appendMessages(tr("Client activated.")); - - // Do we have any post-startup scripting?... - // (only if we're not a detached client) - if (!bDetach && !m_bJackDetach) { - if (m_pSetup->bPostStartupScript - && !m_pSetup->sPostStartupScriptShell.isEmpty()) { - shellExecute(m_pSetup->sPostStartupScriptShell, - tr("Post-startup script..."), - tr("Post-startup script terminated")); - } - } - - // Have we an initial command-line to start away? - if (!m_pSetup->sCmdLine.isEmpty()) { - // Run it dettached... - shellExecute(m_pSetup->sCmdLine, - tr("Command line argument..."), - tr("Command line argument started")); - // And reset it forever more... - m_pSetup->sCmdLine = QString::null; - } - - // OK, we're at it! - return true; -} - - -// Stop jack audio client... -void qjackctlMainForm::stopJackClient (void) -{ - // Clear out the connections and patchbays... - if (m_pConnectionsForm) - m_pConnectionsForm->setJackClient(NULL); - if (m_pPatchbayForm) - m_pPatchbayForm->setJackClient(NULL); - - // Deactivate and close us as a client... - if (m_pJackClient) { - jack_deactivate(m_pJackClient); - jack_client_close(m_pJackClient); - m_pJackClient = NULL; - // Log deactivation here. - appendMessages(tr("Client deactivated.")); - } - - // Reset command-line configuration info. - m_sJackCmdLine = QString::null; - - // Displays are dimmed again. - QPalette pal; - pal.setColor(QPalette::Foreground, Qt::darkYellow); - m_ui.ServerModeTextLabel->setPalette(pal); - m_ui.DspLoadTextLabel->setPalette(pal); - m_ui.SampleRateTextLabel->setPalette(pal); - pal.setColor(QPalette::Foreground, Qt::darkGreen); - m_ui.TimeDisplayTextLabel->setPalette(pal); - m_ui.TransportStateTextLabel->setPalette(pal); - m_ui.TransportBPMTextLabel->setPalette(pal); - m_ui.TransportTimeTextLabel->setPalette(pal); - - // Refresh jack client statistics explicitly. - refreshXrunStats(); -} - - -// Rebuild all patchbay items. -void qjackctlMainForm::refreshConnections (void) -{ - refreshJackConnections(); - refreshAlsaConnections(); -} - -void qjackctlMainForm::refreshJackConnections (void) -{ - // Hack this as for a while. - if (m_pConnectionsForm && m_iJackRefresh == 0) { - m_pConnectionsForm->stabilizeAudio(false); - m_pConnectionsForm->stabilizeMidi(false); - } - - // Just increment our intentions; it will be deferred - // to be executed just on timer slot processing... - m_iJackRefresh++; -} - -void qjackctlMainForm::refreshAlsaConnections (void) -{ - // Hack this as for a while. - if (m_pConnectionsForm && m_iAlsaRefresh == 0) - m_pConnectionsForm->stabilizeAlsa(false); - - // Just increment our intentions; it will be deferred - // to be executed just on timer slot processing... - m_iAlsaRefresh++; -} - - -void qjackctlMainForm::refreshPatchbay (void) -{ - // Just increment our intentions; it will be deferred - // to be executed just on timer slot processing... - m_iPatchbayRefresh++; -} - - -// Main form visibility requester slot. -void qjackctlMainForm::toggleMainForm (void) -{ - m_pSetup->saveWidgetGeometry(this); - if (isVisible()) { - if (m_pSetup->bSystemTray && m_pSystemTray) { - // Hide away from sight. - hide(); - } else { - // Minimize (iconify) normally. - showMinimized(); - } - } else { - show(); - raise(); - activateWindow(); - } -} - - -// Message log form requester slot. -void qjackctlMainForm::toggleMessagesForm (void) -{ - if (m_pMessagesForm) { - m_pSetup->saveWidgetGeometry(m_pMessagesForm); - if (m_pMessagesForm->isVisible()) { - m_pMessagesForm->hide(); - } else { - m_pMessagesForm->show(); - m_pMessagesForm->raise(); - m_pMessagesForm->activateWindow(); - } - } -} - - -// Status form requester slot. -void qjackctlMainForm::toggleStatusForm (void) -{ - if (m_pStatusForm) { - m_pSetup->saveWidgetGeometry(m_pStatusForm); - if (m_pStatusForm->isVisible()) { - m_pStatusForm->hide(); - } else { - m_pStatusForm->show(); - m_pStatusForm->raise(); - m_pStatusForm->activateWindow(); - } - } -} - - -// Connections form requester slot. -void qjackctlMainForm::toggleConnectionsForm (void) -{ - if (m_pConnectionsForm) { - m_pSetup->saveWidgetGeometry(m_pConnectionsForm); - m_pConnectionsForm->setJackClient(m_pJackClient); - m_pConnectionsForm->setAlsaSeq(m_pAlsaSeq); - if (m_pConnectionsForm->isVisible()) { - m_pConnectionsForm->hide(); - } else { - m_pConnectionsForm->show(); - m_pConnectionsForm->raise(); - m_pConnectionsForm->activateWindow(); - } - } -} - - -// Patchbay form requester slot. -void qjackctlMainForm::togglePatchbayForm (void) -{ - if (m_pPatchbayForm) { - m_pSetup->saveWidgetGeometry(m_pPatchbayForm); - m_pPatchbayForm->setJackClient(m_pJackClient); - m_pPatchbayForm->setAlsaSeq(m_pAlsaSeq); - if (m_pPatchbayForm->isVisible()) { - m_pPatchbayForm->hide(); - } else { - m_pPatchbayForm->show(); - m_pPatchbayForm->raise(); - m_pPatchbayForm->activateWindow(); - } - } -} - - -// Setup dialog requester slot. -void qjackctlMainForm::showSetupForm (void) -{ - qjackctlSetupForm *pSetupForm = new qjackctlSetupForm(this); - if (pSetupForm) { - // Check out some initial nullities(tm)... - if (m_pSetup->sMessagesFont.isEmpty() && m_pMessagesForm) - m_pSetup->sMessagesFont = m_pMessagesForm->messagesFont().toString(); - if (m_pSetup->sDisplayFont1.isEmpty()) - m_pSetup->sDisplayFont1 = m_ui.TimeDisplayTextLabel->font().toString(); - if (m_pSetup->sDisplayFont2.isEmpty()) - m_pSetup->sDisplayFont2 = m_ui.ServerStateTextLabel->font().toString(); - if (m_pSetup->sConnectionsFont.isEmpty() && m_pConnectionsForm) - m_pSetup->sConnectionsFont = m_pConnectionsForm->connectionsFont().toString(); - // To track down deferred or immediate changes. - bool bOldMessagesLog = m_pSetup->bMessagesLog; - QString sOldMessagesLogPath = m_pSetup->sMessagesLogPath; - QString sOldMessagesFont = m_pSetup->sMessagesFont; - QString sOldDisplayFont1 = m_pSetup->sDisplayFont1; - QString sOldDisplayFont2 = m_pSetup->sDisplayFont2; - QString sOldConnectionsFont = m_pSetup->sConnectionsFont; - int iOldConnectionsIconSize = m_pSetup->iConnectionsIconSize; - int iOldJackClientPortAlias = m_pSetup->iJackClientPortAlias; - int iOldTimeDisplay = m_pSetup->iTimeDisplay; - int iOldTimeFormat = m_pSetup->iTimeFormat; - bool bOldDisplayEffect = m_pSetup->bDisplayEffect; - bool bOldActivePatchbay = m_pSetup->bActivePatchbay; - QString sOldActivePatchbayPath = m_pSetup->sActivePatchbayPath; - bool bOldStdoutCapture = m_pSetup->bStdoutCapture; - bool bOldKeepOnTop = m_pSetup->bKeepOnTop; - bool bOldSystemTray = m_pSetup->bSystemTray; - bool bOldDelayedSetup = m_pSetup->bDelayedSetup; - int bOldMessagesLimit = m_pSetup->bMessagesLimit; - int iOldMessagesLimitLines = m_pSetup->iMessagesLimitLines; - bool bOldBezierLines = m_pSetup->bBezierLines; - bool bOldAlsaSeqEnabled = m_pSetup->bAlsaSeqEnabled; - bool bOldAliasesEnabled = m_pSetup->bAliasesEnabled; - bool bOldAliasesEditing = m_pSetup->bAliasesEditing; - bool bOldLeftButtons = m_pSetup->bLeftButtons; - bool bOldRightButtons = m_pSetup->bRightButtons; - bool bOldTransportButtons = m_pSetup->bTransportButtons; - bool bOldTextLabels = m_pSetup->bTextLabels; - int iOldBaseFontSize = m_pSetup->iBaseFontSize; - // Load the current setup settings. - pSetupForm->setup(m_pSetup); - // Show the setup dialog... - if (pSetupForm->exec()) { - // Check wheather something immediate has changed. - if (( bOldMessagesLog && !m_pSetup->bMessagesLog) || - (!bOldMessagesLog && m_pSetup->bMessagesLog) || - (sOldMessagesLogPath != m_pSetup->sMessagesLogPath)) - m_pMessagesForm->setLogging( - m_pSetup->bMessagesLog, m_pSetup->sMessagesLogPath); - if (( bOldBezierLines && !m_pSetup->bBezierLines) || - (!bOldBezierLines && m_pSetup->bBezierLines)) - updateBezierLines(); - if (( bOldDisplayEffect && !m_pSetup->bDisplayEffect) || - (!bOldDisplayEffect && m_pSetup->bDisplayEffect)) - updateDisplayEffect(); - if (iOldJackClientPortAlias != m_pSetup->iJackClientPortAlias) - updateJackClientPortAlias(); - if (iOldConnectionsIconSize != m_pSetup->iConnectionsIconSize) - updateConnectionsIconSize(); - if (sOldConnectionsFont != m_pSetup->sConnectionsFont) - updateConnectionsFont(); - if (sOldMessagesFont != m_pSetup->sMessagesFont) - updateMessagesFont(); - if (( bOldMessagesLimit && !m_pSetup->bMessagesLimit) || - (!bOldMessagesLimit && m_pSetup->bMessagesLimit) || - (iOldMessagesLimitLines != m_pSetup->iMessagesLimitLines)) - updateMessagesLimit(); - if (sOldDisplayFont1 != m_pSetup->sDisplayFont1 || - sOldDisplayFont2 != m_pSetup->sDisplayFont2) - updateTimeDisplayFonts(); - if (iOldTimeDisplay |= m_pSetup->iTimeDisplay) - updateTimeDisplayToolTips(); - if (iOldTimeFormat |= m_pSetup->iTimeFormat) - updateTimeFormat(); - if ((!bOldActivePatchbay && m_pSetup->bActivePatchbay) || - (sOldActivePatchbayPath != m_pSetup->sActivePatchbayPath)) - updateActivePatchbay(); - if (( bOldSystemTray && !m_pSetup->bSystemTray) || - (!bOldSystemTray && m_pSetup->bSystemTray)) - updateSystemTray(); - if (( bOldAliasesEnabled && !m_pSetup->bAliasesEnabled) || - (!bOldAliasesEnabled && m_pSetup->bAliasesEnabled) || - ( bOldAliasesEditing && !m_pSetup->bAliasesEditing) || - (!bOldAliasesEditing && m_pSetup->bAliasesEditing)) - updateAliases(); - if (( bOldLeftButtons && !m_pSetup->bLeftButtons) || - (!bOldLeftButtons && m_pSetup->bLeftButtons) || - ( bOldRightButtons && !m_pSetup->bRightButtons) || - (!bOldRightButtons && m_pSetup->bRightButtons) || - ( bOldTransportButtons && !m_pSetup->bTransportButtons) || - (!bOldTransportButtons && m_pSetup->bTransportButtons) || - ( bOldTextLabels && !m_pSetup->bTextLabels) || - (!bOldTextLabels && m_pSetup->bTextLabels)) - updateButtons(); - // Warn if something will be only effective on next run. - if (( bOldStdoutCapture && !m_pSetup->bStdoutCapture) || - (!bOldStdoutCapture && m_pSetup->bStdoutCapture) || - ( bOldKeepOnTop && !m_pSetup->bKeepOnTop) || - (!bOldKeepOnTop && m_pSetup->bKeepOnTop) || - ( bOldDelayedSetup && !m_pSetup->bDelayedSetup) || - (!bOldDelayedSetup && m_pSetup->bDelayedSetup) || - ( bOldAlsaSeqEnabled && !m_pSetup->bAlsaSeqEnabled) || - (!bOldAlsaSeqEnabled && m_pSetup->bAlsaSeqEnabled) || - (iOldBaseFontSize != m_pSetup->iBaseFontSize)) - showDirtySetupWarning(); - // If server is currently running, warn user... - showDirtySettingsWarning(); - } - delete pSetupForm; - } -} - - -// About dialog requester slot. -void qjackctlMainForm::showAboutForm (void) -{ - qjackctlAboutForm(this).exec(); -} - - -// Transport rewind. -void qjackctlMainForm::transportRewind (void) -{ -#ifdef CONFIG_JACK_TRANSPORT - if (m_pJackClient) { - jack_transport_locate(m_pJackClient, 0); - // Log this here. - appendMessages(tr("Transport rewind.")); - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - } -#endif -} - -// Transport backward. -void qjackctlMainForm::transportBackward (void) -{ -#ifdef CONFIG_JACK_TRANSPORT - if (m_pJackClient) { - jack_position_t tpos; - jack_transport_query(m_pJackClient, &tpos); - float rate = float(tpos.frame_rate); - float tloc = ((float(tpos.frame) / rate) - m_fSkipAccel) * rate; - if (tloc < 0.0f) tloc = 0.0f; - jack_transport_locate(m_pJackClient, (jack_nframes_t) tloc); - // Log this here (if on initial toggle). - if (m_fSkipAccel < 1.1f) - appendMessages(tr("Transport backward.")); - // Take care of backward acceleration... - if (m_ui.BackwardToolButton->isDown() && m_fSkipAccel < 60.0) - m_fSkipAccel *= 1.1f; - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - } -#endif -} - -// Transport toggle (start/stop) -void qjackctlMainForm::transportPlay ( bool bOn ) -{ - if (bOn) - transportStart(); - else - transportStop(); -} - -// Transport start (play) -void qjackctlMainForm::transportStart (void) -{ -#ifdef CONFIG_JACK_TRANSPORT - if (m_pJackClient) { - jack_transport_start(m_pJackClient); - updateStatusItem(STATUS_TRANSPORT_STATE, tr("Starting")); - // Log this here. - appendMessages(tr("Transport start.")); - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - } -#endif -} - -// Transport stop (pause). -void qjackctlMainForm::transportStop (void) -{ -#ifdef CONFIG_JACK_TRANSPORT - if (m_pJackClient) { - jack_transport_stop(m_pJackClient); - updateStatusItem(STATUS_TRANSPORT_STATE, tr("Stopping")); - // Log this here. - appendMessages(tr("Transport stop.")); - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - } -#endif -} - -// Transport forward. -void qjackctlMainForm::transportForward (void) -{ -#ifdef CONFIG_JACK_TRANSPORT - if (m_pJackClient) { - jack_position_t tpos; - jack_transport_query(m_pJackClient, &tpos); - float rate = float(tpos.frame_rate); - float tloc = ((float(tpos.frame) / rate) + m_fSkipAccel) * rate; - if (tloc < 0.0f) tloc = 0.0f; - jack_transport_locate(m_pJackClient, (jack_nframes_t) tloc); - // Log this here. - if (m_fSkipAccel < 1.1f) - appendMessages(tr("Transport forward.")); - // Take care of forward acceleration... - if (m_ui.ForwardToolButton->isDown() && m_fSkipAccel < 60.0f) - m_fSkipAccel *= 1.1f; - // Make sure all status(es) will be updated ASAP... - m_iStatusRefresh += QJACKCTL_STATUS_CYCLE; - } -#endif -} - - -// Almost-complete running status refresher. -void qjackctlMainForm::refreshStatus (void) -{ - const QString n = "--"; - const QString b = "--:--.----"; - const QString sStopped = tr("Stopped"); - - m_iStatusRefresh++; - - if (m_pJackClient) { - const QString s = " "; -#ifdef CONFIG_JACK_TRANSPORT - QString sText = n; - jack_position_t tpos; - jack_transport_state_t tstate = jack_transport_query(m_pJackClient, &tpos); - bool bPlaying = (tstate == JackTransportRolling || tstate == JackTransportLooping); - // Transport timecode position. - // if (bPlaying) - updateStatusItem(STATUS_TRANSPORT_TIME, - formatTime(float(tpos.frame) / float(tpos.frame_rate))); - // else - // updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); - // Transport barcode position (bar:beat.tick) - if (tpos.valid & JackPositionBBT) { - updateStatusItem(STATUS_TRANSPORT_BBT, - QString().sprintf("%u:%u.%04u", tpos.bar, tpos.beat, tpos.tick)); - updateStatusItem(STATUS_TRANSPORT_BPM, - QString::number(tpos.beats_per_minute)); - } else { - updateStatusItem(STATUS_TRANSPORT_BBT, b); - updateStatusItem(STATUS_TRANSPORT_BPM, n); - } -#endif // !CONFIG_JACK_TRANSPORT - // Less frequent status items update... - if (m_iStatusRefresh >= QJACKCTL_STATUS_CYCLE) { - m_iStatusRefresh = 0; - float fDspLoad = jack_cpu_load(m_pJackClient); - if (m_pSystemTray) - m_pSystemTray->setToolTip( - tr("%1 (%2%)").arg(windowTitle()).arg(fDspLoad, 0, 'g', 2)); - updateStatusItem(STATUS_DSP_LOAD, - tr("%1 %").arg(fDspLoad, 0, 'g', 2)); - updateStatusItem(STATUS_SAMPLE_RATE, - tr("%1 Hz").arg(jack_get_sample_rate(m_pJackClient))); - updateStatusItem(STATUS_BUFFER_SIZE, - tr("%1 frames").arg(g_nframes)); - // Blink server mode indicator?... - if (m_pSetup && m_pSetup->bDisplayBlink) { - QPalette pal; - pal.setColor(QPalette::Foreground, - (++m_iStatusBlink % 2) ? Qt::darkYellow: Qt::yellow); - m_ui.ServerModeTextLabel->setPalette(pal); - } -#ifdef CONFIG_JACK_REALTIME - bool bRealtime = jack_is_realtime(m_pJackClient); - updateStatusItem(STATUS_REALTIME, - (bRealtime ? tr("Yes") : tr("No"))); - m_ui.ServerModeTextLabel->setText(bRealtime ? tr("RT") : n); -#else - updateStatusItem(STATUS_REALTIME, n); - m_ui.ServerModeTextLabel->setText(n); -#endif // !CONFIG_JACK_REALTIME -#ifdef CONFIG_JACK_TRANSPORT - switch (tstate) { - case JackTransportStarting: - sText = tr("Starting"); - break; - case JackTransportRolling: - sText = tr("Rolling"); - break; - case JackTransportLooping: - sText = tr("Looping"); - break; - case JackTransportStopped: - default: - sText = sStopped; - break; - } - updateStatusItem(STATUS_TRANSPORT_STATE, sText); - m_ui.RewindToolButton->setEnabled(tpos.frame > 0); - m_ui.BackwardToolButton->setEnabled(tpos.frame > 0); - m_ui.PlayToolButton->setEnabled(true); - m_ui.PauseToolButton->setEnabled(bPlaying); - m_ui.ForwardToolButton->setEnabled(true); - m_ui.PlayToolButton->setChecked(bPlaying); - if (!m_ui.BackwardToolButton->isDown() && - !m_ui.ForwardToolButton->isDown()) - m_fSkipAccel = 1.0; -#else - updateStatusItem(STATUS_TRANSPORT_STATE, n); - m_ui.RewindToolButton->setEnabled(false); - m_ui.BackwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setEnabled(false); - m_ui.PauseToolButton->setEnabled(false); - m_ui.ForwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setChecked(false); - updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); - updateStatusItem(STATUS_TRANSPORT_BBT, b); - updateStatusItem(STATUS_TRANSPORT_BPM, n); -#endif // !CONFIG_JACK_TRANSPORT -#ifdef CONFIG_JACK_MAX_DELAY - updateStatusItem(STATUS_MAX_DELAY, tr("%1 msec") - .arg(0.001f * jack_get_max_delayed_usecs(m_pJackClient))); -#endif - // Check if we're have some XRUNs to report... - if (m_iXrunSkips > 0) { - // Maybe we've skipped some... - if (m_iXrunSkips > 1) { - appendMessagesColor(tr("XRUN callback (%1 skipped).") - .arg(m_iXrunSkips - 1), "#cc99cc"); - } - // Reset skip count. - m_iXrunSkips = 0; - // Highlight the (new) status... - refreshXrunStats(); - } - } - } // No need to update often if we're just idle... - else if (m_iStatusRefresh >= QJACKCTL_STATUS_CYCLE) { - m_iStatusRefresh = 0; - updateStatusItem(STATUS_DSP_LOAD, n); - updateStatusItem(STATUS_SAMPLE_RATE, n); - updateStatusItem(STATUS_BUFFER_SIZE, n); - updateStatusItem(STATUS_REALTIME, n); - m_ui.ServerModeTextLabel->setText(n); - updateStatusItem(STATUS_TRANSPORT_STATE, n); - updateStatusItem(STATUS_TRANSPORT_TIME, m_sTimeDashes); - updateStatusItem(STATUS_TRANSPORT_BBT, b); - updateStatusItem(STATUS_TRANSPORT_BPM, n); - m_ui.RewindToolButton->setEnabled(false); - m_ui.BackwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setEnabled(false); - m_ui.PauseToolButton->setEnabled(false); - m_ui.ForwardToolButton->setEnabled(false); - m_ui.PlayToolButton->setChecked(false); - } - - // Elapsed times should be rigorous... - updateElapsedTimes(); -} - - -// Status item updater. -void qjackctlMainForm::updateStatusItem( int iStatusItem, const QString& sText ) -{ - switch (iStatusItem) { - case STATUS_SERVER_STATE: - m_ui.ServerStateTextLabel->setText(sText); - break; - case STATUS_DSP_LOAD: - m_ui.DspLoadTextLabel->setText(sText); - break; - case STATUS_SAMPLE_RATE: - m_ui.SampleRateTextLabel->setText(sText); - break; - case STATUS_XRUN_COUNT: - m_ui.XrunCountTextLabel->setText(sText); - break; - case STATUS_TRANSPORT_STATE: - m_ui.TransportStateTextLabel->setText(sText); - break; - case STATUS_TRANSPORT_TIME: - if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_TIME) - m_ui.TimeDisplayTextLabel->setText(sText); - else - m_ui.TransportTimeTextLabel->setText(sText); - break; - case STATUS_TRANSPORT_BBT: - if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_BBT) - m_ui.TimeDisplayTextLabel->setText(sText); - else - if (m_pSetup->iTimeDisplay == DISPLAY_TRANSPORT_TIME) - m_ui.TransportTimeTextLabel->setText(sText); - break; - case STATUS_TRANSPORT_BPM: - m_ui.TransportBPMTextLabel->setText(sText); - break; - } - - if (m_pStatusForm) - m_pStatusForm->updateStatusItem(iStatusItem, sText); -} - - -// Main window caption title and system tray icon and tooltip update. -void qjackctlMainForm::updateTitleStatus (void) -{ - QString sTitle; - - if (!m_pSetup->bLeftButtons || - !m_pSetup->bRightButtons || - !m_pSetup->bTextLabels) { - sTitle = QJACKCTL_SUBTITLE0; - } else { - sTitle = QJACKCTL_SUBTITLE1; - } - - sTitle += " [" + m_pSetup->sDefPreset + "] "; - - QString sState; - QString sDots = "."; - const QString s = ".."; - switch (m_iServerState) { - case QJACKCTL_STARTING: - sState = tr("Starting"); - sDots += s; - break; - case QJACKCTL_STARTED: - sState = tr("Started"); - break; - case QJACKCTL_STOPPING: - sState = tr("Stopping"); - sDots += s; - break; - case QJACKCTL_STOPPED: - sState = tr("Stopped"); - break; - case QJACKCTL_ACTIVE: - sState = tr("Active"); - break; - case QJACKCTL_ACTIVATING: - sState = tr("Activating"); - sDots += s; - break; - case QJACKCTL_INACTIVE: - default: - sState = tr("Inactive"); - break; - } - sTitle += sState + sDots; - setWindowTitle(sTitle); - - updateStatusItem(STATUS_SERVER_STATE, sState); - - if (m_pSystemTray) { - switch (m_iServerState) { - case QJACKCTL_STARTING: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstarting1.png")); - break; - case QJACKCTL_STARTED: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstarted1.png")); - break; - case QJACKCTL_STOPPING: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstopping1.png")); - break; - case QJACKCTL_STOPPED: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xstopped1.png")); - break; - case QJACKCTL_ACTIVE: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xactive1.png")); - break; - case QJACKCTL_ACTIVATING: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xactivating1.png")); - break; - case QJACKCTL_INACTIVE: - default: - m_pSystemTray->setPixmapOverlay(QPixmap(":/icons/xinactive1.png")); - break; - } - m_pSystemTray->setToolTip(sTitle); - } -} - - -// Main server state status update helper. -void qjackctlMainForm::updateServerState ( int iServerState ) -{ - // Just set the new server state. - m_iServerState = iServerState; - - // Now's time to update main window - // caption title and status immediately. - updateTitleStatus(); -} - - -// System tray master switcher. -void qjackctlMainForm::updateSystemTray (void) -{ -#ifdef CONFIG_SYSTEM_TRAY - if (!m_pSetup->bSystemTray && m_pSystemTray) { - // Strange enough, this would close the application too. - // m_pSystemTray->close(); - delete m_pSystemTray; - m_pSystemTray = NULL; - } - if (m_pSetup->bSystemTray && m_pSystemTray == NULL) { - m_pSystemTray = new qjackctlSystemTray(this); - QObject::connect(m_pSystemTray, - SIGNAL(clicked()), - SLOT(toggleMainForm())); - QObject::connect(m_pSystemTray, - SIGNAL(middleClicked()), - SLOT(resetXrunStats())); - QObject::connect(m_pSystemTray, - SIGNAL(contextMenuRequested(const QPoint &)), - SLOT(systemTrayContextMenu(const QPoint &))); - m_pSystemTray->show(); - } else { - // Make sure the main widget is visible. - show(); - raise(); - activateWindow(); - } -#endif -} - - -// System tray context menu request slot. -void qjackctlMainForm::systemTrayContextMenu ( const QPoint& pos ) -{ - QMenu menu(this); - QAction *pAction; - - QString sHideMinimize = (m_pSetup->bSystemTray && m_pSystemTray - ? tr("&Hide") : tr("Mi&nimize")); - QString sShowRestore = (m_pSetup->bSystemTray && m_pSystemTray - ? tr("S&how") : tr("Rest&ore")); - - pAction = menu.addAction(isVisible() - ? sHideMinimize : sShowRestore, this, SLOT(toggleMainForm())); - menu.addSeparator(); - - if (m_pJackClient == NULL) { - pAction = menu.addAction(QIcon(":/icons/start1.png"), - tr("&Start"), this, SLOT(startJack())); - } else { - pAction = menu.addAction(QIcon(":/icons/stop1.png"), - tr("&Stop"), this, SLOT(stopJack())); - } - pAction = menu.addAction(QIcon(":/icons/reset1.png"), - tr("&Reset"), m_pStatusForm, SLOT(resetXrunStats())); -// pAction->setEnabled(m_pJackClient != NULL); - menu.addSeparator(); - - // Construct the actual presets menu, - // overriding the last one, if any... - QMenu *pPresetsMenu = menu.addMenu(tr("&Presets")); - // Assume QStringList iteration follows item index order (0,1,2...) - int iPreset = 0; - QStringListIterator iter(m_pSetup->presets); - while (iter.hasNext()) { - const QString& sPreset = iter.next(); - pAction = pPresetsMenu->addAction(sPreset); - pAction->setCheckable(true); - pAction->setChecked(sPreset == m_pSetup->sDefPreset); - pAction->setData(iPreset); - iPreset++; - } - // Default preset always present, and has invalid index parameter (-1)... - if (iPreset > 0) - pPresetsMenu->addSeparator(); - pAction = pPresetsMenu->addAction(m_pSetup->sDefPresetName); - pAction->setCheckable(true); - pAction->setChecked(m_pSetup->sDefPresetName == m_pSetup->sDefPreset); - pAction->setData(-1); - QObject::connect(pPresetsMenu, - SIGNAL(triggered(QAction*)), - SLOT(activatePresetsMenu(QAction*))); - menu.addSeparator(); - - pAction = menu.addAction(QIcon(":/icons/messages1.png"), - tr("&Messages"), this, SLOT(toggleMessagesForm())); - pAction->setCheckable(true); - pAction->setChecked(m_pMessagesForm && m_pMessagesForm->isVisible()); - pAction = menu.addAction(QIcon(":/icons/status1.png"), - tr("St&atus"), this, SLOT(toggleStatusForm())); - pAction->setCheckable(true); - pAction->setChecked(m_pStatusForm && m_pStatusForm->isVisible()); - pAction = menu.addAction(QIcon(":/icons/connections1.png"), - tr("&Connections"), this, SLOT(toggleConnectionsForm())); - pAction->setCheckable(true); - pAction->setChecked(m_pConnectionsForm && m_pConnectionsForm->isVisible()); - pAction = menu.addAction(QIcon(":/icons/patchbay1.png"), - tr("Patch&bay"), this, SLOT(togglePatchbayForm())); - pAction->setCheckable(true); - pAction->setChecked(m_pPatchbayForm && m_pPatchbayForm->isVisible()); - menu.addSeparator(); - - QMenu *pTransportMenu = menu.addMenu(tr("&Transport")); - pAction = pTransportMenu->addAction(QIcon(":/icons/rewind1.png"), - tr("&Rewind"), this, SLOT(transportRewind())); - pAction->setEnabled(m_ui.RewindToolButton->isEnabled()); -// pAction = pTransportMenu->addAction(QIcon(":/icons/backward1.png"), -// tr("&Backward"), this, SLOT(transportBackward())); -// pAction->setEnabled(m_ui.BackwardToolButton->isEnabled()); - pAction = pTransportMenu->addAction(QIcon(":/icons/play1.png"), - tr("&Play"), this, SLOT(transportStart())); - pAction->setEnabled(!m_ui.PlayToolButton->isChecked()); - pAction = pTransportMenu->addAction(QIcon(":/icons/pause1.png"), - tr("Pa&use"), this, SLOT(transportStop())); - pAction->setEnabled(m_ui.PauseToolButton->isEnabled()); -// pAction = pTransportMenu->addAction(QIcon(":/icons/forward1.png"), -// tr("&Forward"), this, SLOT(transportForward())); -// pAction->setEnabled(m_ui.ForwardToolButton->isEnabled()); - menu.addSeparator(); - - pAction = menu.addAction(QIcon(":/icons/setup1.png"), - tr("S&etup..."), this, SLOT(showSetupForm())); - - if (!m_pSetup->bRightButtons || !m_pSetup->bTransportButtons) { - pAction = menu.addAction(QIcon(":/icons/about1.png"), - tr("Ab&out..."), this, SLOT(showAboutForm())); - } - menu.addSeparator(); - - pAction = menu.addAction(QIcon(":/icons/quit1.png"), - tr("&Quit"), this, SLOT(quitMainForm())); - - menu.exec(pos); -} - - -// Server settings change warning. -void qjackctlMainForm::showDirtySettingsWarning (void) -{ - // If client service is currently running, - // prompt the effective warning... - if (m_pJackClient) { - QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Server settings will be only effective after\n" - "restarting the JACK audio server."), tr("OK")); - } // Otherwise, it will be just as convenient to update status... - else updateTitleStatus(); -} - - -// Setup otions change warning. -void qjackctlMainForm::showDirtySetupWarning (void) -{ - QMessageBox::information(this, - tr("Information") + " - " QJACKCTL_SUBTITLE1, - tr("Some settings will be only effective\n" - "the next time you start this program."), tr("OK")); -} - - -// Select the current default preset name from context menu. -void qjackctlMainForm::activatePresetsMenu ( QAction *pAction ) -{ - if (m_pConnectionsForm && !m_pConnectionsForm->queryClose()) - return; - - int iPreset = pAction->data().toInt(); - if (iPreset >= 0 && iPreset < m_pSetup->presets.count()) - m_pSetup->sDefPreset = m_pSetup->presets[iPreset]; - else - m_pSetup->sDefPreset = m_pSetup->sDefPresetName; - - showDirtySettingsWarning(); -} - - -// Close main form slot. -void qjackctlMainForm::quitMainForm (void) -{ -#ifdef CONFIG_SYSTEM_TRAY - // Flag that we're quitting explicitly. - m_bQuitForce = true; -#endif - // And then, do the closing dance. - close(); -} - - -// Context menu event handler. -void qjackctlMainForm::contextMenuEvent ( QContextMenuEvent *pEvent ) -{ - // We'll just show up the usual system tray menu. - systemTrayContextMenu(pEvent->globalPos()); -} - - -void qjackctlMainForm::mousePressEvent(QMouseEvent *pMouseEvent) -{ - if (pMouseEvent->button() == Qt::MidButton && - m_ui.StatusDisplayFrame->geometry().contains(pMouseEvent->pos())) { - resetXrunStats(); - } -} - - -// end of qjackctlMainForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.h 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,271 +0,0 @@ -// qjackctlMainForm.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlMainForm_h -#define __qjackctlMainForm_h - -#include "ui_qjackctlMainForm.h" - -#include "qjackctlSetup.h" - -#include -#include - -#include - -#ifdef CONFIG_ALSA_SEQ -#include -#else -typedef void snd_seq_t; -#endif - - -// Forward declarations. -class qjackctlSetup; -class qjackctlMessagesForm; -class qjackctlStatusForm; -class qjackctlConnectionsForm; -class qjackctlPatchbayForm; -class qjackctlPatchbayRack; -class qjackctlSystemTray; -class qjackctlPortItem; - -class QSocketNotifier; - - -//---------------------------------------------------------------------------- -// qjackctlMainForm -- UI wrapper form. - -class qjackctlMainForm : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlMainForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlMainForm(); - - static qjackctlMainForm *getInstance(); - - bool setup(qjackctlSetup * pSetup); - - bool isActivePatchbay(const QString& sPatchbayPath) const; - void updateActivePatchbay(); - void setActivePatchbay(const QString& sPatchbayPath); - void setRecentPatchbays(const QStringList& patchbays); - - void stabilizeForm(); - - void stabilize(int msecs); - - void refreshXrunStats(); - - void refreshJackConnections(); - void refreshAlsaConnections(); - - void refreshPatchbay(); - - void queryDisconnect( - qjackctlPortItem *pOPort, qjackctlPortItem *pIPort, int iSocketType); - -public slots: - - void startJack(); - void stopJack(); - - void readStdout(); - void appendStdoutBuffer(const QString&); - void flushStdoutBuffer(); - - void jackStarted(); - void jackError(QProcess::ProcessError); - void jackFinished(); - void jackCleanup(); - - void stdoutNotifySlot(int); - void alsaNotifySlot(int); - - void timerSlot(); - - void jackConnectChanged(); - void alsaConnectChanged(); - - void cableConnectSlot(const QString&, const QString&, unsigned int); - - void toggleMainForm(); - void toggleMessagesForm(); - void toggleStatusForm(); - void toggleConnectionsForm(); - void togglePatchbayForm(); - - void showSetupForm(); - void showAboutForm(); - - void transportRewind(); - void transportBackward(); - void transportPlay(bool); - void transportStart(); - void transportStop(); - void transportForward(); - - void systemTrayContextMenu(const QPoint&); - void activatePresetsMenu(QAction *); - - void resetXrunStats(); - - void quitMainForm(); - -protected: - - bool queryClose(); - - void closeEvent(QCloseEvent * pCloseEvent); - void customEvent(QEvent *pEvent); - - QString formatExitStatus(int iExitStatus) const; - - void shellExecute(const QString& sShellCommand, - const QString& sStartMessage, const QString& sStopMessage); - - void stopJackServer(); - - QString& detectXrun(QString& s); - void updateXrunStats(float fXrunLast); - - void appendMessages(const QString& s); - void appendMessagesColor(const QString& s, const QString& c); - void appendMessagesText(const QString& s); - void appendMessagesError(const QString& s); - - void updateMessagesFont(); - void updateMessagesLimit(); - void updateConnectionsFont(); - void updateConnectionsIconSize(); - void updateJackClientPortAlias(); - void updateBezierLines(); - void updateDisplayEffect(); - void updateTimeDisplayFonts(); - void updateTimeDisplayToolTips(); - void updateTimeFormat(); - void updateAliases(); - void updateButtons(); - - void updateXrunCount(); - - QString formatTime(float secs) const; - QString formatElapsedTime(int iStatusItem, const QTime& t, bool bElapsed) const; - void updateElapsedTimes(); - - void portNotifyEvent(); - void xrunNotifyEvent(); - void buffNotifyEvent(); - void shutNotifyEvent(); - void exitNotifyEvent(); - - bool startJackClient(bool bDetach); - void stopJackClient(); - - void refreshConnections(); - void refreshStatus(); - - void updateStatusItem(int iStatusItem, const QString& sText); - void updateTitleStatus(); - void updateServerState(int iState); - void updateSystemTray(); - - void showDirtySettingsWarning(); - void showDirtySetupWarning(); - - void contextMenuEvent(QContextMenuEvent *); - void mousePressEvent(QMouseEvent *pMouseEvent); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlMainForm m_ui; - - // Instance variables. - qjackctlSetup *m_pSetup; - - QProcess *m_pJack; - - int m_iServerState; - - jack_client_t *m_pJackClient; - bool m_bJackDetach; - bool m_bJackShutdown; - - snd_seq_t *m_pAlsaSeq; - - int m_iStartDelay; - int m_iTimerDelay; - int m_iTimerRefresh; - int m_iJackRefresh; - int m_iAlsaRefresh; - int m_iJackDirty; - int m_iAlsaDirty; - int m_iStatusBlink; - int m_iStatusRefresh; - int m_iPatchbayRefresh; - - QSocketNotifier *m_pStdoutNotifier; - QSocketNotifier *m_pAlsaNotifier; - - int m_iXrunCallbacks; - int m_iXrunSkips; - int m_iXrunStats; - int m_iXrunCount; - float m_fXrunTotal; - float m_fXrunMax; - float m_fXrunMin; - float m_fXrunLast; - QTime m_tXrunLast; - QTime m_tResetLast; - - qjackctlMessagesForm *m_pMessagesForm; - qjackctlStatusForm *m_pStatusForm; - qjackctlConnectionsForm *m_pConnectionsForm; - qjackctlPatchbayForm *m_pPatchbayForm; - - qjackctlPatchbayRack *m_pPatchbayRack; - - qjackctlSystemTray *m_pSystemTray; - - qjackctlPreset m_preset; - - QString m_sStdoutBuffer; - QString m_sTimeDashes; - QString m_sJackCmdLine; - - bool m_bQuitForce; - float m_fSkipAccel; - - // Kind-of singleton reference. - static qjackctlMainForm *g_pMainForm; -}; - - -#endif // __qjackctlMainForm_h - - -// end of qjackctlMainForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMainForm.ui 2008-05-14 11:50:55.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMainForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,824 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlMainForm - - - - 0 - 0 - 427 - 100 - - - - - 1 - 1 - 0 - 0 - - - - - - - QjackCtl - - - :/icons/qjackctl.png - - - - 4 - - - 4 - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Quit processing and exit - - - &Quit - - - :/icons/quit1.png - - - Alt+Q - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Start the JACK server - - - &Start - - - :/icons/start1.png - - - Alt+S - - - false - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Stop the JACK server - - - S&top - - - :/icons/stop1.png - - - Alt+T - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show/hide the extended status window - - - St&atus - - - :/icons/status1.png - - - - - - true - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show information about this application - - - Ab&out... - - - :/icons/about1.png - - - Alt+B - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show settings and options dialog - - - S&etup... - - - :/icons/setup1.png - - - Alt+E - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show/hide the messages log window - - - &Messages - - - :/icons/messages1.png - - - Alt+M - - - true - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show/hide the patchbay editor window - - - &Patchbay - - - :/icons/patchbay1.png - - - - - - true - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 28 - 28 - - - - - 32767 - 28 - - - - Qt::TabFocus - - - Show/hide the actual connections patchbay window - - - &Connect - - - :/icons/connections1.png - - - Alt+C - - - true - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 7 - 7 - 0 - 0 - - - - - 260 - 80 - - - - true - - - QFrame::Panel - - - QFrame::Sunken - - - - 2 - - - 0 - - - - - - 50 - 0 - - - - - - - JACK server state - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - false - - - 2 - - - - - - - - 20 - 0 - - - - - - - JACK server mode - - - Qt::AlignCenter - - - false - - - - - - - - 40 - 0 - - - - - - - DSP Load - - - Qt::AlignCenter - - - false - - - - - - - - 50 - 0 - - - - - - - Sample rate - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - - 30 - 0 - - - - XRUN Count (notifications) - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - false - - - 2 - - - - - - - - 130 - 0 - - - - - 12 - 75 - true - - - - Time display - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - - 50 - 0 - - - - - - - Transport state - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - false - - - 2 - - - - - - - - 30 - 0 - - - - - - - Transport BPM - - - Qt::AlignCenter - - - false - - - - - - - - 80 - 0 - - - - - 75 - true - - - - Transport time - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - - - - - 28 - 28 - - - - - 48 - 28 - - - - Qt::TabFocus - - - Backward transport - - - &Backward - - - :/icons/backward1.png - - - Alt+B - - - true - - - - - - - - 28 - 28 - - - - - 48 - 28 - - - - Qt::TabFocus - - - Forward transport - - - &Forward - - - :/icons/forward1.png - - - Alt+F - - - true - - - - - - - - 28 - 28 - - - - - 48 - 28 - - - - Qt::TabFocus - - - Rewind transport - - - &Rewind - - - :/icons/rewind1.png - - - Alt+R - - - - - - - - 1 - 1 - 0 - 0 - - - - - 28 - 28 - - - - - 48 - 28 - - - - Qt::TabFocus - - - Stop transport rolling - - - Pa&use - - - :/icons/pause1.png - - - Alt+U - - - - - - - - 28 - 28 - - - - - 48 - 28 - - - - Qt::TabFocus - - - Start transport rolling - - - &Play - - - :/icons/play1.png - - - Alt+P - - - true - - - - - - - - StartToolButton - StopToolButton - QuitToolButton - MessagesToolButton - StatusToolButton - SetupToolButton - ConnectionsToolButton - PatchbayToolButton - RewindToolButton - BackwardToolButton - PlayToolButton - PauseToolButton - ForwardToolButton - AboutToolButton - - - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.cpp 2008-05-14 15:35:59.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,209 +0,0 @@ -// qjackctlMessagesForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlMessagesForm.h" - -#include "qjackctlMainForm.h" - -#include -#include -#include -#include -#include - -#include -#include - - -// The maximum number of message lines. -#define QJACKCTL_MESSAGES_MAXLINES 1000 - - -//---------------------------------------------------------------------------- -// qjackctlMessagesForm -- UI wrapper form. - -// Constructor. -qjackctlMessagesForm::qjackctlMessagesForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QWidget(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - -// m_ui.MessagesTextView->setTextFormat(Qt::LogText); - - // Initialize default message limit. - m_iMessagesLines = 0; - setMessagesLimit(QJACKCTL_MESSAGES_MAXLINES); - - m_pMessagesLog = NULL; -} - - -// Destructor. -qjackctlMessagesForm::~qjackctlMessagesForm (void) -{ - setLogging(false); -} - - -// Notify our parent that we're emerging. -void qjackctlMessagesForm::showEvent ( QShowEvent *pShowEvent ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); - - QWidget::showEvent(pShowEvent); -} - -// Notify our parent that we're closing. -void qjackctlMessagesForm::hideEvent ( QHideEvent *pHideEvent ) -{ - QWidget::hideEvent(pHideEvent); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - -// Just about to notify main-window that we're closing. -void qjackctlMessagesForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) -{ - QWidget::hide(); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - - -// Messages view font accessors. -QFont qjackctlMessagesForm::messagesFont (void) const -{ - return m_ui.MessagesTextView->font(); -} - -void qjackctlMessagesForm::setMessagesFont ( const QFont & font ) -{ - m_ui.MessagesTextView->setFont(font); -} - - -// Messages line limit accessors. -int qjackctlMessagesForm::messagesLimit (void) const -{ - return m_iMessagesLimit; -} - -void qjackctlMessagesForm::setMessagesLimit ( int iMessagesLimit ) -{ - m_iMessagesLimit = iMessagesLimit; - m_iMessagesHigh = iMessagesLimit + (iMessagesLimit / 3); - -// m_ui.MessagesTextView->setMaxLogLines(iMessagesLimit); -} - - -// Messages logging stuff. -bool qjackctlMessagesForm::isLogging (void) const -{ - return (m_pMessagesLog != NULL); -} - -void qjackctlMessagesForm::setLogging ( bool bEnabled, const QString& sFilename ) -{ - if (m_pMessagesLog) { - appendMessages(tr("Logging stopped --- %1 ---") - .arg(QDateTime::currentDateTime().toString())); - m_pMessagesLog->close(); - delete m_pMessagesLog; - m_pMessagesLog = NULL; - } - - if (bEnabled) { - m_pMessagesLog = new QFile(sFilename); - if (m_pMessagesLog->open(QIODevice::Text | QIODevice::Append)) { - appendMessages(tr("Logging started --- %1 ---") - .arg(QDateTime::currentDateTime().toString())); - } else { - delete m_pMessagesLog; - m_pMessagesLog = NULL; - } - } -} - - -// Messages log output method. -void qjackctlMessagesForm::appendMessagesLog ( const QString& s ) -{ - if (m_pMessagesLog) { - QTextStream(m_pMessagesLog) << s << endl; - m_pMessagesLog->flush(); - } -} - -// Messages widget output method. -void qjackctlMessagesForm::appendMessagesLine ( const QString& s ) -{ - // Check for message line limit... - if (m_iMessagesLines > m_iMessagesHigh) { - m_ui.MessagesTextView->setUpdatesEnabled(false); - QTextCursor textCursor(m_ui.MessagesTextView->document()->begin()); - while (m_iMessagesLines > m_iMessagesLimit) { - // Move cursor extending selection - // from start to next line-block... - textCursor.movePosition( - QTextCursor::NextBlock, QTextCursor::KeepAnchor); - m_iMessagesLines--; - } - // Remove the excessive line-blocks... - textCursor.removeSelectedText(); - m_ui.MessagesTextView->setUpdatesEnabled(true); - } - - m_ui.MessagesTextView->append(s); - m_iMessagesLines++; -} - - -void qjackctlMessagesForm::appendMessages ( const QString& s ) -{ - appendMessagesColor(s, "#999999"); -} - -void qjackctlMessagesForm::appendMessagesColor ( const QString& s, const QString& c ) -{ - QString sText = QTime::currentTime().toString("hh:mm:ss.zzz") + ' ' + s; - - appendMessagesLine("" + sText + ""); - appendMessagesLog(sText); -} - -void qjackctlMessagesForm::appendMessagesText ( const QString& s ) -{ - appendMessagesLine(s); - appendMessagesLog(s); -} - - -// end of qjackctlMessagesForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.h 2008-05-14 15:35:59.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,85 +0,0 @@ -// qjackctlMessagesForm.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlMessagesForm_h -#define __qjackctlMessagesForm_h - -#include "ui_qjackctlMessagesForm.h" - -// Forward declarations. -class QFile; - - -//---------------------------------------------------------------------------- -// qjackctlMessagesForm -- UI wrapper form. - -class qjackctlMessagesForm : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlMessagesForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlMessagesForm(); - - QFont messagesFont() const; - void setMessagesFont(const QFont& font); - - int messagesLimit() const; - void setMessagesLimit(int iLimit); - - bool isLogging() const; - void setLogging(bool bEnabled, const QString& sFilename = QString()); - - void appendMessages(const QString& s); - void appendMessagesColor(const QString& s, const QString& c); - void appendMessagesText(const QString& s); - -protected: - - void appendMessagesLine(const QString& s); - void appendMessagesLog(const QString& s); - - void showEvent(QShowEvent *); - void hideEvent(QHideEvent *); - void closeEvent(QCloseEvent *); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlMessagesForm m_ui; - - // Instance variables. - int m_iMessagesLines; - int m_iMessagesLimit; - int m_iMessagesHigh; - - // Logging stuff. - QFile *m_pMessagesLog; -}; - - -#endif // __qjackctlMessagesForm_h - - -// end of qjackctlMessagesForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlMessagesForm.ui 2008-05-14 15:35:59.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlMessagesForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,78 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlMessagesForm - - - - 0 - 0 - 520 - 240 - - - - - 0 - 0 - - - - - - - Messages - JACK Audio Connection Kit - - - :/icons/messages1.png - - - - - - - 320 - 80 - - - - Messages output log - - - QTextEdit::NoWrap - - - true - - - false - - - - - - - - MessagesTextView - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbay.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbay.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbay.cpp 2008-11-26 22:46:50.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbay.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1967 +0,0 @@ -// qjackctlPatchbay.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlPatchbay.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -// Interactivity socket form. -#include "qjackctlSocketForm.h" - -// External patchbay loader. -#include "qjackctlPatchbayFile.h" - - -//---------------------------------------------------------------------- -// class qjackctlPlugItem -- Socket plug list item. -// - -// Constructor. -qjackctlPlugItem::qjackctlPlugItem ( qjackctlSocketItem *pSocket, - const QString& sPlugName, qjackctlPlugItem *pPlugAfter ) - : QTreeWidgetItem(pSocket, pPlugAfter, QJACKCTL_PLUGITEM) -{ - QTreeWidgetItem::setText(0, sPlugName); - - m_pSocket = pSocket; - m_sPlugName = sPlugName; - - m_pSocket->plugs().append(this); - - int iPixmap; - if (pSocket->socketType() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) - iPixmap = QJACKCTL_XPM_AUDIO_PLUG; - else - iPixmap = QJACKCTL_XPM_MIDI_PLUG; - QTreeWidgetItem::setIcon(0, QIcon(pSocket->pixmap(iPixmap))); - - QTreeWidgetItem::setFlags(QTreeWidgetItem::flags() - & ~Qt::ItemIsSelectable); -} - -// Default destructor. -qjackctlPlugItem::~qjackctlPlugItem (void) -{ - int iPlug = m_pSocket->plugs().indexOf(this); - if (iPlug >= 0) - m_pSocket->plugs().removeAt(iPlug); -} - - -// Instance accessors. -const QString& qjackctlPlugItem::socketName (void) const -{ - return m_pSocket->socketName(); -} - -const QString& qjackctlPlugItem::plugName (void) const -{ - return m_sPlugName; -} - - -// Patchbay socket item accessor. -qjackctlSocketItem *qjackctlPlugItem::socket (void) const -{ - return m_pSocket; -} - - -//---------------------------------------------------------------------- -// class qjackctlSocketItem -- Jack client list item. -// - -// Constructor. -qjackctlSocketItem::qjackctlSocketItem ( qjackctlSocketList *pSocketList, - const QString& sSocketName, const QString& sClientName, - int iSocketType, qjackctlSocketItem *pSocketAfter ) - : QTreeWidgetItem(pSocketList->listView(), pSocketAfter, QJACKCTL_SOCKETITEM) -{ - QTreeWidgetItem::setText(0, sSocketName); - - m_pSocketList = pSocketList; - m_sSocketName = sSocketName; - m_sClientName = sClientName; - m_iSocketType = iSocketType; - m_bExclusive = false; - m_sSocketForward.clear(); - - m_pSocketList->sockets().append(this); - - updatePixmap(); -} - -// Default destructor. -qjackctlSocketItem::~qjackctlSocketItem (void) -{ - QListIterator iter(m_connects); - while (iter.hasNext()) - (iter.next())->removeConnect(this); - - m_connects.clear(); - m_plugs.clear(); - - int iSocket = m_pSocketList->sockets().indexOf(this); - if (iSocket >= 0) - m_pSocketList->sockets().removeAt(iSocket); -} - - -// Instance accessors. -const QString& qjackctlSocketItem::socketName (void) const -{ - return m_sSocketName; -} - -const QString& qjackctlSocketItem::clientName (void) const -{ - return m_sClientName; -} - -int qjackctlSocketItem::socketType (void) const -{ - return m_iSocketType; -} - -bool qjackctlSocketItem::isExclusive (void) const -{ - return m_bExclusive; -} - -const QString& qjackctlSocketItem::forward (void) const -{ - return m_sSocketForward; -} - - -void qjackctlSocketItem::setSocketName ( const QString& sSocketName ) -{ - m_sSocketName = sSocketName; -} - -void qjackctlSocketItem::setClientName ( const QString& sClientName ) -{ - m_sClientName = sClientName; -} - -void qjackctlSocketItem::setSocketType ( int iSocketType ) -{ - m_iSocketType = iSocketType; -} - -void qjackctlSocketItem::setExclusive ( bool bExclusive ) -{ - m_bExclusive = bExclusive; -} - -void qjackctlSocketItem::setForward ( const QString& sSocketForward ) -{ - m_sSocketForward = sSocketForward; -} - - -// Socket flags accessor. -bool qjackctlSocketItem::isReadable (void) const -{ - return m_pSocketList->isReadable(); -} - - -// Plug finder. -qjackctlPlugItem *qjackctlSocketItem::findPlug ( const QString& sPlugName ) -{ - QListIterator iter(m_plugs); - while (iter.hasNext()) { - qjackctlPlugItem *pPlug = iter.next(); - if (sPlugName == pPlug->plugName()) - return pPlug; - } - - return NULL; -} - - -// Plug list accessor. -QList& qjackctlSocketItem::plugs (void) -{ - return m_plugs; -} - - -// Connected socket list primitives. -void qjackctlSocketItem::addConnect( qjackctlSocketItem *pSocket ) -{ - m_connects.append(pSocket); -} - -void qjackctlSocketItem::removeConnect( qjackctlSocketItem *pSocket ) -{ - int iSocket = m_connects.indexOf(pSocket); - if (iSocket >= 0) - m_connects.removeAt(iSocket); -} - - - -// Connected socket finder. -qjackctlSocketItem *qjackctlSocketItem::findConnectPtr ( - qjackctlSocketItem *pSocketPtr ) -{ - QListIterator iter(m_connects); - while (iter.hasNext()) { - qjackctlSocketItem *pSocket = iter.next(); - if (pSocketPtr == pSocket) - return pSocket; - } - - return NULL; -} - - -// Connection cache list accessor. -const QList& qjackctlSocketItem::connects (void) const -{ - return m_connects; -} - - -// Plug list cleaner. -void qjackctlSocketItem::clear (void) -{ - qDeleteAll(m_plugs); - m_plugs.clear(); -} - - -// Socket item pixmap peeker. -const QPixmap& qjackctlSocketItem::pixmap ( int iPixmap ) const -{ - return m_pSocketList->pixmap(iPixmap); -} - - -// Update pixmap to its proper context. -void qjackctlSocketItem::updatePixmap (void) -{ - int iPixmap; - if (m_iSocketType == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { - iPixmap = (m_bExclusive - ? QJACKCTL_XPM_AUDIO_SOCKET_X - : QJACKCTL_XPM_AUDIO_SOCKET); - } else { - iPixmap = (m_bExclusive - ? QJACKCTL_XPM_MIDI_SOCKET_X - : QJACKCTL_XPM_MIDI_SOCKET); - } - QTreeWidgetItem::setIcon(0, QIcon(pixmap(iPixmap))); -} - - -// Socket item openness status. -void qjackctlSocketItem::setOpen ( bool bOpen ) -{ -#if QT_VERSION >= 0x040201 - QTreeWidgetItem::setExpanded(bOpen); -#else - QTreeWidgetItem::treeWidget()->setItemExpanded(this, bOpen); -#endif -} - - -bool qjackctlSocketItem::isOpen (void) const -{ -#if QT_VERSION >= 0x040201 - return QTreeWidgetItem::isExpanded(); -#else - return QTreeWidgetItem::treeWidget()->isItemExpanded(this); -#endif -} - - -//---------------------------------------------------------------------- -// qjackctlSocketList -- Jack client list. -// - -// Constructor. -qjackctlSocketList::qjackctlSocketList ( - qjackctlSocketListView *pListView, bool bReadable ) -{ - QPixmap pmXSocket1(":/icons/xsocket1.png"); - - m_pListView = pListView; - m_bReadable = bReadable; - m_pJackClient = NULL; - m_pAlsaSeq = NULL; - - if (bReadable) { - m_sSocketCaption = tr("Output"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET] = new QPixmap(":/icons/asocketo.png"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET], pmXSocket1); - m_apPixmaps[QJACKCTL_XPM_AUDIO_CLIENT] = new QPixmap(":/icons/acliento.png"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_PLUG] = new QPixmap(":/icons/aportlno.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET] = new QPixmap(":/icons/msocketo.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET], pmXSocket1); - m_apPixmaps[QJACKCTL_XPM_MIDI_CLIENT] = new QPixmap(":/icons/mcliento.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_PLUG] = new QPixmap(":/icons/mporto.png"); - } else { - m_sSocketCaption = tr("Input"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET] = new QPixmap(":/icons/asocketi.png"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_AUDIO_SOCKET], pmXSocket1); - m_apPixmaps[QJACKCTL_XPM_AUDIO_CLIENT] = new QPixmap(":/icons/aclienti.png"); - m_apPixmaps[QJACKCTL_XPM_AUDIO_PLUG] = new QPixmap(":/icons/aportlni.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET] = new QPixmap(":/icons/msocketi.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X] = createPixmapMerge(*m_apPixmaps[QJACKCTL_XPM_MIDI_SOCKET], pmXSocket1); - m_apPixmaps[QJACKCTL_XPM_MIDI_CLIENT] = new QPixmap(":/icons/mclienti.png"); - m_apPixmaps[QJACKCTL_XPM_MIDI_PLUG] = new QPixmap(":/icons/mporti.png"); - } - - if (!m_sSocketCaption.isEmpty()) - m_sSocketCaption += ' '; - m_sSocketCaption += tr("Socket"); -} - -// Default destructor. -qjackctlSocketList::~qjackctlSocketList (void) -{ - clear(); - - for (int iPixmap = 0; iPixmap < QJACKCTL_XPM_PIXMAPS; iPixmap++) - delete m_apPixmaps[iPixmap]; -} - - -// Client finder. -qjackctlSocketItem *qjackctlSocketList::findSocket ( - const QString& sSocketName, int iSocketType ) -{ - QListIterator iter(m_sockets); - while (iter.hasNext()) { - qjackctlSocketItem *pSocket = iter.next(); - if (sSocketName == pSocket->socketName() && - iSocketType == pSocket->socketType()) - return pSocket; - } - - return NULL; -} - - -// Socket list accessor. -QList& qjackctlSocketList::sockets (void) -{ - return m_sockets; -} - - -// List view accessor. -qjackctlSocketListView *qjackctlSocketList::listView (void) const -{ - return m_pListView; -} - - -// Socket flags accessor. -bool qjackctlSocketList::isReadable (void) const -{ - return m_bReadable; -} - - -// Socket caption titler. -const QString& qjackctlSocketList::socketCaption (void) const -{ - return m_sSocketCaption; -} - - -// JACK client accessors. -void qjackctlSocketList::setJackClient ( jack_client_t *pJackClient ) -{ - m_pJackClient = pJackClient; -} - -jack_client_t *qjackctlSocketList::jackClient (void) const -{ - return m_pJackClient; -} - - -// ALSA sequencer accessors. -void qjackctlSocketList::setAlsaSeq ( snd_seq_t *pAlsaSeq ) -{ - m_pAlsaSeq = pAlsaSeq; -} - -snd_seq_t *qjackctlSocketList::alsaSeq (void) const -{ - return m_pAlsaSeq; -} - - -// Socket list cleaner. -void qjackctlSocketList::clear (void) -{ - qDeleteAll(m_sockets); - m_sockets.clear(); -} - - -// Socket list pixmap peeker. -const QPixmap& qjackctlSocketList::pixmap ( int iPixmap ) const -{ - return *m_apPixmaps[iPixmap]; -} - - -// Merge two pixmaps with union of respective masks. -QPixmap *qjackctlSocketList::createPixmapMerge ( - const QPixmap& xpmDst, const QPixmap& xpmSrc ) -{ - QPixmap *pXpmMerge = new QPixmap(xpmDst); - if (pXpmMerge) { - QBitmap bmMask = xpmDst.mask(); - QPainter(&bmMask).drawPixmap(0, 0, xpmSrc.mask()); - pXpmMerge->setMask(bmMask); - QPainter(pXpmMerge).drawPixmap(0, 0, xpmSrc); - } - return pXpmMerge; -} - - -// Return currently selected socket item. -qjackctlSocketItem *qjackctlSocketList::selectedSocketItem (void) const -{ - qjackctlSocketItem *pSocketItem = NULL; - - QTreeWidgetItem *pItem = m_pListView->currentItem(); - if (pItem) { - if (pItem->type() == QJACKCTL_PLUGITEM) { - pSocketItem = static_cast (pItem->parent()); - } else { - pSocketItem = static_cast (pItem); - } - } - - return pSocketItem; -} - - -// Add a new socket item, using interactive form. -bool qjackctlSocketList::addSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketForm socketForm(m_pListView); - socketForm.setWindowTitle(tr(" - %1").arg(m_sSocketCaption)); - socketForm.setSocketCaption(m_sSocketCaption); - socketForm.setPixmaps(m_apPixmaps); - socketForm.setSocketList(this); - socketForm.setJackClient(m_pJackClient); - socketForm.setAlsaSeq(m_pAlsaSeq); - qjackctlPatchbaySocket socket(m_sSocketCaption - + ' ' + QString::number(m_sockets.count() + 1), - QString::null, QJACKCTL_SOCKETTYPE_JACK_AUDIO); - socketForm.load(&socket); - if (socketForm.exec()) { - socketForm.save(&socket); - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - // m_pListView->setUpdatesEnabled(false); - if (pSocketItem) -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(false); -#else - m_pListView->setItemSelected(pSocketItem, false); -#endif - pSocketItem = new qjackctlSocketItem(this, socket.name(), - socket.clientName(), socket.type(), pSocketItem); - if (pSocketItem) { - pSocketItem->setExclusive(socket.isExclusive()); - pSocketItem->setForward(socket.forward()); - qjackctlPlugItem *pPlugItem = NULL; - QStringListIterator iter(socket.pluglist()); - while (iter.hasNext()) { - pPlugItem = new qjackctlPlugItem( - pSocketItem, iter.next(), pPlugItem); - } - bResult = true; - } -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(true); -#else - m_pListView->setItemSelected(pSocketItem, true); -#endif - m_pListView->setCurrentItem(pSocketItem); - // m_pListView->setUpdatesEnabled(true); - // m_pListView->update(); - m_pListView->setDirty(true); - } - - return bResult; -} - - -// Remove (delete) currently selected socket item. -bool qjackctlSocketList::removeSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - if (QMessageBox::warning(m_pListView, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("%1 about to be removed:\n\n" - "\"%2\"\n\nAre you sure?") - .arg(m_sSocketCaption) - .arg(pSocketItem->socketName()), - tr("Yes"), tr("No")) == 0) { - delete pSocketItem; - bResult = true; - m_pListView->setDirty(true); - } - } - - return bResult; -} - - -// View or change the properties of currently selected socket item. -bool qjackctlSocketList::editSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - qjackctlSocketForm socketForm(m_pListView); - socketForm.setWindowTitle(pSocketItem->socketName() - + " - " + m_sSocketCaption); - socketForm.setSocketCaption(m_sSocketCaption); - socketForm.setPixmaps(m_apPixmaps); - socketForm.setSocketList(this); - socketForm.setJackClient(m_pJackClient); - socketForm.setAlsaSeq(m_pAlsaSeq); - qjackctlPatchbaySocket socket(pSocketItem->socketName(), - pSocketItem->clientName(), pSocketItem->socketType()); - socket.setExclusive(pSocketItem->isExclusive()); - socket.setForward(pSocketItem->forward()); - QListIterator iter(pSocketItem->plugs()); - while (iter.hasNext()) - socket.pluglist().append((iter.next())->plugName()); - socketForm.load(&socket); - socketForm.setConnectCount(pSocketItem->connects().count()); - if (socketForm.exec()) { - socketForm.save(&socket); - // m_pListView->setUpdatesEnabled(false); - pSocketItem->clear(); - pSocketItem->setText(0, socket.name()); - pSocketItem->setSocketName(socket.name()); - pSocketItem->setClientName(socket.clientName()); - pSocketItem->setSocketType(socket.type()); - pSocketItem->setExclusive(socket.isExclusive()); - pSocketItem->setForward(socket.forward()); - pSocketItem->updatePixmap(); - qjackctlPlugItem *pPlugItem = NULL; - QStringListIterator iter(socket.pluglist()); - while (iter.hasNext()) { - pPlugItem = new qjackctlPlugItem( - pSocketItem, iter.next(), pPlugItem); - } -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(true); -#else - m_pListView->setItemSelected(pSocketItem, true); -#endif - m_pListView->setCurrentItem(pSocketItem); - // m_pListView->setUpdatesEnabled(true); - // m_pListView->triggerUpdate(); - m_pListView->setDirty(true); - bResult = true; - } - } - - return bResult; -} - - -// Duplicate and change the properties of currently selected socket item. -bool qjackctlSocketList::copySocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - qjackctlSocketForm socketForm(m_pListView); - // Find a new distinguishable socket name, please. - QString sSocketName; - QString sSkel = pSocketItem->socketName(); - sSkel.remove(QRegExp("[0-9]+$")).append("%1"); - int iSocketType = pSocketItem->socketType(); - int iSocketNo = 1; - do { sSocketName = sSkel.arg(++iSocketNo); } - while (findSocket(sSocketName, iSocketType)); - // Show up as a new socket... - socketForm.setWindowTitle(tr("%1 - %2") - .arg(pSocketItem->socketName()).arg(m_sSocketCaption)); - socketForm.setSocketCaption(m_sSocketCaption); - socketForm.setPixmaps(m_apPixmaps); - socketForm.setSocketList(this); - socketForm.setJackClient(m_pJackClient); - socketForm.setAlsaSeq(m_pAlsaSeq); - qjackctlPatchbaySocket socket(sSocketName, - pSocketItem->clientName(), iSocketType); - if (pSocketItem->isExclusive()) - socket.setExclusive(true); - QListIterator iter(pSocketItem->plugs()); - while (iter.hasNext()) - socket.pluglist().append((iter.next())->plugName()); - socketForm.load(&socket); - if (socketForm.exec()) { - socketForm.save(&socket); - pSocketItem = new qjackctlSocketItem(this, socket.name(), - socket.clientName(), socket.type(), pSocketItem); - if (pSocketItem) { - pSocketItem->setExclusive(socket.isExclusive()); - pSocketItem->setForward(socket.forward()); - qjackctlPlugItem *pPlugItem = NULL; - QStringListIterator iter(socket.pluglist()); - while (iter.hasNext()) { - pPlugItem = new qjackctlPlugItem( - pSocketItem, iter.next(), pPlugItem); - } - bResult = true; - } -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(true); -#else - m_pListView->setItemSelected(pSocketItem, true); -#endif - m_pListView->setCurrentItem(pSocketItem); - // m_pListView->setUpdatesEnabled(true); - // m_pListView->triggerUpdate(); - m_pListView->setDirty(true); - } - } - - return bResult; -} - - -// Toggle exclusive currently selected socket item. -bool qjackctlSocketList::exclusiveSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - pSocketItem->setExclusive(!pSocketItem->isExclusive()); - pSocketItem->updatePixmap(); - bResult = true; - m_pListView->setDirty(true); - } - - return bResult; -} - - -// Move current selected socket item up one position. -bool qjackctlSocketList::moveUpSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - int iItem = m_pListView->indexOfTopLevelItem(pSocketItem); - if (iItem > 0) { - QTreeWidgetItem *pItem = m_pListView->takeTopLevelItem(iItem); - if (pItem) { - m_pListView->insertTopLevelItem(iItem - 1, pItem); -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(true); -#else - m_pListView->setItemSelected(pSocketItem, true); -#endif - m_pListView->setCurrentItem(pSocketItem); - // m_pListView->setUpdatesEnabled(true); - // m_pListView->update(); - m_pListView->setDirty(true); - bResult = true; - } - } - } - - return bResult; -} - - -// Move current selected socket item down one position. -bool qjackctlSocketList::moveDownSocketItem (void) -{ - bool bResult = false; - - qjackctlSocketItem *pSocketItem = selectedSocketItem(); - if (pSocketItem) { - int iItem = m_pListView->indexOfTopLevelItem(pSocketItem); - int iItemCount = m_pListView->topLevelItemCount(); - if (iItem < iItemCount - 1) { - QTreeWidgetItem *pItem = m_pListView->takeTopLevelItem(iItem); - if (pItem) { - m_pListView->insertTopLevelItem(iItem + 1, pItem); -#if QT_VERSION >= 0x040200 - pSocketItem->setSelected(true); -#else - m_pListView->setItemSelected(pSocketItem, true); -#endif - m_pListView->setCurrentItem(pSocketItem); - // m_pListView->setUpdatesEnabled(true); - // m_pListView->update(); - m_pListView->setDirty(true); - bResult = true; - } - } - } - - return bResult; -} - - -//---------------------------------------------------------------------------- -// qjackctlSocketListView -- Socket list view, supporting drag-n-drop. - -// Constructor. -qjackctlSocketListView::qjackctlSocketListView ( - qjackctlPatchbayView *pPatchbayView, bool bReadable ) - : QTreeWidget(pPatchbayView) -{ - m_pPatchbayView = pPatchbayView; - m_bReadable = bReadable; - - m_pAutoOpenTimer = 0; - m_iAutoOpenTimeout = 0; - - m_pDragItem = NULL; - m_pDropItem = NULL; - - QHeaderView *pHeader = QTreeWidget::header(); -// pHeader->setResizeMode(QHeaderView::Custom); -// pHeader->setDefaultAlignment(Qt::AlignLeft); -// pHeader->setDefaultSectionSize(120); - pHeader->setMovable(false); -// pHeader->setClickable(true); -// pHeader->setSortIndicatorShown(true); - pHeader->setStretchLastSection(true); - - QTreeWidget::setRootIsDecorated(true); - QTreeWidget::setUniformRowHeights(true); -// QTreeWidget::setDragEnabled(true); - QTreeWidget::setAcceptDrops(true); - QTreeWidget::setDropIndicatorShown(true); - QTreeWidget::setAutoScroll(true); - QTreeWidget::setSelectionMode(QAbstractItemView::SingleSelection); - QTreeWidget::setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - QTreeWidget::setSortingEnabled(false); - QTreeWidget::setMinimumWidth(120); - QTreeWidget::setColumnCount(1); - - // Trap for help/tool-tips events. - QTreeWidget::viewport()->installEventFilter(this); - - QString sText; - if (m_bReadable) - sText = tr("Output Sockets / Plugs"); - else - sText = tr("Input Sockets / Plugs"); - QTreeWidget::headerItem()->setText(0, sText); - QTreeWidget::setToolTip(sText); - - setAutoOpenTimeout(800); -} - -// Default destructor. -qjackctlSocketListView::~qjackctlSocketListView (void) -{ - setAutoOpenTimeout(0); -} - - -// Patchbay view dirty flag accessors. -void qjackctlSocketListView::setDirty ( bool bDirty ) -{ - m_pPatchbayView->setDirty(bDirty); -} - -bool qjackctlSocketListView::dirty (void) const -{ - return m_pPatchbayView->dirty(); -} - - -// Auto-open timeout method. -void qjackctlSocketListView::setAutoOpenTimeout ( int iAutoOpenTimeout ) -{ - m_iAutoOpenTimeout = iAutoOpenTimeout; - - if (m_pAutoOpenTimer) - delete m_pAutoOpenTimer; - m_pAutoOpenTimer = NULL; - - if (m_iAutoOpenTimeout > 0) { - m_pAutoOpenTimer = new QTimer(this); - QObject::connect(m_pAutoOpenTimer, - SIGNAL(timeout()), - SLOT(timeoutSlot())); - } -} - - -// Auto-open timeout accessor. -int qjackctlSocketListView::autoOpenTimeout (void) const -{ - return m_iAutoOpenTimeout; -} - - -// Auto-open timer slot. -void qjackctlSocketListView::timeoutSlot (void) -{ - if (m_pAutoOpenTimer) { - m_pAutoOpenTimer->stop(); - if (m_pDropItem && m_pDropItem->type() == QJACKCTL_SOCKETITEM) { - qjackctlSocketItem *pSocketItem - = static_cast (m_pDropItem); - if (pSocketItem && !pSocketItem->isOpen()) - pSocketItem->setOpen(true); - } - } -} - - -// Trap for help/tool-tip events. -bool qjackctlSocketListView::eventFilter ( QObject *pObject, QEvent *pEvent ) -{ - QWidget *pViewport = QTreeWidget::viewport(); - if (static_cast (pObject) == pViewport - && pEvent->type() == QEvent::ToolTip) { - QHelpEvent *pHelpEvent = static_cast (pEvent); - if (pHelpEvent) { - QTreeWidgetItem *pItem = QTreeWidget::itemAt(pHelpEvent->pos()); - if (pItem && pItem->type() == QJACKCTL_SOCKETITEM) { - qjackctlSocketItem *pSocketItem - = static_cast (pItem); - if (pSocketItem) { - QToolTip::showText(pHelpEvent->globalPos(), - pSocketItem->clientName(), pViewport); - return true; - } - } - else - if (pItem && pItem->type() == QJACKCTL_PLUGITEM) { - qjackctlPlugItem *pPlugItem - = static_cast (pItem); - if (pPlugItem) { - QToolTip::showText(pHelpEvent->globalPos(), - pPlugItem->plugName(), pViewport); - return true; - } - } - } - } - - // Not handled here. - return QTreeWidget::eventFilter(pObject, pEvent); -} - - -// Drag-n-drop stuff. -QTreeWidgetItem *qjackctlSocketListView::dragDropItem ( const QPoint& pos ) -{ - QTreeWidgetItem *pItem = QTreeWidget::itemAt(pos); - if (pItem) { - if (m_pDropItem != pItem) { - QTreeWidget::setCurrentItem(pItem); - m_pDropItem = pItem; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->start(m_iAutoOpenTimeout); - qjackctlPatchbay *pPatchbay = m_pPatchbayView->binding(); - if ((pItem->flags() & Qt::ItemIsDropEnabled) == 0 - || pPatchbay == NULL || !pPatchbay->canConnectSelected()) - pItem = NULL; - } - } else { - m_pDropItem = NULL; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->stop(); - } - - return pItem; -} - -void qjackctlSocketListView::dragEnterEvent ( QDragEnterEvent *pDragEnterEvent ) -{ - if (pDragEnterEvent->source() != this && - pDragEnterEvent->mimeData()->hasText() && - dragDropItem(pDragEnterEvent->pos())) { - pDragEnterEvent->accept(); - } else { - pDragEnterEvent->ignore(); - } -} - - -void qjackctlSocketListView::dragMoveEvent ( QDragMoveEvent *pDragMoveEvent ) -{ - if (pDragMoveEvent->source() != this && - pDragMoveEvent->mimeData()->hasText() && - dragDropItem(pDragMoveEvent->pos())) { - pDragMoveEvent->accept(); - } else { - pDragMoveEvent->ignore(); - } -} - - -void qjackctlSocketListView::dragLeaveEvent ( QDragLeaveEvent * ) -{ - m_pDropItem = 0; - if (m_pAutoOpenTimer) - m_pAutoOpenTimer->stop(); -} - - -void qjackctlSocketListView::dropEvent ( QDropEvent *pDropEvent ) -{ - if (pDropEvent->source() != this && - pDropEvent->mimeData()->hasText() && - dragDropItem(pDropEvent->pos())) { - const QString sText = pDropEvent->mimeData()->text(); - qjackctlPatchbay *pPatchbay = m_pPatchbayView->binding(); - if (!sText.isEmpty() && pPatchbay) - pPatchbay->connectSelected(); - } - - dragLeaveEvent(NULL); -} - - -// Handle mouse events for drag-and-drop stuff. -void qjackctlSocketListView::mousePressEvent ( QMouseEvent *pMouseEvent ) -{ - QTreeWidget::mousePressEvent(pMouseEvent); - - if (pMouseEvent->button() == Qt::LeftButton) { - m_posDrag = pMouseEvent->pos(); - m_pDragItem = QTreeWidget::itemAt(m_posDrag); - } -} - - -void qjackctlSocketListView::mouseMoveEvent ( QMouseEvent *pMouseEvent ) -{ - QTreeWidget::mouseMoveEvent(pMouseEvent); - - if ((pMouseEvent->buttons() & Qt::LeftButton) && m_pDragItem - && ((pMouseEvent->pos() - m_posDrag).manhattanLength() - >= QApplication::startDragDistance())) { - // We'll start dragging something alright... - QMimeData *pMimeData = new QMimeData(); - pMimeData->setText(m_pDragItem->text(0)); - QDrag *pDrag = new QDrag(this); - pDrag->setMimeData(pMimeData); - pDrag->setPixmap(m_pDragItem->icon(0).pixmap(16)); - pDrag->setHotSpot(QPoint(-4, -12)); - pDrag->start(Qt::LinkAction); - // We've dragged and maybe dropped it by now... - m_pDragItem = NULL; - } -} - - -// Context menu request event handler. -void qjackctlSocketListView::contextMenuEvent ( - QContextMenuEvent *pContextMenuEvent ) -{ - m_pPatchbayView->contextMenu( - pContextMenuEvent->globalPos(), - (m_bReadable - ? m_pPatchbayView->OSocketList() - : m_pPatchbayView->ISocketList()) - ); -} - - -//---------------------------------------------------------------------- -// qjackctlPatchworkView -- Socket connector widget. -// - -// Constructor. -qjackctlPatchworkView::qjackctlPatchworkView ( - qjackctlPatchbayView *pPatchbayView ) - : QWidget(pPatchbayView) -{ - m_pPatchbayView = pPatchbayView; - - QWidget::setMinimumWidth(20); -// QWidget::setMaximumWidth(120); - QWidget::setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); -} - -// Default destructor. -qjackctlPatchworkView::~qjackctlPatchworkView (void) -{ -} - - -// Legal socket item position helper. -int qjackctlPatchworkView::itemY ( QTreeWidgetItem *pItem ) const -{ - QRect rect; - QTreeWidget *pList = pItem->treeWidget(); - QTreeWidgetItem *pParent = pItem->parent(); - qjackctlSocketItem *pSocketItem = NULL; - if (pParent && pParent->type() == QJACKCTL_SOCKETITEM) - pSocketItem = static_cast (pParent); - if (pSocketItem && !pSocketItem->isOpen()) { - rect = pList->visualItemRect(pParent); - } else { - rect = pList->visualItemRect(pItem); - } - return rect.top() + rect.height() / 2; -} - - -// Draw visible socket connection relation lines -void qjackctlPatchworkView::drawConnectionLine ( QPainter *pPainter, - int x1, int y1, int x2, int y2, int h1, int h2 ) -{ - // Account for list view headers. - y1 += h1; - y2 += h2; - - // Invisible output plugs don't get a connecting dot. - if (y1 > h1) - pPainter->drawLine(x1, y1, x1 + 4, y1); - - // How do we'll draw it? - if (m_pPatchbayView->isBezierLines()) { - // Setup control points - QPolygon spline(4); - int cp = int(float(x2 - x1 - 8) * 0.4f); - spline.putPoints(0, 4, - x1 + 4, y1, x1 + 4 + cp, y1, - x2 - 4 - cp, y2, x2 - 4, y2); - // The connection line, it self. - QPainterPath path; - path.moveTo(spline.at(0)); - path.cubicTo(spline.at(1), spline.at(2), spline.at(3)); - pPainter->strokePath(path, pPainter->pen()); - } // Old style... - else pPainter->drawLine(x1 + 4, y1, x2 - 4, y2); - - // Invisible input plugs don't get a connecting dot. - if (y2 > h2) - pPainter->drawLine(x2 - 4, y2, x2, y2); -} - - -// Draw socket forwrading line (for input sockets / right pane only) -void qjackctlPatchworkView::drawForwardLine ( QPainter *pPainter, - int x, int dx, int y1, int y2, int h ) -{ - // Account for list view headers. - y1 += h; - y2 += h; - dx += 4; - - // Draw it... - if (y1 < y2) { - pPainter->drawLine(x - dx, y1 + 4, x, y1); - pPainter->drawLine(x - dx, y1 + 4, x - dx, y2 - 4); - pPainter->drawLine(x - dx, y2 - 4, x, y2); - // Down arrow... - pPainter->drawLine(x - dx, y2 - 8, x - dx - 2, y2 - 12); - pPainter->drawLine(x - dx, y2 - 8, x - dx + 2, y2 - 12); - } else { - pPainter->drawLine(x - dx, y1 - 4, x, y1); - pPainter->drawLine(x - dx, y1 - 4, x - dx, y2 + 4); - pPainter->drawLine(x - dx, y2 + 4, x, y2); - // Up arrow... - pPainter->drawLine(x - dx, y2 + 8, x - dx - 2, y2 + 12); - pPainter->drawLine(x - dx, y2 + 8, x - dx + 2, y2 + 12); - } -} - - -// Draw visible socket connection relation arrows. -void qjackctlPatchworkView::paintEvent ( QPaintEvent * ) -{ - if (m_pPatchbayView->OSocketList() == NULL || - m_pPatchbayView->ISocketList() == NULL) - return; - - QPainter painter(this); - int x1, y1, h1; - int x2, y2, h2; - int i, rgb[3] = { 0x99, 0x66, 0x33 }; - - // Inline adaptive to darker background themes... - if (QWidget::palette().window().color().value() < 0x7f) - for (i = 0; i < 3; ++i) rgb[i] += 0x33; - - // Initialize color changer. - i = 0; - // Almost constants. - x1 = 0; - x2 = width(); - h1 = ((m_pPatchbayView->OListView())->header())->sizeHint().height(); - h2 = ((m_pPatchbayView->IListView())->header())->sizeHint().height(); - // For each client item... - qjackctlSocketItem *pOSocket, *pISocket; - QListIterator osocket( - (m_pPatchbayView->OSocketList())->sockets()); - while (osocket.hasNext()) { - pOSocket = osocket.next(); - // Set new connector color. - ++i; - painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); - // Get starting connector arrow coordinates. - y1 = itemY(pOSocket); - // Get input socket connections... - QListIterator isocket(pOSocket->connects()); - while (isocket.hasNext()) { - pISocket = isocket.next(); - // Obviously, there is a connection from pOPlug to pIPlug items: - y2 = itemY(pISocket); - drawConnectionLine(&painter, x1, y1, x2, y2, h1, h2); - } - } - - // Look for forwarded inputs... - QList iforwards; - // Make a local copy of just the forwarding socket list, if any... - QListIterator isocket( - (m_pPatchbayView->ISocketList())->sockets()); - while (isocket.hasNext()) { - pISocket = isocket.next(); - // Check if its forwarded... - if (pISocket->forward().isEmpty()) - continue; - iforwards.append(pISocket); - } - // (Re)initialize color changer. - i = 0; - // Now traverse those for proper connection drawing... - int dx = 0; - QListIterator iter(iforwards); - while (iter.hasNext()) { - pISocket = iter.next(); - qjackctlSocketItem *pISocketForward - = m_pPatchbayView->ISocketList()->findSocket( - pISocket->forward(), pISocket->socketType()); - if (pISocketForward == NULL) - continue; - // Set new connector color. - ++i; - painter.setPen(QColor(rgb[i % 3], rgb[(i / 3) % 3], rgb[(i / 9) % 3])); - // Get starting connector arrow coordinates. - y1 = itemY(pISocketForward); - y2 = itemY(pISocket); - drawForwardLine(&painter, x2, dx, y1, y2, h2); - dx += 2; - } -} - - -// Context menu request event handler. -void qjackctlPatchworkView::contextMenuEvent ( - QContextMenuEvent *pContextMenuEvent ) -{ - m_pPatchbayView->contextMenu(pContextMenuEvent->globalPos(), NULL); -} - - -// Widget event slots... - -void qjackctlPatchworkView::contentsChanged (void) -{ - QWidget::update(); -} - - -//---------------------------------------------------------------------------- -// qjackctlPatchbayView -- Integrated patchbay widget. - -// Constructor. -qjackctlPatchbayView::qjackctlPatchbayView ( QWidget *pParent ) - : QSplitter(Qt::Horizontal, pParent) -{ - m_pOListView = new qjackctlSocketListView(this, true); - m_pPatchworkView = new qjackctlPatchworkView(this); - m_pIListView = new qjackctlSocketListView(this, false); - - m_pPatchbay = NULL; - - m_bBezierLines = false; - - QObject::connect(m_pOListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), - m_pPatchworkView, SLOT(contentsChanged())); - QObject::connect(m_pOListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), - m_pPatchworkView, SLOT(contentsChanged())); - QObject::connect(m_pOListView->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pPatchworkView, SLOT(contentsChanged())); -// QObject::connect(m_pOListView->header(), SIGNAL(sectionClicked(int)), -// m_pPatchworkView, SLOT(contentsChanged())); - - QObject::connect(m_pIListView, SIGNAL(itemExpanded(QTreeWidgetItem *)), - m_pPatchworkView, SLOT(contentsChanged())); - QObject::connect(m_pIListView, SIGNAL(itemCollapsed(QTreeWidgetItem *)), - m_pPatchworkView, SLOT(contentsChanged())); - QObject::connect(m_pIListView->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pPatchworkView, SLOT(contentsChanged())); -// QObject::connect(m_pIListView->header(), SIGNAL(sectionClicked(int)), -// m_pPatchworkView, SLOT(contentsChanged())); - - m_bDirty = false; -} - - -// Default destructor. -qjackctlPatchbayView::~qjackctlPatchbayView (void) -{ -} - - -// Common context menu slot. -void qjackctlPatchbayView::contextMenu ( const QPoint& pos, - qjackctlSocketList *pSocketList ) -{ - qjackctlPatchbay *pPatchbay = binding(); - if (pPatchbay == NULL) - return; - - QMenu menu(this); - QAction *pAction; - - if (pSocketList) { - qjackctlSocketItem *pSocketItem = pSocketList->selectedSocketItem(); - bool bEnabled = (pSocketItem != NULL); - pAction = menu.addAction(QIcon(":/icons/add1.png"), - tr("Add..."), pSocketList, SLOT(addSocketItem())); - pAction = menu.addAction(QIcon(":/icons/edit1.png"), - tr("Edit..."), pSocketList, SLOT(editSocketItem())); - pAction->setEnabled(bEnabled); - pAction = menu.addAction(QIcon(":/icons/copy1.png"), - tr("Copy..."), pSocketList, SLOT(copySocketItem())); - pAction->setEnabled(bEnabled); - pAction = menu.addAction(QIcon(":/icons/remove1.png"), - tr("Remove"), pSocketList, SLOT(removeSocketItem())); - pAction->setEnabled(bEnabled); - menu.addSeparator(); - pAction = menu.addAction( - tr("Exclusive"), pSocketList, SLOT(exclusiveSocketItem())); - pAction->setCheckable(true); - pAction->setChecked(bEnabled && pSocketItem->isExclusive()); - pAction->setEnabled(bEnabled /* && (pSocketItem->connects().count() < 2) */); - // Construct the forwarding menu, - // overriding the last one, if any... - QMenu *pForwardMenu = menu.addMenu(tr("Forward")); - // Assume sockets iteration follows item index order (0,1,2...) - // and remember that we only do this for input sockets... - int iIndex = 0; - if (pSocketItem && pSocketList == ISocketList()) { - QListIterator isocket(ISocketList()->sockets()); - while (isocket.hasNext()) { - qjackctlSocketItem *pISocket = isocket.next(); - // Must be of same type of target one... - int iSocketType = pISocket->socketType(); - if (iSocketType != pSocketItem->socketType()) - continue; - const QString& sSocketName = pISocket->socketName(); - if (pSocketItem->socketName() == sSocketName) - continue; - int iPixmap = 0; - switch (iSocketType) { - case QJACKCTL_SOCKETTYPE_JACK_AUDIO: - iPixmap = (pISocket->isExclusive() - ? QJACKCTL_XPM_AUDIO_SOCKET_X - : QJACKCTL_XPM_AUDIO_SOCKET); - break; - case QJACKCTL_SOCKETTYPE_JACK_MIDI: - case QJACKCTL_SOCKETTYPE_ALSA_MIDI: - iPixmap = (pISocket->isExclusive() - ? QJACKCTL_XPM_MIDI_SOCKET_X - : QJACKCTL_XPM_MIDI_SOCKET); - break; - } - pAction = pForwardMenu->addAction( - QIcon(ISocketList()->pixmap(iPixmap)), sSocketName); - pAction->setChecked(pSocketItem->forward() == sSocketName); - pAction->setData(iIndex); - iIndex++; - } - // Null forward always present, - // and has invalid index parameter (-1)... - if (iIndex > 0) - pForwardMenu->addSeparator(); - pAction = pForwardMenu->addAction(tr("(None)")); - pAction->setCheckable(true); - pAction->setChecked(pSocketItem->forward().isEmpty()); - pAction->setData(-1); - // We have something here... - QObject::connect(pForwardMenu, - SIGNAL(triggered(QAction*)), - SLOT(activateForwardMenu(QAction*))); - } - pForwardMenu->setEnabled(iIndex > 0); - menu.addSeparator(); - int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); - int iItemCount = (pSocketList->listView())->topLevelItemCount(); - pAction = menu.addAction(QIcon(":/icons/up1.png"), - tr("Move Up"), pSocketList, SLOT(moveUpSocketItem())); - pAction->setEnabled(bEnabled && iItem > 0); - pAction = menu.addAction(QIcon(":/icons/down1.png"), - tr("Move Down"), pSocketList, SLOT(moveDownSocketItem())); - pAction->setEnabled(bEnabled && iItem < iItemCount - 1); - menu.addSeparator(); - } - - pAction = menu.addAction(QIcon(":/icons/connect1.png"), - tr("&Connect"), pPatchbay, SLOT(connectSelected()), - tr("Alt+C", "Connect")); - pAction->setEnabled(pPatchbay->canConnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnect1.png"), - tr("&Disconnect"), pPatchbay, SLOT(disconnectSelected()), - tr("Alt+D", "Disconnect")); - pAction->setEnabled(pPatchbay->canDisconnectSelected()); - pAction = menu.addAction(QIcon(":/icons/disconnectall1.png"), - tr("Disconnect &All"), pPatchbay, SLOT(disconnectAll()), - tr("Alt+A", "Disconect All")); - pAction->setEnabled(pPatchbay->canDisconnectAll()); - - menu.addSeparator(); - pAction = menu.addAction(QIcon(":/icons/refresh1.png"), - tr("&Refresh"), pPatchbay, SLOT(refresh()), - tr("Alt+R", "Refresh")); - - menu.exec(pos); -} - - -// Select the forwarding socket name from context menu. -void qjackctlPatchbayView::activateForwardMenu ( QAction *pAction ) -{ - int iIndex = pAction->data().toInt(); - - // Get currently input socket (assume its nicely selected) - qjackctlSocketItem *pSocketItem = ISocketList()->selectedSocketItem(); - if (pSocketItem) { - // Check first for forward from nil... - if (iIndex < 0) { - pSocketItem->setForward(QString::null); - setDirty(true); - return; - } - // Hopefully, its a real socket about to be forwraded... - QListIterator isocket(ISocketList()->sockets()); - while (isocket.hasNext()) { - qjackctlSocketItem *pISocket = isocket.next(); - // Must be of same type of target one... - if (pISocket->socketType() != pSocketItem->socketType()) - continue; - const QString& sSocketName = pISocket->socketName(); - if (pSocketItem->socketName() == sSocketName) - continue; - if (iIndex == 0) { - pSocketItem->setForward(sSocketName); - setDirty(true); - break; - } - iIndex--; - } - } -} - - -// Patchbay binding methods. -void qjackctlPatchbayView::setBinding ( qjackctlPatchbay *pPatchbay ) -{ - m_pPatchbay = pPatchbay; -} - -qjackctlPatchbay *qjackctlPatchbayView::binding (void) const -{ - return m_pPatchbay; -} - - -// Patchbay client list accessors. -qjackctlSocketList *qjackctlPatchbayView::OSocketList (void) const -{ - if (m_pPatchbay) - return m_pPatchbay->OSocketList(); - else - return NULL; -} - -qjackctlSocketList *qjackctlPatchbayView::ISocketList (void) const -{ - if (m_pPatchbay) - return m_pPatchbay->ISocketList(); - else - return NULL; -} - - -// Patchwork line style accessors. -void qjackctlPatchbayView::setBezierLines ( bool bBezierLines ) -{ - m_bBezierLines = bBezierLines; -} - -bool qjackctlPatchbayView::isBezierLines (void) const -{ - return m_bBezierLines; -} - - -// Dirty flag methods. -void qjackctlPatchbayView::setDirty ( bool bDirty ) -{ - m_bDirty = bDirty; - if (bDirty) - emit contentsChanged(); -} - -bool qjackctlPatchbayView::dirty (void) const -{ - return m_bDirty; -} - - -//---------------------------------------------------------------------- -// qjackctlPatchbay -- Output-to-Input client/plugs connection object. -// - -// Constructor. -qjackctlPatchbay::qjackctlPatchbay ( qjackctlPatchbayView *pPatchbayView ) -{ - m_pPatchbayView = pPatchbayView; - - m_pOSocketList = new qjackctlSocketList(m_pPatchbayView->OListView(), true); - m_pISocketList = new qjackctlSocketList(m_pPatchbayView->IListView(), false); - - m_pPatchbayView->setBinding(this); -} - -// Default destructor. -qjackctlPatchbay::~qjackctlPatchbay (void) -{ - m_pPatchbayView->setBinding(NULL); - - delete m_pOSocketList; - m_pOSocketList = NULL; - - delete m_pISocketList; - m_pISocketList = NULL; - - (m_pPatchbayView->PatchworkView())->update(); -} - - -// Connection primitive. -void qjackctlPatchbay::connectSockets ( qjackctlSocketItem *pOSocket, - qjackctlSocketItem *pISocket ) -{ - if (pOSocket->findConnectPtr(pISocket) == NULL) { - pOSocket->addConnect(pISocket); - pISocket->addConnect(pOSocket); - } -} - -// Disconnection primitive. -void qjackctlPatchbay::disconnectSockets ( qjackctlSocketItem *pOSocket, - qjackctlSocketItem *pISocket ) -{ - if (pOSocket->findConnectPtr(pISocket) != NULL) { - pOSocket->removeConnect(pISocket); - pISocket->removeConnect(pOSocket); - } -} - - -// Test if selected plugs are connectable. -bool qjackctlPatchbay::canConnectSelected (void) -{ - QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - qjackctlSocketItem *pOSocket = NULL; - switch (pOItem->type()) { - case QJACKCTL_SOCKETITEM: - pOSocket = static_cast (pOItem); - break; - case QJACKCTL_PLUGITEM: - pOSocket = (static_cast (pOItem))->socket(); - break; - default: - return false; - } - - qjackctlSocketItem *pISocket = NULL; - switch (pIItem->type()) { - case QJACKCTL_SOCKETITEM: - pISocket = static_cast (pIItem); - break; - case QJACKCTL_PLUGITEM: - pISocket = (static_cast (pIItem))->socket(); - break; - default: - return false; - } - - // Sockets must be of the same type... - if (pOSocket->socketType() != pISocket->socketType()) - return false; - - // Exclusive sockets may not accept more than one cable. - if (pOSocket->isExclusive() && pOSocket->connects().count() > 0) - return false; - if (pISocket->isExclusive() && pISocket->connects().count() > 0) - return false; - - // One-to-one connection... - return (pOSocket->findConnectPtr(pISocket) == NULL); -} - - -// Connect current selected plugs. -bool qjackctlPatchbay::connectSelected (void) -{ - QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - qjackctlSocketItem *pOSocket = NULL; - switch (pOItem->type()) { - case QJACKCTL_SOCKETITEM: - pOSocket = static_cast (pOItem); - break; - case QJACKCTL_PLUGITEM: - pOSocket = (static_cast (pOItem))->socket(); - break; - default: - return false; - } - - qjackctlSocketItem *pISocket = NULL; - switch (pIItem->type()) { - case QJACKCTL_SOCKETITEM: - pISocket = static_cast (pIItem); - break; - case QJACKCTL_PLUGITEM: - pISocket = (static_cast (pIItem))->socket(); - break; - default: - return false; - } - - // Sockets must be of the same type... - if (pOSocket->socketType() != pISocket->socketType()) - return false; - - // Exclusive sockets may not accept more than one cable. - if (pOSocket->isExclusive() && pOSocket->connects().count() > 0) - return false; - if (pISocket->isExclusive() && pISocket->connects().count() > 0) - return false; - - // One-to-one connection... - connectSockets(pOSocket, pISocket); - - // Making one list dirty will take care of the rest... - (m_pOSocketList->listView())->setDirty(true); - - return true; -} - - -// Test if selected plugs are disconnectable. -bool qjackctlPatchbay::canDisconnectSelected (void) -{ - QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); - if (pOItem == NULL) - return false; - - QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); - if (pIItem == NULL) - return false; - - qjackctlSocketItem *pOSocket = NULL; - switch (pOItem->type()) { - case QJACKCTL_SOCKETITEM: - pOSocket = static_cast (pOItem); - break; - case QJACKCTL_PLUGITEM: - pOSocket = (static_cast (pOItem))->socket(); - break; - default: - return false; - } - - qjackctlSocketItem *pISocket = NULL; - switch (pIItem->type()) { - case QJACKCTL_SOCKETITEM: - pISocket = static_cast (pIItem); - break; - case QJACKCTL_PLUGITEM: - pISocket = (static_cast (pIItem))->socket(); - break; - default: - return false; - } - - // Sockets must be of the same type... - if (pOSocket->socketType() != pISocket->socketType()) - return false; - - return (pOSocket->findConnectPtr(pISocket) != 0); -} - - -// Disconnect current selected plugs. -bool qjackctlPatchbay::disconnectSelected (void) -{ - QTreeWidgetItem *pOItem = (m_pOSocketList->listView())->currentItem(); - if (!pOItem) - return false; - - QTreeWidgetItem *pIItem = (m_pISocketList->listView())->currentItem(); - if (!pIItem) - return false; - - qjackctlSocketItem *pOSocket = NULL; - switch (pOItem->type()) { - case QJACKCTL_SOCKETITEM: - pOSocket = static_cast (pOItem); - break; - case QJACKCTL_PLUGITEM: - pOSocket = (static_cast (pOItem))->socket(); - break; - default: - return false; - } - - qjackctlSocketItem *pISocket = NULL; - switch (pIItem->type()) { - case QJACKCTL_SOCKETITEM: - pISocket = static_cast (pIItem); - break; - case QJACKCTL_PLUGITEM: - pISocket = (static_cast (pIItem))->socket(); - break; - default: - return false; - } - - // Sockets must be of the same type... - if (pOSocket->socketType() != pISocket->socketType()) - return false; - - // One-to-one disconnection... - disconnectSockets(pOSocket, pISocket); - - // Making one list dirty will take care of the rest... - (m_pOSocketList->listView())->setDirty(true); - - return true; -} - - -// Test if any plug is disconnectable. -bool qjackctlPatchbay::canDisconnectAll (void) -{ - QListIterator osocket(m_pOSocketList->sockets()); - while (osocket.hasNext()) { - qjackctlSocketItem *pOSocket = osocket.next(); - if (pOSocket->connects().count() > 0) - return true; - } - - return false; -} - - -// Disconnect all plugs. -bool qjackctlPatchbay::disconnectAll (void) -{ - if (QMessageBox::warning(m_pPatchbayView, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("This will disconnect all sockets.\n\n" - "Are you sure?"), - tr("Yes"), tr("No")) > 0) { - return false; - } - - QListIterator osocket(m_pOSocketList->sockets()); - while (osocket.hasNext()) { - qjackctlSocketItem *pOSocket = osocket.next(); - QListIterator isocket(pOSocket->connects()); - while (isocket.hasNext()) - disconnectSockets(pOSocket, isocket.next()); - } - - // Making one list dirty will take care of the rest... - (m_pOSocketList->listView())->setDirty(true); - - return true; -} - - - -// Complete contents rebuilder. -void qjackctlPatchbay::refresh (void) -{ - (m_pOSocketList->listView())->update(); - (m_pISocketList->listView())->update(); - (m_pPatchbayView->PatchworkView())->update(); -} - - -// Complete contents clearer. -void qjackctlPatchbay::clear (void) -{ - // Clear socket lists. - m_pOSocketList->clear(); - m_pISocketList->clear(); - - // Reset dirty flag. - m_pPatchbayView->setDirty(false); - - // May refresh everything. - refresh(); -} - - -// Patchbay client list accessors. -qjackctlSocketList *qjackctlPatchbay::OSocketList (void) const -{ - return m_pOSocketList; -} - -qjackctlSocketList *qjackctlPatchbay::ISocketList (void) const -{ - return m_pISocketList; -} - - -// External rack transfer method: copy patchbay structure from master rack model. -void qjackctlPatchbay::loadRackSockets ( qjackctlSocketList *pSocketList, - QList& socketlist ) -{ - pSocketList->clear(); - qjackctlSocketItem *pSocketItem = NULL; - - QListIterator sockit(socketlist); - while (sockit.hasNext()) { - qjackctlPatchbaySocket *pSocket = sockit.next(); - pSocketItem = new qjackctlSocketItem(pSocketList, pSocket->name(), - pSocket->clientName(), pSocket->type(), pSocketItem); - if (pSocketItem) { - pSocketItem->setExclusive(pSocket->isExclusive()); - pSocketItem->setForward(pSocket->forward()); - pSocketItem->updatePixmap(); - qjackctlPlugItem *pPlugItem = NULL; - QStringListIterator iter(pSocket->pluglist()); - while (iter.hasNext()) { - pPlugItem = new qjackctlPlugItem( - pSocketItem, iter.next(), pPlugItem); - } - } - } -} - -void qjackctlPatchbay::loadRack ( qjackctlPatchbayRack *pPatchbayRack ) -{ - (m_pOSocketList->listView())->setUpdatesEnabled(false); - (m_pISocketList->listView())->setUpdatesEnabled(false); - - // Load ouput sockets. - loadRackSockets(m_pOSocketList, pPatchbayRack->osocketlist()); - - // Load input sockets. - loadRackSockets(m_pISocketList, pPatchbayRack->isocketlist()); - - // Now ready to load from cable model. - QListIterator iter(pPatchbayRack->cablelist()); - while (iter.hasNext()) { - qjackctlPatchbayCable *pCable = iter.next(); - // Get proper sockets... - qjackctlPatchbaySocket *pOSocket = pCable->outputSocket(); - qjackctlPatchbaySocket *pISocket = pCable->inputSocket(); - if (pOSocket && pISocket) { - qjackctlSocketItem *pOSocketItem - = m_pOSocketList->findSocket(pOSocket->name(), pOSocket->type()); - qjackctlSocketItem *pISocketItem - = m_pISocketList->findSocket(pISocket->name(), pISocket->type()); - if (pOSocketItem && pISocketItem) - connectSockets(pOSocketItem, pISocketItem); - } - } - - (m_pOSocketList->listView())->setUpdatesEnabled(true); - (m_pISocketList->listView())->setUpdatesEnabled(true); - - (m_pOSocketList->listView())->update(); - (m_pISocketList->listView())->update(); - (m_pPatchbayView->PatchworkView())->update(); - - // Reset dirty flag. - m_pPatchbayView->setDirty(false); -} - -// External rack transfer method: copy patchbay structure into master rack model. -void qjackctlPatchbay::saveRackSockets ( qjackctlSocketList *pSocketList, - QList& socketlist ) -{ - // Have QTreeWidget item order into account: - qjackctlSocketListView *pListView = pSocketList->listView(); - if (pListView == NULL) - return; - - socketlist.clear(); - - int iItemCount = pListView->topLevelItemCount(); - for (int iItem = 0; iItem < iItemCount; ++iItem) { - QTreeWidgetItem *pItem = pListView->topLevelItem(iItem); - if (pItem->type() != QJACKCTL_SOCKETITEM) - continue; - qjackctlSocketItem *pSocketItem - = static_cast (pItem); - if (pSocketItem == NULL) - continue; - qjackctlPatchbaySocket *pSocket - = new qjackctlPatchbaySocket(pSocketItem->socketName(), - pSocketItem->clientName(), pSocketItem->socketType()); - if (pSocket) { - pSocket->setExclusive(pSocketItem->isExclusive()); - pSocket->setForward(pSocketItem->forward()); - QListIterator iter(pSocketItem->plugs()); - while (iter.hasNext()) - pSocket->pluglist().append((iter.next())->plugName()); - socketlist.append(pSocket); - } - } -} - -void qjackctlPatchbay::saveRack ( qjackctlPatchbayRack *pPatchbayRack ) -{ - // Save ouput sockets. - saveRackSockets(m_pOSocketList, pPatchbayRack->osocketlist()); - - // Save input sockets. - saveRackSockets(m_pISocketList, pPatchbayRack->isocketlist()); - - // Now ready to save into cable model. - pPatchbayRack->cablelist().clear(); - - // Start from output sockets... - QListIterator osocket(m_pOSocketList->sockets()); - while (osocket.hasNext()) { - qjackctlSocketItem *pOSocketItem = osocket.next(); - // Then to input sockets... - QListIterator isocket(pOSocketItem->connects()); - while (isocket.hasNext()) { - qjackctlSocketItem *pISocketItem = isocket.next(); - // Now find proper racked sockets... - qjackctlPatchbaySocket *pOSocket = pPatchbayRack->findSocket( - pPatchbayRack->osocketlist(), pOSocketItem->socketName()); - qjackctlPatchbaySocket *pISocket = pPatchbayRack->findSocket( - pPatchbayRack->isocketlist(), pISocketItem->socketName()); - if (pOSocket && pISocket) { - pPatchbayRack->addCable( - new qjackctlPatchbayCable(pOSocket, pISocket)); - } - } - } - - // Reset dirty flag. - m_pPatchbayView->setDirty(false); -} - - -// JACK client property accessors. -void qjackctlPatchbay::setJackClient ( jack_client_t *pJackClient ) -{ - m_pOSocketList->setJackClient(pJackClient); - m_pISocketList->setJackClient(pJackClient); -} - -jack_client_t *qjackctlPatchbay::jackClient (void) const -{ - return m_pOSocketList->jackClient(); -} - -// ALSA sequencer property accessors. -void qjackctlPatchbay::setAlsaSeq ( snd_seq_t *pAlsaSeq ) -{ - m_pOSocketList->setAlsaSeq(pAlsaSeq); - m_pISocketList->setAlsaSeq(pAlsaSeq); -} - -snd_seq_t *qjackctlPatchbay::alsaSeq (void) const -{ - return m_pOSocketList->alsaSeq(); -} - - -// Connections snapshot. -void qjackctlPatchbay::connectionsSnapshot (void) -{ - qjackctlPatchbayRack rack; - rack.connectJackSnapshot(jackClient()); - rack.connectAlsaSnapshot(alsaSeq()); - loadRack(&rack); -} - - -// end of qjackctlPatchbay.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.cpp 2008-04-27 17:42:17.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,292 +0,0 @@ -// qjackctlPatchbayFile.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlPatchbayFile.h" - -#include -#include -#include - - -//---------------------------------------------------------------------- -// Specific patchbay socket list save (write) subroutine. -static void load_socketlist ( QList& socketlist, - QDomElement& eSockets ) -{ - for (QDomNode nSocket = eSockets.firstChild(); - !nSocket.isNull(); - nSocket = nSocket.nextSibling()) { - // Convert slot node to element... - QDomElement eSocket = nSocket.toElement(); - if (eSocket.isNull()) - continue; - if (eSocket.tagName() == "socket") { - QString sSocketName = eSocket.attribute("name"); - QString sClientName = eSocket.attribute("client"); - QString sSocketType = eSocket.attribute("type"); - QString sExclusive = eSocket.attribute("exclusive"); - QString sSocketForward = eSocket.attribute("forward"); - int iSocketType = QJACKCTL_SOCKETTYPE_JACK_AUDIO; - if (sSocketType == "midi" || sSocketType == "alsa-midi") - iSocketType = QJACKCTL_SOCKETTYPE_ALSA_MIDI; - else - if (sSocketType == "jack-midi") - iSocketType = QJACKCTL_SOCKETTYPE_JACK_MIDI; - bool bExclusive = (sExclusive == "on" || sExclusive == "yes" || sExclusive == "1"); - qjackctlPatchbaySocket *pSocket - = new qjackctlPatchbaySocket(sSocketName, sClientName, iSocketType); - if (pSocket) { - pSocket->setExclusive(bExclusive); - pSocket->setForward(sSocketForward); - // Now's time to handle pluglist... - for (QDomNode nPlug = eSocket.firstChild(); - !nPlug.isNull(); - nPlug = nPlug.nextSibling()) { - // Convert plug node to element... - QDomElement ePlug = nPlug.toElement(); - if (ePlug.isNull()) - continue; - if (ePlug.tagName() == "plug") - pSocket->addPlug(ePlug.text()); - } - socketlist.append(pSocket); - } - } - } -} - - -//---------------------------------------------------------------------- -// Specific patchbay socket list save (write) subroutine. -static void save_socketlist ( QList& socketlist, - QDomElement& eSockets, QDomDocument& doc ) -{ - QListIterator sockit(socketlist); - while (sockit.hasNext()) { - qjackctlPatchbaySocket *pSocket = sockit.next(); - QDomElement eSocket = doc.createElement("socket"); - eSocket.setAttribute("name", pSocket->name()); - eSocket.setAttribute("client", pSocket->clientName()); - QString sSocketType = "audio"; // FIXME: "jack-audio" - if (pSocket->type() == QJACKCTL_SOCKETTYPE_ALSA_MIDI) - sSocketType = "midi"; // FIXME: "alsa-midi" - else - if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) - sSocketType = "jack-midi"; - eSocket.setAttribute("type", sSocketType); - eSocket.setAttribute("exclusive", (pSocket->isExclusive() ? "on" : "off")); - if (!pSocket->forward().isEmpty()) - eSocket.setAttribute("forward", pSocket->forward()); - QDomElement ePlug; - QStringListIterator iter(pSocket->pluglist()); - while (iter.hasNext()) { - const QString& sPlug = iter.next(); - QDomElement ePlug = doc.createElement("plug"); - QDomText text = doc.createTextNode(sPlug); - ePlug.appendChild(text); - eSocket.appendChild(ePlug); - } - eSockets.appendChild(eSocket); - } -} - - -//---------------------------------------------------------------------- -// class qjackctlPatchbayFile -- Patchbay file helper implementation. -// - -// Specific patchbay load (read) method. -bool qjackctlPatchbayFile::load ( qjackctlPatchbayRack *pPatchbay, - const QString& sFilename ) -{ - // Open file... - QFile file(sFilename); - if (!file.open(QIODevice::ReadOnly)) - return false; - // Parse it a-la-DOM :-) - QDomDocument doc("patchbay"); - if (!doc.setContent(&file)) { - file.close(); - return false; - } - file.close(); - - // Now e're better reset any old patchbay settings. - pPatchbay->clear(); - - // Get root element. - QDomElement eDoc = doc.documentElement(); - - // Now parse for slots, sockets and cables... - for (QDomNode nRoot = eDoc.firstChild(); - !nRoot.isNull(); - nRoot = nRoot.nextSibling()) { - - // Convert node to element, if any. - QDomElement eRoot = nRoot.toElement(); - if (eRoot.isNull()) - continue; - - // Check for output-socket spec lists... - if (eRoot.tagName() == "output-sockets") - load_socketlist(pPatchbay->osocketlist(), eRoot); - else - // Check for input-socket spec lists... - if (eRoot.tagName() == "input-sockets") - load_socketlist(pPatchbay->isocketlist(), eRoot); - else - // Check for slots spec list... - if (eRoot.tagName() == "slots") { - for (QDomNode nSlot = eRoot.firstChild(); - !nSlot.isNull(); - nSlot = nSlot.nextSibling()) { - // Convert slot node to element... - QDomElement eSlot = nSlot.toElement(); - if (eSlot.isNull()) - continue; - if (eSlot.tagName() == "slot") { - QString sSlotName = eSlot.attribute("name"); - QString sSlotMode = eSlot.attribute("mode"); - int iSlotMode = QJACKCTL_SLOTMODE_OPEN; - if (sSlotMode == "half") - iSlotMode = QJACKCTL_SLOTMODE_HALF; - else if (sSlotMode == "full") - iSlotMode = QJACKCTL_SLOTMODE_FULL; - qjackctlPatchbaySlot *pSlot - = new qjackctlPatchbaySlot(sSlotName, iSlotMode); - pSlot->setOutputSocket( - pPatchbay->findSocket(pPatchbay->osocketlist(), - eSlot.attribute("output"))); - pSlot->setInputSocket( - pPatchbay->findSocket(pPatchbay->isocketlist(), - eSlot.attribute("input"))); - pPatchbay->addSlot(pSlot); - } - } - } - else - // Check for cable spec list... - if (eRoot.tagName() == "cables") { - for (QDomNode nCable = eRoot.firstChild(); - !nCable.isNull(); - nCable = nCable.nextSibling()) { - // Convert cable node to element... - QDomElement eCable = nCable.toElement(); - if (eCable.isNull()) - continue; - if (eCable.tagName() == "cable") { - qjackctlPatchbaySocket *pOutputSocket - = pPatchbay->findSocket(pPatchbay->osocketlist(), - eCable.attribute("output")); - qjackctlPatchbaySocket *pIntputSocket - = pPatchbay->findSocket(pPatchbay->isocketlist(), - eCable.attribute("input")); - if (pOutputSocket && pIntputSocket) { - pPatchbay->addCable( - new qjackctlPatchbayCable( - pOutputSocket, - pIntputSocket)); - } - } - } - } - } - - return true; -} - - -// Specific patchbay save (write) method. -bool qjackctlPatchbayFile::save ( qjackctlPatchbayRack *pPatchbay, - const QString& sFilename ) -{ - QFileInfo fi(sFilename); - - QDomDocument doc("patchbay"); - QDomElement eRoot = doc.createElement("patchbay"); - eRoot.setAttribute("name", fi.baseName()); - eRoot.setAttribute("version", QJACKCTL_VERSION); - doc.appendChild(eRoot); - - // Save output-sockets spec... - QDomElement eOutputSockets = doc.createElement("output-sockets"); - save_socketlist(pPatchbay->osocketlist(), eOutputSockets, doc); - eRoot.appendChild(eOutputSockets); - - // Save input-sockets spec... - QDomElement eInputSockets = doc.createElement("input-sockets"); - save_socketlist(pPatchbay->isocketlist(), eInputSockets, doc); - eRoot.appendChild(eInputSockets); - - // Save slots spec... - QDomElement eSlots = doc.createElement("slots"); - QListIterator slotit(pPatchbay->slotlist()); - while (slotit.hasNext()) { - qjackctlPatchbaySlot *pSlot = slotit.next(); - QDomElement eSlot = doc.createElement("slot"); - eSlot.setAttribute("name", pSlot->name()); - QString sSlotMode = "open"; - switch (pSlot->mode()) { - case QJACKCTL_SLOTMODE_HALF: - sSlotMode = "half"; - break; - case QJACKCTL_SLOTMODE_FULL: - sSlotMode = "full"; - break; - } - eSlot.setAttribute("mode", sSlotMode); - if (pSlot->outputSocket()) - eSlot.setAttribute("output", pSlot->outputSocket()->name()); - if (pSlot->inputSocket()) - eSlot.setAttribute("input", pSlot->inputSocket()->name()); - // Add this slot... - eSlots.appendChild(eSlot); - } - eRoot.appendChild(eSlots); - - // Save cables spec... - QDomElement eCables = doc.createElement("cables"); - QListIterator cablit(pPatchbay->cablelist()); - while (cablit.hasNext()) { - qjackctlPatchbayCable *pCable = cablit.next(); - if (pCable->outputSocket() && pCable->inputSocket()) { - QDomElement eCable = doc.createElement("cable"); - eCable.setAttribute("output", pCable->outputSocket()->name()); - eCable.setAttribute("input", pCable->inputSocket()->name()); - eCables.appendChild(eCable); - } - } - eRoot.appendChild(eCables); - - // Finally, we're ready to save to external file. - QFile file(sFilename); - if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) - return false; - QTextStream ts(&file); - ts << doc.toString() << endl; - file.close(); - - return true; -} - - -// qjackctlPatchbayFile.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.h 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,43 +0,0 @@ -// qjackctlPatchbayFile.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlPatchbayFile_h -#define __qjackctlPatchbayFile_h - -#include "qjackctlPatchbayRack.h" - - -// Patchbay XML definition. -class qjackctlPatchbayFile -{ -public: - - // Simple patchbay I/O methods. - static bool load (qjackctlPatchbayRack *pPatchbay, - const QString& sFilename); - static bool save (qjackctlPatchbayRack *pPatchbay, - const QString& sFilename); -}; - - -#endif // __qjackctlPatchbayFile_h - -// qjackctlPatchbayFile.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.txt qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.txt --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayFile.txt 2008-04-27 17:42:17.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayFile.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -qjackctlPatchbayFile format specification ------------------------------------------ - - - - - - plug-name - . - . - . - - . - . - . - - - - plug-name - . - . - . - - . - . - . - -# -# -# . -# . -# . -# - - - . - . - . - - - - - patchbay-name := string-literal - patchbay-version := string-literal - socket-name := string-literal - socket-type := "audio" | "midi" | "jack-audio" | "jack-midi" | "alsa-midi" -# slot-name := string-literal -# slot-mode := "open" | "half" | "full" - client-name := string-regexp (JACK/ALSA client name) - plug-name := string-regexp (JACK/ALSA port name) - exclusive-flag := "on" | "off" | "yes" | "no" | "1" | "0" - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.cpp 2008-11-26 19:42:14.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,717 +0,0 @@ -// qjackctlPatchbayForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlPatchbayForm.h" - -#include "qjackctlPatchbayFile.h" -#include "qjackctlSetup.h" - -#include "qjackctlMainForm.h" -#include "qjackctlSocketForm.h" - -#include -#include -#include -#include - -#include -#include - - -//---------------------------------------------------------------------------- -// qjackctlPatchbayForm -- UI wrapper form. - -// Constructor. -qjackctlPatchbayForm::qjackctlPatchbayForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QWidget(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - m_pSetup = NULL; - - // Create the patchbay view object. - m_pPatchbay = new qjackctlPatchbay(m_ui.PatchbayView); - m_iUntitled = 0; - - m_bActivePatchbay = false; - - m_iUpdate = 0; - - // UI connections... - - QObject::connect(m_ui.NewPatchbayPushButton, - SIGNAL(clicked()), - SLOT(newPatchbay())); - QObject::connect(m_ui.LoadPatchbayPushButton, - SIGNAL(clicked()), - SLOT(loadPatchbay())); - QObject::connect(m_ui.SavePatchbayPushButton, - SIGNAL(clicked()), - SLOT(savePatchbay())); - QObject::connect(m_ui.PatchbayComboBox, - SIGNAL(activated(int)), - SLOT(selectPatchbay(int))); - QObject::connect(m_ui.ActivatePatchbayPushButton, - SIGNAL(clicked()), - SLOT(toggleActivePatchbay())); - - QObject::connect(m_ui.OSocketAddPushButton, - SIGNAL(clicked()), - SLOT(addOSocket())); - QObject::connect(m_ui.OSocketEditPushButton, - SIGNAL(clicked()), - SLOT(editOSocket())); - QObject::connect(m_ui.OSocketCopyPushButton, - SIGNAL(clicked()), - SLOT(copyOSocket())); - QObject::connect(m_ui.OSocketRemovePushButton, - SIGNAL(clicked()), - SLOT(removeOSocket())); - QObject::connect(m_ui.OSocketMoveUpPushButton, - SIGNAL(clicked()), - SLOT(moveUpOSocket())); - QObject::connect(m_ui.OSocketMoveDownPushButton, - SIGNAL(clicked()), - SLOT(moveDownOSocket())); - - QObject::connect(m_ui.ISocketAddPushButton, - SIGNAL(clicked()), - SLOT(addISocket())); - QObject::connect(m_ui.ISocketEditPushButton, - SIGNAL(clicked()), - SLOT(editISocket())); - QObject::connect(m_ui.ISocketCopyPushButton, - SIGNAL(clicked()), - SLOT(copyISocket())); - QObject::connect(m_ui.ISocketRemovePushButton, - SIGNAL(clicked()), - SLOT(removeISocket())); - QObject::connect(m_ui.ISocketMoveUpPushButton, - SIGNAL(clicked()), - SLOT(moveUpISocket())); - QObject::connect(m_ui.ISocketMoveDownPushButton, - SIGNAL(clicked()), - SLOT(moveDownISocket())); - - QObject::connect(m_ui.ConnectPushButton, - SIGNAL(clicked()), - SLOT(connectSelected())); - QObject::connect(m_ui.DisconnectPushButton, - SIGNAL(clicked()), - SLOT(disconnectSelected())); - QObject::connect(m_ui.DisconnectAllPushButton, - SIGNAL(clicked()), - SLOT(disconnectAll())); - - QObject::connect(m_ui.RefreshPushButton, - SIGNAL(clicked()), - SLOT(refreshForm())); - - // Connect it to some UI feedback slot. - QObject::connect(m_ui.PatchbayView->OListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(stabilizeForm())); - QObject::connect(m_ui.PatchbayView->IListView(), - SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), - SLOT(stabilizeForm())); - - // Dirty patchbay dispatcher (stabilization deferral). - QObject::connect(m_ui.PatchbayView, - SIGNAL(contentsChanged()), - SLOT(contentsChanged())); - - newPatchbayFile(false); - stabilizeForm(); -} - - -// Destructor. -qjackctlPatchbayForm::~qjackctlPatchbayForm (void) -{ - // May delete the patchbay view object. - delete m_pPatchbay; -} - - -// Notify our parent that we're emerging. -void qjackctlPatchbayForm::showEvent ( QShowEvent *pShowEvent ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); - - stabilizeForm(); - - QWidget::showEvent(pShowEvent); -} - -// Notify our parent that we're closing. -void qjackctlPatchbayForm::hideEvent ( QHideEvent *pHideEvent ) -{ - QWidget::hideEvent(pHideEvent); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - -// Just about to notify main-window that we're closing. -void qjackctlPatchbayForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) -{ - QWidget::hide(); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - - -// Set reference to global options, mostly needed for the -// initial sizes of the main splitter views... -void qjackctlPatchbayForm::setup ( qjackctlSetup *pSetup ) -{ - m_pSetup = pSetup; - - // Load main splitter sizes... - if (m_pSetup) { - QList sizes; - sizes.append(180); - sizes.append(60); - sizes.append(180); - m_pSetup->loadSplitterSizes(m_ui.PatchbayView, sizes); - } -} - - -// Patchbay view accessor. -qjackctlPatchbayView *qjackctlPatchbayForm::patchbayView (void) const -{ - return m_ui.PatchbayView; -} - - -// Window close event handlers. -bool qjackctlPatchbayForm::queryClose (void) -{ - bool bQueryClose = true; - - if (m_ui.PatchbayView->dirty()) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("The patchbay definition has been changed:\n\n" - "\"%1\"\n\nDo you want to save the changes?") - .arg(m_sPatchbayName), - tr("Save"), tr("Discard"), tr("Cancel"))) { - case 0: // Save... - savePatchbay(); - // Fall thru.... - case 1: // Discard - break; - default: // Cancel. - bQueryClose = false; - } - } - - // Save main splitter sizes... - if (m_pSetup && bQueryClose) - m_pSetup->saveSplitterSizes(m_ui.PatchbayView); - - return bQueryClose; -} - - -// Contents change deferrer slot... -void qjackctlPatchbayForm::contentsChanged (void) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->refreshPatchbay(); -} - - -// Refresh complete form. -void qjackctlPatchbayForm::refreshForm ( void ) -{ - m_pPatchbay->refresh(); - stabilizeForm(); -} - - -// A helper stabilization slot. -void qjackctlPatchbayForm::stabilizeForm ( void ) -{ - m_ui.SavePatchbayPushButton->setEnabled(m_ui.PatchbayView->dirty()); - m_ui.ActivatePatchbayPushButton->setEnabled( - QFileInfo(m_sPatchbayPath).exists()); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - m_bActivePatchbay = (pMainForm - && pMainForm->isActivePatchbay(m_sPatchbayPath)); - m_ui.ActivatePatchbayPushButton->setChecked(m_bActivePatchbay); - - if (m_ui.PatchbayView->dirty()) { - m_ui.PatchbayComboBox->setItemText( - m_ui.PatchbayComboBox->currentIndex(), - tr("%1 [modified]").arg(m_sPatchbayName)); - } - - // Take care that IT might be destroyed already... - if (m_ui.PatchbayView->binding() == NULL) - return; - - qjackctlSocketList *pSocketList; - qjackctlSocketItem *pSocketItem; - - pSocketList = m_pPatchbay->OSocketList(); - pSocketItem = pSocketList->selectedSocketItem(); - if (pSocketItem) { - int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); - int iItemCount = (pSocketList->listView())->topLevelItemCount(); - m_ui.OSocketEditPushButton->setEnabled(true); - m_ui.OSocketCopyPushButton->setEnabled(true); - m_ui.OSocketRemovePushButton->setEnabled(true); - m_ui.OSocketMoveUpPushButton->setEnabled(iItem > 0); - m_ui.OSocketMoveDownPushButton->setEnabled(iItem < iItemCount - 1); - } else { - m_ui.OSocketEditPushButton->setEnabled(false); - m_ui.OSocketCopyPushButton->setEnabled(false); - m_ui.OSocketRemovePushButton->setEnabled(false); - m_ui.OSocketMoveUpPushButton->setEnabled(false); - m_ui.OSocketMoveDownPushButton->setEnabled(false); - } - - pSocketList = m_pPatchbay->ISocketList(); - pSocketItem = pSocketList->selectedSocketItem(); - if (pSocketItem) { - int iItem = (pSocketList->listView())->indexOfTopLevelItem(pSocketItem); - int iItemCount = (pSocketList->listView())->topLevelItemCount(); - m_ui.ISocketEditPushButton->setEnabled(true); - m_ui.ISocketCopyPushButton->setEnabled(true); - m_ui.ISocketRemovePushButton->setEnabled(true); - m_ui.ISocketMoveUpPushButton->setEnabled(iItem > 0); - m_ui.ISocketMoveDownPushButton->setEnabled(iItem < iItemCount - 1); - } else { - m_ui.ISocketEditPushButton->setEnabled(false); - m_ui.ISocketCopyPushButton->setEnabled(false); - m_ui.ISocketRemovePushButton->setEnabled(false); - m_ui.ISocketMoveUpPushButton->setEnabled(false); - m_ui.ISocketMoveDownPushButton->setEnabled(false); - } - - m_ui.ConnectPushButton->setEnabled( - m_pPatchbay->canConnectSelected()); - m_ui.DisconnectPushButton->setEnabled( - m_pPatchbay->canDisconnectSelected()); - m_ui.DisconnectAllPushButton->setEnabled( - m_pPatchbay->canDisconnectAll()); -} - - -// Patchbay path accessor. -const QString& qjackctlPatchbayForm::patchbayPath (void) const -{ - return m_sPatchbayPath; -} - - -// Reset patchbay definition from scratch. -void qjackctlPatchbayForm::newPatchbayFile ( bool bSnapshot ) -{ - m_pPatchbay->clear(); - m_sPatchbayPath.clear(); - m_sPatchbayName = tr("Untitled%1").arg(m_iUntitled++); - if (bSnapshot) - m_pPatchbay->connectionsSnapshot(); -// updateRecentPatchbays(); -} - - -// Load patchbay definitions from specific file path. -bool qjackctlPatchbayForm::loadPatchbayFile ( const QString& sFileName ) -{ - // Check if we're going to discard safely the current one... - if (!queryClose()) - return false; - - // We'll have a temporary rack... - qjackctlPatchbayRack rack; - // Step 1: load from file... - if (!qjackctlPatchbayFile::load(&rack, sFileName)) { - QMessageBox::critical(this, - tr("Error") + " - " QJACKCTL_SUBTITLE1, - tr("Could not load patchbay definition file: \n\n\"%1\"") - .arg(sFileName), - tr("Cancel")); - // Reset/disable further trials. - m_sPatchbayPath.clear(); - return false; - } - // Step 2: load from rack... - m_pPatchbay->loadRack(&rack); - - // Step 3: stabilize form... - m_sPatchbayPath = sFileName; - m_sPatchbayName = QFileInfo(sFileName).baseName(); -// updateRecentPatchbays(); - - return true; -} - - -// Save current patchbay definition to specific file path. -bool qjackctlPatchbayForm::savePatchbayFile ( const QString& sFileName ) -{ - // We'll have a temporary rack... - qjackctlPatchbayRack rack; - // Step 1: save to rack... - m_pPatchbay->saveRack(&rack); - // Step 2: save to file... - if (!qjackctlPatchbayFile::save(&rack, sFileName)) { - QMessageBox::critical(this, - tr("Error") + " - " QJACKCTL_SUBTITLE1, - tr("Could not save patchbay definition file: \n\n\"%1\"") - .arg(sFileName), - tr("Cancel")); - return false; - } - // Step 3: stabilize form... - m_sPatchbayPath = sFileName; - m_sPatchbayName = QFileInfo(sFileName).baseName(); -// updateRecentPatchbays(); - - // Step 4: notify main form if applicable ... - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - m_bActivePatchbay = (pMainForm - && pMainForm->isActivePatchbay(m_sPatchbayPath)); - if (m_bActivePatchbay) - pMainForm->updateActivePatchbay(); - - return true; -} - - -// Dirty-(re)load patchbay definitions from know rack. -void qjackctlPatchbayForm::loadPatchbayRack ( qjackctlPatchbayRack *pRack ) -{ - // Step 1: load from rack... - m_pPatchbay->loadRack(pRack); - - // Override dirty flag. - m_ui.PatchbayView->setDirty(true); - - // Done. - stabilizeForm(); -} - - -// Create a new patchbay definition from scratch. -void qjackctlPatchbayForm::newPatchbay (void) -{ - // Assume a snapshot from scratch... - bool bSnapshot = false; - - // Ask user what he/she wants to do... - if (m_pPatchbay->jackClient() || m_pPatchbay->alsaSeq()) { - switch (QMessageBox::information(this, - tr("New Patchbay definition") + " - " QJACKCTL_SUBTITLE1, - tr("Create patchbay definition as a snapshot\n" - "of all actual client connections?"), - tr("Yes"), tr("No"), tr("Cancel"))) { - case 0: // Yes. - bSnapshot = true; - break; - case 1: // No. - bSnapshot = false; - break; - default: // Cancel. - return; - } - } - - // Check if we can discard safely the current one... - if (!queryClose()) - return; - - // Reset patchbay editor. - newPatchbayFile(bSnapshot); - updateRecentPatchbays(); - stabilizeForm(); -} - - -// Load patchbay definitions from file. -void qjackctlPatchbayForm::loadPatchbay (void) -{ - QString sFileName = QFileDialog::getOpenFileName( - this, tr("Load Patchbay Definition"), // Parent & Caption. - m_sPatchbayPath, // Start here. - tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) - ); - - if (sFileName.isEmpty()) - return; - - // Load it right away. - if (loadPatchbayFile(sFileName)) - updateRecentPatchbays(); - - stabilizeForm(); -} - - -// Save current patchbay definition to file. -void qjackctlPatchbayForm::savePatchbay (void) -{ - QString sFileName = QFileDialog::getSaveFileName( - this, tr("Save Patchbay Definition"), // Parent & Caption. - m_sPatchbayPath, // Start here. - tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) - ); - - if (sFileName.isEmpty()) - return; - - // Enforce .xml extension... - if (QFileInfo(sFileName).suffix().isEmpty()) - sFileName += ".xml"; - - // Save it right away. - if (savePatchbayFile(sFileName)) - updateRecentPatchbays(); - - stabilizeForm(); -} - - -// A new patchbay has been selected -void qjackctlPatchbayForm::selectPatchbay ( int iPatchbay ) -{ - - // Remember and avoid reloading the previous (first) selected one. - if (iPatchbay > 0) { - // Take care whether the first is untitled, and - // thus not present in the recenet ptachbays list - if (m_sPatchbayPath.isEmpty()) - iPatchbay--; - if (iPatchbay >= 0 && iPatchbay < m_recentPatchbays.count()) { - // If we cannot load the new one, backout... - loadPatchbayFile(m_recentPatchbays[iPatchbay]); - updateRecentPatchbays(); - } - } - - stabilizeForm(); -} - - -// Set current active patchbay definition file. -void qjackctlPatchbayForm::toggleActivePatchbay (void) -{ - // Check if we're going to discard safely the current one... - if (!queryClose()) - return; - - // Activate it... - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) { - pMainForm->setActivePatchbay( - m_bActivePatchbay ? QString::null : m_sPatchbayPath); - } - - // Need to force/refresh the patchbay list... - updateRecentPatchbays(); - stabilizeForm(); -} - - -// Set/initialize the MRU patchbay list. -void qjackctlPatchbayForm::setRecentPatchbays ( const QStringList& patchbays ) -{ - m_recentPatchbays = patchbays; -} - - -// Update patchbay MRU variables and widgets. -void qjackctlPatchbayForm::updateRecentPatchbays (void) -{ - // TRye not to be reeentrant. - if (m_iUpdate > 0) - return; - - m_iUpdate++; - - // Update the visible combobox... - const QIcon icon(":/icons/patchbay1.png"); - m_ui.PatchbayComboBox->clear(); - - if (m_sPatchbayPath.isEmpty()) { - // Display a probable untitled patchbay... - m_ui.PatchbayComboBox->addItem(icon, m_sPatchbayName); - } else { - // Remove from list if already there (avoid duplicates)... - int iIndex = m_recentPatchbays.indexOf(m_sPatchbayPath); - if (iIndex >= 0) - m_recentPatchbays.removeAt(iIndex); - // Put it to front... - m_recentPatchbays.push_front(m_sPatchbayPath); - } - - // Time to keep the list under limits. - while (m_recentPatchbays.count() > 8) - m_recentPatchbays.pop_back(); - - // Update the main setup list... - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->setRecentPatchbays(m_recentPatchbays); - - QStringListIterator iter(m_recentPatchbays); - while (iter.hasNext()) { - const QString& sPatchbayPath = iter.next(); - QString sText = QFileInfo(sPatchbayPath).baseName(); - if (pMainForm && pMainForm->isActivePatchbay(sPatchbayPath)) - sText += " [" + tr("active") + "]"; - m_ui.PatchbayComboBox->addItem(icon, sText); - } - - // Sure this one must be currently selected. - m_ui.PatchbayComboBox->setCurrentIndex(0); -// stabilizeForm(); - - m_iUpdate--; -} - - -// (Un)Bind a JACK client to this form. -void qjackctlPatchbayForm::setJackClient ( jack_client_t *pJackClient ) -{ - m_pPatchbay->setJackClient(pJackClient); -} - - -// (Un)Bind a ALSA sequencer to this form. -void qjackctlPatchbayForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) -{ - m_pPatchbay->setAlsaSeq(pAlsaSeq); -} - - -// Output socket list push button handlers gallore... - -void qjackctlPatchbayForm::addOSocket (void) -{ - (m_pPatchbay->OSocketList())->addSocketItem(); -} - - -void qjackctlPatchbayForm::removeOSocket (void) -{ - (m_pPatchbay->OSocketList())->removeSocketItem(); -} - - -void qjackctlPatchbayForm::editOSocket (void) -{ - (m_pPatchbay->OSocketList())->editSocketItem(); -} - - -void qjackctlPatchbayForm::copyOSocket (void) -{ - (m_pPatchbay->OSocketList())->copySocketItem(); -} - - -void qjackctlPatchbayForm::moveUpOSocket (void) -{ - (m_pPatchbay->OSocketList())->moveUpSocketItem(); -} - - -void qjackctlPatchbayForm::moveDownOSocket (void) -{ - (m_pPatchbay->OSocketList())->moveDownSocketItem(); -} - - -// Input socket list push button handlers gallore... - -void qjackctlPatchbayForm::addISocket (void) -{ - (m_pPatchbay->ISocketList())->addSocketItem(); -} - - -void qjackctlPatchbayForm::removeISocket (void) -{ - (m_pPatchbay->ISocketList())->removeSocketItem(); -} - - -void qjackctlPatchbayForm::editISocket (void) -{ - (m_pPatchbay->ISocketList())->editSocketItem(); -} - - -void qjackctlPatchbayForm::copyISocket (void) -{ - (m_pPatchbay->ISocketList())->copySocketItem(); -} - - -void qjackctlPatchbayForm::moveUpISocket (void) -{ - (m_pPatchbay->ISocketList())->moveUpSocketItem(); -} - - -void qjackctlPatchbayForm::moveDownISocket (void) -{ - (m_pPatchbay->ISocketList())->moveDownSocketItem(); -} - - -// Connect current selected ports. -void qjackctlPatchbayForm::connectSelected (void) -{ - m_pPatchbay->connectSelected(); -} - - -// Disconnect current selected ports. -void qjackctlPatchbayForm::disconnectSelected (void) -{ - m_pPatchbay->disconnectSelected(); -} - - -// Disconnect all connected ports. -void qjackctlPatchbayForm::disconnectAll (void) -{ - m_pPatchbay->disconnectAll(); -} - - -// end of qjackctlPatchbayForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.h 2008-11-26 19:42:14.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,125 +0,0 @@ -// qjackctlPatchbayForm.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlPatchbayForm_h -#define __qjackctlPatchbayForm_h - -#include "ui_qjackctlPatchbayForm.h" - -// Forward declarations. -class qjackctlPatchbay; -class qjackctlSetup; - - -//---------------------------------------------------------------------------- -// qjackctlPatchbayForm -- UI wrapper form. - -class qjackctlPatchbayForm : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlPatchbayForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlPatchbayForm(); - - void setup(qjackctlSetup *pSetup); - - qjackctlPatchbayView *patchbayView() const; - - bool queryClose(); - - const QString& patchbayPath() const; - - void newPatchbayFile(bool bSnapshot); - bool loadPatchbayFile(const QString& sFileName); - bool savePatchbayFile(const QString& sFileName); - - void loadPatchbayRack(qjackctlPatchbayRack *pRack); - - void setRecentPatchbays(const QStringList& patchbays); - void updateRecentPatchbays(); - - void setJackClient(jack_client_t * pJackClient); - void setAlsaSeq(snd_seq_t *pAlsaSeq); - -public slots: - - void newPatchbay(); - void loadPatchbay(); - void savePatchbay(); - void selectPatchbay(int iPatchbay); - void toggleActivePatchbay(); - - void addOSocket(); - void removeOSocket(); - void editOSocket(); - void copyOSocket(); - void moveUpOSocket(); - void moveDownOSocket(); - - void addISocket(); - void removeISocket(); - void editISocket(); - void copyISocket(); - void moveUpISocket(); - void moveDownISocket(); - - void connectSelected(); - void disconnectSelected(); - void disconnectAll(); - - void contentsChanged(); - - void refreshForm(); - void stabilizeForm(); - -protected: - - void showEvent(QShowEvent *); - void hideEvent(QHideEvent *); - void closeEvent(QCloseEvent *); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlPatchbayForm m_ui; - - // Instance variables. - qjackctlSetup *m_pSetup; - - int m_iUntitled; - qjackctlPatchbay *m_pPatchbay; - QString m_sPatchbayPath; - QString m_sPatchbayName; - QStringList m_recentPatchbays; - bool m_bActivePatchbay; - - int m_iUpdate; -}; - - -#endif // __qjackctlPatchbayForm_h - - -// end of qjackctlPatchbayForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayForm.ui 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,585 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlPatchbayForm - - - - 0 - 0 - 598 - 321 - - - - - 1 - 1 - 0 - 0 - - - - - - - Patchbay - JACK Audio Connection Kit - - - :/icons/patchbay1.png - - - - 4 - - - 4 - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 80 - 8 - - - - - - - - 4 - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - Qt::TabFocus - - - - - - - Move currently selected output socket down one position - - - Down - - - :/icons/down1.png - - - - - - - - - - Create a new output socket - - - Add... - - - :/icons/add1.png - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 8 - 42 - - - - - - - - Edit currently selected input socket properties - - - Edit... - - - :/icons/edit1.png - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 8 - 42 - - - - - - - - Move currently selected output socket up one position - - - Up - - - :/icons/up1.png - - - - - - - - - - Remove currently selected output socket - - - Remove - - - :/icons/remove1.png - - - - - - - - - - Duplicate (copy) currently selected output socket - - - Copy... - - - :/icons/copy1.png - - - - - - - - - - Move currently selected output socket down one position - - - Down - - - :/icons/down1.png - - - - - - - - - - Remove currently selected input socket - - - Remove - - - :/icons/remove1.png - - - - - - - - - - Duplicate (copy) currently selected input socket - - - Copy... - - - :/icons/copy1.png - - - - - - - - - - Create a new input socket - - - Add... - - - :/icons/add1.png - - - - - - - - - - Edit currently selected output socket properties - - - Edit... - - - :/icons/edit1.png - - - - - - - - - - Move currently selected output socket up one position - - - Up - - - :/icons/up1.png - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 80 - 8 - - - - - - - - 4 - - - 4 - - - - - Connect currently selected sockets - - - &Connect - - - :/icons/connect1.png - - - Alt+C - - - - - - - Disconnect currently selected sockets - - - &Disconnect - - - :/icons/disconnect1.png - - - Alt+D - - - - - - - Disconnect all currently connected sockets - - - Disconnect &All - - - :/icons/disconnect1.png - - - Alt+A - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 87 - 8 - - - - - - - - Refresh current patchbay view - - - &Refresh - - - :/icons/refresh1.png - - - Alt+R - - - true - - - - - - - - - 4 - - - 4 - - - - - Create a new patchbay profile - - - &New - - - :/icons/new1.png - - - Alt+N - - - false - - - - - - - Load patchbay profile - - - &Load... - - - :/icons/open1.png - - - Alt+L - - - false - - - - - - - Save current patchbay profile - - - &Save... - - - :/icons/save1.png - - - Alt+S - - - false - - - - - - - - 7 - 5 - 0 - 0 - - - - - 75 - true - - - - Current (recent) patchbay profile(s) - - - - - - - Toggle activation of current patchbay profile - - - Acti&vate - - - :/icons/apply1.png - - - Alt+V - - - true - - - false - - - - - - - - - - - qjackctlPatchbayView - QWidget -
qjackctlPatchbay.h
-
-
- - NewPatchbayPushButton - LoadPatchbayPushButton - SavePatchbayPushButton - PatchbayComboBox - ActivatePatchbayPushButton - OSocketAddPushButton - OSocketEditPushButton - OSocketCopyPushButton - OSocketRemovePushButton - OSocketMoveUpPushButton - OSocketMoveDownPushButton - PatchbayView - ISocketAddPushButton - ISocketEditPushButton - ISocketCopyPushButton - ISocketRemovePushButton - ISocketMoveUpPushButton - ISocketMoveDownPushButton - ConnectPushButton - DisconnectPushButton - DisconnectAllPushButton - RefreshPushButton - - - - - -
diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbay.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbay.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbay.h 2008-11-26 19:42:14.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbay.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,488 +0,0 @@ -// qjackctlPatchbay.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlPatchbay_h -#define __qjackctlPatchbay_h - -#include -#include - - -// Our external patchbay models. -#include "qjackctlPatchbayRack.h" - -// QListViewItem::rtti return values. -#define QJACKCTL_SOCKETITEM 2001 -#define QJACKCTL_PLUGITEM 2002 - -// Forward declarations. -class qjackctlPlugItem; -class qjackctlSocketItem; -class qjackctlSocketList; -class qjackctlSocketListView; -class qjackctlPatchworkView; -class qjackctlPatchbayView; -class qjackctlPatchbay; - -// Pixmap-set indexes. -#define QJACKCTL_XPM_AUDIO_SOCKET 0 -#define QJACKCTL_XPM_AUDIO_SOCKET_X 1 -#define QJACKCTL_XPM_AUDIO_CLIENT 2 -#define QJACKCTL_XPM_AUDIO_PLUG 3 -#define QJACKCTL_XPM_MIDI_SOCKET 4 -#define QJACKCTL_XPM_MIDI_SOCKET_X 5 -#define QJACKCTL_XPM_MIDI_CLIENT 6 -#define QJACKCTL_XPM_MIDI_PLUG 7 -#define QJACKCTL_XPM_PIXMAPS 8 - - -// Patchbay plug (port) list item. -class qjackctlPlugItem : public QTreeWidgetItem -{ -public: - - // Constructor. - qjackctlPlugItem(qjackctlSocketItem *pSocket, - const QString& sPlugName, qjackctlPlugItem *pPlugAfter); - // Default destructor. - ~qjackctlPlugItem(); - - // Instance accessors. - const QString& socketName() const; - const QString& plugName() const; - - // Patchbay socket item accessor. - qjackctlSocketItem *socket() const; - -private: - - // Instance variables. - qjackctlSocketItem *m_pSocket; - QString m_sPlugName; -}; - - -// Patchbay socket (client) list item. -class qjackctlSocketItem : public QTreeWidgetItem -{ -public: - - // Constructor. - qjackctlSocketItem(qjackctlSocketList *pSocketList, - const QString& sSocketName, const QString& sClientName, - int iSocketType,qjackctlSocketItem *pSocketAfter); - - // Default destructor. - ~qjackctlSocketItem(); - - // Instance accessors. - const QString& socketName() const; - const QString& clientName() const; - int socketType() const; - bool isExclusive() const; - const QString& forward() const; - - void setSocketName (const QString& sSocketName); - void setClientName (const QString& sClientName); - void setSocketType (int iSocketType); - void setExclusive (bool bExclusive); - void setForward (const QString& sSocketForward); - - // Socket flags accessor. - bool isReadable() const; - - // Connected plug list primitives. - void addConnect(qjackctlSocketItem *pSocket); - void removeConnect(qjackctlSocketItem *pSocket); - - // Connected plug finders. - qjackctlSocketItem *findConnectPtr(qjackctlSocketItem *pSocketPtr); - - // Connection list accessor. - const QList& connects() const; - - // Plug list primitive methods. - void addPlug(qjackctlPlugItem *pPlug); - void removePlug(qjackctlPlugItem *pPlug); - - // Plug finder. - qjackctlPlugItem *findPlug(const QString& sPlugName); - - // Plug list accessor. - QList& plugs(); - - // Plug list cleaner. - void clear(); - - // Retrieve a context pixmap. - const QPixmap& pixmap(int iPixmap) const; - - // Update pixmap to its proper context. - void updatePixmap(); - - // Client item openness status. - void setOpen(bool bOpen); - bool isOpen() const; - -private: - - // Instance variables. - qjackctlSocketList *m_pSocketList; - QString m_sSocketName; - QString m_sClientName; - int m_iSocketType; - bool m_bExclusive; - QString m_sSocketForward; - - // Plug (port) list. - QList m_plugs; - - // Connection cache list. - QList m_connects; -}; - - -// Patchbay socket (client) list. -class qjackctlSocketList : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlSocketList(qjackctlSocketListView *pListView, bool bReadable); - // Default destructor. - ~qjackctlSocketList(); - - // Socket list primitive methods. - void addSocket(qjackctlSocketItem *pSocket); - void removeSocket(qjackctlSocketItem *pSocket); - - // Socket finder. - qjackctlSocketItem *findSocket(const QString& sSocketName, int iSocketType); - - // List view accessor. - qjackctlSocketListView *listView() const; - - // Socket flags accessor. - bool isReadable() const; - - // Socket aesthetics accessors. - const QString& socketCaption() const; - - // JACK client accessors. - void setJackClient(jack_client_t *pJackClient); - jack_client_t *jackClient() const; - - // ALSA sequencer accessors. - void setAlsaSeq(snd_seq_t *pAlsaSeq); - snd_seq_t *alsaSeq() const; - - // Socket list cleaner. - void clear(); - - // Socket list accessor. - QList& sockets(); - - // Find the current selected socket item in list. - qjackctlSocketItem *selectedSocketItem() const; - - // Retrieve a context pixmap. - const QPixmap& pixmap(int iPixmap) const; - -public slots: - - // Socket item interactivity methods. - bool addSocketItem(); - bool removeSocketItem(); - bool editSocketItem(); - bool copySocketItem(); - bool exclusiveSocketItem(); - bool moveUpSocketItem(); - bool moveDownSocketItem(); - -private: - - // Merge two pixmaps with union of respective masks. - QPixmap *createPixmapMerge(const QPixmap& xpmDst, const QPixmap& xpmSrc); - - // Instance variables. - qjackctlSocketListView *m_pListView; - bool m_bReadable; - QString m_sSocketCaption; - jack_client_t *m_pJackClient; - snd_seq_t *m_pAlsaSeq; - - QPixmap *m_apPixmaps[QJACKCTL_XPM_PIXMAPS]; - - QList m_sockets; -}; - - -//---------------------------------------------------------------------------- -// qjackctlSocketListView -- Socket list view, supporting drag-n-drop. - -class qjackctlSocketListView : public QTreeWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlSocketListView(qjackctlPatchbayView *pPatchbayView, bool bReadable); - // Default destructor. - ~qjackctlSocketListView(); - - // Patchbay dirty flag accessors. - void setDirty (bool bDirty); - bool dirty() const; - - // Auto-open timer methods. - void setAutoOpenTimeout(int iAutoOpenTimeout); - int autoOpenTimeout() const; - -protected slots: - - // Auto-open timeout slot. - void timeoutSlot(); - -protected: - - // Trap for help/tool-tip events. - bool eventFilter(QObject *pObject, QEvent *pEvent); - - // Drag-n-drop stuff. - QTreeWidgetItem *dragDropItem(const QPoint& pos); - - // Drag-n-drop stuff -- reimplemented virtual methods. - void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); - void dragMoveEvent(QDragMoveEvent *pDragMoveEvent); - void dragLeaveEvent(QDragLeaveEvent *); - void dropEvent(QDropEvent *pDropEvent); - - // Handle mouse events for drag-and-drop stuff. - void mousePressEvent(QMouseEvent *pMouseEvent); - void mouseMoveEvent(QMouseEvent *pMouseEvent); - - // Context menu request event handler. - void contextMenuEvent(QContextMenuEvent *); - -private: - - // Bindings. - qjackctlPatchbayView *m_pPatchbayView; - - bool m_bReadable; - - // Auto-open timer. - int m_iAutoOpenTimeout; - QTimer *m_pAutoOpenTimer; - - // Items we'll eventually drop something. - QTreeWidgetItem *m_pDragItem; - QTreeWidgetItem *m_pDropItem; - // The point from where drag started. - QPoint m_posDrag; -}; - - -//---------------------------------------------------------------------------- -// qjackctlPatchworkView -- Socket plugging connector widget. - -class qjackctlPatchworkView : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlPatchworkView(qjackctlPatchbayView *pPatchbayView); - // Default destructor. - ~qjackctlPatchworkView(); - -public slots: - - // Useful slots (should this be protected?). - void contentsChanged(); - -protected: - - // Draw visible port connection relation arrows. - void paintEvent(QPaintEvent *); - - // Context menu request event handler. - void contextMenuEvent(QContextMenuEvent *); - -private: - - // Legal socket item position helper. - int itemY(QTreeWidgetItem *pItem) const; - - // Drawing methods. - void drawForwardLine(QPainter *pPainter, - int x, int dx, int y1, int y2, int h); - void drawConnectionLine(QPainter *pPainter, - int x1, int y1, int x2, int y2, int h1, int h2); - - // Local instance variables. - qjackctlPatchbayView *m_pPatchbayView; -}; - - -//---------------------------------------------------------------------------- -// qjackctlPatchbayView -- Patchbay integrated widget. - -class qjackctlPatchbayView : public QSplitter -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlPatchbayView(QWidget *pParent = 0); - // Default destructor. - ~qjackctlPatchbayView(); - - // Widget accesors. - qjackctlSocketListView *OListView() { return m_pOListView; } - qjackctlSocketListView *IListView() { return m_pIListView; } - qjackctlPatchworkView *PatchworkView() { return m_pPatchworkView; } - - // Patchbay object binding methods. - void setBinding(qjackctlPatchbay *pPatchbay); - qjackctlPatchbay *binding() const; - - // Socket list accessors. - qjackctlSocketList *OSocketList() const; - qjackctlSocketList *ISocketList() const; - - // Patchwork line style accessors. - void setBezierLines(bool bBezierLines); - bool isBezierLines() const; - - // Patchbay dirty flag accessors. - void setDirty (bool bDirty); - bool dirty() const; - -signals: - - // Contents change signal. - void contentsChanged(); - -public slots: - - // Common context menu slots. - void contextMenu(const QPoint& pos, qjackctlSocketList *pSocketList); - void activateForwardMenu(QAction *); - -private: - - // Child controls. - qjackctlSocketListView *m_pOListView; - qjackctlSocketListView *m_pIListView; - qjackctlPatchworkView *m_pPatchworkView; - - // The main binding object. - qjackctlPatchbay *m_pPatchbay; - - // How we'll draw patchwork lines. - bool m_bBezierLines; - - // The obnoxious dirty flag. - bool m_bDirty; -}; - - -//---------------------------------------------------------------------------- -// qjackctlPatchbay -- Patchbay integrated object. - -class qjackctlPatchbay : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlPatchbay(qjackctlPatchbayView *pPatchbayView); - // Default destructor. - ~qjackctlPatchbay(); - - // Explicit connection tests. - bool canConnectSelected(); - bool canDisconnectSelected(); - bool canDisconnectAll(); - - // Socket list accessors. - qjackctlSocketList *OSocketList() const; - qjackctlSocketList *ISocketList() const; - - // External rack transfer methods. - void loadRack(qjackctlPatchbayRack *pPatchbayRack); - void saveRack(qjackctlPatchbayRack *pPatchbayRack); - - // JACK client property accessors. - void setJackClient(jack_client_t *pJackClient); - jack_client_t *jackClient() const; - - // ALSA sequencer property accessors. - void setAlsaSeq(snd_seq_t *pAlsaSeq); - snd_seq_t *alsaSeq() const; - -public slots: - - // Complete contents refreshner. - void refresh(); - - // Explicit connection slots. - bool connectSelected(); - bool disconnectSelected(); - bool disconnectAll(); - - // Complete patchbay clearer. - void clear(); - - // Do actual and complete connections snapshot. - void connectionsSnapshot(); - -private: - - // Internal rack transfer methods. - void loadRackSockets (qjackctlSocketList *pSocketList, - QList& socketlist); - void saveRackSockets (qjackctlSocketList *pSocketList, - QList& socketlist); - - // Connect/Disconnection primitives. - void connectSockets(qjackctlSocketItem *pOSocket, - qjackctlSocketItem *pISocket); - void disconnectSockets(qjackctlSocketItem *pOSocket, - qjackctlSocketItem *pISocket); - - // Instance variables. - qjackctlPatchbayView *m_pPatchbayView; - qjackctlSocketList *m_pOSocketList; - qjackctlSocketList *m_pISocketList; -}; - - -#endif // __qjackctlPatchbay_h - -// end of qjackctlPatchbay.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayRack.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayRack.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayRack.cpp 2008-12-01 15:32:50.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayRack.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1549 +0,0 @@ -// qjackctlPatchbayRack.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlPatchbayRack.h" - -// Aliases accessors. -#include "qjackctlConnectAlias.h" - - -//---------------------------------------------------------------------- -// class qjackctlPatchbaySnapshot -- Patchbay snapshot infrastructure. -// - -#include - -class qjackctlPatchbaySnapshot -{ -public: - - // Constructor. - qjackctlPatchbaySnapshot() {}; - - // Cleanup. - void clear() { m_hash.clear(); } - - // Prepare/add snapshot connection item. - void append ( - const QString& sOClientName, const QString& sOPortName, - const QString& sIClientName, const QString& sIPortName ) - { - Ports& ports = m_hash[sOClientName + ':' + sIClientName]; - ports.outs.append(sOPortName); - ports.ins.append(sIPortName); - } - - // Commit snapshot into patchbay rack. - void commit ( qjackctlPatchbayRack *pRack, int iSocketType ) - { - QHash::Iterator iter = m_hash.begin(); - for ( ; iter != m_hash.end(); ++iter) { - const QString& sKey = iter.key(); - const QString& sOClient = sKey.section(':', 0, 0); - const QString& sIClient = sKey.section(':', 1, 1); - Ports& ports = iter.value(); - qjackctlPatchbaySocket *pOSocket = get_socket( - pRack->osocketlist(), sOClient, ports.outs, iSocketType); - qjackctlPatchbaySocket *pISocket = get_socket( - pRack->isocketlist(), sIClient, ports.ins, iSocketType); - pRack->addCable(new qjackctlPatchbayCable(pOSocket, pISocket)); - } - - m_hash.clear(); - } - - // Find first existing socket. - static qjackctlPatchbaySocket *find_socket ( - QList& socketlist, - const QString& sClientName, int iSocketType ) - { - QListIterator iter(socketlist); - while (iter.hasNext()) { - qjackctlPatchbaySocket *pSocket = iter.next(); - if (QRegExp(pSocket->clientName()).exactMatch(sClientName) - && pSocket->type() == iSocketType) { - return pSocket; - } - } - return NULL; - } - - // Add socket plug. - static void add_socket ( QList& socketlist, - const QString& sClientName, const QString& sPortName, int iSocketType ) - { - qjackctlPatchbaySocket *pSocket - = find_socket(socketlist, sClientName, iSocketType); - if (pSocket == NULL) { - pSocket = new qjackctlPatchbaySocket(sClientName, - qjackctlClientAlias::escapeRegExpDigits(sClientName), - iSocketType); - socketlist.append(pSocket); - } - pSocket->addPlug( - qjackctlClientAlias::escapeRegExpDigits(sPortName)); - } - - // Get client socket into rack (socket list). - static qjackctlPatchbaySocket *get_socket ( - QList& socketlist, - const QString& sClientName, const QStringList& ports, - int iSocketType ) - { - int iSocket = 0; - qjackctlPatchbaySocket *pSocket = NULL; - QListIterator iter(socketlist); - while (iter.hasNext()) { - pSocket = iter.next(); - if (QRegExp(pSocket->clientName()).exactMatch(sClientName) - && pSocket->type() == iSocketType) { - QStringListIterator plug_iter(pSocket->pluglist()); - QStringListIterator port_iter(ports); - bool bMatch = true; - while (bMatch - && plug_iter.hasNext() && port_iter.hasNext()) { - const QString& sPlug = plug_iter.next(); - const QString& sPort = port_iter.next(); - bMatch = (QRegExp(sPlug).exactMatch(sPort)); - } - if (bMatch) - return pSocket; - iSocket++; - } - } - - QString sSocketName = sClientName; - if (iSocket > 0) - sSocketName += ' ' + QString::number(iSocket + 1); - - pSocket = new qjackctlPatchbaySocket(sSocketName, - qjackctlClientAlias::escapeRegExpDigits(sClientName), - iSocketType); - QStringListIterator port_iter(ports); - while (port_iter.hasNext()) { - pSocket->addPlug( - qjackctlClientAlias::escapeRegExpDigits(port_iter.next())); - } - - socketlist.append(pSocket); - - return pSocket; - } - -private: - - // Snapshot instance variables. - struct Ports - { - QStringList outs; - QStringList ins; - }; - - QHash m_hash; -}; - - -//---------------------------------------------------------------------- -// class qjackctlPatchbaySocket -- Patchbay socket implementation. -// - -// Constructor. -qjackctlPatchbaySocket::qjackctlPatchbaySocket ( const QString& sSocketName, - const QString& sClientName, int iSocketType ) -{ - m_sSocketName = sSocketName; - m_sClientName = sClientName; - m_iSocketType = iSocketType; - m_bExclusive = false; - m_sSocketForward.clear(); -} - -// Default destructor. -qjackctlPatchbaySocket::~qjackctlPatchbaySocket (void) -{ - m_pluglist.clear(); -} - - -// Socket property accessors. -const QString& qjackctlPatchbaySocket::name (void) const -{ - return m_sSocketName; -} - -const QString& qjackctlPatchbaySocket::clientName (void) const -{ - return m_sClientName; -} - -int qjackctlPatchbaySocket::type (void) const -{ - return m_iSocketType; -} - -bool qjackctlPatchbaySocket::isExclusive (void) const -{ - return m_bExclusive; -} - -const QString& qjackctlPatchbaySocket::forward (void) const -{ - return m_sSocketForward; -} - - -// Slot property methods. -void qjackctlPatchbaySocket::setName ( const QString& sSocketName ) -{ - m_sSocketName = sSocketName; -} - -void qjackctlPatchbaySocket::setClientName ( const QString& sClientName ) -{ - m_sClientName = sClientName; -} - -void qjackctlPatchbaySocket::setType ( int iSocketType ) -{ - m_iSocketType = iSocketType; -} - -void qjackctlPatchbaySocket::setExclusive ( bool bExclusive ) -{ - m_bExclusive = bExclusive; -} - -void qjackctlPatchbaySocket::setForward ( const QString& sSocketForward ) -{ - m_sSocketForward = sSocketForward; -} - - -// Plug list primitive methods. -void qjackctlPatchbaySocket::addPlug ( const QString& sPlugName ) -{ - m_pluglist.append(sPlugName); -} - -void qjackctlPatchbaySocket::removePlug ( const QString& sPlugName ) -{ - int iPlug = m_pluglist.indexOf(sPlugName); - if (iPlug >= 0) - m_pluglist.removeAt(iPlug); -} - - -// Plug list accessor. -QStringList& qjackctlPatchbaySocket::pluglist (void) -{ - return m_pluglist; -} - - -//---------------------------------------------------------------------- -// class qjackctlPatchbaySlot -- Patchbay socket slot implementation. -// - -// Constructor. -qjackctlPatchbaySlot::qjackctlPatchbaySlot ( - const QString& sSlotName, int iSlotMode ) -{ - m_pOutputSocket = NULL; - m_pInputSocket = NULL; - - m_sSlotName = sSlotName; - m_iSlotMode = iSlotMode; -} - -// Default destructor. -qjackctlPatchbaySlot::~qjackctlPatchbaySlot (void) -{ - setOutputSocket(NULL); - setInputSocket(NULL); -} - - -// Slot property accessors. -const QString& qjackctlPatchbaySlot::name (void) const -{ - return m_sSlotName; -} - -int qjackctlPatchbaySlot::mode (void) const -{ - return m_iSlotMode; -} - - -// Slot property methods. -void qjackctlPatchbaySlot::setName ( const QString& sSlotName ) -{ - m_sSlotName = sSlotName; -} - -void qjackctlPatchbaySlot::setMode ( int iSlotMode ) -{ - m_iSlotMode = iSlotMode; -} - - -// Socket methods. -void qjackctlPatchbaySlot::setOutputSocket ( qjackctlPatchbaySocket *pSocket ) -{ - m_pOutputSocket = pSocket; -} - -void qjackctlPatchbaySlot::setInputSocket ( qjackctlPatchbaySocket *pSocket ) -{ - m_pInputSocket = pSocket; -} - - -// Socket accessors. -qjackctlPatchbaySocket *qjackctlPatchbaySlot::outputSocket (void) const -{ - return m_pOutputSocket; -} - -qjackctlPatchbaySocket *qjackctlPatchbaySlot::inputSocket (void) const -{ - return m_pInputSocket; -} - - -//---------------------------------------------------------------------- -// class qjackctlPatchbayCable -- Patchbay cable connection implementation. -// - -// Constructor. -qjackctlPatchbayCable::qjackctlPatchbayCable ( - qjackctlPatchbaySocket *pOutputSocket, - qjackctlPatchbaySocket *pInputSocket ) -{ - m_pOutputSocket = pOutputSocket; - m_pInputSocket = pInputSocket; -} - -// Default destructor. -qjackctlPatchbayCable::~qjackctlPatchbayCable (void) -{ - setOutputSocket(NULL); - setInputSocket(NULL); -} - - -// Socket methods. -void qjackctlPatchbayCable::setOutputSocket ( qjackctlPatchbaySocket *pSocket ) -{ - m_pOutputSocket = pSocket; -} - -void qjackctlPatchbayCable::setInputSocket ( qjackctlPatchbaySocket *pSocket ) -{ - m_pInputSocket = pSocket; -} - - -// Socket accessors. -qjackctlPatchbaySocket *qjackctlPatchbayCable::outputSocket (void) const -{ - return m_pOutputSocket; -} - -qjackctlPatchbaySocket *qjackctlPatchbayCable::inputSocket (void) const -{ - return m_pInputSocket; -} - - -//---------------------------------------------------------------------- -// class qjackctlPatchbayRack -- Patchbay rack profile implementation. -// - -// Constructor. -qjackctlPatchbayRack::qjackctlPatchbayRack (void) -{ - m_pJackClient = NULL; - m_ppszOAudioPorts = NULL; - m_ppszIAudioPorts = NULL; - m_ppszOMidiPorts = NULL; - m_ppszIMidiPorts = NULL; - - // MIDI connection persistence cache variables. - m_pAlsaSeq = NULL; -} - -// Default destructor. -qjackctlPatchbayRack::~qjackctlPatchbayRack (void) -{ - clear(); -} - - -// Common socket list primitive methods. -void qjackctlPatchbayRack::addSocket ( - QList& socketlist, - qjackctlPatchbaySocket *pSocket ) -{ - qjackctlPatchbaySocket *pSocketPtr - = findSocket(socketlist, pSocket->name()); - if (pSocketPtr) - removeSocket(socketlist, pSocketPtr); - - socketlist.append(pSocket); -} - - -void qjackctlPatchbayRack::removeSocket ( - QList& socketlist, - qjackctlPatchbaySocket *pSocket ) -{ - int iSocket = socketlist.indexOf(pSocket); - if (iSocket >= 0) { - socketlist.removeAt(iSocket); - delete pSocket; - } -} - - -// Slot list primitive methods. -void qjackctlPatchbayRack::addSlot ( qjackctlPatchbaySlot *pSlot ) -{ - qjackctlPatchbaySlot *pSlotPtr = findSlot(pSlot->name()); - if (pSlotPtr) - removeSlot(pSlotPtr); - - m_slotlist.append(pSlot); -} - -void qjackctlPatchbayRack::removeSlot ( qjackctlPatchbaySlot *pSlot ) -{ - int iSlot = m_slotlist.indexOf(pSlot); - if (iSlot >= 0) { - m_slotlist.removeAt(iSlot); - delete pSlot; - } -} - - -// Cable list primitive methods. -void qjackctlPatchbayRack::addCable ( qjackctlPatchbayCable *pCable ) -{ - qjackctlPatchbayCable *pCablePtr = findCable(pCable); - if (pCablePtr) - removeCable(pCablePtr); - - m_cablelist.append(pCable); -} - -void qjackctlPatchbayRack::removeCable ( qjackctlPatchbayCable *pCable ) -{ - int iCable = m_cablelist.indexOf(pCable); - if (iCable >= 0) { - m_cablelist.removeAt(iCable); - delete pCable; - } -} - - -// Common socket finders. -qjackctlPatchbaySocket *qjackctlPatchbayRack::findSocket ( - QList& socketlist, const QString& sSocketName ) -{ - QListIterator iter(socketlist); - while (iter.hasNext()) { - qjackctlPatchbaySocket *pSocket = iter.next(); - if (sSocketName == pSocket->name()) - return pSocket; - } - - return NULL; -} - - -// Patchbay socket slot finders. -qjackctlPatchbaySlot *qjackctlPatchbayRack::findSlot ( const QString& sSlotName ) -{ - QListIterator iter(m_slotlist); - while (iter.hasNext()) { - qjackctlPatchbaySlot *pSlot = iter.next(); - if (sSlotName == pSlot->name()) - return pSlot; - } - - return NULL; -} - - -// Cable finders. -qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( - const QString& sOutputSocket, const QString& sInputSocket ) -{ - qjackctlPatchbaySocket *pSocket; - - QListIterator iter(m_cablelist); - while (iter.hasNext()) { - qjackctlPatchbayCable *pCable = iter.next(); - pSocket = pCable->outputSocket(); - if (pSocket && sOutputSocket == pSocket->name()) { - pSocket = pCable->inputSocket(); - if (pSocket && sInputSocket == pSocket->name()) - return pCable; - } - } - - return NULL; -} - -qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( - qjackctlPatchbayCable *pCablePtr ) -{ - QString sOutputSocket; - if (pCablePtr->outputSocket()) - sOutputSocket = pCablePtr->outputSocket()->name(); - - QString sInputSocket; - if (pCablePtr->inputSocket()) - sInputSocket = pCablePtr->inputSocket()->name(); - - return findCable(sOutputSocket, sInputSocket); -} - - -// Cable finder (logical matching by client/port names). -qjackctlPatchbayCable *qjackctlPatchbayRack::findCable ( - const QString& sOClientName, const QString& sOPortName, - const QString& sIClientName, const QString& sIPortName, - int iSocketType ) -{ - // This is a regex prefix needed for ALSA MDII - // as client and port names include id-number+colon... - QString sPrefix; - if (iSocketType == QJACKCTL_SOCKETTYPE_ALSA_MIDI) - sPrefix = "[0-9]+:"; - - // Scan from output-socket list... - QListIterator osocket(m_osocketlist); - while (osocket.hasNext()) { - qjackctlPatchbaySocket *pOSocket = osocket.next(); - if (pOSocket->type() != iSocketType) - continue; - // Output socket client name match? - if (!QRegExp(sPrefix + pOSocket->clientName()) - .exactMatch(sOClientName)) - continue; - // Output plug port names match? - QStringListIterator oplug(pOSocket->pluglist()); - while (oplug.hasNext()) { - if (!QRegExp(sPrefix + oplug.next()) - .exactMatch(sOPortName)) - continue; - // Scan for output-socket cable... - QListIterator cable(m_cablelist); - while (cable.hasNext()) { - qjackctlPatchbayCable *pCable = cable.next(); - if (pCable->outputSocket() != pOSocket) - continue; - qjackctlPatchbaySocket *pISocket = pCable->inputSocket(); - // Input socket client name match? - if (!QRegExp(sPrefix + pISocket->clientName()) - .exactMatch(sIClientName)) - continue; - // Input plug port names match? - QStringListIterator iplug(pISocket->pluglist()); - while (iplug.hasNext()) { - // Found it? - if (QRegExp(sPrefix + iplug.next()) - .exactMatch(sIPortName)) - return pCable; - } - } - } - } - - // No matching cable was found. - return NULL; -} - - -// Patckbay cleaners. -void qjackctlPatchbayRack::clear (void) -{ - qDeleteAll(m_cablelist); - m_cablelist.clear(); - - qDeleteAll(m_slotlist); - m_slotlist.clear(); - - qDeleteAll(m_isocketlist); - m_isocketlist.clear(); - - qDeleteAll(m_osocketlist); - m_osocketlist.clear(); -} - - -// Patchbay rack output sockets list accessor. -QList& qjackctlPatchbayRack::osocketlist (void) -{ - return m_osocketlist; -} - - -// Patchbay rack input sockets list accessor. -QList& qjackctlPatchbayRack::isocketlist (void) -{ - return m_isocketlist; -} - - -// Patchbay rack slots list accessor. -QList& qjackctlPatchbayRack::slotlist (void) -{ - return m_slotlist; -} - - -// Patchbay cable connections list accessor. -QList& qjackctlPatchbayRack::cablelist (void) -{ - return m_cablelist; -} - - -// Lookup for the n-th JACK client port -// that matches the given regular expression... -const char *qjackctlPatchbayRack::findJackPort ( const char **ppszJackPorts, - const QString& sClientName, const QString& sPortName, int n ) -{ - QRegExp rxClientName(sClientName); - QRegExp rxPortName(sPortName); - - int i = 0; - int iClientPort = 0; - while (ppszJackPorts[iClientPort]) { - QString sClientPort = ppszJackPorts[iClientPort]; - int iColon = sClientPort.indexOf(':'); - if (iColon >= 0) { - if (rxClientName.exactMatch(sClientPort.left(iColon)) && - rxPortName.exactMatch(sClientPort.right( - sClientPort.length() - iColon - 1))) { - if (++i > n) - return ppszJackPorts[iClientPort]; - } - } - iClientPort++; - } - - return NULL; -} - -// JACK port-pair connection executive IS DEPRECATED! -void qjackctlPatchbayRack::connectJackPorts ( - const char *pszOutputPort, const char *pszInputPort ) -{ - unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; - - if (jack_connect(m_pJackClient, pszOutputPort, pszInputPort) == 0) - uiCableFlags = QJACKCTL_CABLE_CONNECTED; - - emit cableConnected( - pszOutputPort, pszInputPort, uiCableFlags); -} - - -// JACK port-pair disconnection executive. -void qjackctlPatchbayRack::disconnectJackPorts ( - const char *pszOutputPort, const char *pszInputPort ) -{ - unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; - - if (jack_disconnect(m_pJackClient, pszOutputPort, pszInputPort) == 0) - uiCableFlags = QJACKCTL_CABLE_DISCONNECTED; - - emit cableConnected( - pszOutputPort, pszInputPort, uiCableFlags); -} - - -// JACK port-pair connection notifier. -void qjackctlPatchbayRack::checkJackPorts ( - const char *pszOutputPort, const char *pszInputPort ) -{ - emit cableConnected( - pszOutputPort, pszInputPort, QJACKCTL_CABLE_CHECKED); -} - - -// Check and enforce if an audio output client:port is connected to one input. -void qjackctlPatchbayRack::connectJackSocketPorts ( - qjackctlPatchbaySocket *pOutputSocket, const char *pszOutputPort, - qjackctlPatchbaySocket *pInputSocket, const char *pszInputPort ) -{ - bool bConnected = false; - - // Check for inputs from output... - const char **ppszInputPorts = jack_port_get_all_connections( - m_pJackClient, jack_port_by_name(m_pJackClient, pszOutputPort)); - if (ppszInputPorts) { - for (int i = 0 ; ppszInputPorts[i]; i++) { - if (strcmp(ppszInputPorts[i], pszInputPort) == 0) - bConnected = true; - else if (pOutputSocket->isExclusive()) - disconnectJackPorts(pszOutputPort, ppszInputPorts[i]); - } - ::free(ppszInputPorts); - } - - // Check for outputs from input, if the input socket is on exclusive mode... - if (pInputSocket->isExclusive()) { - const char **ppszOutputPorts = jack_port_get_all_connections( - m_pJackClient, jack_port_by_name(m_pJackClient, pszInputPort)); - if (ppszOutputPorts) { - for (int i = 0 ; ppszOutputPorts[i]; i++) { - if (strcmp(ppszOutputPorts[i], pszOutputPort) == 0) - bConnected = true; - else - disconnectJackPorts(ppszOutputPorts[i], pszInputPort); - } - ::free(ppszOutputPorts); - } - } - - // Finally do the connection?... - if (!bConnected) { - connectJackPorts(pszOutputPort, pszInputPort); - } else { - emit cableConnected( - pszOutputPort, - pszInputPort, - QJACKCTL_CABLE_CHECKED); - } -} - - -// Check and maint whether an JACK socket pair is fully connected. -void qjackctlPatchbayRack::connectJackCable ( - qjackctlPatchbaySocket *pOutputSocket, qjackctlPatchbaySocket *pInputSocket ) -{ - if (pOutputSocket == NULL || pInputSocket == NULL) - return; - if (pOutputSocket->type() != pInputSocket->type()) - return; - - const char **ppszOutputPorts = NULL; - const char **ppszInputPorts = NULL; - if (pOutputSocket->type() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { - ppszOutputPorts = m_ppszOAudioPorts; - ppszInputPorts = m_ppszIAudioPorts; - } - else - if (pOutputSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) { - ppszOutputPorts = m_ppszOMidiPorts; - ppszInputPorts = m_ppszIMidiPorts; - } - - if (ppszOutputPorts == NULL || ppszInputPorts == NULL) - return; - - // Iterate on each corresponding plug... - QStringListIterator iterOutputPlug(pOutputSocket->pluglist()); - QStringListIterator iterInputPlug(pInputSocket->pluglist()); - while (iterOutputPlug.hasNext() && iterInputPlug.hasNext()) { - const QString& sOutputPlug = iterOutputPlug.next(); - const QString& sInputPlug = iterInputPlug.next(); - // Check audio port connection sequentially... - int iOPort = 0; - const char *pszOutputPort; - while ((pszOutputPort = findJackPort(ppszOutputPorts, - pOutputSocket->clientName(), sOutputPlug, iOPort)) != NULL) { - int iIPort = 0; - const char *pszInputPort; - while ((pszInputPort = findJackPort(ppszInputPorts, - pInputSocket->clientName(), sInputPlug, iIPort)) != NULL) { - connectJackSocketPorts( - pOutputSocket, pszOutputPort, - pInputSocket, pszInputPort); - iIPort++; - } - iOPort++; - } - } -} - - -// Main JACK cable connect persistance scan cycle. -void qjackctlPatchbayRack::connectJackScan ( jack_client_t *pJackClient ) -{ - if (pJackClient == NULL || m_pJackClient) - return; - - // Cache client descriptor. - m_pJackClient = pJackClient; - // Cache all current audio client-ports... - m_ppszOAudioPorts = jack_get_ports(m_pJackClient, - 0, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput); - m_ppszIAudioPorts = jack_get_ports(m_pJackClient, - 0, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput); -#ifdef CONFIG_JACK_MIDI - // Cache all current MIDI client-ports... - m_ppszOMidiPorts = jack_get_ports(m_pJackClient, - 0, JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput); - m_ppszIMidiPorts = jack_get_ports(m_pJackClient, - 0, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput); -#else - m_ppszOMidiPorts = NULL; - m_ppszIMidiPorts = NULL; -#endif - - // Start looking for connections... - QListIterator iter(m_cablelist); - while (iter.hasNext()) { - qjackctlPatchbayCable *pCable = iter.next(); - connectJackCable( - pCable->outputSocket(), - pCable->inputSocket()); - } - - // Forward sockets... - connectForwardScan(QJACKCTL_SOCKETTYPE_JACK_AUDIO); -#ifdef CONFIG_JACK_MIDI - connectForwardScan(QJACKCTL_SOCKETTYPE_JACK_MIDI); -#endif - - // Free client-ports caches... - if (m_ppszOAudioPorts) - ::free(m_ppszOAudioPorts); - if (m_ppszIAudioPorts) - ::free(m_ppszIAudioPorts); -#ifdef CONFIG_JACK_MIDI - if (m_ppszOMidiPorts) - ::free(m_ppszOMidiPorts); - if (m_ppszIMidiPorts) - ::free(m_ppszIMidiPorts); -#endif - // Reset cached pointers. - m_ppszOAudioPorts = NULL; - m_ppszIAudioPorts = NULL; - m_ppszOMidiPorts = NULL; - m_ppszIMidiPorts = NULL; - m_pJackClient = NULL; -} - - -// Load all midi available midi ports of a given type. -void qjackctlPatchbayRack::loadAlsaPorts ( - QList& midiports, bool bReadable ) -{ - if (m_pAlsaSeq == NULL) - return; - - qDeleteAll(midiports); - midiports.clear(); - -#ifdef CONFIG_ALSA_SEQ - - unsigned int uiAlsaFlags; - if (bReadable) - uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; - else - uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; - - snd_seq_client_info_t *pClientInfo; - snd_seq_port_info_t *pPortInfo; - - snd_seq_client_info_alloca(&pClientInfo); - snd_seq_port_info_alloca(&pPortInfo); - snd_seq_client_info_set_client(pClientInfo, -1); - - while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { - int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); - if (iAlsaClient > 0) { - QString sClientName = snd_seq_client_info_get_name(pClientInfo); - snd_seq_port_info_set_client(pPortInfo, iAlsaClient); - snd_seq_port_info_set_port(pPortInfo, -1); - while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { - unsigned int uiPortCapability = snd_seq_port_info_get_capability(pPortInfo); - if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && - ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { - qjackctlAlsaMidiPort *pMidiPort = new qjackctlAlsaMidiPort; - pMidiPort->sClientName = sClientName; - pMidiPort->iAlsaClient = iAlsaClient; - pMidiPort->sPortName = snd_seq_port_info_get_name(pPortInfo); - pMidiPort->iAlsaPort = snd_seq_port_info_get_port(pPortInfo); - midiports.append(pMidiPort); - } - } - } - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Get current connections from given MIDI port. -void qjackctlPatchbayRack::loadAlsaConnections ( - QList& midiports, - qjackctlAlsaMidiPort *pMidiPort, bool bReadable ) -{ - qDeleteAll(midiports); - midiports.clear(); - -#ifdef CONFIG_ALSA_SEQ - - snd_seq_query_subs_type_t snd_subs_type; - if (bReadable) - snd_subs_type = SND_SEQ_QUERY_SUBS_READ; - else - snd_subs_type = SND_SEQ_QUERY_SUBS_WRITE; - - snd_seq_query_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_query_subscribe_alloca(&pAlsaSubs); - - snd_seq_query_subscribe_set_type(pAlsaSubs, snd_subs_type); - snd_seq_query_subscribe_set_index(pAlsaSubs, 0); - seq_addr.client = pMidiPort->iAlsaClient; - seq_addr.port = pMidiPort->iAlsaPort; - snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); - while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { - seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); - qjackctlAlsaMidiPort *pPort = new qjackctlAlsaMidiPort; - setAlsaPort(pPort, seq_addr.client, seq_addr.port); - midiports.append(pPort); - snd_seq_query_subscribe_set_index(pAlsaSubs, - snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Lookup for the n-th MIDI client port that matches the given regular expression... -qjackctlAlsaMidiPort *qjackctlPatchbayRack::findAlsaPort ( - QList& midiports, - const QString& sClientName, const QString& sPortName, int n ) -{ - QRegExp rxClientName(sClientName); - QRegExp rxPortName(sPortName); - - int i = 0; - // For each port... - QListIterator iter(midiports); - while (iter.hasNext()) { - qjackctlAlsaMidiPort *pMidiPort = iter.next(); - if (rxClientName.exactMatch(pMidiPort->sClientName) && - rxPortName.exactMatch(pMidiPort->sPortName)) { - if (++i > n) - return pMidiPort; - } - } - - return NULL; -} - - -// MIDI port-pair name string. -QString qjackctlPatchbayRack::getAlsaPortName ( qjackctlAlsaMidiPort *pMidiPort ) -{ - return QString::number(pMidiPort->iAlsaClient) - + ':' + QString::number(pMidiPort->iAlsaPort) - + ' ' + pMidiPort->sClientName; -} - - -// MIDI port-pair name string. -void qjackctlPatchbayRack::setAlsaPort ( qjackctlAlsaMidiPort *pMidiPort, - int iAlsaClient, int iAlsaPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - snd_seq_client_info_t *pClientInfo; - snd_seq_port_info_t *pPortInfo; - - snd_seq_client_info_alloca(&pClientInfo); - snd_seq_port_info_alloca(&pPortInfo); - - pMidiPort->iAlsaClient = iAlsaClient; - pMidiPort->iAlsaPort = iAlsaPort; - - if (snd_seq_get_any_client_info(m_pAlsaSeq, iAlsaClient, pClientInfo) == 0) - pMidiPort->sClientName = snd_seq_client_info_get_name(pClientInfo); - - if (snd_seq_get_any_port_info(m_pAlsaSeq, iAlsaClient, iAlsaPort, pPortInfo) == 0) - pMidiPort->sPortName = snd_seq_port_info_get_name(pPortInfo); - -#endif // CONFIG_ALSA_SEQ -} - - -// MIDI port-pair connection executive. -void qjackctlPatchbayRack::connectAlsaPorts ( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; - - snd_seq_port_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_port_subscribe_alloca(&pAlsaSubs); - - seq_addr.client = pOutputPort->iAlsaClient; - seq_addr.port = pOutputPort->iAlsaPort; - snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); - - seq_addr.client = pInputPort->iAlsaClient; - seq_addr.port = pInputPort->iAlsaPort; - snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); - - if (snd_seq_subscribe_port(m_pAlsaSeq, pAlsaSubs) == 0) - uiCableFlags = QJACKCTL_CABLE_CONNECTED; - - emit cableConnected( - getAlsaPortName(pOutputPort), - getAlsaPortName(pInputPort), - uiCableFlags); - -#endif // CONFIG_ALSA_SEQ -} - - -// MIDI port-pair disconnection executive. -void qjackctlPatchbayRack::disconnectAlsaPorts ( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - unsigned int uiCableFlags = QJACKCTL_CABLE_FAILED; - - snd_seq_port_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_port_subscribe_alloca(&pAlsaSubs); - - seq_addr.client = pOutputPort->iAlsaClient; - seq_addr.port = pOutputPort->iAlsaPort; - snd_seq_port_subscribe_set_sender(pAlsaSubs, &seq_addr); - - seq_addr.client = pInputPort->iAlsaClient; - seq_addr.port = pInputPort->iAlsaPort; - snd_seq_port_subscribe_set_dest(pAlsaSubs, &seq_addr); - - if (snd_seq_unsubscribe_port(m_pAlsaSeq, pAlsaSubs) == 0) - uiCableFlags = QJACKCTL_CABLE_DISCONNECTED; - - emit cableConnected( - getAlsaPortName(pOutputPort), - getAlsaPortName(pInputPort), - uiCableFlags); - -#endif // CONFIG_ALSA_SEQ -} - - -// MIDI port-pair disconnection notifier. -void qjackctlPatchbayRack::checkAlsaPorts ( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort ) -{ - emit cableConnected( - getAlsaPortName(pOutputPort), - getAlsaPortName(pInputPort), - QJACKCTL_CABLE_CHECKED); -} - - -// Check and enforce if a midi output client:port is connected to one input. -void qjackctlPatchbayRack::connectAlsaSocketPorts ( - qjackctlPatchbaySocket *pOutputSocket, qjackctlAlsaMidiPort *pOutputPort, - qjackctlPatchbaySocket *pInputSocket, qjackctlAlsaMidiPort *pInputPort ) -{ -#ifdef CONFIG_ALSA_SEQ - - bool bConnected = false; - - snd_seq_query_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_query_subscribe_alloca(&pAlsaSubs); - - // Check for inputs from output... - snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_READ); - snd_seq_query_subscribe_set_index(pAlsaSubs, 0); - seq_addr.client = pOutputPort->iAlsaClient; - seq_addr.port = pOutputPort->iAlsaPort; - snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); - while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { - seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); - if (seq_addr.client == pInputPort->iAlsaClient - && seq_addr.port == pInputPort->iAlsaPort) - bConnected = true; - else if (pOutputSocket->isExclusive()) { - qjackctlAlsaMidiPort iport; - setAlsaPort(&iport, seq_addr.client, seq_addr.port); - disconnectAlsaPorts(pOutputPort, &iport); - } - snd_seq_query_subscribe_set_index(pAlsaSubs, - snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); - } - - // Check for outputs from input, if the input socket is on exclusive mode... - if (pInputSocket->isExclusive()) { - snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_WRITE); - snd_seq_query_subscribe_set_index(pAlsaSubs, 0); - seq_addr.client = pInputPort->iAlsaClient; - seq_addr.port = pInputPort->iAlsaPort; - snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); - while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { - seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); - if (seq_addr.client == pOutputPort->iAlsaClient - && seq_addr.port == pOutputPort->iAlsaPort) - bConnected = true; - else if (pInputSocket->isExclusive()) { - qjackctlAlsaMidiPort oport; - setAlsaPort(&oport, seq_addr.client, seq_addr.port); - disconnectAlsaPorts(&oport, pInputPort); - } - snd_seq_query_subscribe_set_index(pAlsaSubs, - snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); - } - } - - // Finally do the connection?... - if (!bConnected) { - connectAlsaPorts(pOutputPort, pInputPort); - } else { - emit cableConnected( - getAlsaPortName(pOutputPort), - getAlsaPortName(pInputPort), - QJACKCTL_CABLE_CHECKED); - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Check and maint whether a MIDI socket pair is fully connected. -void qjackctlPatchbayRack::connectAlsaCable ( - qjackctlPatchbaySocket *pOutputSocket, qjackctlPatchbaySocket *pInputSocket ) -{ - if (pOutputSocket == NULL || pInputSocket == NULL) - return; - if (pOutputSocket->type() != pInputSocket->type() || - pOutputSocket->type() != QJACKCTL_SOCKETTYPE_ALSA_MIDI) - return; - - // Iterate on each corresponding plug... - QStringListIterator iterOutputPlug(pOutputSocket->pluglist()); - QStringListIterator iterInputPlug(pInputSocket->pluglist()); - while (iterOutputPlug.hasNext() && iterInputPlug.hasNext()) { - const QString& sOutputPlug = iterOutputPlug.next(); - const QString& sInputPlug = iterInputPlug.next(); - // Check MIDI port connection sequentially... - int iOPort = 0; - qjackctlAlsaMidiPort *pOutputPort; - while ((pOutputPort = findAlsaPort(m_omidiports, - pOutputSocket->clientName(), sOutputPlug, iOPort)) != NULL) { - int iIPort = 0; - qjackctlAlsaMidiPort *pInputPort; - while ((pInputPort = findAlsaPort(m_imidiports, - pInputSocket->clientName(), sInputPlug, iIPort)) != NULL) { - connectAlsaSocketPorts( - pOutputSocket, pOutputPort, - pInputSocket, pInputPort); - iIPort++; - } - iOPort++; - } - } -} - - -// Overloaded MIDI cable connect persistance scan cycle. -void qjackctlPatchbayRack::connectAlsaScan ( snd_seq_t *pAlsaSeq ) -{ - if (pAlsaSeq == NULL || m_pAlsaSeq) - return; - - // Cache sequencer descriptor. - m_pAlsaSeq = pAlsaSeq; - - // Cache all current output client-ports... - loadAlsaPorts(m_omidiports, true); - loadAlsaPorts(m_imidiports, false); - - // Run the MIDI cable scan... - QListIterator iter(m_cablelist); - while (iter.hasNext()) { - qjackctlPatchbayCable *pCable = iter.next(); - connectAlsaCable( - pCable->outputSocket(), - pCable->inputSocket()); - } - - // Forward MIDI sockets... - connectForwardScan(QJACKCTL_SOCKETTYPE_ALSA_MIDI); - - // Free client-ports caches... - qDeleteAll(m_omidiports); - m_omidiports.clear(); - - qDeleteAll(m_imidiports); - m_imidiports.clear(); - - m_pAlsaSeq = NULL; -} - - -// JACK socket/ports forwarding scan... -void qjackctlPatchbayRack::connectJackForwardPorts ( - const char *pszPort, const char *pszPortForward ) -{ - // Check for outputs from forwarded input... - const char **ppszOutputPorts = jack_port_get_all_connections( - m_pJackClient, jack_port_by_name(m_pJackClient, pszPortForward)); - if (ppszOutputPorts) { - // Grab current connections of target port... - const char **ppszPorts = jack_port_get_all_connections( - m_pJackClient, jack_port_by_name(m_pJackClient, pszPort)); - for (int i = 0 ; ppszOutputPorts[i]; i++) { - // Need to lookup if already connected... - bool bConnected = false; - for (int j = 0; ppszPorts && ppszPorts[j]; j++) { - if (strcmp(ppszOutputPorts[i], ppszPorts[j]) == 0) { - bConnected = true; - break; - } - } - // Make or just report the connection... - if (bConnected) { - checkJackPorts(ppszOutputPorts[i], pszPort); - } else { - connectJackPorts(ppszOutputPorts[i], pszPort); - } - } - // Free provided arrays... - if (ppszPorts) - ::free(ppszPorts); - ::free(ppszOutputPorts); - } -} - -void qjackctlPatchbayRack::connectJackForward ( - qjackctlPatchbaySocket *pSocket, qjackctlPatchbaySocket *pSocketForward ) -{ - if (pSocket == NULL || pSocketForward == NULL) - return; - if (pSocket->type() != pSocketForward->type()) - return; - - const char **ppszOutputPorts = NULL; - const char **ppszInputPorts = NULL; - if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_AUDIO) { - ppszOutputPorts = m_ppszOAudioPorts; - ppszInputPorts = m_ppszIAudioPorts; - } - else - if (pSocket->type() == QJACKCTL_SOCKETTYPE_JACK_MIDI) { - ppszOutputPorts = m_ppszOMidiPorts; - ppszInputPorts = m_ppszIMidiPorts; - } - - if (ppszOutputPorts == NULL || ppszInputPorts == NULL) - return; - - QStringListIterator iterPlug(pSocket->pluglist()); - QStringListIterator iterPlugForward(pSocketForward->pluglist()); - while (iterPlug.hasNext() && iterPlugForward.hasNext()) { - // Check audio port connection sequentially... - const QString& sPlug = iterPlug.next(); - const QString& sPlugForward = iterPlugForward.next(); - const char *pszPortForward = findJackPort(ppszInputPorts, - pSocketForward->clientName(), sPlugForward, 0); - if (pszPortForward) { - const char *pszPort = findJackPort(ppszInputPorts, - pSocket->clientName(), sPlug, 0); - if (pszPort) - connectJackForwardPorts(pszPort, pszPortForward); - } - } -} - - -// ALSA socket/ports forwarding scan... -void qjackctlPatchbayRack::connectAlsaForwardPorts ( - qjackctlAlsaMidiPort *pPort, qjackctlAlsaMidiPort *pPortForward ) -{ -#ifdef CONFIG_ALSA_SEQ - - // Grab current connections of target port... - QList midiports; - loadAlsaConnections(midiports, pPort, false); - - snd_seq_query_subscribe_t *pAlsaSubs; - snd_seq_addr_t seq_addr; - - snd_seq_query_subscribe_alloca(&pAlsaSubs); - - // Check for inputs from output... - snd_seq_query_subscribe_set_type(pAlsaSubs, SND_SEQ_QUERY_SUBS_WRITE); - snd_seq_query_subscribe_set_index(pAlsaSubs, 0); - seq_addr.client = pPortForward->iAlsaClient; - seq_addr.port = pPortForward->iAlsaPort; - snd_seq_query_subscribe_set_root(pAlsaSubs, &seq_addr); - while (snd_seq_query_port_subscribers(m_pAlsaSeq, pAlsaSubs) >= 0) { - seq_addr = *snd_seq_query_subscribe_get_addr(pAlsaSubs); - // Need to lookup if already connected... - bool bConnected = false; - QListIterator iter(midiports); - while (iter.hasNext()) { - qjackctlAlsaMidiPort *pMidiPort = iter.next(); - if (pMidiPort->iAlsaClient == seq_addr.client && - pMidiPort->iAlsaPort == seq_addr.port) { - bConnected = true; - break; - } - } - // Make and/or just report the connection... - qjackctlAlsaMidiPort oport; - setAlsaPort(&oport, seq_addr.client, seq_addr.port); - if (bConnected) { - checkAlsaPorts(&oport, pPort); - } else { - connectAlsaPorts(&oport, pPort); - } - snd_seq_query_subscribe_set_index(pAlsaSubs, - snd_seq_query_subscribe_get_index(pAlsaSubs) + 1); - } - - qDeleteAll(midiports); - midiports.clear(); - -#endif // CONFIG_ALSA_SEQ -} - -void qjackctlPatchbayRack::connectAlsaForward ( - qjackctlPatchbaySocket *pSocket, qjackctlPatchbaySocket *pSocketForward ) -{ - if (pSocket == NULL || pSocketForward == NULL) - return; - if (pSocket->type() != pSocketForward->type() || - pSocket->type() != QJACKCTL_SOCKETTYPE_ALSA_MIDI) - return; - - QStringListIterator iterPlug(pSocket->pluglist()); - QStringListIterator iterPlugForward(pSocketForward->pluglist()); - while (iterPlug.hasNext() && iterPlugForward.hasNext()) { - // Check MIDI port connection sequentially... - const QString& sPlug = iterPlug.next(); - const QString& sPlugForward = iterPlugForward.next(); - qjackctlAlsaMidiPort *pPortForward = findAlsaPort(m_imidiports, - pSocketForward->clientName(), sPlugForward, 0); - if (pPortForward) { - qjackctlAlsaMidiPort *pPort = findAlsaPort(m_imidiports, - pSocket->clientName(), sPlug, 0); - if (pPort) - connectAlsaForwardPorts(pPort, pPortForward); - } - } -} - - -// Common socket forwrading scan... -void qjackctlPatchbayRack::connectForwardScan ( int iSocketType ) -{ - // First, make a copy of a seriously forwarded socket list... - QList socketlist; - - QListIterator isocket(m_isocketlist); - while (isocket.hasNext()) { - qjackctlPatchbaySocket *pSocket = isocket.next(); - if (pSocket->type() != iSocketType) - continue; - if (pSocket->forward().isEmpty()) - continue; - socketlist.append(pSocket); - } - - // Second, scan for input forwarded sockets... - QListIterator iter(socketlist); - while (iter.hasNext()) { - qjackctlPatchbaySocket *pSocket = iter.next(); - qjackctlPatchbaySocket *pSocketForward - = findSocket(m_isocketlist, pSocket->forward()); - if (pSocketForward == NULL) - continue; - switch (iSocketType) { - case QJACKCTL_SOCKETTYPE_JACK_AUDIO: - case QJACKCTL_SOCKETTYPE_JACK_MIDI: - connectJackForward(pSocket, pSocketForward); - break; - case QJACKCTL_SOCKETTYPE_ALSA_MIDI: - connectAlsaForward(pSocket, pSocketForward); - break; - } - } -} - - -//---------------------------------------------------------------------- -// JACK snapshot. - -void qjackctlPatchbayRack::connectJackSnapshotEx ( int iSocketType ) -{ - if (m_pJackClient == NULL) - return; - - const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; -#ifdef CONFIG_JACK_MIDI - if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) - pszJackPortType = JACK_DEFAULT_MIDI_TYPE; -#endif - - const char **ppszInputPorts = jack_get_ports(m_pJackClient, - 0, pszJackPortType, JackPortIsInput); - if (ppszInputPorts) { - for (int i = 0; ppszInputPorts[i]; ++i) { - const char *pszInputPort = ppszInputPorts[i]; - const QString sInputPort = pszInputPort; - const QString& sIClient = sInputPort.section(':', 0, 0); - const QString& sIPort = sInputPort.section(':', 1, 1); - qjackctlPatchbaySnapshot::add_socket( - isocketlist(), sIClient, sIPort, iSocketType); - } - ::free(ppszInputPorts); - } - - const char **ppszOutputPorts = jack_get_ports(m_pJackClient, - 0, pszJackPortType, JackPortIsOutput); - if (ppszOutputPorts == NULL) - return; - - qjackctlPatchbaySnapshot snapshot; - - for (int i = 0; ppszOutputPorts[i]; ++i) { - const char *pszOutputPort = ppszOutputPorts[i]; - const QString sOutputPort = pszOutputPort; - const QString& sOClient = sOutputPort.section(':', 0, 0); - const QString& sOPort = sOutputPort.section(':', 1, 1); - qjackctlPatchbaySnapshot::add_socket( - osocketlist(), sOClient, sOPort, iSocketType); - // Check for inputs from output... - ppszInputPorts = jack_port_get_all_connections( - m_pJackClient, jack_port_by_name(m_pJackClient, pszOutputPort)); - if (ppszInputPorts == NULL) - continue; - for (int j = 0 ; ppszInputPorts[j]; ++j) { - const char *pszInputPort = ppszInputPorts[j]; - const QString sInputPort = pszInputPort; - const QString& sIClient = sInputPort.section(':', 0, 0); - const QString& sIPort = sInputPort.section(':', 1, 1); - snapshot.append(sOClient, sOPort, sIClient, sIPort); - } - ::free(ppszInputPorts); - } - ::free(ppszOutputPorts); - - snapshot.commit(this, iSocketType); -} - - -void qjackctlPatchbayRack::connectJackSnapshot ( jack_client_t *pJackClient ) -{ - if (pJackClient == NULL || m_pJackClient) - return; - - // Cache JACK client descriptor. - m_pJackClient = pJackClient; - - connectJackSnapshotEx(QJACKCTL_SOCKETTYPE_JACK_AUDIO); - connectJackSnapshotEx(QJACKCTL_SOCKETTYPE_JACK_MIDI); - - // Done. - m_pJackClient = NULL; -} - - -//---------------------------------------------------------------------- -// ALSA snapshot. - -void qjackctlPatchbayRack::connectAlsaSnapshot ( snd_seq_t *pAlsaSeq ) -{ - if (pAlsaSeq == NULL || m_pAlsaSeq) - return; - - // Cache sequencer descriptor. - m_pAlsaSeq = pAlsaSeq; - -#ifdef CONFIG_ALSA_SEQ - - QList imidiports; - loadAlsaPorts(imidiports, false); - - QListIterator iport(imidiports); - while (iport.hasNext()) { - qjackctlAlsaMidiPort *pIPort = iport.next(); - qjackctlPatchbaySnapshot::add_socket( - isocketlist(), pIPort->sClientName, pIPort->sPortName, - QJACKCTL_SOCKETTYPE_ALSA_MIDI); - } - - qDeleteAll(imidiports); - imidiports.clear(); - - qjackctlPatchbaySnapshot snapshot; - - QList omidiports; - loadAlsaPorts(omidiports, true); - - QListIterator oport(omidiports); - while (oport.hasNext()) { - qjackctlAlsaMidiPort *pOPort = oport.next(); - qjackctlPatchbaySnapshot::add_socket( - osocketlist(), pOPort->sClientName, pOPort->sPortName, - QJACKCTL_SOCKETTYPE_ALSA_MIDI); - loadAlsaConnections(imidiports, pOPort, true); - QListIterator iport(imidiports); - while (iport.hasNext()) { - qjackctlAlsaMidiPort *pIPort = iport.next(); - snapshot.append( - pOPort->sClientName, pOPort->sPortName, - pIPort->sClientName, pIPort->sPortName); - } - qDeleteAll(imidiports); - imidiports.clear(); - } - - qDeleteAll(omidiports); - omidiports.clear(); - - snapshot.commit(this, QJACKCTL_SOCKETTYPE_ALSA_MIDI); - -#endif - - // Done. - m_pAlsaSeq = NULL; -} - - -// qjackctlPatchbayRack.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayRack.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayRack.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlPatchbayRack.h 2008-11-26 19:42:14.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlPatchbayRack.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,325 +0,0 @@ -// qjackctlPatchbayRack.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlPatchbayRack_h -#define __qjackctlPatchbayRack_h - -#include "qjackctlAbout.h" - -#include - -#include - -#ifdef CONFIG_ALSA_SEQ -#include -#else -typedef void snd_seq_t; -#endif - -// Patchbay socket types. -#define QJACKCTL_SOCKETTYPE_JACK_AUDIO 0 -#define QJACKCTL_SOCKETTYPE_JACK_MIDI 1 -#define QJACKCTL_SOCKETTYPE_ALSA_MIDI 2 - -// Patchbay slot normalization modes. -#define QJACKCTL_SLOTMODE_OPEN 0 -#define QJACKCTL_SLOTMODE_HALF 1 -#define QJACKCTL_SLOTMODE_FULL 2 - -// Patchbay change signal flags. -#define QJACKCTL_CABLE_FAILED 0 -#define QJACKCTL_CABLE_CHECKED 1 -#define QJACKCTL_CABLE_CONNECTED 2 -#define QJACKCTL_CABLE_DISCONNECTED 3 - - -// Struct name says it all. -struct qjackctlAlsaMidiPort -{ - QString sClientName; - QString sPortName; - int iAlsaClient; - int iAlsaPort; -}; - -// Patchbay socket definition. -class qjackctlPatchbaySocket -{ -public: - - // Constructor. - qjackctlPatchbaySocket(const QString& sSocketName, const QString& sClientName, int iSocketType); - // Default destructor. - ~qjackctlPatchbaySocket(); - - // Socket property accessors. - const QString& name() const; - const QString& clientName() const; - int type() const; - bool isExclusive() const; - const QString& forward() const; - - // Socket property methods. - void setName(const QString& sSocketName); - void setClientName(const QString& sClientName); - void setType(int iSocketType); - void setExclusive(bool bExclusive); - void setForward(const QString& sSocketForward); - - // Plug list primitive methods. - void addPlug(const QString& sPlugName); - void removePlug(const QString& sPlugName); - - // Plug list accessor. - QStringList& pluglist(); - -private: - - // Properties. - QString m_sSocketName; - QString m_sClientName; - int m_iSocketType; - bool m_bExclusive; - QString m_sSocketForward; - - // Patchbay socket plug list. - QStringList m_pluglist; -}; - - -// Patchbay socket slot definition. -class qjackctlPatchbaySlot -{ -public: - - // Constructor. - qjackctlPatchbaySlot(const QString& sSlotName, int iSlotMode = QJACKCTL_SLOTMODE_OPEN); - // Default destructor. - ~qjackctlPatchbaySlot(); - - // Slot property accessors. - const QString& name() const; - int mode() const; - - // Slot property methods. - void setName(const QString& sSlotName); - void setMode(int iSlotMode); - - // Socket methods. - void setOutputSocket(qjackctlPatchbaySocket *pSocket); - void setInputSocket(qjackctlPatchbaySocket *pSocket); - - // Socket accessors. - qjackctlPatchbaySocket *outputSocket() const; - qjackctlPatchbaySocket *inputSocket() const; - -private: - - // Slot properties. - QString m_sSlotName; - int m_iSlotMode; - - // Socket references. - qjackctlPatchbaySocket *m_pOutputSocket; - qjackctlPatchbaySocket *m_pInputSocket; -}; - - -// Patchbay cable connection definition. -class qjackctlPatchbayCable -{ -public: - - // Constructor. - qjackctlPatchbayCable(qjackctlPatchbaySocket *pOutputSocket, - qjackctlPatchbaySocket *pInputSocket); - // Default destructor. - ~qjackctlPatchbayCable(); - - // Socket methods. - void setOutputSocket(qjackctlPatchbaySocket *pSocket); - void setInputSocket(qjackctlPatchbaySocket *pSocket); - - // Socket accessors. - qjackctlPatchbaySocket *outputSocket() const; - qjackctlPatchbaySocket *inputSocket() const; - -private: - - // Socket references. - qjackctlPatchbaySocket *m_pOutputSocket; - qjackctlPatchbaySocket *m_pInputSocket; -}; - - -// Patchbay rack profile definition. -class qjackctlPatchbayRack : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlPatchbayRack(); - // Default destructor. - ~qjackctlPatchbayRack(); - - // Common socket list primitive methods. - void addSocket(QList& socketlist, - qjackctlPatchbaySocket *pSocket); - void removeSocket(QList& socketlist, - qjackctlPatchbaySocket *pSocket); - - // Slot list primitive methods. - void addSlot(qjackctlPatchbaySlot *pSlot); - void removeSlot(qjackctlPatchbaySlot *pSlot); - - // Cable list primitive methods. - void addCable(qjackctlPatchbayCable *pCable); - void removeCable(qjackctlPatchbayCable *pCable); - - // Common socket finder. - qjackctlPatchbaySocket *findSocket( - QList& socketlist, const QString& sSocketName); - // Slot finders. - qjackctlPatchbaySlot *findSlot(const QString& sSlotName); - // Cable finder. - qjackctlPatchbayCable *findCable( - const QString& sOutputSocket, const QString& sInputSocket); - qjackctlPatchbayCable *findCable(qjackctlPatchbayCable *pCablePtr); - - // Cable finder (logical matching by client/port names). - qjackctlPatchbayCable *findCable ( - const QString& sOClientName, const QString& sOPortName, - const QString& sIClientName, const QString& sIPortName, - int iSocketType); - - // Patchbay cleaner. - void clear(); - - // Patchbay rack socket list accessors. - QList& osocketlist(); - QList& isocketlist(); - // Patchbay rack slots list accessor. - QList& slotlist(); - // Patchbay cable connections list accessor. - QList& cablelist(); - - // Overloaded cable connection persistence scan cycle methods. - void connectJackScan(jack_client_t *pJackClient); - void connectAlsaScan(snd_seq_t *pAlsaSeq); - - // Patchbay snapshot methods. - void connectJackSnapshot(jack_client_t *pJackClient); - void connectAlsaSnapshot(snd_seq_t *pAlsaSeq); - -signals: - - // Cable connection change signal. - void cableConnected(const QString& sOutputPort, - const QString& sInputPort, unsigned int uiCableFlags); - -private: - - // Audio connection scan related private methods. - const char *findJackPort(const char **ppszJackPorts, - const QString& sClientName, const QString& sPortName, int n = 0); - void connectJackPorts( - const char *pszOutputPort, const char *pszInputPort); - void disconnectJackPorts( - const char *pszOutputPort, const char *pszInputPort); - void checkJackPorts( - const char *pszOutputPort, const char *pszInputPort); - void connectJackSocketPorts( - qjackctlPatchbaySocket *pOutputSocket, const char *pszOutputPort, - qjackctlPatchbaySocket *pInputSocket, const char *pszInputPort); - void connectJackCable( - qjackctlPatchbaySocket *pOutputSocket, - qjackctlPatchbaySocket *pInputSocket); - - // MIDI connection scan related private methods. - void loadAlsaPorts(QList& midiports, bool bReadable); - qjackctlAlsaMidiPort *findAlsaPort(QList& midiports, - const QString& sClientName, const QString& sPortName, int n); - QString getAlsaPortName(qjackctlAlsaMidiPort *pAlsaPort); - void setAlsaPort(qjackctlAlsaMidiPort *pAlsaPort, - int iAlsaClient, int iAlsaPort); - void connectAlsaPorts( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); - void disconnectAlsaPorts( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); - void checkAlsaPorts( - qjackctlAlsaMidiPort *pOutputPort, qjackctlAlsaMidiPort *pInputPort); - void connectAlsaSocketPorts( - qjackctlPatchbaySocket *pOutputSocket, qjackctlAlsaMidiPort *pOutputPort, - qjackctlPatchbaySocket *pInputSocket, qjackctlAlsaMidiPort *pInputPort); - void connectAlsaCable( - qjackctlPatchbaySocket *pOutputSocket, - qjackctlPatchbaySocket *pInputSocket); - - void loadAlsaConnections(QList& midiports, - qjackctlAlsaMidiPort *pAlsaPort, bool bReadable); - - // Audio socket/ports forwarding executive methods. - void connectJackForwardPorts( - const char *pszPort, const char *pszPortForward); - void connectJackForward( - qjackctlPatchbaySocket *pSocket, - qjackctlPatchbaySocket *pSocketForward); - - // MIDI socket/ports forwarding executive methods. - void connectAlsaForwardPorts( - qjackctlAlsaMidiPort *pPort, qjackctlAlsaMidiPort *pPortForward); - void connectAlsaForward( - qjackctlPatchbaySocket *pSocket, - qjackctlPatchbaySocket *pSocketForward); - - // Common socket forwarding scan method. - void connectForwardScan(int iSocketType); - - // JACK snapshot executive. - void connectJackSnapshotEx(int iSocketType); - - // Patchbay sockets lists. - QList m_osocketlist; - QList m_isocketlist; - // Patchbay rack slots list. - QList m_slotlist; - // Patchbay cable connections list. - QList m_cablelist; - - // Audio connection persistence cache variables. - jack_client_t *m_pJackClient; - const char **m_ppszOAudioPorts; - const char **m_ppszIAudioPorts; - const char **m_ppszOMidiPorts; - const char **m_ppszIMidiPorts; - - // MIDI connection persistence cache variables. - snd_seq_t *m_pAlsaSeq; - QList m_omidiports; - QList m_imidiports; -}; - - -#endif // __qjackctlPatchbayRack_h - -// qjackctlPatchbayRack.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetup.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetup.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetup.cpp 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetup.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,664 +0,0 @@ -// qjackctlSetup.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlSetup.h" - -#include -#include -#include - -#include -#include - - -// Constructor. -qjackctlSetup::qjackctlSetup (void) - : m_settings(QJACKCTL_DOMAIN, QJACKCTL_TITLE) -{ - bStartJack = false; - sDefPresetName = QObject::tr("(default)"); - - m_settings.beginGroup("/Presets"); - sDefPreset = m_settings.value("/DefPreset", sDefPresetName).toString(); - QString sPrefix = "/Preset%1"; - int i = 0; - for (;;) { - QString sItem = m_settings.value(sPrefix.arg(++i)).toString(); - if (sItem.isEmpty()) - break; - presets.append(sItem); - } - m_settings.endGroup(); - - m_settings.beginGroup("/Options"); - bStartJack = m_settings.value("/StartJack", false).toBool(); - bStartupScript = m_settings.value("/StartupScript", true).toBool(); - sStartupScriptShell = m_settings.value("/StartupScriptShell", "artsshell -q terminate").toString(); - bPostStartupScript = m_settings.value("/PostStartupScript", false).toBool(); - sPostStartupScriptShell = m_settings.value("/PostStartupScriptShell").toString(); - bShutdownScript = m_settings.value("/ShutdownScript", false).toBool(); - sShutdownScriptShell = m_settings.value("/ShutdownScriptShell").toString(); - bPostShutdownScript = m_settings.value("/PostShutdownScript", true).toBool(); - sPostShutdownScriptShell = m_settings.value("/PostShutdownScriptShell", "killall jackd").toString(); - bStdoutCapture = m_settings.value("/StdoutCapture", true).toBool(); - sXrunRegex = m_settings.value("/XrunRegex", "xrun of at least ([0-9|\\.]+) msecs").toString(); - bXrunIgnoreFirst = m_settings.value("/XrunIgnoreFirst", false).toBool(); - bActivePatchbay = m_settings.value("/ActivePatchbay", false).toBool(); - sActivePatchbayPath = m_settings.value("/ActivePatchbayPath").toString(); -#ifdef CONFIG_AUTO_REFRESH - bAutoRefresh = m_settings.value("/AutoRefresh", false).toBool(); - iTimeRefresh = m_settings.value("/TimeRefresh", 10).toInt(); -#endif - bMessagesLog = m_settings.value("/MessagesLog", false).toBool(); - sMessagesLogPath = m_settings.value("/MessagesLogPath", "qjackctl.log").toString(); - bBezierLines = m_settings.value("/BezierLines", false).toBool(); - iTimeDisplay = m_settings.value("/TimeDisplay", 0).toInt(); - iTimeFormat = m_settings.value("/TimeFormat", 0).toInt(); - sMessagesFont = m_settings.value("/MessagesFont").toString(); - bMessagesLimit = m_settings.value("/MessagesLimit", true).toBool(); - iMessagesLimitLines = m_settings.value("/MessagesLimitLines", 1000).toInt(); - sDisplayFont1 = m_settings.value("/DisplayFont1").toString(); - sDisplayFont2 = m_settings.value("/DisplayFont2").toString(); - bDisplayEffect = m_settings.value("/DisplayEffect", true).toBool(); - bDisplayBlink = m_settings.value("/DisplayBlink", true).toBool(); - iJackClientPortAlias = m_settings.value("/JackClientPortAlias", 0).toInt(); - iConnectionsIconSize = m_settings.value("/ConnectionsIconSize", QJACKCTL_ICON_16X16).toInt(); - sConnectionsFont = m_settings.value("/ConnectionsFont").toString(); - bQueryClose = m_settings.value("/QueryClose", true).toBool(); - bKeepOnTop = m_settings.value("/KeepOnTop", false).toBool(); - bSystemTray = m_settings.value("/SystemTray", false).toBool(); - bStartMinimized = m_settings.value("/StartMinimized", false).toBool(); - bDelayedSetup = m_settings.value("/DelayedSetup", false).toBool(); - bServerConfig = m_settings.value("/ServerConfig", true).toBool(); - sServerConfigName = m_settings.value("/ServerConfigName", ".jackdrc").toString(); - bServerConfigTemp = m_settings.value("/ServerConfigTemp", false).toBool(); - bQueryShutdown = m_settings.value("/QueryShutdown", true).toBool(); - bAlsaSeqEnabled = m_settings.value("/AlsaSeqEnabled", true).toBool(); - bAliasesEnabled = m_settings.value("/AliasesEnabled", false).toBool(); - bAliasesEditing = m_settings.value("/AliasesEditing", false).toBool(); - bLeftButtons = m_settings.value("/LeftButtons", true).toBool(); - bRightButtons = m_settings.value("/RightButtons", true).toBool(); - bTransportButtons = m_settings.value("/TransportButtons", true).toBool(); - bTextLabels = m_settings.value("/TextLabels", true).toBool(); - iBaseFontSize = m_settings.value("/BaseFontSize", 0).toInt(); - m_settings.endGroup(); - - m_settings.beginGroup("/Defaults"); - sPatchbayPath = m_settings.value("/PatchbayPath").toString(); - m_settings.endGroup(); - - // Load recent patchbay list... - m_settings.beginGroup("/Patchbays"); - sPrefix = "/Patchbay%1"; - i = 0; - for (;;) { - QString sItem = m_settings.value(sPrefix.arg(++i)).toString(); - if (sItem.isEmpty()) - break; - patchbays.append(sItem); - } - m_settings.endGroup(); -} - - -// Destructor; -qjackctlSetup::~qjackctlSetup (void) -{ - // Save all settings and options... - m_settings.beginGroup("/Program"); - m_settings.setValue("/Version", QJACKCTL_VERSION); - m_settings.endGroup(); - - m_settings.beginGroup("/Presets"); - m_settings.setValue("/DefPreset", sDefPreset); - // Save last preset list. - QString sPrefix = "/Preset%1"; - int i = 0; - QStringListIterator iter(presets); - while (iter.hasNext()) - m_settings.setValue(sPrefix.arg(++i), iter.next()); - // Cleanup old entries, if any... - while (!m_settings.value(sPrefix.arg(++i)).toString().isEmpty()) - m_settings.remove(sPrefix.arg(i)); - m_settings.endGroup(); - - m_settings.beginGroup("/Options"); - m_settings.setValue("/StartJack", bStartJack); - m_settings.setValue("/StartupScript", bStartupScript); - m_settings.setValue("/StartupScriptShell", sStartupScriptShell); - m_settings.setValue("/PostStartupScript", bPostStartupScript); - m_settings.setValue("/PostStartupScriptShell", sPostStartupScriptShell); - m_settings.setValue("/ShutdownScript", bShutdownScript); - m_settings.setValue("/ShutdownScriptShell", sShutdownScriptShell); - m_settings.setValue("/PostShutdownScript", bPostShutdownScript); - m_settings.setValue("/PostShutdownScriptShell", sPostShutdownScriptShell); - m_settings.setValue("/StdoutCapture", bStdoutCapture); - m_settings.setValue("/XrunRegex", sXrunRegex); - m_settings.setValue("/XrunIgnoreFirst", bXrunIgnoreFirst); - m_settings.setValue("/ActivePatchbay", bActivePatchbay); - m_settings.setValue("/ActivePatchbayPath", sActivePatchbayPath); -#ifdef CONFIG_AUTO_REFRESH - m_settings.setValue("/AutoRefresh", bAutoRefresh); - m_settings.setValue("/TimeRefresh", iTimeRefresh); -#endif - m_settings.setValue("/MessagesLog", bMessagesLog); - m_settings.setValue("/MessagesLogPath", sMessagesLogPath); - m_settings.setValue("/BezierLines", bBezierLines); - m_settings.setValue("/TimeDisplay", iTimeDisplay); - m_settings.setValue("/TimeFormat", iTimeFormat); - m_settings.setValue("/MessagesFont", sMessagesFont); - m_settings.setValue("/MessagesLimit", bMessagesLimit); - m_settings.setValue("/MessagesLimitLines", iMessagesLimitLines); - m_settings.setValue("/DisplayFont1", sDisplayFont1); - m_settings.setValue("/DisplayFont2", sDisplayFont2); - m_settings.setValue("/DisplayEffect", bDisplayEffect); - m_settings.setValue("/DisplayBlink", bDisplayBlink); - m_settings.setValue("/JackClientPortAlias", iJackClientPortAlias); - m_settings.setValue("/ConnectionsIconSize", iConnectionsIconSize); - m_settings.setValue("/ConnectionsFont", sConnectionsFont); - m_settings.setValue("/QueryClose", bQueryClose); - m_settings.setValue("/KeepOnTop", bKeepOnTop); - m_settings.setValue("/SystemTray", bSystemTray); - m_settings.setValue("/StartMinimized", bStartMinimized); - m_settings.setValue("/DelayedSetup", bDelayedSetup); - m_settings.setValue("/ServerConfig", bServerConfig); - m_settings.setValue("/ServerConfigName", sServerConfigName); - m_settings.setValue("/ServerConfigTemp", bServerConfigTemp); - m_settings.setValue("/QueryShutdown", bQueryShutdown); - m_settings.setValue("/AlsaSeqEnabled", bAlsaSeqEnabled); - m_settings.setValue("/AliasesEnabled", bAliasesEnabled); - m_settings.setValue("/AliasesEditing", bAliasesEditing); - m_settings.setValue("/LeftButtons", bLeftButtons); - m_settings.setValue("/RightButtons", bRightButtons); - m_settings.setValue("/TransportButtons", bTransportButtons); - m_settings.setValue("/TextLabels", bTextLabels); - m_settings.setValue("/BaseFontSize", iBaseFontSize); - m_settings.endGroup(); - - m_settings.beginGroup("/Defaults"); - m_settings.setValue("/PatchbayPath", sPatchbayPath); - m_settings.endGroup(); - - // Save patchbay list... - m_settings.beginGroup("/Patchbays"); - sPrefix = "/Patchbay%1"; - i = 0; - QStringListIterator iter2(patchbays); - while (iter2.hasNext()) - m_settings.setValue(sPrefix.arg(++i), iter2.next()); - // Cleanup old entries, if any... - while (!m_settings.value(sPrefix.arg(++i)).toString().isEmpty()) - m_settings.remove(sPrefix.arg(i)); - m_settings.endGroup(); -} - - -//--------------------------------------------------------------------------- -// Aliases preset management methods. - -bool qjackctlSetup::loadAliases ( const QString& sPreset ) -{ - QString sSuffix; - if (sPreset != sDefPresetName && !sPreset.isEmpty()) { - sSuffix = '/' + sPreset; - // Check if on list. - if (!presets.contains(sPreset)) - return false; - } - - // Load preset aliases... - const QString sAliasesKey = "/Aliases" + sSuffix; - m_settings.beginGroup(sAliasesKey); - m_settings.beginGroup("/Jack"); // FIXME: Audio - aliasAudioOutputs.loadSettings(m_settings, "/Outputs"); - aliasAudioInputs.loadSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.beginGroup("/Midi"); - aliasMidiOutputs.loadSettings(m_settings, "/Outputs"); - aliasMidiInputs.loadSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.beginGroup("/Alsa"); - aliasAlsaOutputs.loadSettings(m_settings, "/Outputs"); - aliasAlsaInputs.loadSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.endGroup(); - - return true; -} - -bool qjackctlSetup::saveAliases ( const QString& sPreset ) -{ - QString sSuffix; - if (sPreset != sDefPresetName && !sPreset.isEmpty()) { - sSuffix = "/" + sPreset; - // Append to list if not already. - if (!presets.contains(sPreset)) - presets.prepend(sPreset); - } - - // Save preset aliases... - const QString sAliasesKey = "/Aliases" + sSuffix; - m_settings.remove(sAliasesKey); - m_settings.beginGroup(sAliasesKey); - m_settings.beginGroup("/Jack"); // FIXME: Audio - aliasAudioOutputs.saveSettings(m_settings, "/Outputs"); - aliasAudioInputs.saveSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.beginGroup("/Midi"); - aliasMidiOutputs.saveSettings(m_settings, "/Outputs"); - aliasMidiInputs.saveSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.beginGroup("/Alsa"); - aliasAlsaOutputs.saveSettings(m_settings, "/Outputs"); - aliasAlsaInputs.saveSettings(m_settings, "/Inputs"); - m_settings.endGroup(); - m_settings.endGroup(); - - return true; -} - - -//--------------------------------------------------------------------------- -// Preset management methods. - -bool qjackctlSetup::loadPreset ( qjackctlPreset& preset, const QString& sPreset ) -{ - QString sSuffix; - if (sPreset != sDefPresetName && !sPreset.isEmpty()) { - sSuffix = '/' + sPreset; - // Check if on list. - if (!presets.contains(sPreset)) - return false; - } - - m_settings.beginGroup("/Settings" + sSuffix); - preset.sServer = m_settings.value("/Server", "jackd").toString(); - preset.bRealtime = m_settings.value("/Realtime", true).toBool(); - preset.bSoftMode = m_settings.value("/SoftMode", false).toBool(); - preset.bMonitor = m_settings.value("/Monitor", false).toBool(); - preset.bShorts = m_settings.value("/Shorts", false).toBool(); - preset.bNoMemLock = m_settings.value("/NoMemLock", false).toBool(); - preset.bUnlockMem = m_settings.value("/UnlockMem", false).toBool(); - preset.bHWMon = m_settings.value("/HWMon", false).toBool(); - preset.bHWMeter = m_settings.value("/HWMeter", false).toBool(); - preset.bIgnoreHW = m_settings.value("/IgnoreHW", false).toBool(); - preset.iPriority = m_settings.value("/Priority", 0).toInt(); - preset.iFrames = m_settings.value("/Frames", 1024).toInt(); - preset.iSampleRate = m_settings.value("/SampleRate", 48000).toInt(); - preset.iPeriods = m_settings.value("/Periods", 2).toInt(); - preset.iWordLength = m_settings.value("/WordLength", 16).toInt(); - preset.iWait = m_settings.value("/Wait", 21333).toInt(); - preset.iChan = m_settings.value("/Chan", 0).toInt(); - preset.sDriver = m_settings.value("/Driver", "alsa").toString(); - preset.sInterface = m_settings.value("/Interface").toString(); - preset.iAudio = m_settings.value("/Audio", 0).toInt(); - preset.iDither = m_settings.value("/Dither", 0).toInt(); - preset.iTimeout = m_settings.value("/Timeout", 500).toInt(); - preset.sInDevice = m_settings.value("/InDevice").toString(); - preset.sOutDevice = m_settings.value("/OutDevice").toString(); - preset.iInChannels = m_settings.value("/InChannels", 0).toInt(); - preset.iOutChannels = m_settings.value("/OutChannels", 0).toInt(); - preset.iInLatency = m_settings.value("/InLatency", 0).toInt(); - preset.iOutLatency = m_settings.value("/OutLatency", 0).toInt(); - preset.iStartDelay = m_settings.value("/StartDelay", 2).toInt(); - preset.bVerbose = m_settings.value("/Verbose", false).toBool(); - preset.iPortMax = m_settings.value("/PortMax", 256).toInt(); - preset.sMidiDriver = m_settings.value("/MidiDriver").toString(); - m_settings.endGroup(); - -#ifdef CONFIG_JACK_MIDI - if (!preset.sMidiDriver.isEmpty() && - preset.sMidiDriver != "raw" && - preset.sMidiDriver != "seq") - preset.sMidiDriver.clear(); -#endif - - return true; -} - -bool qjackctlSetup::savePreset ( qjackctlPreset& preset, const QString& sPreset ) -{ - QString sSuffix; - if (sPreset != sDefPresetName && !sPreset.isEmpty()) { - sSuffix = '/' + sPreset; - // Append to list if not already. - if (!presets.contains(sPreset)) - presets.prepend(sPreset); - } - - m_settings.beginGroup("/Settings" + sSuffix); - m_settings.setValue("/Server", preset.sServer); - m_settings.setValue("/Realtime", preset.bRealtime); - m_settings.setValue("/SoftMode", preset.bSoftMode); - m_settings.setValue("/Monitor", preset.bMonitor); - m_settings.setValue("/Shorts", preset.bShorts); - m_settings.setValue("/NoMemLock", preset.bNoMemLock); - m_settings.setValue("/UnlockMem", preset.bUnlockMem); - m_settings.setValue("/HWMon", preset.bHWMon); - m_settings.setValue("/HWMeter", preset.bHWMeter); - m_settings.setValue("/IgnoreHW", preset.bIgnoreHW); - m_settings.setValue("/Priority", preset.iPriority); - m_settings.setValue("/Frames", preset.iFrames); - m_settings.setValue("/SampleRate", preset.iSampleRate); - m_settings.setValue("/Periods", preset.iPeriods); - m_settings.setValue("/WordLength", preset.iWordLength); - m_settings.setValue("/Wait", preset.iWait); - m_settings.setValue("/Chan", preset.iChan); - m_settings.setValue("/Driver", preset.sDriver); - m_settings.setValue("/Interface", preset.sInterface); - m_settings.setValue("/Audio", preset.iAudio); - m_settings.setValue("/Dither", preset.iDither); - m_settings.setValue("/Timeout", preset.iTimeout); - m_settings.setValue("/InDevice", preset.sInDevice); - m_settings.setValue("/OutDevice", preset.sOutDevice); - m_settings.setValue("/InChannels", preset.iInChannels); - m_settings.setValue("/OutChannels", preset.iOutChannels); - m_settings.setValue("/InLatency", preset.iInLatency); - m_settings.setValue("/OutLatency", preset.iOutLatency); - m_settings.setValue("/StartDelay", preset.iStartDelay); - m_settings.setValue("/Verbose", preset.bVerbose); - m_settings.setValue("/PortMax", preset.iPortMax); - m_settings.setValue("/MidiDriver", preset.sMidiDriver); - m_settings.endGroup(); - - return true; -} - -bool qjackctlSetup::deletePreset ( const QString& sPreset ) -{ - QString sSuffix; - if (sPreset != sDefPresetName && !sPreset.isEmpty()) { - sSuffix = '/' + sPreset; - int iPreset = presets.indexOf(sPreset); - if (iPreset < 0) - return false; - presets.removeAt(iPreset); - m_settings.remove("/Settings" + sSuffix); - m_settings.remove("/Aliases" + sSuffix); - } - return true; -} - - -//------------------------------------------------------------------------- -// Command-line argument stuff. -// - -// Help about command line options. -void qjackctlSetup::print_usage ( const char *arg0 ) -{ - QTextStream out(stderr); - const QString sEot = "\n\t"; - const QString sEol = "\n\n"; - - out << QObject::tr("Usage: %1" - " [options] [command-and-args]").arg(arg0) + sEol; - out << QJACKCTL_TITLE " - " + QObject::tr(QJACKCTL_SUBTITLE) + sEol; - out << QObject::tr("Options:") + sEol; - out << " -s, --start" + sEot + - QObject::tr("Start JACK audio server immediately") + sEol; - out << " -p, --preset=[label]" + sEot + - QObject::tr("Set default settings preset name") + sEol; - out << " -h, --help" + sEot + - QObject::tr("Show help about command line options") + sEol; - out << " -v, --version" + sEot + - QObject::tr("Show version information") + sEol; -} - - -// Parse command line arguments into m_settings. -bool qjackctlSetup::parse_args ( int argc, char **argv ) -{ - QTextStream out(stderr); - const QString sEol = "\n\n"; - int iCmdArgs = 0; - - for (int i = 1; i < argc; i++) { - - if (iCmdArgs > 0) { - sCmdLine += ' '; - sCmdLine += argv[i]; - iCmdArgs++; - continue; - } - - QString sArg = argv[i]; - QString sVal = QString::null; - int iEqual = sArg.indexOf('='); - if (iEqual >= 0) { - sVal = sArg.right(sArg.length() - iEqual - 1); - sArg = sArg.left(iEqual); - } - else if (i < argc) - sVal = argv[i + 1]; - - if (sArg == "-s" || sArg == "--start") { - bStartJack = true; - } - else if (sArg == "-p" || sArg == "--preset") { - if (sVal.isNull()) { - out << QObject::tr("Option -p requires an argument (preset).") + sEol; - return false; - } - sDefPreset = sVal; - if (iEqual < 0) - i++; - } - else if (sArg == "-h" || sArg == "--help") { - print_usage(argv[0]); - return false; - } - else if (sArg == "-v" || sArg == "--version") { - out << QObject::tr("Qt: %1\n").arg(qVersion()); - out << QObject::tr(QJACKCTL_TITLE ": %1\n").arg(QJACKCTL_VERSION); - return false; - } // FIXME: Avoid auto-start jackd stuffed args! - else if (sArg != "-T" && sArg != "-ndefault") { - // Here starts the optional command line... - sCmdLine += sArg; - iCmdArgs++; - } - } - - // HACK: If there's a command line, it must be spawned on background... - if (iCmdArgs > 0) - sCmdLine += " &"; - - // Alright with argument parsing. - return true; -} - - -//--------------------------------------------------------------------------- -// Combo box history persistence helper implementation. - -void qjackctlSetup::loadComboBoxHistory ( QComboBox *pComboBox, int iLimit ) -{ - // Load combobox list from configuration settings file... - m_settings.beginGroup("/History/" + pComboBox->objectName()); - - if (m_settings.childKeys().count() > 0) { - pComboBox->setUpdatesEnabled(false); - pComboBox->setDuplicatesEnabled(false); - pComboBox->clear(); - for (int i = 0; i < iLimit; i++) { - const QString& sText = m_settings.value( - "/Item" + QString::number(i + 1)).toString(); - if (sText.isEmpty()) - break; - pComboBox->addItem(sText); - } - pComboBox->setUpdatesEnabled(true); - } - - m_settings.endGroup(); -} - - -void qjackctlSetup::saveComboBoxHistory ( QComboBox *pComboBox, int iLimit ) -{ - // Add current text as latest item... - const QString& sCurrentText = pComboBox->currentText(); - int iCount = pComboBox->count(); - for (int i = 0; i < iCount; i++) { - const QString& sText = pComboBox->itemText(i); - if (sText == sCurrentText) { - pComboBox->removeItem(i); - iCount--; - break; - } - } - while (iCount >= iLimit) - pComboBox->removeItem(--iCount); - pComboBox->insertItem(0, sCurrentText); - iCount++; - - // Save combobox list to configuration settings file... - m_settings.beginGroup("/History/" + pComboBox->objectName()); - for (int i = 0; i < iCount; i++) { - const QString& sText = pComboBox->itemText(i); - if (sText.isEmpty()) - break; - m_settings.setValue("/Item" + QString::number(i + 1), sText); - } - m_settings.endGroup(); -} - - -//--------------------------------------------------------------------------- -// Splitter widget sizes persistence helper methods. - -void qjackctlSetup::loadSplitterSizes ( QSplitter *pSplitter, - QList& sizes ) -{ - // Try to restore old splitter sizes... - if (pSplitter) { - m_settings.beginGroup("/Splitter/" + pSplitter->objectName()); - QStringList list = m_settings.value("/sizes").toStringList(); - if (!list.isEmpty()) { - sizes.clear(); - QStringListIterator iter(list); - while (iter.hasNext()) - sizes.append(iter.next().toInt()); - } - pSplitter->setSizes(sizes); - m_settings.endGroup(); - } -} - - -void qjackctlSetup::saveSplitterSizes ( QSplitter *pSplitter ) -{ - // Try to save current splitter sizes... - if (pSplitter) { - m_settings.beginGroup("/Splitter/" + pSplitter->objectName()); - QStringList list; - QList sizes = pSplitter->sizes(); - QListIterator iter(sizes); - while (iter.hasNext()) - list.append(QString::number(iter.next())); - if (!list.isEmpty()) - m_settings.setValue("/sizes", list); - m_settings.endGroup(); - } -} - - -//--------------------------------------------------------------------------- -// Widget geometry persistence helper methods. - -void qjackctlSetup::loadWidgetGeometry ( QWidget *pWidget, bool bMinimized ) -{ - // Try to restore old form window positioning. - if (pWidget) { - QPoint fpos; - QSize fsize; - bool bVisible; - m_settings.beginGroup("/Geometry/" + pWidget->objectName()); - fpos.setX(m_settings.value("/x", -1).toInt()); - fpos.setY(m_settings.value("/y", -1).toInt()); - fsize.setWidth(m_settings.value("/width", -1).toInt()); - fsize.setHeight(m_settings.value("/height", -1).toInt()); - bVisible = m_settings.value("/visible", false).toBool(); - m_settings.endGroup(); - new qjackctlDelayedSetup(pWidget, fpos, fsize, bVisible && !bMinimized, - (bDelayedSetup ? 1000 : 0)); - } -} - - -void qjackctlSetup::saveWidgetGeometry ( QWidget *pWidget, bool bMinimized ) -{ - // Try to save form window position... - // (due to X11 window managers ideossincrasies, we better - // only save the form geometry while its up and visible) - if (pWidget) { - m_settings.beginGroup("/Geometry/" + pWidget->objectName()); - bool bVisible = pWidget->isVisible(); - const QPoint& fpos = pWidget->pos(); - const QSize& fsize = pWidget->size(); - m_settings.setValue("/x", fpos.x()); - m_settings.setValue("/y", fpos.y()); - m_settings.setValue("/width", fsize.width()); - m_settings.setValue("/height", fsize.height()); - m_settings.setValue("/visible", bVisible && !bMinimized); - m_settings.endGroup(); - } -} - - -//--------------------------------------------------------------------------- -// Delayed setup option. - -// Delayed widget setup helper class. -qjackctlDelayedSetup::qjackctlDelayedSetup ( QWidget *pWidget, - const QPoint& pos, const QSize& size, bool bVisible, int iDelay ) - : m_pos(pos), m_size(size) -{ - m_pWidget = pWidget; - m_bVisible = bVisible; - - if (iDelay > 0) { - QTimer::singleShot(iDelay, this, SLOT(setup())); - } else { - setup(); - } -} - - -void qjackctlDelayedSetup::setup (void) -{ - if (m_pWidget) { - if (m_pos.x() > 0 && m_pos.y() > 0) - m_pWidget->move(m_pos); - if (m_size.width() > 0 && m_size.height() > 0) - m_pWidget->resize(m_size); - else - m_pWidget->adjustSize(); - if (m_bVisible) - m_pWidget->show(); - } - deleteLater(); -} - - -// end of qjackctlSetup.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.cpp 2008-11-26 19:42:14.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1795 +0,0 @@ -// qjackctlSetupForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlSetupForm.h" - -#include "qjackctlSetup.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#ifdef CONFIG_COREAUDIO -#include -#include -#include -#include -#include -#endif - -#ifdef CONFIG_ALSA_SEQ -#include -#endif - - -//---------------------------------------------------------------------------- -// qjackctlSetupForm -- UI wrapper form. - -// Constructor. -qjackctlSetupForm::qjackctlSetupForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QDialog(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - // No settings descriptor initially (the caller will set it). - m_pSetup = NULL; - - // Setup time-display radio-button group. - m_pTimeDisplayButtonGroup = new QButtonGroup(this); - m_pTimeDisplayButtonGroup->addButton(m_ui.TransportTimeRadioButton, 0); - m_pTimeDisplayButtonGroup->addButton(m_ui.TransportBBTRadioButton, 1); - m_pTimeDisplayButtonGroup->addButton(m_ui.ElapsedResetRadioButton, 2); - m_pTimeDisplayButtonGroup->addButton(m_ui.ElapsedXrunRadioButton, 3); - m_pTimeDisplayButtonGroup->setExclusive(true); - - // Initialize dirty control state. - m_iDirtySetup = 0; - m_iDirtySettings = 0; - m_iDirtyOptions = 0; - - // Set dialog validators... - m_ui.PresetComboBox->setValidator( - new QRegExpValidator(QRegExp("[\\w-]+"), m_ui.PresetComboBox)); - m_ui.FramesComboBox->setValidator( - new QIntValidator(m_ui.FramesComboBox)); - m_ui.SampleRateComboBox->setValidator( - new QIntValidator(m_ui.SampleRateComboBox)); - m_ui.WaitComboBox->setValidator( - new QIntValidator(m_ui.WaitComboBox)); - m_ui.WordLengthComboBox->setValidator( - new QIntValidator(m_ui.WordLengthComboBox)); - m_ui.TimeoutComboBox->setValidator( - new QIntValidator(m_ui.TimeoutComboBox)); -#ifdef CONFIG_AUTO_REFRESH - m_ui.TimeRefreshComboBox->setValidator( - new QIntValidator(m_ui.TimeRefreshComboBox)); -#endif - m_ui.PortMaxComboBox->setValidator( - new QIntValidator(m_ui.PortMaxComboBox)); - m_ui.MessagesLimitLinesComboBox->setValidator( - new QIntValidator(m_ui.MessagesLimitLinesComboBox)); - - // UI connections... - - QObject::connect(m_ui.PresetComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(changeCurrentPreset(const QString&))); - QObject::connect(m_ui.PresetSavePushButton, - SIGNAL(clicked()), - SLOT(saveCurrentPreset())); - QObject::connect(m_ui.PresetDeletePushButton, - SIGNAL(clicked()), - SLOT(deleteCurrentPreset())); - - QObject::connect(m_ui.DriverComboBox, - SIGNAL(highlighted(const QString&)), - SLOT(changeDriver(const QString&))); - QObject::connect(m_ui.InterfaceToolButton, - SIGNAL(clicked()), - SLOT(selectInterface())); - QObject::connect(m_ui.InDeviceToolButton, - SIGNAL(clicked()), - SLOT(selectInDevice())); - QObject::connect(m_ui.OutDeviceToolButton, - SIGNAL(clicked()), - SLOT(selectOutDevice())); - QObject::connect(m_ui.AudioComboBox, - SIGNAL(highlighted(int)), - SLOT(changeAudio(int))); - QObject::connect(m_ui.ServerComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.DriverComboBox, - SIGNAL(activated(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.RealtimeCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.NoMemLockCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.SoftModeCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.MonitorCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.ShortsCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.HWMonCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.HWMeterCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.IgnoreHWCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.UnlockMemCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.VerboseCheckBox, - SIGNAL(stateChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.PrioritySpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.FramesComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.SampleRateComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.PeriodsSpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.WordLengthComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.WaitComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.ChanSpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.InterfaceComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.AudioComboBox, - SIGNAL(activated(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.DitherComboBox, - SIGNAL(activated(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.TimeoutComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.InDeviceComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.OutDeviceComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - QObject::connect(m_ui.InChannelsSpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.OutChannelsSpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.InLatencySpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.OutLatencySpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.MidiDriverComboBox, - SIGNAL(activated(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.StartDelaySpinBox, - SIGNAL(valueChanged(int)), - SLOT(settingsChanged())); - QObject::connect(m_ui.PortMaxComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(settingsChanged())); - - QObject::connect(m_ui.StartupScriptCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.StartupScriptShellComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.PostStartupScriptCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.PostStartupScriptShellComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ShutdownScriptCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ShutdownScriptShellComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.PostShutdownScriptCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.PostShutdownScriptShellComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.StartupScriptBrowseToolButton, - SIGNAL(clicked()), - SLOT(browseStartupScript())); - QObject::connect(m_ui.PostStartupScriptBrowseToolButton, - SIGNAL(clicked()), - SLOT(browsePostStartupScript())); - QObject::connect(m_ui.ShutdownScriptBrowseToolButton, - SIGNAL(clicked()), - SLOT(browseShutdownScript())); - QObject::connect(m_ui.PostShutdownScriptBrowseToolButton, - SIGNAL(clicked()), - SLOT(browsePostShutdownScript())); - QObject::connect(m_ui.StartupScriptSymbolToolButton, - SIGNAL(clicked()), - SLOT(symbolStartupScript())); - QObject::connect(m_ui.PostStartupScriptSymbolToolButton, - SIGNAL(clicked()), - SLOT(symbolPostStartupScript())); - QObject::connect(m_ui.ShutdownScriptSymbolToolButton, - SIGNAL(clicked()), - SLOT(symbolShutdownScript())); - QObject::connect(m_ui.PostShutdownScriptSymbolToolButton, - SIGNAL(clicked()), - SLOT(symbolPostShutdownScript())); - - QObject::connect(m_ui.StdoutCaptureCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.XrunRegexComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.XrunIgnoreFirstCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ActivePatchbayCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ActivePatchbayPathComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ActivePatchbayPathToolButton, - SIGNAL(clicked()), - SLOT(browseActivePatchbayPath())); -#ifdef CONFIG_AUTO_REFRESH - QObject::connect(m_ui.AutoRefreshCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.TimeRefreshComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); -#endif - QObject::connect(m_ui.MessagesLogCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.MessagesLogPathComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.MessagesLogPathToolButton, - SIGNAL(clicked()), - SLOT(browseMessagesLogPath())); - QObject::connect(m_ui.TransportTimeRadioButton, - SIGNAL(toggled(bool)), - SLOT(optionsChanged())); - QObject::connect(m_ui.TransportBBTRadioButton, - SIGNAL(toggled(bool)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ElapsedResetRadioButton, - SIGNAL(toggled(bool)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ElapsedXrunRadioButton, - SIGNAL(toggled(bool)), - SLOT(optionsChanged())); - QObject::connect(m_ui.TimeFormatComboBox, - SIGNAL(activated(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.DisplayEffectCheckBox, - SIGNAL(toggled(bool)), - SLOT(toggleDisplayEffect(bool))); - QObject::connect(m_ui.DisplayBlinkCheckBox, - SIGNAL(toggled(bool)), - SLOT(optionsChanged())); - QObject::connect(m_ui.DisplayFont1PushButton, - SIGNAL(clicked()), - SLOT(chooseDisplayFont1())); - QObject::connect(m_ui.DisplayFont2PushButton, - SIGNAL(clicked()), - SLOT(chooseDisplayFont2())); - QObject::connect(m_ui.MessagesFontPushButton, - SIGNAL(clicked()), - SLOT(chooseMessagesFont())); - QObject::connect(m_ui.ConnectionsFontPushButton, - SIGNAL(clicked()), - SLOT(chooseConnectionsFont())); - QObject::connect(m_ui.MessagesLimitCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.MessagesLimitLinesComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ConnectionsIconSizeComboBox, - SIGNAL(activated(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.BezierLinesCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.AliasesEnabledCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.AliasesEditingCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.JackClientPortAliasComboBox, - SIGNAL(activated(int)), - SLOT(optionsChanged())); - - QObject::connect(m_ui.StartJackCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.QueryCloseCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.KeepOnTopCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.SystemTrayCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.StartMinimizedCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.DelayedSetupCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ServerConfigCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ServerConfigNameComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - QObject::connect(m_ui.ServerConfigTempCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.QueryShutdownCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.AlsaSeqEnabledCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.LeftButtonsCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.RightButtonsCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.TransportButtonsCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.TextLabelsCheckBox, - SIGNAL(stateChanged(int)), - SLOT(optionsChanged())); - QObject::connect(m_ui.BaseFontSizeComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(optionsChanged())); - - QObject::connect(m_ui.OkPushButton, - SIGNAL(clicked()), - SLOT(accept())); - QObject::connect(m_ui.CancelPushButton, - SIGNAL(clicked()), - SLOT(reject())); - - // Try to restore old window positioning. - adjustSize(); -} - - -// Destructor. -qjackctlSetupForm::~qjackctlSetupForm (void) -{ - delete m_pTimeDisplayButtonGroup; -} - - -// A combo-box text item setter helper. -void qjackctlSetupForm::setComboBoxCurrentText ( - QComboBox *pComboBox, const QString& sText ) const -{ - if (pComboBox->isEditable()) { - pComboBox->setEditText(sText); - } else { - int iIndex = pComboBox->findText(sText); - if (iIndex < 0) { - iIndex = 0; - if (!sText.isEmpty()) - pComboBox->insertItem(0, sText); - } - pComboBox->setCurrentIndex(iIndex); - } -} - - -// Populate (setup) dialog controls from settings descriptors. -void qjackctlSetupForm::setup ( qjackctlSetup *pSetup ) -{ - // Set reference descriptor. - m_pSetup = pSetup; - - // Avoid dirty this all up. - m_iDirtySetup++; - - // Load combo box history... - m_pSetup->loadComboBoxHistory(m_ui.ServerComboBox); - m_pSetup->loadComboBoxHistory(m_ui.InterfaceComboBox); - m_pSetup->loadComboBoxHistory(m_ui.InDeviceComboBox); - m_pSetup->loadComboBoxHistory(m_ui.OutDeviceComboBox); - m_pSetup->loadComboBoxHistory(m_ui.StartupScriptShellComboBox); - m_pSetup->loadComboBoxHistory(m_ui.PostStartupScriptShellComboBox); - m_pSetup->loadComboBoxHistory(m_ui.ShutdownScriptShellComboBox); - m_pSetup->loadComboBoxHistory(m_ui.PostShutdownScriptShellComboBox); - m_pSetup->loadComboBoxHistory(m_ui.XrunRegexComboBox); - m_pSetup->loadComboBoxHistory(m_ui.ActivePatchbayPathComboBox); - m_pSetup->loadComboBoxHistory(m_ui.MessagesLogPathComboBox); - m_pSetup->loadComboBoxHistory(m_ui.ServerConfigNameComboBox); - - // Load Options... - m_ui.StartupScriptCheckBox->setChecked(m_pSetup->bStartupScript); - setComboBoxCurrentText(m_ui.StartupScriptShellComboBox, - m_pSetup->sStartupScriptShell); - m_ui.PostStartupScriptCheckBox->setChecked(m_pSetup->bPostStartupScript); - setComboBoxCurrentText(m_ui.PostStartupScriptShellComboBox, - m_pSetup->sPostStartupScriptShell); - m_ui.ShutdownScriptCheckBox->setChecked(m_pSetup->bShutdownScript); - setComboBoxCurrentText(m_ui.ShutdownScriptShellComboBox, - m_pSetup->sShutdownScriptShell); - m_ui.PostShutdownScriptCheckBox->setChecked(m_pSetup->bPostShutdownScript); - setComboBoxCurrentText(m_ui.PostShutdownScriptShellComboBox, - m_pSetup->sPostShutdownScriptShell); - m_ui.StdoutCaptureCheckBox->setChecked(m_pSetup->bStdoutCapture); - setComboBoxCurrentText(m_ui.XrunRegexComboBox, - m_pSetup->sXrunRegex); - m_ui.XrunIgnoreFirstCheckBox->setChecked(m_pSetup->bXrunIgnoreFirst); - m_ui.ActivePatchbayCheckBox->setChecked(m_pSetup->bActivePatchbay); - setComboBoxCurrentText(m_ui.ActivePatchbayPathComboBox, - m_pSetup->sActivePatchbayPath); -#ifdef CONFIG_AUTO_REFRESH - m_ui.AutoRefreshCheckBox->setChecked(m_pSetup->bAutoRefresh); - setComboBoxCurrentText(m_ui.TimeRefreshComboBox, - QString::number(m_pSetup->iTimeRefresh)); -#else - m_ui.AutoRefreshCheckBox->setVisible(false); - m_ui.TimeRefreshComboBox->setVisible(false); -#endif - m_ui.MessagesLogCheckBox->setChecked(m_pSetup->bMessagesLog); - setComboBoxCurrentText(m_ui.MessagesLogPathComboBox, - m_pSetup->sMessagesLogPath); - m_ui.BezierLinesCheckBox->setChecked(m_pSetup->bBezierLines); - - // Load some other defaults... - QRadioButton *pRadioButton - = static_cast ( - m_pTimeDisplayButtonGroup->button(m_pSetup->iTimeDisplay)); - if (pRadioButton) - pRadioButton->setChecked(true); - - m_ui.TimeFormatComboBox->setCurrentIndex(m_pSetup->iTimeFormat); - - // Load font chooser samples... - const QString sSansSerif = "Sans Serif"; - QFont font; - QPalette pal; - - if (m_pSetup->sDisplayFont1.isEmpty() - || !font.fromString(m_pSetup->sDisplayFont1)) - font = QFont(sSansSerif, 12, QFont::Bold); - m_ui.DisplayFont1TextLabel->setFont(font); - m_ui.DisplayFont1TextLabel->setText( - font.family() + ' ' + QString::number(font.pointSize())); - - if (m_pSetup->sDisplayFont2.isEmpty() - || !font.fromString(m_pSetup->sDisplayFont2)) - font = QFont(sSansSerif, 6, QFont::Bold); - m_ui.DisplayFont2TextLabel->setFont(font); - m_ui.DisplayFont2TextLabel->setText( - font.family() + ' ' + QString::number(font.pointSize())); - - if (m_pSetup->sMessagesFont.isEmpty() - || !font.fromString(m_pSetup->sMessagesFont)) - font = QFont("Monospace", 8); - pal = m_ui.MessagesFontTextLabel->palette(); - pal.setColor(QPalette::Background, pal.base().color()); - m_ui.MessagesFontTextLabel->setPalette(pal); - m_ui.MessagesFontTextLabel->setFont(font); - m_ui.MessagesFontTextLabel->setText( - font.family() + ' ' + QString::number(font.pointSize())); - - if (m_pSetup->sConnectionsFont.isEmpty() - || !font.fromString(m_pSetup->sConnectionsFont)) - font = QFont(sSansSerif, 10); - pal = m_ui.ConnectionsFontTextLabel->palette(); - pal.setColor(QPalette::Background, pal.base().color()); - m_ui.ConnectionsFontTextLabel->setPalette(pal); - m_ui.ConnectionsFontTextLabel->setFont(font); - m_ui.ConnectionsFontTextLabel->setText( - font.family() + ' ' + QString::number(font.pointSize())); - - // The main display shiny effect option. - m_ui.DisplayEffectCheckBox->setChecked(m_pSetup->bDisplayEffect); - m_ui.DisplayBlinkCheckBox->setChecked(m_pSetup->bDisplayBlink); - toggleDisplayEffect(m_pSetup->bDisplayEffect); - - // Connections view icon size. - m_ui.ConnectionsIconSizeComboBox->setCurrentIndex( - m_pSetup->iConnectionsIconSize); - // and this JACK speciality... - m_ui.JackClientPortAliasComboBox->setCurrentIndex( - m_pSetup->iJackClientPortAlias); - - // Messages limit option. - m_ui.MessagesLimitCheckBox->setChecked(m_pSetup->bMessagesLimit); - setComboBoxCurrentText(m_ui.MessagesLimitLinesComboBox, - QString::number(m_pSetup->iMessagesLimitLines)); - - // Other misc options... - m_ui.StartJackCheckBox->setChecked(m_pSetup->bStartJack); - m_ui.QueryCloseCheckBox->setChecked(m_pSetup->bQueryClose); - m_ui.KeepOnTopCheckBox->setChecked(m_pSetup->bKeepOnTop); - m_ui.SystemTrayCheckBox->setChecked(m_pSetup->bSystemTray); - m_ui.StartMinimizedCheckBox->setChecked(m_pSetup->bStartMinimized); - m_ui.DelayedSetupCheckBox->setChecked(m_pSetup->bDelayedSetup); - m_ui.ServerConfigCheckBox->setChecked(m_pSetup->bServerConfig); - setComboBoxCurrentText(m_ui.ServerConfigNameComboBox, - m_pSetup->sServerConfigName); - m_ui.ServerConfigTempCheckBox->setChecked(m_pSetup->bServerConfigTemp); - m_ui.QueryShutdownCheckBox->setChecked(m_pSetup->bQueryShutdown); - m_ui.AlsaSeqEnabledCheckBox->setChecked(m_pSetup->bAlsaSeqEnabled); - m_ui.AliasesEnabledCheckBox->setChecked(m_pSetup->bAliasesEnabled); - m_ui.AliasesEditingCheckBox->setChecked(m_pSetup->bAliasesEditing); - m_ui.LeftButtonsCheckBox->setChecked(!m_pSetup->bLeftButtons); - m_ui.RightButtonsCheckBox->setChecked(!m_pSetup->bRightButtons); - m_ui.TransportButtonsCheckBox->setChecked(!m_pSetup->bTransportButtons); - m_ui.TextLabelsCheckBox->setChecked(!m_pSetup->bTextLabels); - if (m_pSetup->iBaseFontSize > 0) - m_ui.BaseFontSizeComboBox->setEditText(QString::number(m_pSetup->iBaseFontSize)); - else - m_ui.BaseFontSizeComboBox->setCurrentIndex(0); - -#ifndef CONFIG_SYSTEM_TRAY - m_ui.SystemTrayCheckBox->setChecked(false); - m_ui.SystemTrayCheckBox->setEnabled(false); - m_ui.StartMinimizedCheckBox->setChecked(false); - m_ui.StartMinimizedCheckBox->setEnabled(false); -#endif -#ifndef CONFIG_JACK_MIDI - m_ui.MidiDriverComboBox->setCurrentIndex(0); - m_ui.MidiDriverTextLabel->setEnabled(false); - m_ui.MidiDriverComboBox->setEnabled(false); -#endif -#ifndef CONFIG_ALSA_SEQ - m_ui.AlsaSeqEnabledCheckBox->setEnabled(false); -#endif - - // Load preset list... - resetPresets(); - setComboBoxCurrentText(m_ui.PresetComboBox, - m_pSetup->sDefPreset); - // Finally, load default settings... - changePreset(m_ui.PresetComboBox->currentText()); - - // We're clean now. - m_iDirtySetup--; - stabilizeForm(); -} - - -void qjackctlSetupForm::changePreset ( const QString& sPreset ) -{ - if (sPreset.isEmpty()) - return; - - // Load Settings... - qjackctlPreset preset; - if (m_pSetup->loadPreset(preset, sPreset)) { - setComboBoxCurrentText(m_ui.ServerComboBox, preset.sServer); - m_ui.RealtimeCheckBox->setChecked(preset.bRealtime); - m_ui.SoftModeCheckBox->setChecked(preset.bSoftMode); - m_ui.MonitorCheckBox->setChecked(preset.bMonitor); - m_ui.ShortsCheckBox->setChecked(preset.bShorts); - m_ui.NoMemLockCheckBox->setChecked(preset.bNoMemLock); - m_ui.UnlockMemCheckBox->setChecked(preset.bUnlockMem); - m_ui.HWMonCheckBox->setChecked(preset.bHWMon); - m_ui.HWMeterCheckBox->setChecked(preset.bHWMeter); - m_ui.IgnoreHWCheckBox->setChecked(preset.bIgnoreHW); - m_ui.PrioritySpinBox->setValue(preset.iPriority); - setComboBoxCurrentText(m_ui.FramesComboBox, - QString::number(preset.iFrames)); - setComboBoxCurrentText(m_ui.SampleRateComboBox, - QString::number(preset.iSampleRate)); - m_ui.PeriodsSpinBox->setValue(preset.iPeriods); - setComboBoxCurrentText(m_ui.WordLengthComboBox, - QString::number(preset.iWordLength)); - setComboBoxCurrentText(m_ui.WaitComboBox, - QString::number(preset.iWait)); - m_ui.ChanSpinBox->setValue(preset.iChan); - setComboBoxCurrentText(m_ui.DriverComboBox, preset.sDriver); - setComboBoxCurrentText(m_ui.InterfaceComboBox, - preset.sInterface.isEmpty() - ? m_pSetup->sDefPresetName - : preset.sInterface); - m_ui.AudioComboBox->setCurrentIndex(preset.iAudio); - m_ui.DitherComboBox->setCurrentIndex(preset.iDither); - setComboBoxCurrentText(m_ui.TimeoutComboBox, - QString::number(preset.iTimeout)); - setComboBoxCurrentText(m_ui.InDeviceComboBox, - preset.sInDevice.isEmpty() - ? m_pSetup->sDefPresetName - : preset.sInDevice); - setComboBoxCurrentText(m_ui.OutDeviceComboBox, - preset.sOutDevice.isEmpty() - ? m_pSetup->sDefPresetName - : preset.sOutDevice); - m_ui.InChannelsSpinBox->setValue(preset.iInChannels); - m_ui.OutChannelsSpinBox->setValue(preset.iOutChannels); - m_ui.InLatencySpinBox->setValue(preset.iInLatency); - m_ui.OutLatencySpinBox->setValue(preset.iOutLatency); - m_ui.StartDelaySpinBox->setValue(preset.iStartDelay); - m_ui.VerboseCheckBox->setChecked(preset.bVerbose); - setComboBoxCurrentText(m_ui.PortMaxComboBox, - QString::number(preset.iPortMax)); -#ifdef CONFIG_JACK_MIDI - setComboBoxCurrentText(m_ui.MidiDriverComboBox, - preset.sMidiDriver); -#endif - // Reset dirty flag. - m_iDirtySettings = 0; - } - - // Set current preset name.. - m_sPreset = sPreset; -} - - -bool qjackctlSetupForm::savePreset ( const QString& sPreset ) -{ - if (sPreset.isEmpty()) - return false; - - // Unload settings. - qjackctlPreset preset; - preset.sServer = m_ui.ServerComboBox->currentText(); - preset.bRealtime = m_ui.RealtimeCheckBox->isChecked(); - preset.bSoftMode = m_ui.SoftModeCheckBox->isChecked(); - preset.bMonitor = m_ui.MonitorCheckBox->isChecked(); - preset.bShorts = m_ui.ShortsCheckBox->isChecked(); - preset.bNoMemLock = m_ui.NoMemLockCheckBox->isChecked(); - preset.bUnlockMem = m_ui.UnlockMemCheckBox->isChecked(); - preset.bHWMon = m_ui.HWMonCheckBox->isChecked(); - preset.bHWMeter = m_ui.HWMeterCheckBox->isChecked(); - preset.bIgnoreHW = m_ui.IgnoreHWCheckBox->isChecked(); - preset.iPriority = m_ui.PrioritySpinBox->value(); - preset.iFrames = m_ui.FramesComboBox->currentText().toInt(); - preset.iSampleRate = m_ui.SampleRateComboBox->currentText().toInt(); - preset.iPeriods = m_ui.PeriodsSpinBox->value(); - preset.iWordLength = m_ui.WordLengthComboBox->currentText().toInt(); - preset.iWait = m_ui.WaitComboBox->currentText().toInt(); - preset.iChan = m_ui.ChanSpinBox->value(); - preset.sDriver = m_ui.DriverComboBox->currentText(); - preset.sInterface = m_ui.InterfaceComboBox->currentText(); - preset.iAudio = m_ui.AudioComboBox->currentIndex(); - preset.iDither = m_ui.DitherComboBox->currentIndex(); - preset.iTimeout = m_ui.TimeoutComboBox->currentText().toInt(); - preset.sInDevice = m_ui.InDeviceComboBox->currentText(); - preset.sOutDevice = m_ui.OutDeviceComboBox->currentText(); - preset.iInChannels = m_ui.InChannelsSpinBox->value(); - preset.iOutChannels = m_ui.OutChannelsSpinBox->value(); - preset.iInLatency = m_ui.InLatencySpinBox->value(); - preset.iOutLatency = m_ui.OutLatencySpinBox->value(); - preset.iStartDelay = m_ui.StartDelaySpinBox->value(); - preset.bVerbose = m_ui.VerboseCheckBox->isChecked(); - preset.iPortMax = m_ui.PortMaxComboBox->currentText().toInt(); -#ifdef CONFIG_JACK_MIDI - preset.sMidiDriver = m_ui.MidiDriverComboBox->currentText(); -#endif - if (preset.sInterface == m_pSetup->sDefPresetName) - preset.sInterface.clear(); - if (preset.sInDevice == m_pSetup->sDefPresetName) - preset.sInDevice.clear(); - if (preset.sOutDevice == m_pSetup->sDefPresetName) - preset.sOutDevice.clear(); - m_pSetup->savePreset(preset, sPreset); - - return true; -} - - -bool qjackctlSetupForm::deletePreset ( const QString& sPreset ) -{ - if (sPreset.isEmpty()) - return false; - - // Just remove the preset item... - m_pSetup->deletePreset(sPreset); - - return true; -} - - -void qjackctlSetupForm::resetPresets (void) -{ - m_ui.PresetComboBox->clear(); - m_ui.PresetComboBox->addItems(m_pSetup->presets); - m_ui.PresetComboBox->addItem(m_pSetup->sDefPresetName); -} - - -void qjackctlSetupForm::changeCurrentPreset ( const QString& sPreset ) -{ - if (m_iDirtySetup > 0) - return; - - // Check if there's any pending changes... - if (m_iDirtySettings > 0 && !m_sPreset.isEmpty()) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Some settings have been changed:\n\n" - "\"%1\"\n\nDo you want to save the changes?") - .arg(m_sPreset), - tr("Save"), tr("Discard"), tr("Cancel"))) { - case 0: // Save... - savePreset(m_sPreset); - m_iDirtySetup++; - resetPresets(); - setComboBoxCurrentText(m_ui.PresetComboBox, sPreset); - m_iDirtySetup--; - case 1: // Discard... - m_iDirtySettings = 0; - break; - default:// Cancel... - m_iDirtySetup++; - resetPresets(); - setComboBoxCurrentText(m_ui.PresetComboBox, m_sPreset); - m_iDirtySetup--; - return; - } - } - - changePreset(sPreset); - optionsChanged(); -} - -void qjackctlSetupForm::saveCurrentPreset (void) -{ - const QString sPreset = m_ui.PresetComboBox->currentText(); - - if (savePreset(sPreset)) { - // Reset preset combobox list. - m_iDirtySetup++; - resetPresets(); - setComboBoxCurrentText(m_ui.PresetComboBox, sPreset); - m_iDirtySetup--; - // Reset dirty flag. - m_iDirtySettings = 0; - stabilizeForm(); - } -} - - -void qjackctlSetupForm::deleteCurrentPreset (void) -{ - const QString sPreset = m_ui.PresetComboBox->currentText(); - - // Try to prompt user if he/she really wants this... - if (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Delete preset:\n\n" - "\"%1\"\n\nAre you sure?") - .arg(sPreset), - tr("OK"), tr("Cancel")) > 0) - return; - - if (deletePreset(sPreset)) { - // Reset preset combobox list, - // and load a new available preset.. - m_iDirtySetup++; - int iItem = m_ui.PresetComboBox->currentIndex(); - resetPresets(); - m_ui.PresetComboBox->setCurrentIndex(iItem); - changePreset(m_ui.PresetComboBox->currentText()); - m_iDirtySetup--; - // Take care that maybe it was the default one... - if (m_pSetup->sDefPreset == sPreset) - m_pSetup->sDefPreset = m_sPreset; - // Make this stable now. - optionsChanged(); - } -} - - -void qjackctlSetupForm::computeLatency (void) -{ - float lat = 0.0; - int p = m_ui.FramesComboBox->currentText().toInt(); - int r = m_ui.SampleRateComboBox->currentText().toInt(); - int n = m_ui.PeriodsSpinBox->value(); - if (r > 0) - lat = (float) (1000.0 * p * n) / (float) r; - if (lat > 0.0) - m_ui.LatencyTextValue->setText(QString::number(lat, 'g', 3) + " " + tr("msec")); - else - m_ui.LatencyTextValue->setText(tr("n/a")); -} - - -void qjackctlSetupForm::changeDriverAudio ( const QString& sDriver, int iAudio ) -{ - bool bSun = (sDriver == "sun"); - bool bOss = (sDriver == "oss"); - bool bAlsa = (sDriver == "alsa"); - bool bCoreaudio = (sDriver == "coreaudio"); - bool bPortaudio = (sDriver == "portaudio"); - bool bFreebob = (sDriver == "freebob"); - bool bFirewire = (sDriver == "firewire"); - bool bNet = (sDriver == "net"); - bool bInEnabled = false; - bool bOutEnabled = false; - bool bEnabled; - - switch (iAudio) { - case QJACKCTL_DUPLEX: - bInEnabled = (bSun || bOss || bAlsa || bCoreaudio || bPortaudio || bNet); - bOutEnabled = (bSun || bOss || bAlsa || bCoreaudio || bPortaudio || bNet); - break; - case QJACKCTL_CAPTURE: - bInEnabled = (bSun || bOss || bCoreaudio || bPortaudio || bNet); - break; - case QJACKCTL_PLAYBACK: - bOutEnabled = (bSun || bOss || bCoreaudio || bPortaudio || bNet); - break; - } - - bEnabled = (bInEnabled && (bAlsa || bSun || bOss)); - m_ui.InDeviceTextLabel->setEnabled(bEnabled); - m_ui.InDeviceComboBox->setEnabled(bEnabled); - m_ui.InDeviceToolButton->setEnabled(bEnabled); - if (!bEnabled) - setComboBoxCurrentText(m_ui.InDeviceComboBox, m_pSetup->sDefPresetName); - - bEnabled = (bOutEnabled && (bAlsa || bSun || bOss)); - m_ui.OutDeviceTextLabel->setEnabled(bEnabled); - m_ui.OutDeviceComboBox->setEnabled(bEnabled); - m_ui.OutDeviceToolButton->setEnabled(bEnabled); - if (!bEnabled) - setComboBoxCurrentText(m_ui.OutDeviceComboBox, m_pSetup->sDefPresetName); - - m_ui.InChannelsTextLabel->setEnabled(bInEnabled - || ((bAlsa || bFirewire) && iAudio != QJACKCTL_PLAYBACK)); - m_ui.InChannelsSpinBox->setEnabled(bInEnabled - || ((bAlsa || bFirewire) && iAudio != QJACKCTL_PLAYBACK)); - - m_ui.OutChannelsTextLabel->setEnabled(bOutEnabled - || ((bAlsa || bFirewire) && iAudio != QJACKCTL_CAPTURE)); - m_ui.OutChannelsSpinBox->setEnabled(bOutEnabled - || ((bAlsa || bFirewire) && iAudio != QJACKCTL_CAPTURE)); - - m_ui.InLatencyTextLabel->setEnabled((bInEnabled && !bNet) - || ((bAlsa || bFreebob) && iAudio != QJACKCTL_PLAYBACK)); - m_ui.InLatencySpinBox->setEnabled((bInEnabled && !bNet) - || ((bAlsa || bFreebob) && iAudio != QJACKCTL_PLAYBACK)); - m_ui.OutLatencyTextLabel->setEnabled((bOutEnabled && !bNet) - || ((bAlsa || bFreebob) && iAudio != QJACKCTL_CAPTURE)); - m_ui.OutLatencySpinBox->setEnabled((bOutEnabled && !bNet) - || ((bAlsa || bFreebob) && iAudio != QJACKCTL_CAPTURE)); - - computeLatency(); -} - - -void qjackctlSetupForm::changeAudio ( int iAudio ) -{ - changeDriverAudio(m_ui.DriverComboBox->currentText(), iAudio); -} - - -void qjackctlSetupForm::changeDriver ( const QString& sDriver ) -{ - changeDriverUpdate(sDriver, true); -} - - -void qjackctlSetupForm::changeDriverUpdate ( const QString& sDriver, bool bUpdate ) -{ - bool bDummy = (sDriver == "dummy"); - bool bSun = (sDriver == "sun"); - bool bOss = (sDriver == "oss"); - bool bAlsa = (sDriver == "alsa"); - bool bPortaudio = (sDriver == "portaudio"); - bool bCoreaudio = (sDriver == "coreaudio"); - bool bFreebob = (sDriver == "freebob"); - bool bFirewire = (sDriver == "firewire"); -// bool bNet = (sDriver == "net"); - - m_ui.NoMemLockCheckBox->setEnabled(!bCoreaudio); - m_ui.UnlockMemCheckBox->setEnabled(!bCoreaudio - && !m_ui.NoMemLockCheckBox->isChecked()); - - m_ui.SoftModeCheckBox->setEnabled(bAlsa); - m_ui.MonitorCheckBox->setEnabled(bAlsa); - m_ui.ShortsCheckBox->setEnabled(bAlsa); - m_ui.HWMonCheckBox->setEnabled(bAlsa); - m_ui.HWMeterCheckBox->setEnabled(bAlsa); - - m_ui.IgnoreHWCheckBox->setEnabled(bSun || bOss); - -#ifdef CONFIG_COREAUDIO - m_ui.PriorityTextLabel->setEnabled(false); - m_ui.PrioritySpinBox->setEnabled(false); -#else - bool bPriorityEnabled = m_ui.RealtimeCheckBox->isChecked() && !bCoreaudio; - m_ui.PriorityTextLabel->setEnabled(bPriorityEnabled); - m_ui.PrioritySpinBox->setEnabled(bPriorityEnabled); -#endif - - m_ui.PeriodsTextLabel->setEnabled(bAlsa || bSun || bOss || bFreebob || bFirewire); - m_ui.PeriodsSpinBox->setEnabled(bAlsa || bSun || bOss || bFreebob || bFirewire); - - if (bUpdate && (bFreebob || bFirewire) && m_ui.PeriodsSpinBox->value() < 3) - m_ui.PeriodsSpinBox->setValue(3); - - m_ui.WordLengthTextLabel->setEnabled(bSun || bOss); - m_ui.WordLengthComboBox->setEnabled(bSun || bOss); - - m_ui.WaitTextLabel->setEnabled(bDummy); - m_ui.WaitComboBox->setEnabled(bDummy); - - m_ui.ChanTextLabel->setEnabled(bPortaudio); - m_ui.ChanSpinBox->setEnabled(bPortaudio); - - int iAudio = m_ui.AudioComboBox->currentIndex(); - bool bEnabled = bAlsa; - if (bEnabled && iAudio == QJACKCTL_DUPLEX) { - const QString& sInDevice = m_ui.InDeviceComboBox->currentText(); - const QString& sOutDevice = m_ui.OutDeviceComboBox->currentText(); - bEnabled = (sInDevice.isEmpty() || sInDevice == m_pSetup->sDefPresetName || - sOutDevice.isEmpty() || sOutDevice == m_pSetup->sDefPresetName); - } - - bool bInterface = (bEnabled || bCoreaudio || bFreebob || bFirewire); - m_ui.InterfaceTextLabel->setEnabled(bInterface); - m_ui.InterfaceComboBox->setEnabled(bInterface); - m_ui.InterfaceToolButton->setEnabled(bEnabled || bCoreaudio); - if (!bInterface) - setComboBoxCurrentText(m_ui.InterfaceComboBox, m_pSetup->sDefPresetName); - - m_ui.DitherTextLabel->setEnabled(bAlsa || bPortaudio); - m_ui.DitherComboBox->setEnabled(bAlsa || bPortaudio); - -#ifdef CONFIG_JACK_MIDI - m_ui.MidiDriverTextLabel->setEnabled(bAlsa); - m_ui.MidiDriverComboBox->setEnabled(bAlsa); -#endif - - changeDriverAudio(sDriver, iAudio); -} - - -// Stabilize current form state. -void qjackctlSetupForm::stabilizeForm (void) -{ - bool bValid = (m_iDirtySettings > 0 || m_iDirtyOptions > 0); - - QString sPreset = m_ui.PresetComboBox->currentText(); - if (!sPreset.isEmpty()) { - bool bPreset = (m_pSetup->presets.contains(sPreset)); - m_ui.PresetSavePushButton->setEnabled(m_iDirtySettings > 0 - || (!bPreset && sPreset != m_pSetup->sDefPresetName)); - m_ui.PresetDeletePushButton->setEnabled(bPreset); - } else { - m_ui.PresetSavePushButton->setEnabled(false); - m_ui.PresetDeletePushButton->setEnabled(false); - } - - bool bEnabled = m_ui.StartupScriptCheckBox->isChecked(); - m_ui.StartupScriptShellComboBox->setEnabled(bEnabled); - m_ui.StartupScriptSymbolToolButton->setEnabled(bEnabled); - m_ui.StartupScriptBrowseToolButton->setEnabled(bEnabled); - - bEnabled = m_ui.PostStartupScriptCheckBox->isChecked(); - m_ui.PostStartupScriptShellComboBox->setEnabled(bEnabled); - m_ui.PostStartupScriptSymbolToolButton->setEnabled(bEnabled); - m_ui.PostStartupScriptBrowseToolButton->setEnabled(bEnabled); - - bEnabled = m_ui.ShutdownScriptCheckBox->isChecked(); - m_ui.ShutdownScriptShellComboBox->setEnabled(bEnabled); - m_ui.ShutdownScriptSymbolToolButton->setEnabled(bEnabled); - m_ui.ShutdownScriptBrowseToolButton->setEnabled(bEnabled); - - bEnabled = m_ui.PostShutdownScriptCheckBox->isChecked(); - m_ui.PostShutdownScriptShellComboBox->setEnabled(bEnabled); - m_ui.PostShutdownScriptSymbolToolButton->setEnabled(bEnabled); - m_ui.PostShutdownScriptBrowseToolButton->setEnabled(bEnabled); - - bEnabled = m_ui.StdoutCaptureCheckBox->isChecked(); - m_ui.XrunRegexTextLabel->setEnabled(bEnabled); - m_ui.XrunRegexComboBox->setEnabled(bEnabled); - m_ui.XrunIgnoreFirstCheckBox->setEnabled(bEnabled); - - bEnabled = m_ui.ActivePatchbayCheckBox->isChecked(); - m_ui.ActivePatchbayPathComboBox->setEnabled(bEnabled); - m_ui.ActivePatchbayPathToolButton->setEnabled(bEnabled); - if (bEnabled && bValid) { - const QString& sPath = m_ui.ActivePatchbayPathComboBox->currentText(); - bValid = (!sPath.isEmpty() && QFileInfo(sPath).exists()); - } - -#ifdef CONFIG_AUTO_REFRESH - m_ui.TimeRefreshComboBox->setEnabled( - m_ui.AutoRefreshCheckBox->isChecked()); -#endif - - bEnabled = m_ui.MessagesLogCheckBox->isChecked(); - m_ui.MessagesLogPathComboBox->setEnabled(bEnabled); - m_ui.MessagesLogPathToolButton->setEnabled(bEnabled); - if (bEnabled && bValid) { - const QString& sPath = m_ui.MessagesLogPathComboBox->currentText(); - bValid = !sPath.isEmpty(); - } - - m_ui.MessagesLimitLinesComboBox->setEnabled( - m_ui.MessagesLimitCheckBox->isChecked()); - - m_ui.StartMinimizedCheckBox->setEnabled( - m_ui.SystemTrayCheckBox->isChecked()); - - bEnabled = m_ui.ServerConfigCheckBox->isChecked(); - m_ui.ServerConfigNameComboBox->setEnabled(bEnabled); - m_ui.ServerConfigTempCheckBox->setEnabled(bEnabled); - - m_ui.AliasesEditingCheckBox->setEnabled( - m_ui.AliasesEnabledCheckBox->isChecked()); - - m_ui.DelayedSetupCheckBox->setEnabled( - !m_ui.StartMinimizedCheckBox->isChecked()); - - m_ui.TransportButtonsCheckBox->setEnabled( - m_ui.LeftButtonsCheckBox->isChecked()); - - changeDriverUpdate(m_ui.DriverComboBox->currentText(), false); - - m_ui.OkPushButton->setEnabled(bValid); -} - - -#ifdef CONFIG_COREAUDIO -// borrowed from jackpilot source -static OSStatus getTotalChannels( AudioDeviceID device, - UInt32* channelCount, Boolean isInput ) -{ - OSStatus err = noErr; - UInt32 outSize; - Boolean outWritable; - AudioBufferList* bufferList = 0; - AudioStreamID* streamList = 0; - size_t i, numStream; - - err = AudioDeviceGetPropertyInfo(device, 0, isInput, - kAudioDevicePropertyStreams, &outSize, &outWritable); - if (err == noErr) { - streamList = (AudioStreamID*)malloc(outSize); - numStream = outSize/sizeof(AudioStreamID); - //JPLog("getTotalChannels device stream number %ld %ld\n", device, numStream); - err = AudioDeviceGetProperty(device, 0, isInput, - kAudioDevicePropertyStreams, &outSize, streamList); - if (err == noErr) { - AudioStreamBasicDescription streamDesc; - outSize = sizeof(AudioStreamBasicDescription); - for (i = 0; i < numStream; i++) { - err = AudioStreamGetProperty(streamList[i], 0, - kAudioDevicePropertyStreamFormat, &outSize, &streamDesc); - //JPLog("getTotalChannels streamDesc mFormatFlags %ld mChannelsPerFrame %ld\n", streamDesc.mFormatFlags, streamDesc.mChannelsPerFrame); - } - } - } - - *channelCount = 0; - err = AudioDeviceGetPropertyInfo(device, 0, isInput, - kAudioDevicePropertyStreamConfiguration, &outSize, &outWritable); - if (err == noErr) { - bufferList = (AudioBufferList*)malloc(outSize); - err = AudioDeviceGetProperty(device, 0, isInput, - kAudioDevicePropertyStreamConfiguration, &outSize, bufferList); - if (err == noErr) { - for (i = 0; i < bufferList->mNumberBuffers; i++) - *channelCount += bufferList->mBuffers[i].mNumberChannels; - } - } - - if (streamList) - free(streamList); - if (bufferList) - free(bufferList); - - return (err); -} - -static OSStatus getDeviceUIDFromID( AudioDeviceID id, - char *name, UInt32 nsize ) -{ - UInt32 size = sizeof(CFStringRef); - CFStringRef UI; - OSStatus res = AudioDeviceGetProperty(id, 0, false, - kAudioDevicePropertyDeviceUID, &size, &UI); - if (res == noErr) - CFStringGetCString(UI,name,nsize,CFStringGetSystemEncoding()); - CFRelease(UI); - return res; -} - -#endif // CONFIG_COREAUDIO - - -// Device selection menu executive. -void qjackctlSetupForm::deviceMenu( QLineEdit *pLineEdit, - QToolButton *pToolButton, int iAudio ) -{ - // FIXME: Only valid for ALSA, Sun and OSS devices, - // for the time being... and also CoreAudio ones too. - const QString& sDriver = m_ui.DriverComboBox->currentText(); - bool bAlsa = (sDriver == "alsa"); - bool bSun = (sDriver == "sun"); - bool bOss = (sDriver == "oss"); -#ifdef CONFIG_COREAUDIO - bool bCoreaudio = (sDriver == "coreaudio"); - std::map coreaudioIdMap; -#endif - QString sCurName = pLineEdit->text(); - QString sName, sSubName; - QString sText; - - QMenu menu(this); - QAction *pAction; - - int iCards = 0; - - if (bAlsa) { -#ifdef CONFIG_ALSA_SEQ - // Enumerate the ALSA cards and PCM harfware devices... - snd_ctl_t *handle; - snd_ctl_card_info_t *info; - snd_pcm_info_t *pcminfo; - snd_ctl_card_info_alloca(&info); - snd_pcm_info_alloca(&pcminfo); - bool bCapture, bPlayback; - int iCard = -1; - while (snd_card_next(&iCard) >= 0 && iCard >= 0) { - sName = "hw:" + QString::number(iCard); - if (snd_ctl_open(&handle, sName.toUtf8().constData(), 0) >= 0 - && snd_ctl_card_info(handle, info) >= 0) { - if (iCards > 0) - menu.addSeparator(); - sText = sName + '\t'; - sText += snd_ctl_card_info_get_name(info); - pAction = menu.addAction(sText); - pAction->setCheckable(true); - pAction->setChecked(sCurName == sName); - int iDevice = -1; - while (snd_ctl_pcm_next_device(handle, &iDevice) >= 0 - && iDevice >= 0) { - // Capture devices.. - bCapture = false; - if (iAudio == QJACKCTL_CAPTURE || - iAudio == QJACKCTL_DUPLEX) { - snd_pcm_info_set_device(pcminfo, iDevice); - snd_pcm_info_set_subdevice(pcminfo, 0); - snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_CAPTURE); - bCapture = (snd_ctl_pcm_info(handle, pcminfo) >= 0); - } - // Playback devices.. - bPlayback = false; - if (iAudio == QJACKCTL_PLAYBACK || - iAudio == QJACKCTL_DUPLEX) { - snd_pcm_info_set_device(pcminfo, iDevice); - snd_pcm_info_set_subdevice(pcminfo, 0); - snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_PLAYBACK); - bPlayback = (snd_ctl_pcm_info(handle, pcminfo) >= 0); - } - // List iif compliant with the audio mode criteria... - if ((iAudio == QJACKCTL_CAPTURE && bCapture && !bPlayback) || - (iAudio == QJACKCTL_PLAYBACK && !bCapture && bPlayback) || - (iAudio == QJACKCTL_DUPLEX && bCapture && bPlayback)) { - sSubName = sName + ',' + QString::number(iDevice); - sText = sSubName + '\t'; - sText += snd_pcm_info_get_name(pcminfo); - pAction = menu.addAction(sText); - pAction->setCheckable(true); - pAction->setChecked(sCurName == sSubName); - } - } - snd_ctl_close(handle); - ++iCards; - } - } -#endif // CONFIG_ALSA_SEQ - } // Enumerate the OSS Audio devices... - else - if (bSun) { - QFile file("/var/run/dmesg.boot"); - if (file.open(QIODevice::ReadOnly)) { - QTextStream stream(&file); - QString sLine; - QRegExp rxDevice("audio([0-9]) at (.*)"); - while (!stream.atEnd()) { - sLine = stream.readLine(); - if (rxDevice.exactMatch(sLine)) { - sName = "/dev/audio" + rxDevice.cap(1); - sText = sName + '\t' + rxDevice.cap(2); - pAction = menu.addAction(sText); - pAction->setCheckable(true); - pAction->setChecked(sCurName == sName); - ++iCards; - } - } - file.close(); - } - } - else - if (bOss) { - QFile file("/dev/sndstat"); - if (file.open(QIODevice::ReadOnly)) { - QTextStream stream(&file); - QString sLine; - bool bAudioDevices = false; - QRegExp rxHeader("Audio devices.*", Qt::CaseInsensitive); - QRegExp rxDevice("([0-9]+):[ ]+(.*)"); - while (!stream.atEnd()) { - sLine = stream.readLine(); - if (bAudioDevices) { - if (rxDevice.exactMatch(sLine)) { - sName = "/dev/dsp" + rxDevice.cap(1); - sText = sName + '\t' + rxDevice.cap(2); - pAction = menu.addAction(sText); - pAction->setCheckable(true); - pAction->setChecked(sCurName == sName); - ++iCards; - } - else break; - } - else if (rxHeader.exactMatch(sLine)) - bAudioDevices = true; - } - file.close(); - } - } -#ifdef CONFIG_COREAUDIO - else if (bCoreaudio) { - // Find out how many Core Audio devices are there, if any... - // (code snippet gently "borrowed" from St?hane Letz jackdmp;) - OSStatus err; - Boolean isWritable; - UInt32 outSize = sizeof(isWritable); - err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, - &outSize, &isWritable); - if (err == noErr) { - // Calculate the number of device available... - int numCoreDevices = outSize / sizeof(AudioDeviceID); - // Make space for the devices we are about to get... - AudioDeviceID *coreDeviceIDs = new AudioDeviceID [numCoreDevices]; - err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, - &outSize, (void *) coreDeviceIDs); - if (err == noErr) { - // Look for the CoreAudio device name... - char coreDeviceName[256]; - UInt32 nameSize = 256; - for (int i = 0; i < numCoreDevices; i++) { - err = AudioDeviceGetPropertyInfo(coreDeviceIDs[i], - 0, true, kAudioDevicePropertyDeviceName, - &outSize, &isWritable); - if (err == noErr) { - err = AudioDeviceGetProperty(coreDeviceIDs[i], - 0, true, kAudioDevicePropertyDeviceName, - &nameSize, (void *) coreDeviceName); - if (err == noErr) { - char drivername[128]; - UInt32 dnsize = 128; - // this returns the unique id for the device - // that must be used on the commandline for jack - if (getDeviceUIDFromID(coreDeviceIDs[i], - drivername, dnsize) == noErr) { - sName = drivername; - } else { - sName = "Error"; - } - coreaudioIdMap[sName] = coreDeviceIDs[i]; - // TODO: hide this ugly ID from the user, - // only show human readable name - // humanreadable \t UID - sText = QString(coreDeviceName) + '\t' + sName; - pAction = menu.addAction(sText); - pAction->setCheckable(true); - pAction->setChecked(sCurName == sName); - ++iCards; - } - } - } - } - delete [] coreDeviceIDs; - } - } -#endif // CONFIG_COREAUDIO - - // There's always the default device... - if (iCards > 0) - menu.addSeparator(); - pAction = menu.addAction(m_pSetup->sDefPresetName); - pAction->setCheckable(true); - pAction->setChecked(sCurName == m_pSetup->sDefPresetName); - - // Show the device menu and read selection... - pAction = menu.exec(pToolButton->mapToGlobal(QPoint(0,0))); - if (pAction) { - sText = pAction->text(); - int iTabPos = sText.indexOf('\t'); - if (iTabPos >= 0) { -#ifndef CONFIG_COREAUDIO - pLineEdit->setText(sText.left(iTabPos)); -#else - // for OSX, figure out the device's channel counts and set the combos. - // this might be too difficult for the user to determine themselves - // and jack won't start if the values exceed the actual. - // we now use the second tab delimited field as the value to - // put in the combo - pLineEdit->setText(sText.mid(iTabPos + 1)); - std::map::iterator found - = coreaudioIdMap.find(sText.mid(iTabPos+1)); - if (found != coreaudioIdMap.end()) { - AudioDeviceID devid = found->second; - UInt32 chans; - if (getTotalChannels(devid, &chans, true) == noErr) { - //InChannelsSpinBox->setMaxValue(chans); - m_ui.InChannelsSpinBox->setValue(chans); - } - if (getTotalChannels(devid, &chans, false) == noErr) { - //OutChannelsSpinBox->setMaxValue(chans); - m_ui.OutChannelsSpinBox->setValue(chans); - } - } -#endif - } else { - pLineEdit->setText(sText); - } - // settingsChanged(); - } -} - - -// Interface device selection menu. -void qjackctlSetupForm::selectInterface (void) -{ - deviceMenu(m_ui.InterfaceComboBox->lineEdit(), - m_ui.InterfaceToolButton, m_ui.AudioComboBox->currentIndex()); -} - - -// Input device selection menu. -void qjackctlSetupForm::selectInDevice (void) -{ - deviceMenu(m_ui.InDeviceComboBox->lineEdit(), - m_ui.InDeviceToolButton, QJACKCTL_CAPTURE); -} - - -// Output device selection menu. -void qjackctlSetupForm::selectOutDevice (void) -{ - deviceMenu(m_ui.OutDeviceComboBox->lineEdit(), - m_ui.OutDeviceToolButton, QJACKCTL_PLAYBACK); -} - - -// Meta-symbol menu executive. -void qjackctlSetupForm::symbolMenu( QLineEdit *pLineEdit, - QToolButton *pToolButton ) -{ - const QString s = " "; - - QMenu menu(this); - - menu.addAction("%P" + s + tr("&Preset Name")); - menu.addSeparator(); - menu.addAction("%s" + s + tr("&Server Path")); - menu.addAction("%d" + s + tr("&Driver")); - menu.addAction("%i" + s + tr("&Interface")); - menu.addSeparator(); - menu.addAction("%r" + s + tr("Sample &Rate")); - menu.addAction("%p" + s + tr("&Frames/Period")); - menu.addAction("%n" + s + tr("Periods/&Buffer")); - - QAction *pAction = menu.exec(pToolButton->mapToGlobal(QPoint(0,0))); - if (pAction) { - const QString sText = pAction->text(); - int iMetaChar = sText.indexOf('%'); - if (iMetaChar >= 0) { - pLineEdit->insert('%' + sText[iMetaChar + 1]); - // optionsChanged(); - } - } -} - - -// Startup script meta-symbol button slot. -void qjackctlSetupForm::symbolStartupScript (void) -{ - symbolMenu(m_ui.StartupScriptShellComboBox->lineEdit(), - m_ui.StartupScriptSymbolToolButton); -} - -// Post-startup script meta-symbol button slot. -void qjackctlSetupForm::symbolPostStartupScript (void) -{ - symbolMenu(m_ui.PostStartupScriptShellComboBox->lineEdit(), - m_ui.PostStartupScriptSymbolToolButton); -} - -// Shutdown script meta-symbol button slot. -void qjackctlSetupForm::symbolShutdownScript (void) -{ - symbolMenu(m_ui.ShutdownScriptShellComboBox->lineEdit(), - m_ui.ShutdownScriptSymbolToolButton); -} - -// Post-shutdown script meta-symbol button slot. -void qjackctlSetupForm::symbolPostShutdownScript (void) -{ - symbolMenu(m_ui.PostShutdownScriptShellComboBox->lineEdit(), - m_ui.PostShutdownScriptSymbolToolButton); -} - - -// Startup script browse slot. -void qjackctlSetupForm::browseStartupScript() -{ - QString sFileName = QFileDialog::getOpenFileName( - this, // Parent. - tr("Startup Script"), // Caption. - m_ui.StartupScriptShellComboBox->currentText() // Start here. - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.StartupScriptShellComboBox, sFileName); - m_ui.StartupScriptShellComboBox->setFocus(); - optionsChanged(); - } -} - - -// Post-startup script browse slot. -void qjackctlSetupForm::browsePostStartupScript() -{ - QString sFileName = QFileDialog::getOpenFileName( - this, // Parent. - tr("Post-Startup Script"), // Caption. - m_ui.PostStartupScriptShellComboBox->currentText() // Start here. - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.PostStartupScriptShellComboBox, sFileName); - m_ui.PostStartupScriptShellComboBox->setFocus(); - optionsChanged(); - } -} - - -// Shutdown script browse slot. -void qjackctlSetupForm::browseShutdownScript() -{ - QString sFileName = QFileDialog::getOpenFileName( - this, // Parent. - tr("Shutdown Script"), // Caption. - m_ui.ShutdownScriptShellComboBox->currentText() // Start here. - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.ShutdownScriptShellComboBox, sFileName); - m_ui.ShutdownScriptShellComboBox->setFocus(); - optionsChanged(); - } -} - - -// Post-shutdown script browse slot. -void qjackctlSetupForm::browsePostShutdownScript() -{ - QString sFileName = QFileDialog::getOpenFileName( - this, // Parent. - tr("Post-Shutdown Script"), // Caption. - m_ui.PostShutdownScriptShellComboBox->currentText() // Start here. - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.PostShutdownScriptShellComboBox, sFileName); - m_ui.PostShutdownScriptShellComboBox->setFocus(); - optionsChanged(); - } -} - - -// Active Patchbay path browse slot. -void qjackctlSetupForm::browseActivePatchbayPath() -{ - QString sFileName = QFileDialog::getOpenFileName( - this, // Parent. - tr("Active Patchbay Definition"), // Caption. - m_ui.ActivePatchbayPathComboBox->currentText(), // Start here. - tr("Patchbay Definition files") + " (*.xml)" // Filter (XML files) - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.ActivePatchbayPathComboBox, sFileName); - m_ui.ActivePatchbayPathComboBox->setFocus(); - optionsChanged(); - } -} - - -// Messages log path browse slot. -void qjackctlSetupForm::browseMessagesLogPath() -{ - QString sFileName = QFileDialog::getSaveFileName( - this, // Parent. - tr("Messages Log"), // Caption. - m_ui.MessagesLogPathComboBox->currentText(), // Start here. - tr("Log files") + " (*.log)" // Filter (log files) - ); - - if (!sFileName.isEmpty()) { - setComboBoxCurrentText(m_ui.MessagesLogPathComboBox, sFileName); - m_ui.MessagesLogPathComboBox->setFocus(); - optionsChanged(); - } -} - - -// The display font 1 (big time) selection dialog. -void qjackctlSetupForm::chooseDisplayFont1() -{ - bool bOk = false; - QFont font = QFontDialog::getFont(&bOk, - m_ui.DisplayFont1TextLabel->font(), this); - if (bOk) { - m_ui.DisplayFont1TextLabel->setFont(font); - m_ui.DisplayFont1TextLabel->setText(font.family() - + ' ' + QString::number(font.pointSize())); - optionsChanged(); - } -} - - -// The display font 2 (normal time et al.) selection dialog. -void qjackctlSetupForm::chooseDisplayFont2() -{ - bool bOk = false; - QFont font = QFontDialog::getFont(&bOk, - m_ui.DisplayFont2TextLabel->font(), this); - if (bOk) { - m_ui.DisplayFont2TextLabel->setFont(font); - m_ui.DisplayFont2TextLabel->setText(font.family() - + ' ' + QString::number(font.pointSize())); - optionsChanged(); - } -} - - -// The channel display effect demo changer. -void qjackctlSetupForm::toggleDisplayEffect ( bool bOn ) -{ - QPalette pal; - pal.setColor(QPalette::Foreground, Qt::green); - if (bOn) { - QPixmap pm(":/icons/displaybg1.png"); - pal.setBrush(QPalette::Background, QBrush(pm)); - } else { - pal.setColor(QPalette::Background, Qt::black); - } - m_ui.DisplayFont1TextLabel->setPalette(pal); - m_ui.DisplayFont2TextLabel->setPalette(pal); - optionsChanged(); -} - - -// The messages font selection dialog. -void qjackctlSetupForm::chooseMessagesFont (void) -{ - bool bOk = false; - QFont font = QFontDialog::getFont(&bOk, - m_ui.MessagesFontTextLabel->font(), this); - if (bOk) { - m_ui.MessagesFontTextLabel->setFont(font); - m_ui.MessagesFontTextLabel->setText(font.family() - + ' ' + QString::number(font.pointSize())); - optionsChanged(); - } -} - - -// The connections font selection dialog. -void qjackctlSetupForm::chooseConnectionsFont (void) -{ - bool bOk = false; - QFont font = QFontDialog::getFont(&bOk, - m_ui.ConnectionsFontTextLabel->font(), this); - if (bOk) { - m_ui.ConnectionsFontTextLabel->setFont(font); - m_ui.ConnectionsFontTextLabel->setText(font.family() - + ' ' + QString::number(font.pointSize())); - optionsChanged(); - } -} - - -// Mark that some server preset settings have changed. -void qjackctlSetupForm::settingsChanged (void) -{ - if (m_iDirtySetup > 0) - return; - - m_iDirtySettings++; - stabilizeForm(); -} - -// Mark that some program options have changed. -void qjackctlSetupForm::optionsChanged (void) -{ - if (m_iDirtySetup > 0) - return; - - m_iDirtyOptions++; - stabilizeForm(); -} - - -// Accept settings (OK button slot). -void qjackctlSetupForm::accept (void) -{ - if (m_iDirtySettings > 0 || m_iDirtyOptions > 0) { - // Save current preset selection. - m_pSetup->sDefPreset = m_ui.PresetComboBox->currentText(); - // Always save current settings... - savePreset(m_pSetup->sDefPreset); - // Save Options... - m_pSetup->bStartupScript = m_ui.StartupScriptCheckBox->isChecked(); - m_pSetup->sStartupScriptShell = m_ui.StartupScriptShellComboBox->currentText(); - m_pSetup->bPostStartupScript = m_ui.PostStartupScriptCheckBox->isChecked(); - m_pSetup->sPostStartupScriptShell = m_ui.PostStartupScriptShellComboBox->currentText(); - m_pSetup->bShutdownScript = m_ui.ShutdownScriptCheckBox->isChecked(); - m_pSetup->sShutdownScriptShell = m_ui.ShutdownScriptShellComboBox->currentText(); - m_pSetup->bPostShutdownScript = m_ui.PostShutdownScriptCheckBox->isChecked(); - m_pSetup->sPostShutdownScriptShell = m_ui.PostShutdownScriptShellComboBox->currentText(); - m_pSetup->bStdoutCapture = m_ui.StdoutCaptureCheckBox->isChecked(); - m_pSetup->sXrunRegex = m_ui.XrunRegexComboBox->currentText(); - m_pSetup->bXrunIgnoreFirst = m_ui.XrunIgnoreFirstCheckBox->isChecked(); - m_pSetup->bActivePatchbay = m_ui.ActivePatchbayCheckBox->isChecked(); - m_pSetup->sActivePatchbayPath = m_ui.ActivePatchbayPathComboBox->currentText(); -#ifdef CONFIG_AUTO_REFRESH - m_pSetup->bAutoRefresh = m_ui.AutoRefreshCheckBox->isChecked(); - m_pSetup->iTimeRefresh = m_ui.TimeRefreshComboBox->currentText().toInt(); -#endif - m_pSetup->bMessagesLog = m_ui.MessagesLogCheckBox->isChecked(); - m_pSetup->sMessagesLogPath = m_ui.MessagesLogPathComboBox->currentText(); - m_pSetup->bBezierLines = m_ui.BezierLinesCheckBox->isChecked(); - // Save Defaults... - m_pSetup->iTimeDisplay = m_pTimeDisplayButtonGroup->checkedId(); - m_pSetup->iTimeFormat = m_ui.TimeFormatComboBox->currentIndex(); - m_pSetup->sMessagesFont = m_ui.MessagesFontTextLabel->font().toString(); - m_pSetup->bMessagesLimit = m_ui.MessagesLimitCheckBox->isChecked(); - m_pSetup->iMessagesLimitLines = m_ui.MessagesLimitLinesComboBox->currentText().toInt(); - m_pSetup->sDisplayFont1 = m_ui.DisplayFont1TextLabel->font().toString(); - m_pSetup->sDisplayFont2 = m_ui.DisplayFont2TextLabel->font().toString(); - m_pSetup->bDisplayEffect = m_ui.DisplayEffectCheckBox->isChecked(); - m_pSetup->bDisplayBlink = m_ui.DisplayBlinkCheckBox->isChecked(); - m_pSetup->iJackClientPortAlias = m_ui.JackClientPortAliasComboBox->currentIndex(); - m_pSetup->iConnectionsIconSize = m_ui.ConnectionsIconSizeComboBox->currentIndex(); - m_pSetup->sConnectionsFont = m_ui.ConnectionsFontTextLabel->font().toString(); - m_pSetup->bStartJack = m_ui.StartJackCheckBox->isChecked(); - m_pSetup->bQueryClose = m_ui.QueryCloseCheckBox->isChecked(); - m_pSetup->bKeepOnTop = m_ui.KeepOnTopCheckBox->isChecked(); - m_pSetup->bSystemTray = m_ui.SystemTrayCheckBox->isChecked(); - m_pSetup->bStartMinimized = m_ui.StartMinimizedCheckBox->isChecked(); - m_pSetup->bDelayedSetup = m_ui.DelayedSetupCheckBox->isChecked(); - m_pSetup->bServerConfig = m_ui.ServerConfigCheckBox->isChecked(); - m_pSetup->sServerConfigName = m_ui.ServerConfigNameComboBox->currentText(); - m_pSetup->bServerConfigTemp = m_ui.ServerConfigTempCheckBox->isChecked(); - m_pSetup->bQueryShutdown = m_ui.QueryShutdownCheckBox->isChecked(); - m_pSetup->bAlsaSeqEnabled = m_ui.AlsaSeqEnabledCheckBox->isChecked(); - m_pSetup->bAliasesEnabled = m_ui.AliasesEnabledCheckBox->isChecked(); - m_pSetup->bAliasesEditing = m_ui.AliasesEditingCheckBox->isChecked(); - m_pSetup->bLeftButtons = !m_ui.LeftButtonsCheckBox->isChecked(); - m_pSetup->bRightButtons = !m_ui.RightButtonsCheckBox->isChecked(); - m_pSetup->bTransportButtons = !m_ui.TransportButtonsCheckBox->isChecked(); - m_pSetup->bTextLabels = !m_ui.TextLabelsCheckBox->isChecked(); - m_pSetup->iBaseFontSize = m_ui.BaseFontSizeComboBox->currentText().toInt(); - } - - // Save combobox history... - m_pSetup->saveComboBoxHistory(m_ui.ServerComboBox); - m_pSetup->saveComboBoxHistory(m_ui.InterfaceComboBox); - m_pSetup->saveComboBoxHistory(m_ui.InDeviceComboBox); - m_pSetup->saveComboBoxHistory(m_ui.OutDeviceComboBox); - m_pSetup->saveComboBoxHistory(m_ui.StartupScriptShellComboBox); - m_pSetup->saveComboBoxHistory(m_ui.PostStartupScriptShellComboBox); - m_pSetup->saveComboBoxHistory(m_ui.ShutdownScriptShellComboBox); - m_pSetup->saveComboBoxHistory(m_ui.PostShutdownScriptShellComboBox); - m_pSetup->saveComboBoxHistory(m_ui.XrunRegexComboBox); - m_pSetup->saveComboBoxHistory(m_ui.ActivePatchbayPathComboBox); - m_pSetup->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); - m_pSetup->saveComboBoxHistory(m_ui.ServerConfigNameComboBox); - - // Just go with dialog acceptance. - QDialog::accept(); -} - - -// Reject settings (Cancel button slot). -void qjackctlSetupForm::reject (void) -{ - bool bReject = true; - - // Check if there's any pending changes... - if (m_iDirtySettings > 0 || m_iDirtyOptions > 0) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Some settings have been changed.\n\n" - "Do you want to apply the changes?"), - tr("Apply"), tr("Discard"), tr("Cancel"))) { - case 0: // Apply... - accept(); - return; - case 1: // Discard - break; - default: // Cancel. - bReject = false; - } - } - - if (bReject) - QDialog::reject(); -} - - -// end of qjackctlSetupForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.h 2008-05-14 11:50:55.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,129 +0,0 @@ -// qjackctlSetupForm.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlSetupForm_h -#define __qjackctlSetupForm_h - -#include "ui_qjackctlSetupForm.h" - -// Forward declarations. -class qjackctlSetup; - -class QButtonGroup; - - -//---------------------------------------------------------------------------- -// qjackctlSetupForm -- UI wrapper form. - -class qjackctlSetupForm : public QDialog -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlSetupForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlSetupForm(); - - void setup(qjackctlSetup * pSetup); - -public slots: - - void changeCurrentPreset(const QString&); - void saveCurrentPreset(); - void deleteCurrentPreset(); - - void changeAudio(int); - void changeDriver(const QString&); - void selectInterface(); - void selectInDevice(); - void selectOutDevice(); - - void symbolStartupScript(); - void symbolPostStartupScript(); - void symbolShutdownScript(); - void symbolPostShutdownScript(); - - void browseStartupScript(); - void browsePostStartupScript(); - void browseShutdownScript(); - void browsePostShutdownScript(); - void browseActivePatchbayPath(); - void browseMessagesLogPath(); - - void chooseDisplayFont1(); - void chooseDisplayFont2(); - void toggleDisplayEffect(bool); - void chooseMessagesFont(); - void chooseConnectionsFont(); - - void settingsChanged(); - void optionsChanged(); - -protected slots: - - void accept(); - void reject(); - -protected: - - // A combo-box text item setter helper. - void setComboBoxCurrentText ( - QComboBox *pComboBox, const QString& sText ) const; - - void changePreset(const QString& sPreset); - bool savePreset(const QString& sPreset); - bool deletePreset(const QString& sPreset); - void resetPresets(); - - void computeLatency(); - - void changeDriverAudio( const QString& sDriver, int iAudio ); - void changeDriverUpdate( const QString& sDriver, bool bUpdate ); - - void deviceMenu(QLineEdit * pLineEdit, QToolButton * pToolButton, int iAudio); - void symbolMenu(QLineEdit * pLineEdit, QToolButton * pToolButton ); - - void stabilizeForm(); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlSetupForm m_ui; - - // Instance variables. - qjackctlSetup *m_pSetup; - - QButtonGroup *m_pTimeDisplayButtonGroup; - - int m_iDirtySetup; - int m_iDirtySettings; - int m_iDirtyOptions; - - QString m_sPreset; -}; - - -#endif // __qjackctlSetupForm_h - - -// end of qjackctlSetupForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetupForm.ui 2008-10-26 15:37:55.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetupForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,4377 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlSetupForm - - - - 0 - 0 - 666 - 539 - - - - - 1 - 1 - 0 - 0 - - - - Setup - JACK Audio Connection Kit - - - :/icons/setup1.png - - - true - - - - 4 - - - 4 - - - - - false - - - 0 - - - - Settings - - - - 9 - - - 6 - - - - - 4 - - - 4 - - - - - Preset &Name: - - - false - - - PresetComboBox - - - - - - - - 3 - 0 - 0 - 0 - - - - Settings preset name - - - true - - - - (default) - - - - - - - - Save settings as current preset name - - - &Save - - - :/icons/save1.png - - - Alt+S - - - false - - - - - - - Delete current settings preset - - - &Delete - - - :/icons/remove1.png - - - Alt+D - - - false - - - - - - - - - - 75 - true - - - - Server - - - true - - - - 4 - - - 4 - - - - - - 50 - false - - - - Server &Path: - - - Qt::AlignVCenter - - - false - - - ServerComboBox - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - The JACK Audio Connection Kit sound server path - - - true - - - - jackd - - - - - jackdmp - - - - - jackstart - - - - - jackd-realtime - - - - - - - - - 50 - false - - - - Driv&er: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - DriverComboBox - - - - - - - - 50 - false - - - - The audio backend driver interface to use - - - false - - - - dummy - - - - - sun - - - - - oss - - - - - alsa - - - - - portaudio - - - - - coreaudio - - - - - freebob - - - - - firewire - - - - - - - - - - - - 75 - true - - - - Parameters - - - true - - - - 8 - - - 4 - - - - - 0 - - - 4 - - - - - - 50 - false - - - - MIDI Driv&er: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - MidiDriverComboBox - - - - - - - - 50 - false - - - - The ALSA MIDI backend driver to use - - - false - - - - none - - - - - raw - - - - - seq - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 8 - 8 - - - - - - - - - 50 - false - - - - Start De&lay (secs): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - StartDelaySpinBox - - - - - - - - 50 - false - - - - Time in seconds that client is delayed after server startup - - - 999 - - - 0 - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 8 - 8 - - - - - - - - - 5 - 5 - 0 - 0 - - - - - 50 - false - - - - QFrame::NoFrame - - - QFrame::Plain - - - Latency: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - - 1 - 5 - 0 - 0 - - - - - 80 - 0 - - - - - 50 - false - - - - Output latency in milliseconds, calculated based on the period, rate and buffer settings - - - QFrame::StyledPanel - - - QFrame::Sunken - - - 0 - - - Qt::AlignCenter - - - false - - - - - - - - - 0 - - - 4 - - - - - - 50 - false - - - - Use realtime scheduling - - - &Realtime - - - Alt+R - - - - - - - - 50 - false - - - - Do not attempt to lock memory, even if in realtime mode - - - No Memory Loc&k - - - Alt+K - - - - - - - - 50 - false - - - - Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) - - - &Unlock Memory - - - Alt+U - - - - - - - - 50 - false - - - - Ignore xruns reported by the backend driver - - - So&ft Mode - - - Alt+F - - - - - - - - 50 - false - - - - Provide output monitor ports - - - &Monitor - - - Alt+M - - - - - - - - 50 - false - - - - Force 16bit mode instead of failing over 32bit (default) - - - Force &16bit - - - Alt+1 - - - - - - - - 50 - false - - - - Enable hardware monitoring of capture ports - - - H/W M&onitor - - - Alt+O - - - - - - - - 50 - false - - - - Enable hardware metering on cards that support it - - - H/&W Meter - - - Alt+W - - - - - - - - 50 - false - - - - Ignore hardware period/buffer size - - - &Ignore H/W - - - Alt+I - - - - - - - - 50 - false - - - - Whether to give verbose output on messages - - - &Verbose messages - - - Alt+V - - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - 0 - - - 4 - - - - - - 50 - false - - - - &Output Device: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - OutDeviceComboBox - - - - - - - - 50 - false - - - - &Output Channels: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - OutChannelsSpinBox - - - - - - - - 50 - false - - - - &Interface: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - InterfaceComboBox - - - - - - - - 50 - false - - - - Maximum input audio hardware channels to allocate - - - 999 - - - (default) - - - - - - - - 50 - false - - - - &Audio: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - AudioComboBox - - - - - - - - 50 - false - - - - &Input Latency: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - InLatencySpinBox - - - - - - - - 50 - false - - - - QFrame::NoFrame - - - QFrame::Plain - - - Dit&her: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - DitherComboBox - - - - - - - - 50 - false - - - - External output latency (frames) - - - 9999999 - - - (default) - - - - - - - - 50 - false - - - - &Input Device: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - InDeviceComboBox - - - - - - - - 50 - false - - - - Provide either audio capture, playback or both - - - - Duplex - - - - - Capture Only - - - - - Playback Only - - - - - - - - - 50 - false - - - - The PCM device name to use - - - true - - - - (default) - - - - - hw:0 - - - - - plughw:0 - - - - - /dev/audio - - - - - /dev/dsp - - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Select output device for playback - - - > - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - - 50 - false - - - - Alternate input device for capture - - - true - - - - (default) - - - - - hw:0 - - - - - plughw:0 - - - - - /dev/audio - - - - - /dev/dsp - - - - - - - - - 50 - false - - - - &Output Latency: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - OutLatencySpinBox - - - - - - - - 50 - false - - - - Maximum output audio hardware channels to allocate - - - 999 - - - (default) - - - - - - - - 50 - false - - - - Alternate output device for playback - - - true - - - - (default) - - - - - hw:0 - - - - - plughw:0 - - - - - /dev/audio - - - - - /dev/dsp - - - - - - - - - 50 - false - - - - &Input Channels: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - InChannelsSpinBox - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Select input device for capture - - - > - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Select PCM device name - - - > - - - - - - - - 50 - false - - - - External input latency (frames) - - - 9999999 - - - (default) - - - - - - - - 50 - false - - - - Set dither mode - - - - None - - - - - Rectangular - - - - - Shaped - - - - - Triangular - - - - - - - - - - 0 - - - 4 - - - - - - 50 - false - - - - Number of periods in the hardware buffer - - - 999 - - - 2 - - - - - - - - 50 - false - - - - QFrame::NoFrame - - - QFrame::Plain - - - Priorit&y: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - PrioritySpinBox - - - - - - - - 50 - false - - - - &Frames/Period: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - FramesComboBox - - - - - - - - 50 - false - - - - Frames per period between process() calls - - - true - - - - 16 - - - - - 32 - - - - - 64 - - - - - 128 - - - - - 256 - - - - - 512 - - - - - 1024 - - - - - 2048 - - - - - 4096 - - - - - - - - - 50 - false - - - - Port Ma&ximum: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - PortMaxComboBox - - - - - - - - 5 - 5 - 0 - 0 - - - - - 50 - false - - - - &Channels: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - 0 - - - ChanSpinBox - - - - - - - - Sans Serif - 50 - false - - - - false - - - Number o microseconds to wait between engine processes (dummy) - - - true - - - - 21333 - - - - - - - - - 50 - false - - - - Sample rate in frames per second - - - true - - - - 22050 - - - - - 32000 - - - - - 44100 - - - - - 48000 - - - - - 88200 - - - - - 96000 - - - - - 192000 - - - - - - - - - 50 - false - - - - Scheduler priority when running realtime - - - 89 - - - (default) - - - - - - - - 50 - false - - - - &Word Length: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - WordLengthComboBox - - - - - - - - 50 - false - - - - Periods/&Buffer: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - PeriodsSpinBox - - - - - - - - 50 - false - - - - false - - - Word length - - - true - - - - 16 - - - - - 32 - - - - - 64 - - - - - - - - - 5 - 0 - 0 - 0 - - - - - 60 - 0 - - - - - 50 - false - - - - Maximum number of ports the JACK server can manage - - - true - - - 1 - - - - 128 - - - - - 256 - - - - - 512 - - - - - 1024 - - - - - - - - - 50 - false - - - - &Wait (usec): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - WaitComboBox - - - - - - - - 50 - false - - - - QFrame::NoFrame - - - QFrame::Plain - - - Sample &Rate: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - SampleRateComboBox - - - - - - - - 50 - false - - - - Maximum number of audio channels to allocate - - - 999 - - - (default) - - - - - - - - 50 - false - false - - - - QFrame::NoFrame - - - QFrame::Plain - - - &Timeout (msec): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - TimeoutComboBox - - - - - - - - 50 - false - - - - Set client timeout limit in miliseconds - - - true - - - 1 - - - - 200 - - - - - 500 - - - - - 1000 - - - - - 2000 - - - - - 5000 - - - - - 10000 - - - - - - - - - - - - - - Options - - - - 4 - - - 4 - - - - - - 75 - true - - - - Scripting - - - true - - - - 8 - - - 4 - - - - - - 50 - false - - - - Whether to execute a custom shell script before starting up the JACK audio server. - - - Execute script on Start&up: - - - Alt+U - - - - - - - - 50 - false - - - - Whether to execute a custom shell script after starting up the JACK audio server. - - - Execute script after &Startup: - - - Alt+S - - - - - - - - 50 - false - - - - Whether to execute a custom shell script before shuting down the JACK audio server. - - - Execute script on Shut&down: - - - Alt+D - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Command line to be executed before starting up the JACK audio server - - - true - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Scripting argument meta-symbols - - - > - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for script to be executed before starting up the JACK audio server - - - ... - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Command line to be executed after starting up the JACK audio server - - - true - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Scripting argument meta-symbols - - - > - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for script to be executed after starting up the JACK audio server - - - ... - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Scripting argument meta-symbols - - - > - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for script to be executed before shutting down the JACK audio server - - - ... - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Command line to be executed before shutting down the JACK audio server - - - true - - - - - - - - 50 - false - - - - Whether to execute a custom shell script after shuting down the JACK audio server. - - - Execute script after Shu&tdown: - - - Alt+T - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Scripting argument meta-symbols - - - > - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for script to be executed after shutting down the JACK audio server - - - ... - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Command line to be executed after shutting down the JACK audio server - - - true - - - - - - - - - - - 75 - true - - - - Statistics - - - true - - - - 8 - - - 4 - - - - - - 50 - false - - - - Whether to capture standard output (stdout/stderr) into messages window - - - &Capture standard output - - - Alt+C - - - - - - - - 5 - 5 - 0 - 0 - - - - - 50 - false - - - - &XRUN detection regex: - - - false - - - XrunRegexComboBox - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Regular expression used to detect XRUNs on server output messages - - - true - - - - xrun of at least ([0-9|\.]+) msecs - - - - - - - - - 50 - false - - - - Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) - - - &Ignore first XRUN occurrence on statistics - - - Alt+I - - - - - - - - - - - 75 - true - - - - Connections - - - true - - - - 8 - - - 4 - - - - - - 40 - 0 - - - - - 50 - false - - - - Time in seconds between each auto-refresh cycle - - - true - - - - 5 - - - - - 10 - - - - - 20 - - - - - 30 - - - - - 60 - - - - - 120 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 200 - 8 - - - - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Patchbay definition file to be activated as connection persistence profile - - - true - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for a patchbay definition file to be activated - - - ... - - - - - - - - 50 - false - - - - Whether to refresh the connections patchbay automatically - - - &Auto refresh connections Patchbay, every (secs): - - - Alt+A - - - - - - - - 50 - false - - - - Whether to activate a patchbay definition for connection persistence profile. - - - Activate &Patchbay persistence: - - - Alt+P - - - - - - - - - - - 75 - true - - - - Logging - - - true - - - - 8 - - - 4 - - - - - - 7 - 0 - 0 - 0 - - - - - 50 - false - - - - Messages log file - - - true - - - - - - - - 22 - 22 - - - - - 24 - 24 - - - - - 50 - false - - - - Qt::TabFocus - - - Browse for the messages log file location - - - ... - - - - - - - - 50 - false - - - - Whether to activate a messages logging to file. - - - &Messages log file: - - - Alt+M - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - - Display - - - - 4 - - - 4 - - - - - - 75 - true - - - - Time Display - - - true - - - - 8 - - - 4 - - - - - 4 - - - 4 - - - - - - 50 - false - - - - Time F&ormat: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - TimeFormatComboBox - - - - - - - - 50 - false - - - - The general time format on display - - - false - - - - hh:mm:ss - - - - - hh:mm:ss.d - - - - - hh:mm:ss.dd - - - - - hh:mm:ss.ddd - - - - - - - - - - 4 - - - 4 - - - - - - 50 - false - - - - Transport &Time Code - - - Alt+T - - - - - - - - 50 - false - - - - Transport &BBT (bar:beat.ticks) - - - Alt+B - - - - - - - - 50 - false - - - - Elapsed time since last &Reset - - - Alt+R - - - - - - - - 50 - false - - - - Elapsed time since last &XRUN - - - Alt+X - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 24 - 8 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 24 - 8 - - - - - - - - 4 - - - 4 - - - - - - 180 - 0 - - - - - 260 - 32767 - - - - - 50 - false - - - - Sample front panel normal display font - - - true - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::AlignCenter - - - false - - - - - - - - 180 - 0 - - - - - 260 - 32767 - - - - - 50 - false - - - - Sample big time display font - - - true - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::AlignCenter - - - false - - - - - - - - 50 - false - - - - Big Time display: - - - false - - - - - - - - 50 - false - - - - Select font for front panel normal display - - - &Font... - - - Alt+F - - - false - - - - - - - - 50 - false - - - - Select font for big time display - - - &Font... - - - Alt+F - - - false - - - - - - - - 50 - false - - - - Normal display: - - - false - - - - - - - - 50 - false - - - - Whether to enable a shiny glass light effect on the main display - - - &Display shiny glass light effect - - - Alt+D - - - - - - - - 50 - false - - - - Whether to enable blinking (flashing) of the server mode (RT) indicator - - - Blin&k server mode indicator - - - Alt+K - - - - - - - - - - - - - 75 - true - - - - Messages Window - - - true - - - - 8 - - - 4 - - - - - - 180 - 0 - - - - - 260 - 16777215 - - - - - 50 - false - - - - Sample messages text font display - - - true - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::AlignCenter - - - false - - - - - - - - 50 - false - - - - Select font for the messages text display - - - &Font... - - - Alt+F - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 8 - 8 - - - - - - - - - 50 - false - - - - Whether to keep a maximum number of lines in the messages window - - - &Messages limit: - - - Alt+M - - - - - - - - 50 - false - - - - The maximum number of message lines to keep in view - - - true - - - 3 - - - - 100 - - - - - 250 - - - - - 500 - - - - - 1000 - - - - - 2500 - - - - - 5000 - - - - - - - - - - - - 75 - true - - - - Connections Window - - - true - - - - 8 - - - 4 - - - - - - 180 - 0 - - - - - 260 - 16777215 - - - - - 50 - false - - - - Sample connections view font - - - true - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::AlignCenter - - - false - - - - - - - - 50 - false - - - - Select font for the connections view - - - &Font... - - - Alt+F - - - false - - - - - - - - 50 - false - - - - &Icon size: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - ConnectionsIconSizeComboBox - - - - - - - - 50 - false - - - - The icon size for each item of the connections view - - - false - - - 0 - - - - 16 x 16 - - - - - 32 x 32 - - - - - 64 x 64 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 8 - 8 - - - - - - - - Qt::Vertical - - - QSizePolicy::Minimum - - - - 8 - 8 - - - - - - - - - 50 - false - - - - &JACK client/port aliases: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - JackClientPortAliasComboBox - - - - - - - - 50 - false - - - - JACK client/port aliases display mode - - - false - - - 0 - - - - Default - - - - - First - - - - - Second - - - - - - - - - 50 - false - - - - Whether to enable in-place client/port name editing (rename) - - - Ena&ble client/port aliases editing (rename) - - - Alt+B - - - - - - - - 50 - false - - - - Whether to enable client/port name aliases on the connections window - - - E&nable client/port aliases - - - Alt+N - - - - - - - - 50 - false - - - - Whether to draw connection lines as cubic Bezier curves - - - Draw connection and patchbay lines as Be&zier curves - - - Alt+Z - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - - Misc - - - - 4 - - - 4 - - - - - - 75 - true - - - - Other - - - true - - - - 4 - - - 4 - - - - - 0 - - - 4 - - - - - - 50 - false - - - - Whether to start JACK audio server immediately on application startup - - - &Start JACK audio server on application startup - - - Alt+S - - - - - - - - 50 - false - - - - Whether to ask for confirmation on application exit - - - &Confirm application close - - - Alt+C - - - - - - - - 50 - false - false - - - - Whether to keep all child windows on top of the main window - - - &Keep child windows always on top - - - Alt+K - - - - - - - - 50 - false - - - - Whether to enable the system tray icon - - - &Enable system tray icon - - - Alt+E - - - - - - - - 50 - false - - - - Whether to start minimized to system tray - - - Start minimi&zed to system tray - - - Alt+Z - - - - - - - - 50 - false - - - - Whether to delay window positioning at application startup - - - &Delay window positioning at startup - - - Alt+D - - - - - - - - - 0 - - - 4 - - - - - - 50 - false - - - - Whether to save the JACK server command-line configuration into a local file (auto-start) - - - S&ave JACK audio server configuration to: - - - Alt+A - - - - - - - - 50 - false - - - - The server configuration local file name (auto-start) - - - true - - - - .jackdrc - - - - - - - - - 50 - false - - - - Whether to exit once all clients have closed (auto-start) - - - C&onfigure as temporary server - - - Alt+O - - - - - - - - 50 - false - - - - Whether to ask for confirmation on JACK audio server shutdown - - - Confirm server sh&utdown - - - Alt+U - - - - - - - - 50 - false - - - - Whether to enable ALSA Sequencer (MIDI) support on startup - - - E&nable ALSA Sequencer support - - - Alt+N - - - - - - - - - - - - - 75 - true - - - - Buttons - - - true - - - - 4 - - - 4 - - - - - 0 - - - 4 - - - - - - 50 - false - - - - Whether to hide the left button group on the main window - - - Hide main window &Left buttons - - - Alt+L - - - - - - - - 50 - false - - - - Whether to hide the right button group on the main window - - - Hide main window &Right buttons - - - Alt+R - - - - - - - - 50 - false - - - - Whether to hide the transport button group on the main window - - - Hide main window &Transport buttons - - - Alt+T - - - - - - - - 50 - false - - - - Whether to hide the text labels on the main window buttons - - - Hide main window &button text labels - - - Alt+B - - - - - - - - - - - - - 75 - true - - - - Defaults - - - true - - - - 4 - - - 4 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 8 - 8 - - - - - - - - - 50 - false - - - - &Base font size: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - BaseFontSizeComboBox - - - - - - - - 50 - false - - - - Base application font size (pt.) - - - true - - - - (default) - - - - - 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 8 - 8 - - - - - - - - - - - - 4 - - - 4 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 160 - 8 - - - - - - - - OK - - - :/icons/accept1.png - - - - - - - Cancel - - - :/icons/quit1.png - - - - - - - - - - SetupTabWidget - PresetComboBox - PresetSavePushButton - PresetDeletePushButton - ServerComboBox - DriverComboBox - RealtimeCheckBox - NoMemLockCheckBox - UnlockMemCheckBox - SoftModeCheckBox - MonitorCheckBox - ShortsCheckBox - HWMonCheckBox - HWMeterCheckBox - IgnoreHWCheckBox - VerboseCheckBox - PrioritySpinBox - FramesComboBox - SampleRateComboBox - PeriodsSpinBox - WordLengthComboBox - WaitComboBox - ChanSpinBox - PortMaxComboBox - TimeoutComboBox - InterfaceComboBox - InterfaceToolButton - DitherComboBox - AudioComboBox - InDeviceComboBox - InDeviceToolButton - OutDeviceComboBox - OutDeviceToolButton - InChannelsSpinBox - OutChannelsSpinBox - InLatencySpinBox - OutLatencySpinBox - MidiDriverComboBox - StartDelaySpinBox - StartupScriptCheckBox - StartupScriptShellComboBox - StartupScriptSymbolToolButton - StartupScriptBrowseToolButton - PostStartupScriptCheckBox - PostStartupScriptShellComboBox - PostStartupScriptSymbolToolButton - PostStartupScriptBrowseToolButton - ShutdownScriptCheckBox - ShutdownScriptShellComboBox - ShutdownScriptSymbolToolButton - ShutdownScriptBrowseToolButton - PostShutdownScriptCheckBox - PostShutdownScriptShellComboBox - PostShutdownScriptSymbolToolButton - PostShutdownScriptBrowseToolButton - StdoutCaptureCheckBox - XrunRegexComboBox - XrunIgnoreFirstCheckBox - ActivePatchbayCheckBox - ActivePatchbayPathComboBox - ActivePatchbayPathToolButton - AutoRefreshCheckBox - TimeRefreshComboBox - MessagesLogCheckBox - MessagesLogPathComboBox - MessagesLogPathToolButton - TransportTimeRadioButton - TransportBBTRadioButton - ElapsedResetRadioButton - ElapsedXrunRadioButton - TimeFormatComboBox - DisplayFont1PushButton - DisplayFont2PushButton - DisplayEffectCheckBox - DisplayBlinkCheckBox - MessagesFontPushButton - MessagesLimitCheckBox - MessagesLimitLinesComboBox - ConnectionsFontPushButton - ConnectionsIconSizeComboBox - BezierLinesCheckBox - AliasesEnabledCheckBox - AliasesEditingCheckBox - StartJackCheckBox - QueryCloseCheckBox - KeepOnTopCheckBox - SystemTrayCheckBox - StartMinimizedCheckBox - DelayedSetupCheckBox - ServerConfigCheckBox - ServerConfigNameComboBox - ServerConfigTempCheckBox - QueryShutdownCheckBox - AlsaSeqEnabledCheckBox - LeftButtonsCheckBox - RightButtonsCheckBox - TransportButtonsCheckBox - TextLabelsCheckBox - BaseFontSizeComboBox - OkPushButton - CancelPushButton - - - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetup.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetup.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSetup.h 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSetup.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,230 +0,0 @@ -// qjackctlSetup.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlSetup_h -#define __qjackctlSetup_h - -#include "qjackctlConnectAlias.h" - -#include - - -// Forward declarations. -class QComboBox; -class QSplitter; - - -// Audio mode combobox item indexes. -#define QJACKCTL_DUPLEX 0 -#define QJACKCTL_CAPTURE 1 -#define QJACKCTL_PLAYBACK 2 - -// Icon size combobox item indexes. -#define QJACKCTL_ICON_16X16 0 -#define QJACKCTL_ICON_32X32 1 -#define QJACKCTL_ICON_64X64 2 - - -// Server settings preset struct. -struct qjackctlPreset -{ - QString sServer; - bool bRealtime; - bool bSoftMode; - bool bMonitor; - bool bShorts; - bool bNoMemLock; - bool bUnlockMem; - bool bHWMon; - bool bHWMeter; - bool bIgnoreHW; - int iPriority; - int iFrames; - int iSampleRate; - int iPeriods; - int iWordLength; - int iWait; - int iChan; - QString sDriver; - QString sInterface; - int iAudio; - int iDither; - int iTimeout; - QString sInDevice; - QString sOutDevice; - int iInChannels; - int iOutChannels; - int iInLatency; - int iOutLatency; - int iStartDelay; - bool bVerbose; - int iPortMax; - QString sMidiDriver; -}; - -// Common settings profile class. -class qjackctlSetup -{ -public: - - // Constructor. - qjackctlSetup(); - // destructor; - ~qjackctlSetup(); - - // Command line arguments parser. - bool parse_args(int argc, char **argv); - // Command line usage helper. - void print_usage(const char *arg0); - - // Default (translated) preset name. - QString sDefPresetName; - - // Immediate server start option. - bool bStartJack; - - // User supplied command line. - QString sCmdLine; - - // Current (default) preset name. - QString sDefPreset; - // Available presets list. - QStringList presets; - - // Options... - bool bStartupScript; - QString sStartupScriptShell; - bool bPostStartupScript; - QString sPostStartupScriptShell; - bool bShutdownScript; - QString sShutdownScriptShell; - bool bPostShutdownScript; - QString sPostShutdownScriptShell; - bool bStdoutCapture; - QString sXrunRegex; - bool bXrunIgnoreFirst; - bool bActivePatchbay; - QString sActivePatchbayPath; -#ifdef CONFIG_AUTO_REFRESH - bool bAutoRefresh; - int iTimeRefresh; -#endif - bool bMessagesLog; - QString sMessagesLogPath; - bool bBezierLines; - int iTimeDisplay; - int iTimeFormat; - QString sMessagesFont; - bool bMessagesLimit; - int iMessagesLimitLines; - QString sDisplayFont1; - QString sDisplayFont2; - bool bDisplayEffect; - bool bDisplayBlink; - int iJackClientPortAlias; - int iConnectionsIconSize; - QString sConnectionsFont; - bool bQueryClose; - bool bKeepOnTop; - bool bSystemTray; - bool bStartMinimized; - bool bDelayedSetup; - bool bServerConfig; - QString sServerConfigName; - bool bServerConfigTemp; - bool bQueryShutdown; - bool bAlsaSeqEnabled; - bool bAliasesEnabled; - bool bAliasesEditing; - bool bLeftButtons; - bool bRightButtons; - bool bTransportButtons; - bool bTextLabels; - int iBaseFontSize; - - // Defaults... - QString sPatchbayPath; - // Recent patchbay listing. - QStringList patchbays; - - // Aliases containers. - qjackctlConnectAlias aliasAudioOutputs; - qjackctlConnectAlias aliasAudioInputs; - qjackctlConnectAlias aliasMidiOutputs; - qjackctlConnectAlias aliasMidiInputs; - qjackctlConnectAlias aliasAlsaOutputs; - qjackctlConnectAlias aliasAlsaInputs; - - // Aliases preset management methods. - bool loadAliases(const QString& sPreset); - bool saveAliases(const QString& sPreset); - // Preset management methods. - bool loadPreset(qjackctlPreset& preset, const QString& sPreset); - bool savePreset(qjackctlPreset& preset, const QString& sPreset); - bool deletePreset(const QString& sPreset); - - // Combo box history persistence helper prototypes. - void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); - void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); - - // Splitter widget sizes persistence helper methods. - void loadSplitterSizes(QSplitter *pSplitter, QList& sizes); - void saveSplitterSizes(QSplitter *pSplitter); - - // Widget geometry persistence helper prototypes. - void saveWidgetGeometry(QWidget *pWidget, bool bMinimized = false); - void loadWidgetGeometry(QWidget *pWidget, bool bMinimized = false); - -private: - - // Our proper settings profile. - QSettings m_settings; -}; - - -// Delayed widget setup helper class. -class qjackctlDelayedSetup : public QObject -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlDelayedSetup(QWidget *pWidget, - const QPoint& pos, const QSize& size, bool bVisible, int iDelay = 0); - -protected slots: - - void setup(); - -private: - - QWidget *m_pWidget; - QPoint m_pos; - QSize m_size; - bool m_bVisible; -}; - - -#endif // __qjackctlSetup_h - - -// end of qjackctlSetup.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.cpp 2008-04-27 17:42:17.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,877 +0,0 @@ -// qjackctlSocketForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlSocketForm.h" - -#include "qjackctlPatchbay.h" -#include "qjackctlConnectAlias.h" - -#include -#include -#include -#include -#include -#include - - -//---------------------------------------------------------------------------- -// qjackctlSocketForm -- UI wrapper form. - -// Constructor. -qjackctlSocketForm::qjackctlSocketForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QDialog(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - m_pSocketList = NULL; - m_pJackClient = NULL; - m_pAlsaSeq = NULL; - m_ppPixmaps = NULL; - m_iDirtyCount = 0; - - // Setup time-display radio-button group. - m_pSocketTypeButtonGroup = new QButtonGroup(this); - m_pSocketTypeButtonGroup->addButton(m_ui.AudioRadioButton, 0); - m_pSocketTypeButtonGroup->addButton(m_ui.MidiRadioButton, 1); - m_pSocketTypeButtonGroup->addButton(m_ui.AlsaRadioButton, 2); - m_pSocketTypeButtonGroup->setExclusive(true); - - // Plug list is not sortable. - //m_ui.PlugListView->setSorting(-1); - - // Plug list view... - QHeaderView *pHeader = m_ui.PlugListView->header(); -// pHeader->setResizeMode(QHeaderView::Custom); - pHeader->setDefaultAlignment(Qt::AlignLeft); -// pHeader->setDefaultSectionSize(300); - pHeader->setMovable(false); - pHeader->setStretchLastSection(true); - -#ifndef CONFIG_JACK_MIDI - m_ui.MidiRadioButton->setEnabled(false); -#endif -#ifndef CONFIG_ALSA_SEQ - m_ui.AlsaRadioButton->setEnabled(false); -#endif - - // UI connections... - - QObject::connect(m_ui.PlugAddPushButton, - SIGNAL(clicked()), - SLOT(addPlug())); - QObject::connect(m_ui.PlugRemovePushButton, - SIGNAL(clicked()), - SLOT(removePlug())); - QObject::connect(m_ui.PlugEditPushButton, - SIGNAL(clicked()), - SLOT(editPlug())); - QObject::connect(m_ui.PlugUpPushButton, - SIGNAL(clicked()), - SLOT(moveUpPlug())); - QObject::connect(m_ui.PlugDownPushButton, - SIGNAL(clicked()), - SLOT(moveDownPlug())); - QObject::connect(m_ui.PlugListView, - SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), - SLOT(selectedPlug())); - - QObject::connect(m_ui.SocketNameLineEdit, - SIGNAL(textChanged(const QString&)), - SLOT(changed())); - QObject::connect(m_ui.AudioRadioButton, - SIGNAL(toggled(bool)), - SLOT(socketTypeChanged())); - QObject::connect(m_ui.MidiRadioButton, - SIGNAL(toggled(bool)), - SLOT(socketTypeChanged())); - QObject::connect(m_ui.AlsaRadioButton, - SIGNAL(toggled(bool)), - SLOT(socketTypeChanged())); - QObject::connect(m_ui.ExclusiveCheckBox, - SIGNAL(toggled(bool)), - SLOT(socketTypeChanged())); - QObject::connect(m_ui.ClientNameComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(clientNameChanged())); - QObject::connect(m_ui.PlugNameComboBox, - SIGNAL(editTextChanged(const QString&)), - SLOT(changed())); - - QObject::connect(m_ui.PlugListView, - SIGNAL(customContextMenuRequested(const QPoint&)), - SLOT(customContextMenu(const QPoint&))); - QObject::connect(m_ui.PlugListView->itemDelegate(), - SIGNAL(commitData(QWidget*)), - SLOT(changed())); - QObject::connect(m_ui.SocketForwardComboBox, - SIGNAL(activated(int)), - SLOT(changed())); - - QObject::connect(m_ui.OkPushButton, - SIGNAL(clicked()), - SLOT(accept())); - QObject::connect(m_ui.CancelPushButton, - SIGNAL(clicked()), - SLOT(reject())); -} - - -// Destructor. -qjackctlSocketForm::~qjackctlSocketForm (void) -{ - delete m_pSocketTypeButtonGroup; -} - - -// Socket caption utility method. -void qjackctlSocketForm::setSocketCaption ( const QString& sSocketCaption ) -{ - m_ui.SocketTabWidget->setTabText(0, sSocketCaption); - (m_ui.PlugListView->headerItem())->setText(0, - sSocketCaption + ' ' + tr("Plugs / Ports")); -} - - -// Socket list enablement. -void qjackctlSocketForm::setSocketList ( qjackctlSocketList *pSocketList ) -{ - m_pSocketList = pSocketList; -} - - -// Pixmap utility methods. -void qjackctlSocketForm::setPixmaps ( QPixmap **ppPixmaps ) -{ - m_ppPixmaps = ppPixmaps; -} - - -// JACK client accessor. -void qjackctlSocketForm::setJackClient ( jack_client_t *pJackClient ) -{ - m_pJackClient = pJackClient; -} - - -// ALSA sequencer accessor. -void qjackctlSocketForm::setAlsaSeq ( snd_seq_t *pAlsaSeq ) -{ - m_pAlsaSeq = pAlsaSeq; -} - - -// Socket type and exclusiveness editing enablement. -void qjackctlSocketForm::setConnectCount ( int iConnectCount ) -{ -// m_ui.SocketTypeGroupBox->setEnabled(iConnectCount < 1); - if (iConnectCount) { - switch (m_pSocketTypeButtonGroup->checkedId()) { - case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO - m_ui.MidiRadioButton->setEnabled(false); - m_ui.AlsaRadioButton->setEnabled(false); - break; - case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI - m_ui.AudioRadioButton->setEnabled(false); - m_ui.AlsaRadioButton->setEnabled(false); - break; - case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI - m_ui.AudioRadioButton->setEnabled(false); - m_ui.MidiRadioButton->setEnabled(false); - break; - } - } -// m_ui.ExclusiveCheckBox->setEnabled(iConnectCount < 2); - -#ifndef CONFIG_JACK_MIDI - m_ui.MidiRadioButton->setEnabled(false); -#endif -#ifndef CONFIG_ALSA_SEQ - m_ui.AlsaRadioButton->setEnabled(false); -#endif -} - - -// Load dialog controls from socket properties. -void qjackctlSocketForm::load ( qjackctlPatchbaySocket *pSocket ) -{ - m_ui.SocketNameLineEdit->setText(pSocket->name()); - - QRadioButton *pRadioButton - = static_cast ( - m_pSocketTypeButtonGroup->button(pSocket->type())); - if (pRadioButton) - pRadioButton->setChecked(true); - - m_ui.ClientNameComboBox->setEditText(pSocket->clientName()); - m_ui.ExclusiveCheckBox->setChecked(pSocket->isExclusive()); - - m_ui.PlugListView->clear(); - QTreeWidgetItem *pPlugItem = NULL; - QStringListIterator iter(pSocket->pluglist()); - while (iter.hasNext()) { - const QString& sPlugName = iter.next(); - pPlugItem = new QTreeWidgetItem(m_ui.PlugListView, pPlugItem); - if (pPlugItem) { - pPlugItem->setText(0, sPlugName); - pPlugItem->setFlags(pPlugItem->flags() | Qt::ItemIsEditable); - } - } - - socketTypeChanged(); - - int iItemIndex = 0; - if (!pSocket->forward().isEmpty()) { - int iItem = m_ui.SocketForwardComboBox->findText(pSocket->forward()); - if (iItem >= 0) - iItemIndex = iItem; - } - m_ui.SocketForwardComboBox->setCurrentIndex(iItemIndex); - - m_iDirtyCount = 0; - - stabilizeForm(); -} - - -// Save dialog controls into socket properties. -void qjackctlSocketForm::save ( qjackctlPatchbaySocket *pSocket ) -{ - pSocket->setName(m_ui.SocketNameLineEdit->text()); - pSocket->setType(m_pSocketTypeButtonGroup->checkedId()); - pSocket->setClientName(m_ui.ClientNameComboBox->currentText()); - pSocket->setExclusive(m_ui.ExclusiveCheckBox->isChecked()); - - pSocket->pluglist().clear(); - int iPlugCount = m_ui.PlugListView->topLevelItemCount(); - for (int iPlug = 0; iPlug < iPlugCount; ++iPlug) { - QTreeWidgetItem *pItem = m_ui.PlugListView->topLevelItem(iPlug); - pSocket->addPlug(pItem->text(0)); - } - - if (m_ui.SocketForwardComboBox->currentIndex() > 0) - pSocket->setForward(m_ui.SocketForwardComboBox->currentText()); - else - pSocket->setForward(QString::null); - - m_iDirtyCount = 0; -} - - -// Stabilize current state form. -void qjackctlSocketForm::stabilizeForm (void) -{ - m_ui.OkPushButton->setEnabled(validateForm()); - - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) { - int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); - int iItemCount = m_ui.PlugListView->topLevelItemCount(); - m_ui.PlugEditPushButton->setEnabled(true); - m_ui.PlugRemovePushButton->setEnabled(true); - m_ui.PlugUpPushButton->setEnabled(iItem > 0); - m_ui.PlugDownPushButton->setEnabled(iItem < iItemCount - 1); - } else { - m_ui.PlugEditPushButton->setEnabled(false); - m_ui.PlugRemovePushButton->setEnabled(false); - m_ui.PlugUpPushButton->setEnabled(false); - m_ui.PlugDownPushButton->setEnabled(false); - } - - bool bEnabled = !m_ui.PlugNameComboBox->currentText().isEmpty(); - if (bEnabled) { - bEnabled = (m_ui.PlugListView->findItems( - m_ui.PlugNameComboBox->currentText(), Qt::MatchExactly).isEmpty()); - } - m_ui.PlugAddPushButton->setEnabled(bEnabled); -} - - -// Validate form fields. -bool qjackctlSocketForm::validateForm (void) -{ - bool bValid = (m_iDirtyCount > 0); - - bValid = bValid && !m_ui.SocketNameLineEdit->text().isEmpty(); - bValid = bValid && !m_ui.ClientNameComboBox->currentText().isEmpty(); - bValid = bValid && (m_ui.PlugListView->topLevelItemCount() > 0); - - return bValid; -} - -// Validate form fields and accept it valid. -void qjackctlSocketForm::accept (void) -{ - if (!validateForm()) - return; - - QDialog::accept(); -} - - -void qjackctlSocketForm::reject (void) -{ - bool bReject = true; - - // Check if there's any pending changes... - if (m_iDirtyCount > 0) { - switch (QMessageBox::warning(this, - tr("Warning") + " - " QJACKCTL_SUBTITLE1, - tr("Some settings have been changed.\n\n" - "Do you want to apply the changes?"), - tr("Apply"), tr("Discard"), tr("Cancel"))) { - case 0: // Apply... - accept(); - return; - case 1: // Discard - break; - default: // Cancel. - bReject = false; - } - } - - if (bReject) - QDialog::reject(); -} - - -// Dirty up the current form. -void qjackctlSocketForm::changed (void) -{ - m_iDirtyCount++; - stabilizeForm(); -} - - -// Add new Plug to socket list. -void qjackctlSocketForm::addPlug (void) -{ - if (m_ppPixmaps == NULL) - return; - - QString sPlugName = m_ui.PlugNameComboBox->currentText(); - if (!sPlugName.isEmpty()) { - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) -#if QT_VERSION >= 0x040200 - pItem->setSelected(false); -#else - m_ui.PlugListView->setItemSelected(pItem, false); -#endif - pItem = new QTreeWidgetItem(m_ui.PlugListView, pItem); - if (pItem) { - pItem->setText(0, sPlugName); - pItem->setFlags(pItem->flags() | Qt::ItemIsEditable); - QPixmap *pXpmPlug = NULL; - switch (m_pSocketTypeButtonGroup->checkedId()) { - case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO - pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_AUDIO_PLUG]; - break; - case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI - case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI - pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; - break; - } - if (pXpmPlug) - pItem->setIcon(0, QIcon(*pXpmPlug)); -#if QT_VERSION >= 0x040200 - pItem->setSelected(true); -#else - m_ui.PlugListView->setItemSelected(pItem, true); -#endif - m_ui.PlugListView->setCurrentItem(pItem); - } - m_ui.PlugNameComboBox->setEditText(QString::null); - } - - clientNameChanged(); -} - - -// Rename current selected Plug. -void qjackctlSocketForm::editPlug (void) -{ - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) - m_ui.PlugListView->editItem(pItem, 0); - - clientNameChanged(); -} - - -// Remove current selected Plug. -void qjackctlSocketForm::removePlug (void) -{ - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) - delete pItem; - - clientNameChanged(); -} - - -// Move current selected Plug one position up. -void qjackctlSocketForm::moveUpPlug (void) -{ - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) { - int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); - if (iItem > 0) { -#if QT_VERSION >= 0x040200 - pItem->setSelected(false); -#else - m_ui.PlugListView->setItemSelected(pItem, false); -#endif - pItem = m_ui.PlugListView->takeTopLevelItem(iItem); - m_ui.PlugListView->insertTopLevelItem(iItem - 1, pItem); -#if QT_VERSION >= 0x040200 - pItem->setSelected(true); -#else - m_ui.PlugListView->setItemSelected(pItem, true); -#endif - m_ui.PlugListView->setCurrentItem(pItem); - } - } - - changed(); -} - - -// Move current selected Plug one position down -void qjackctlSocketForm::moveDownPlug (void) -{ - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) { - int iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); - int iItemCount = m_ui.PlugListView->topLevelItemCount(); - if (iItem < iItemCount - 1) { -#if QT_VERSION >= 0x040200 - pItem->setSelected(false); -#else - m_ui.PlugListView->setItemSelected(pItem, false); -#endif - pItem = m_ui.PlugListView->takeTopLevelItem(iItem); - m_ui.PlugListView->insertTopLevelItem(iItem + 1, pItem); -#if QT_VERSION >= 0x040200 - pItem->setSelected(true); -#else - m_ui.PlugListView->setItemSelected(pItem, true); -#endif - m_ui.PlugListView->setCurrentItem(pItem); - } - } - - changed(); -} - -// Update selected plug one position down -void qjackctlSocketForm::selectedPlug (void) -{ - QTreeWidgetItem *pItem = m_ui.PlugListView->currentItem(); - if (pItem) - m_ui.PlugNameComboBox->setEditText(pItem->text(0)); - - stabilizeForm(); -} - - -// Add new Plug from context menu. -void qjackctlSocketForm::activateAddPlugMenu ( QAction *pAction ) -{ - int iIndex = pAction->data().toInt(); - if (iIndex >= 0 && iIndex < m_ui.PlugNameComboBox->count()) { - m_ui.PlugNameComboBox->setCurrentIndex(iIndex); - addPlug(); - } -} - - -// Plug list context menu handler. -void qjackctlSocketForm::customContextMenu ( const QPoint& pos ) -{ - int iItem = 0; - int iItemCount = 0; - QTreeWidgetItem *pItem = m_ui.PlugListView->itemAt(pos); - if (pItem == NULL) - pItem = m_ui.PlugListView->currentItem(); - if (pItem) { - iItem = m_ui.PlugListView->indexOfTopLevelItem(pItem); - iItemCount = m_ui.PlugListView->topLevelItemCount(); - } - - QMenu menu(this); - QAction *pAction; - - // Build the add plug sub-menu... - QMenu *pAddPlugMenu = menu.addMenu( - QIcon(":/icons/add1.png"), tr("Add Plug")); - int iIndex = 0; - for (iIndex = 0; iIndex < m_ui.PlugNameComboBox->count(); iIndex++) { - pAction = pAddPlugMenu->addAction( - m_ui.PlugNameComboBox->itemText(iIndex)); - pAction->setData(iIndex); - } - QObject::connect(pAddPlugMenu, - SIGNAL(triggered(QAction*)), - SLOT(activateAddPlugMenu(QAction*))); - pAddPlugMenu->setEnabled(iIndex > 0); - // Build the plug context menu... - bool bEnabled = (pItem != NULL); - pAction = menu.addAction(QIcon(":/icons/edit1.png"), - tr("Edit"), this, SLOT(editPlug())); - pAction->setEnabled(bEnabled); - pAction = menu.addAction(QIcon(":/icons/remove1.png"), - tr("Remove"), this, SLOT(removePlug())); - pAction->setEnabled(bEnabled); - menu.addSeparator(); - pAction = menu.addAction(QIcon(":/icons/up1.png"), - tr("Move Up"), this, SLOT(moveUpPlug())); - pAction->setEnabled(bEnabled && iItem > 0); - pAction = menu.addAction(QIcon(":/icons/down1.png"), - tr("Move Down"), this, SLOT(moveDownPlug())); - pAction->setEnabled(bEnabled && iItem < iItemCount - 1); - - menu.exec((m_ui.PlugListView->viewport())->mapToGlobal(pos)); -} - - -void qjackctlSocketForm::updateJackClients ( int iSocketType ) -{ - if (m_pJackClient == NULL) - return; - - const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; - int iPixmap = QJACKCTL_XPM_AUDIO_CLIENT; -#ifdef CONFIG_JACK_MIDI - if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) { - pszJackPortType = JACK_DEFAULT_MIDI_TYPE; - iPixmap = QJACKCTL_XPM_MIDI_CLIENT; - } -#endif - - bool bReadable = m_pSocketList->isReadable(); - const QIcon icon(*m_ppPixmaps[iPixmap]); - - // Grab all client ports. - const char **ppszClientPorts = jack_get_ports(m_pJackClient, - NULL, pszJackPortType, - (bReadable ? JackPortIsOutput : JackPortIsInput)); - if (ppszClientPorts) { - int iClientPort = 0; - while (ppszClientPorts[iClientPort]) { - QString sClientPort = ppszClientPorts[iClientPort]; - int iColon = sClientPort.indexOf(':'); - if (iColon >= 0) { - QString sClientName - = qjackctlClientAlias::escapeRegExpDigits( - sClientPort.left(iColon)); - bool bExists = false; - for (int i = 0; - i < m_ui.ClientNameComboBox->count() && !bExists; i++) - bExists = (sClientName == m_ui.ClientNameComboBox->itemText(i)); - if (!bExists) { - m_ui.ClientNameComboBox->addItem(icon, sClientName); - } - } - iClientPort++; - } - ::free(ppszClientPorts); - } -} - - -// ALSA client names refreshner. -void qjackctlSocketForm::updateAlsaClients ( int iSocketType ) -{ - if (m_pAlsaSeq == NULL) - return; - -#ifdef CONFIG_ALSA_SEQ - - bool bReadable = m_pSocketList->isReadable(); - const QIcon icon(*m_ppPixmaps[QJACKCTL_XPM_MIDI_CLIENT]); - - // Readd all subscribers... - snd_seq_client_info_t *pClientInfo; - snd_seq_port_info_t *pPortInfo; - unsigned int uiAlsaFlags; - if (bReadable) - uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; - else - uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; - - snd_seq_client_info_alloca(&pClientInfo); - snd_seq_port_info_alloca(&pPortInfo); - snd_seq_client_info_set_client(pClientInfo, -1); - while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { - int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); - QString sClient - = qjackctlClientAlias::escapeRegExpDigits( - snd_seq_client_info_get_name(pClientInfo)); - if (iAlsaClient > 0) { - bool bExists = false; - snd_seq_port_info_set_client(pPortInfo, iAlsaClient); - snd_seq_port_info_set_port(pPortInfo, -1); - while (!bExists - && snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { - unsigned int uiPortCapability - = snd_seq_port_info_get_capability(pPortInfo); - if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && - ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { - for (int i = 0; - i < m_ui.ClientNameComboBox->count() && !bExists; i++) - bExists = (sClient == m_ui.ClientNameComboBox->itemText(i)); - if (!bExists) { - m_ui.ClientNameComboBox->addItem(icon, sClient); - bExists = true; - } - } - } - } - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Socket type change slot. -void qjackctlSocketForm::socketTypeChanged (void) -{ - if (m_ppPixmaps == NULL) - return; - if (m_pSocketList == NULL) - return; - - QString sOldClientName = m_ui.ClientNameComboBox->currentText(); - - m_ui.ClientNameComboBox->clear(); - - QPixmap *pXpmSocket = NULL; - QPixmap *pXpmPlug = NULL; - - bool bReadable = m_pSocketList->isReadable(); - int iSocketType = m_pSocketTypeButtonGroup->checkedId(); - switch (iSocketType) { - case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO - if (m_ui.ExclusiveCheckBox->isChecked()) - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X]; - else - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET]; - m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); - pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_AUDIO_PLUG]; - updateJackClients(QJACKCTL_SOCKETTYPE_JACK_AUDIO); - break; - case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI - if (m_ui.ExclusiveCheckBox->isChecked()) - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; - else - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; - m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); - pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; - updateJackClients(QJACKCTL_SOCKETTYPE_JACK_MIDI); - break; - case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI - if (m_ui.ExclusiveCheckBox->isChecked()) - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; - else - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; - m_ui.SocketTabWidget->setTabIcon(0, QIcon(*pXpmSocket)); - pXpmPlug = m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]; - updateAlsaClients(QJACKCTL_SOCKETTYPE_ALSA_MIDI); - break; - } - - m_ui.ClientNameComboBox->setEditText(sOldClientName); - clientNameChanged(); - - if (pXpmPlug) { - int iItemCount = m_ui.PlugListView->topLevelItemCount(); - for (int iItem = 0; iItem < iItemCount; ++iItem) { - QTreeWidgetItem *pItem = m_ui.PlugListView->topLevelItem(iItem); - pItem->setIcon(0, QIcon(*pXpmPlug)); - } - } - - // Now the socket forward list... - m_ui.SocketForwardComboBox->clear(); - m_ui.SocketForwardComboBox->addItem(tr("(None)")); - if (!bReadable) { - QListIterator iter(m_pSocketList->sockets()); - while (iter.hasNext()) { - qjackctlSocketItem *pSocketItem = iter.next(); - if (pSocketItem->socketType() == iSocketType - && pSocketItem->socketName() != m_ui.SocketNameLineEdit->text()) { - switch (iSocketType) { - case 0: // QJACKCTL_SOCKETTYPE_JACK_AUDIO - if (pSocketItem->isExclusive()) - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET_X]; - else - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_AUDIO_SOCKET]; - break; - case 1: // QJACKCTL_SOCKETTYPE_JACK_MIDI - case 2: // QJACKCTL_SOCKETTYPE_ALSA_MIDI - if (pSocketItem->isExclusive()) - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET_X]; - else - pXpmSocket = m_ppPixmaps[QJACKCTL_XPM_MIDI_SOCKET]; - break; - } - m_ui.SocketForwardComboBox->addItem( - QIcon(*pXpmSocket), pSocketItem->socketName()); - } - } - } - - bool bEnabled = (m_ui.SocketForwardComboBox->count() > 1); - m_ui.SocketForwardTextLabel->setEnabled(bEnabled); - m_ui.SocketForwardComboBox->setEnabled(bEnabled); -} - - -// JACK client plugs refreshner. -void qjackctlSocketForm::updateJackPlugs ( int iSocketType ) -{ - if (m_pJackClient == NULL) - return; - - const char *pszJackPortType = JACK_DEFAULT_AUDIO_TYPE; - int iPixmap = QJACKCTL_XPM_AUDIO_PLUG; -#ifdef CONFIG_JACK_MIDI - if (iSocketType == QJACKCTL_SOCKETTYPE_JACK_MIDI) { - pszJackPortType = JACK_DEFAULT_MIDI_TYPE; - iPixmap = QJACKCTL_XPM_MIDI_PLUG; - } -#endif - - QString sClientName = m_ui.ClientNameComboBox->currentText(); - if (sClientName.isEmpty()) - return; - QRegExp rxClientName(sClientName); - - bool bReadable = m_pSocketList->isReadable(); - const QIcon icon(*m_ppPixmaps[iPixmap]); - const char **ppszClientPorts = jack_get_ports(m_pJackClient, - NULL, pszJackPortType, - (bReadable ? JackPortIsOutput : JackPortIsInput)); - if (ppszClientPorts) { - int iClientPort = 0; - while (ppszClientPorts[iClientPort]) { - QString sClientPort = ppszClientPorts[iClientPort]; - int iColon = sClientPort.indexOf(':'); - if (iColon >= 0 && rxClientName.exactMatch(sClientPort.left(iColon))) { - QString sPort - = qjackctlClientAlias::escapeRegExpDigits( - sClientPort.right(sClientPort.length() - iColon - 1)); - if (m_ui.PlugListView->findItems(sPort, Qt::MatchExactly).isEmpty()) - m_ui.PlugNameComboBox->addItem(icon, sPort); - } - iClientPort++; - } - ::free(ppszClientPorts); - } -} - - -// ALSA client plugs refreshner. -void qjackctlSocketForm::updateAlsaPlugs ( int iSocketType ) -{ - if (m_pAlsaSeq == NULL) - return; - if (iSocketType != QJACKCTL_SOCKETTYPE_ALSA_MIDI) - return; - -#ifdef CONFIG_ALSA_SEQ - - QString sClientName = m_ui.ClientNameComboBox->currentText(); - if (sClientName.isEmpty()) - return; - QRegExp rxClientName(sClientName); - - bool bReadable = m_pSocketList->isReadable(); - const QIcon icon(*m_ppPixmaps[QJACKCTL_XPM_MIDI_PLUG]); - - // Fill sequencer plugs... - snd_seq_client_info_t *pClientInfo; - snd_seq_port_info_t *pPortInfo; - unsigned int uiAlsaFlags; - if (bReadable) - uiAlsaFlags = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; - else - uiAlsaFlags = SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE; - - snd_seq_client_info_alloca(&pClientInfo); - snd_seq_port_info_alloca(&pPortInfo); - snd_seq_client_info_set_client(pClientInfo, -1); - while (snd_seq_query_next_client(m_pAlsaSeq, pClientInfo) >= 0) { - int iAlsaClient = snd_seq_client_info_get_client(pClientInfo); - QString sClient = snd_seq_client_info_get_name(pClientInfo); - if (iAlsaClient > 0 && rxClientName.exactMatch(sClient)) { - snd_seq_port_info_set_client(pPortInfo, iAlsaClient); - snd_seq_port_info_set_port(pPortInfo, -1); - while (snd_seq_query_next_port(m_pAlsaSeq, pPortInfo) >= 0) { - unsigned int uiPortCapability - = snd_seq_port_info_get_capability(pPortInfo); - if (((uiPortCapability & uiAlsaFlags) == uiAlsaFlags) && - ((uiPortCapability & SND_SEQ_PORT_CAP_NO_EXPORT) == 0)) { - QString sPort - = qjackctlClientAlias::escapeRegExpDigits( - snd_seq_port_info_get_name(pPortInfo)); - if (m_ui.PlugListView->findItems(sPort, Qt::MatchExactly).isEmpty()) - m_ui.PlugNameComboBox->addItem(icon, sPort); - } - } - } - } - -#endif // CONFIG_ALSA_SEQ -} - - -// Update client list if available. -void qjackctlSocketForm::clientNameChanged (void) -{ - if (m_ppPixmaps == NULL) - return; - if (m_pSocketList == NULL) - return; - - m_ui.PlugNameComboBox->clear(); - - int iSocketType = m_pSocketTypeButtonGroup->checkedId(); - switch (iSocketType) { - case 0: - updateJackPlugs(QJACKCTL_SOCKETTYPE_JACK_AUDIO); - break; - case 1: - updateJackPlugs(QJACKCTL_SOCKETTYPE_JACK_MIDI); - break; - case 2: - updateAlsaPlugs(QJACKCTL_SOCKETTYPE_ALSA_MIDI); - break; - } - - changed(); -} - - -// end of qjackctlSocketForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.h 2008-10-02 17:18:12.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,126 +0,0 @@ -// qjackctlSocketForm.h -// -/**************************************************************************** - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlSocketForm_h -#define __qjackctlSocketForm_h - -#include - -#if QT_VERSION < 0x040200 -#define setAllColumnsShowFocus(x) parent() -#endif - -#include "ui_qjackctlSocketForm.h" - -#include "qjackctlJackConnect.h" -#include "qjackctlAlsaConnect.h" - -// Forward declarations. -class qjackctlPatchbay; -class qjackctlPatchbaySocket; -class qjackctlSocketList; - -class QButtonGroup; -class QPixmap; - - -//---------------------------------------------------------------------------- -// qjackctlSocketForm -- UI wrapper form. - -class qjackctlSocketForm : public QDialog -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlSocketForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlSocketForm(); - - void setSocketCaption(const QString& sSocketCaption); - void setSocketList(qjackctlSocketList *pSocketList); - - void setPixmaps(QPixmap **ppPixmaps); - - void setJackClient(jack_client_t *pJackClient); - void setAlsaSeq(snd_seq_t *pAlsaSeq); - - void setConnectCount(int iConnectCount); - - void load(qjackctlPatchbaySocket *pSocket); - void save(qjackctlPatchbaySocket *pSocket); - -public slots: - - void changed(); - - void addPlug(); - void editPlug(); - void removePlug(); - void moveUpPlug(); - void moveDownPlug(); - void selectedPlug(); - - void activateAddPlugMenu(QAction *); - - void customContextMenu(const QPoint&); - - void socketTypeChanged(); - void clientNameChanged(); - - void stabilizeForm(); - -protected slots: - - void accept(); - void reject(); - -protected: - - void updateJackClients(int iSocketType); - void updateAlsaClients(int iSocketType); - - void updateJackPlugs(int iSocketType); - void updateAlsaPlugs(int iSocketType); - - bool validateForm(); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlSocketForm m_ui; - - // Instance variables. - qjackctlSocketList *m_pSocketList; - jack_client_t *m_pJackClient; - snd_seq_t *m_pAlsaSeq; - QPixmap **m_ppPixmaps; - int m_iDirtyCount; - - QButtonGroup *m_pSocketTypeButtonGroup; -}; - - -#endif // __qjackctlSocketForm_h - - -// end of qjackctlSocketForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSocketForm.ui 2008-04-27 17:42:17.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSocketForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,437 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2008, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlSocketForm - - - - 0 - 0 - 400 - 467 - - - - Socket - JACK Audio Connection Kit - - - :/icons/patchbay1.png - - - - 9 - - - 6 - - - - - QTabWidget::Rounded - - - - &Socket - - - - 8 - - - 4 - - - - - &Name (alias): - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - SocketNameLineEdit - - - - - - - Socket name (an alias for client name) - - - - - - - Client name (regular expression) - - - true - - - - - - - Add plug to socket plug list - - - Add P&lug - - - :/icons/add1.png - - - Alt+L - - - - - - - &Plug: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - PlugNameComboBox - - - - - - - Port name (regular expression) - - - true - - - - - - - Qt::CustomContextMenu - - - Socket plug list - - - false - - - true - - - false - - - true - - - - Socket Plugs / Ports - - - - - - - - Edit currently selected plug - - - &Edit - - - :/icons/edit1.png - - - Alt+E - - - - - - - Remove currently selected plug from socket plug list - - - &Remove - - - :/icons/remove1.png - - - Alt+R - - - - - - - &Client: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - ClientNameComboBox - - - - - - - Move down currently selected plug in socket plug list - - - &Down - - - :/icons/down1.png - - - Alt+D - - - - - - - Move up current selected plug in socket plug list - - - &Up - - - :/icons/up1.png - - - Alt+U - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 16 - 38 - - - - - - - - Enforce only one exclusive cable connection - - - E&xclusive - - - Alt+X - - - - - - - &Forward: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - SocketForwardComboBox - - - - - - - Forward (clone) all connections from this socket - - - false - - - - - - - Type - - - - 8 - - - 4 - - - - - Audio socket type (JACK) - - - &Audio - - - Alt+A - - - - - - - MIDI socket type (JACK) - - - &MIDI - - - Alt+M - - - - - - - MIDI socket type (ALSA) - - - AL&SA - - - Alt+S - - - - - - - - - - - - - - 4 - - - 4 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 120 - 8 - - - - - - - - - - - OK - - - :/icons/accept1.png - - - true - - - - - - - - - - Cancel - - - :/icons/quit1.png - - - - - - - - - - SocketTabWidget - SocketNameLineEdit - AudioRadioButton - MidiRadioButton - AlsaRadioButton - ClientNameComboBox - PlugNameComboBox - PlugAddPushButton - PlugListView - PlugEditPushButton - PlugRemovePushButton - PlugUpPushButton - PlugDownPushButton - ExclusiveCheckBox - SocketForwardComboBox - OkPushButton - CancelPushButton - - - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.cpp 2007-10-29 10:52:04.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,181 +0,0 @@ -// qjackctlStatusForm.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlStatusForm.h" - -#include "qjackctlStatus.h" -#include "qjackctlSetup.h" - -#include "qjackctlMainForm.h" - -#include - -#include -#include - - -//---------------------------------------------------------------------------- -// qjackctlStatusForm -- UI wrapper form. - -// Constructor. -qjackctlStatusForm::qjackctlStatusForm ( - QWidget *pParent, Qt::WindowFlags wflags ) - : QWidget(pParent, wflags) -{ - // Setup UI struct... - m_ui.setupUi(this); - - // Create the list view items 'a priori'... - QString s = " "; - QString c = ":" + s; - QString n = "--"; - QTreeWidgetItem *pViewItem; - - // Status list view... - QHeaderView *pHeader = m_ui.StatsListView->header(); -// pHeader->setResizeMode(QHeaderView::Custom); - pHeader->setDefaultAlignment(Qt::AlignLeft); -// pHeader->setDefaultSectionSize(320); - pHeader->setMovable(false); - pHeader->setStretchLastSection(true); - - m_apStatus[STATUS_SERVER_STATE] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Server state") + c << n); - m_apStatus[STATUS_DSP_LOAD] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("DSP Load") + c << n); - m_apStatus[STATUS_SAMPLE_RATE] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Sample Rate") + c << n); - m_apStatus[STATUS_BUFFER_SIZE] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Buffer Size") + c << n); - m_apStatus[STATUS_REALTIME] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Realtime Mode") + c << n); - - pViewItem = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Transport state") + c << n); - m_apStatus[STATUS_TRANSPORT_STATE] = pViewItem; - m_apStatus[STATUS_TRANSPORT_TIME] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("Transport Timecode") + c << n); - m_apStatus[STATUS_TRANSPORT_BBT] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("Transport BBT") + c << n); - m_apStatus[STATUS_TRANSPORT_BPM] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("Transport BPM") + c << n); - - pViewItem = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("XRUN count since last server startup") + c << n); - m_apStatus[STATUS_XRUN_COUNT] = pViewItem; - m_apStatus[STATUS_XRUN_TIME] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN last time detected") + c << n); - m_apStatus[STATUS_XRUN_LAST] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN last") + c << n); - m_apStatus[STATUS_XRUN_MAX] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN maximum") + c << n); - m_apStatus[STATUS_XRUN_MIN] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN minimum") + c << n); - m_apStatus[STATUS_XRUN_AVG] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN average") + c << n); - m_apStatus[STATUS_XRUN_TOTAL] = new QTreeWidgetItem(pViewItem, - QStringList() << s + tr("XRUN total") + c << n); - -#ifdef CONFIG_JACK_MAX_DELAY - m_apStatus[STATUS_MAX_DELAY] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Maximum scheduling delay") + c << n); -#endif - m_apStatus[STATUS_RESET_TIME] = new QTreeWidgetItem(m_ui.StatsListView, - QStringList() << s + tr("Time of last reset") + c << n); - - m_ui.StatsListView->resizeColumnToContents(0); // Description. - m_ui.StatsListView->resizeColumnToContents(1); // Value. - - // UI connections... - - QObject::connect(m_ui.ResetPushButton, - SIGNAL(clicked()), - SLOT(resetXrunStats())); - QObject::connect(m_ui.RefreshPushButton, - SIGNAL(clicked()), - SLOT(refreshXrunStats())); -} - - -// Destructor. -qjackctlStatusForm::~qjackctlStatusForm (void) -{ -} - - -// Notify our parent that we're emerging. -void qjackctlStatusForm::showEvent ( QShowEvent *pShowEvent ) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); - - QWidget::showEvent(pShowEvent); -} - -// Notify our parent that we're closing. -void qjackctlStatusForm::hideEvent ( QHideEvent *pHideEvent ) -{ - QWidget::hideEvent(pHideEvent); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - -// Just about to notify main-window that we're closing. -void qjackctlStatusForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) -{ - QWidget::hide(); - - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->stabilizeForm(); -} - - -// Ask our parent to reset status. -void qjackctlStatusForm::resetXrunStats (void) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->resetXrunStats(); -} - -// Ask our parent to refresh our status. -void qjackctlStatusForm::refreshXrunStats (void) -{ - qjackctlMainForm *pMainForm = qjackctlMainForm::getInstance(); - if (pMainForm) - pMainForm->refreshXrunStats(); -} - - -// Update one status item value. -void qjackctlStatusForm::updateStatusItem ( int iStatusItem, - const QString& sText ) -{ - m_apStatus[iStatusItem]->setText(1, sText); -} - - -// end of qjackctlStatusForm.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.h 2007-10-29 10:52:04.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,77 +0,0 @@ -// qjackctlStatusForm.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlStatusForm_h -#define __qjackctlStatusForm_h - -#include - -#if QT_VERSION < 0x040200 -#define setAllColumnsShowFocus(x) parent() -#endif - -#include "ui_qjackctlStatusForm.h" - -// Forward declarations. -class QTreeWidgetItem; - - -//---------------------------------------------------------------------------- -// qjackctlStatusForm -- UI wrapper form. - -class qjackctlStatusForm : public QWidget -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlStatusForm(QWidget *pParent = 0, Qt::WindowFlags wflags = 0); - // Destructor. - ~qjackctlStatusForm(); - - void updateStatusItem(int iStatusItem, const QString& sText); - -public slots: - - void resetXrunStats(); - void refreshXrunStats(); - -protected: - - void showEvent(QShowEvent *); - void hideEvent(QHideEvent *); - void closeEvent(QCloseEvent *); - -private: - - // The Qt-designer UI struct... - Ui::qjackctlStatusForm m_ui; - - // Instance variables. - QTreeWidgetItem *m_apStatus[18]; -}; - - -#endif // __qjackctlStatusForm_h - - -// end of qjackctlStatusForm.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.ui qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.ui --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatusForm.ui 2007-07-08 17:29:08.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatusForm.ui 1970-01-01 01:00:00.000000000 +0100 @@ -1,167 +0,0 @@ - - rncbc aka Rui Nuno Capela - JACK Audio Connection Kit - Qt GUI Interface. - - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - - qjackctlStatusForm - - - - 0 - 0 - 440 - 220 - - - - - 1 - 1 - 0 - 0 - - - - - - - Status - JACK Audio Connection Kit - - - :/icons/status1.png - - - - 4 - - - 4 - - - - - - 7 - 7 - 0 - 0 - - - - - 240 - 0 - - - - Statistics since last server startup - - - false - - - true - - - QAbstractItemView::NoSelection - - - true - - - true - - - false - - - true - - - - Description - - - - - Value - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 192 - 16 - - - - - - - - Reset XRUN statistic values - - - Re&set - - - :/icons/reset1.png - - - Alt+S - - - - - - - Refresh XRUN statistic values - - - &Refresh - - - :/icons/refresh1.png - - - Alt+R - - - - - - - - StatsListView - ResetPushButton - - - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatus.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatus.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlStatus.h 2007-01-22 17:45:55.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlStatus.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -// qjackctlStatus.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlStatus_h -#define __qjackctlStatus_h - -// List view statistics item indexes -#define STATUS_SERVER_STATE 0 -#define STATUS_DSP_LOAD 1 -#define STATUS_SAMPLE_RATE 2 -#define STATUS_BUFFER_SIZE 3 -#define STATUS_REALTIME 4 -#define STATUS_TRANSPORT_STATE 5 -#define STATUS_TRANSPORT_TIME 6 -#define STATUS_TRANSPORT_BBT 7 -#define STATUS_TRANSPORT_BPM 8 -#define STATUS_XRUN_COUNT 9 -#define STATUS_XRUN_TIME 10 -#define STATUS_XRUN_LAST 11 -#define STATUS_XRUN_MAX 12 -#define STATUS_XRUN_MIN 13 -#define STATUS_XRUN_AVG 14 -#define STATUS_XRUN_TOTAL 15 -#define STATUS_RESET_TIME 16 -#define STATUS_MAX_DELAY 17 - -// (Big)Time display identifiers. -#define DISPLAY_TRANSPORT_TIME 0 -#define DISPLAY_TRANSPORT_BBT 1 -#define DISPLAY_RESET_TIME 2 -#define DISPLAY_XRUN_TIME 3 - -#endif // __qjackctlStatus_h - -// end of qjackctlStatus.h - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSystemTray.cpp qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSystemTray.cpp --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSystemTray.cpp 2007-11-28 16:40:59.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSystemTray.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,322 +0,0 @@ -// qjackctlSystemTray.cpp -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#include "qjackctlAbout.h" -#include "qjackctlSystemTray.h" - -#include -#include - -#ifndef QJACKCTL_QT4_SYSTEM_TRAY - -#include -#include - -#if defined(Q_WS_X11) - -#include - -#include -#include - -// System Tray Protocol Specification opcodes. -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -#endif // Q_WS_X11 - -#endif - - -//---------------------------------------------------------------------------- -// qjackctlSystemTray -- Custom system tray widget. - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - -// Constructor. -qjackctlSystemTray::qjackctlSystemTray ( QWidget *pParent ) - : QSystemTrayIcon(pParent) -{ - // Set things inherited... - if (pParent) { - m_icon = pParent->windowIcon(); - QSystemTrayIcon::setIcon(m_icon); - QSystemTrayIcon::setToolTip(pParent->windowTitle()); - } - - QObject::connect(this, - SIGNAL(activated(QSystemTrayIcon::ActivationReason)), - SLOT(activated(QSystemTrayIcon::ActivationReason))); - - setBackground(Qt::transparent); - - QSystemTrayIcon::show(); -} - - -// Redirect to hide. -void qjackctlSystemTray::close (void) -{ - QSystemTrayIcon::hide(); -} - - -// Handle systeam tray activity. -void qjackctlSystemTray::activated ( QSystemTrayIcon::ActivationReason reason ) -{ - switch (reason) { - case QSystemTrayIcon::Context: - emit contextMenuRequested(QCursor::pos()); - break; - case QSystemTrayIcon::Trigger: - emit clicked(); - break; - case QSystemTrayIcon::MiddleClick: - emit middleClicked(); - break; - case QSystemTrayIcon::DoubleClick: - case QSystemTrayIcon::Unknown: - default: - break; - } -} - -#else - -// Constructor. -qjackctlSystemTray::qjackctlSystemTray ( QWidget *pParent ) - : QWidget(pParent, Qt::Window -#if QT_VERSION >= 0x040200 - | Qt::CustomizeWindowHint -#endif - | Qt::X11BypassWindowManagerHint - | Qt::FramelessWindowHint - | Qt::WindowStaysOnTopHint) -{ -#if QT_VERSION >= 0x040200 - QWidget::setAttribute(Qt::WA_AlwaysShowToolTips); -#endif -// QWidget::setAttribute(Qt::WA_NoSystemBackground); - -// QWidget::setBackgroundRole(QPalette::NoRole); -// QWidget::setAutoFillBackground(true); - - QWidget::setFixedSize(22, 22); -// QWidget::setMinimumSize(22, 22); - -#if defined(Q_WS_X11) - - Display *dpy = QX11Info::display(); - WId trayWin = winId(); - - // System Tray Protocol Specification. - Screen *screen = XDefaultScreenOfDisplay(dpy); - int iScreen = XScreenNumberOfScreen(screen); - char szAtom[32]; - snprintf(szAtom, sizeof(szAtom), "_NET_SYSTEM_TRAY_S%d", iScreen); - Atom selectionAtom = XInternAtom(dpy, szAtom, false); - XGrabServer(dpy); - Window managerWin = XGetSelectionOwner(dpy, selectionAtom); - if (managerWin != None) - XSelectInput(dpy, managerWin, StructureNotifyMask); - XUngrabServer(dpy); - XFlush(dpy); - if (managerWin != None) { - XEvent ev; - memset(&ev, 0, sizeof(ev)); - ev.xclient.type = ClientMessage; - ev.xclient.window = managerWin; - ev.xclient.message_type = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", false); - ev.xclient.format = 32; - ev.xclient.data.l[0] = CurrentTime; - ev.xclient.data.l[1] = SYSTEM_TRAY_REQUEST_DOCK; - ev.xclient.data.l[2] = trayWin; - ev.xclient.data.l[3] = 0; - ev.xclient.data.l[4] = 0; - XSendEvent(dpy, managerWin, false, NoEventMask, &ev); - XSync(dpy, false); - } - - // Follwing simple KDE specs: - Atom trayAtom; - // For older KDE's (hopefully)... - int data = 1; - trayAtom = XInternAtom(dpy, "KWM_DOCKWINDOW", false); - XChangeProperty(dpy, trayWin, trayAtom, trayAtom, 32, PropModeReplace, (unsigned char *) &data, 1); - // For not so older KDE's... - WId forWin = pParent ? pParent->topLevelWidget()->winId() : QX11Info::appRootWindow(); - trayAtom = XInternAtom(dpy, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false); - XChangeProperty(dpy, trayWin, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char *) &forWin, 1); - -#endif // Q_WS_X11 - - // Set things inherited... - if (pParent) { - QWidget::setWindowIcon(pParent->windowIcon()); - QWidget::setToolTip(pParent->windowTitle()); - } - - setBackground(Qt::transparent); -} - -#endif - - -// Default destructor. -qjackctlSystemTray::~qjackctlSystemTray (void) -{ -} - - -// System tray icon/pixmaps update method. -void qjackctlSystemTray::updatePixmap (void) -{ - // Renitialize icon as fit... -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - m_pixmap = m_icon.pixmap(22, 22); -#else - m_pixmap = QWidget::windowIcon().pixmap(QWidget::size()); -#endif - - // Merge with the overlay pixmap... - if (!m_pixmapOverlay.mask().isNull()) { - QBitmap mask = m_pixmap.mask(); - QPainter(&mask).drawPixmap(0, 0, m_pixmapOverlay.mask()); - m_pixmap.setMask(mask); - QPainter(&m_pixmap).drawPixmap(0, 0, m_pixmapOverlay); - } - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - - if (m_background != Qt::transparent) { - QPixmap pixmap(m_pixmap); - m_pixmap.fill(m_background); - QPainter(&m_pixmap).drawPixmap(0, 0, pixmap); - } - - // Setup system tray icon directly... - QSystemTrayIcon::setIcon(QIcon(m_pixmap)); - -#else - - // Setup widget drawable pixmap transparency... - if (!m_pixmap.mask().isNull() && m_background == Qt::transparent) { - QBitmap mask(m_pixmap.size()); - mask.fill(Qt::color0); - QBitmap maskPixmap = m_pixmap.mask(); - QPainter(&mask).drawPixmap( - (mask.width() - maskPixmap.width()) / 2, - (mask.height() - maskPixmap.height()) / 2, - maskPixmap); - QWidget::setMask(mask); - } else { - QWidget::setMask(QBitmap()); - } - - QWidget::update(); - -#endif -} - - - -// Background mask methods. -void qjackctlSystemTray::setBackground ( const QColor& background ) -{ - // Set background color, now. - m_background = background; - -#ifndef QJACKCTL_QT4_SYSTEM_TRAY - - QPalette pal(QWidget::palette()); - pal.setColor(QWidget::backgroundRole(), m_background); - QWidget::setPalette(pal); - -#endif - - updatePixmap(); -} - -const QColor& qjackctlSystemTray::background (void) const -{ - return m_background; -} - - -// Set system tray icon overlay. -void qjackctlSystemTray::setPixmapOverlay ( const QPixmap& pmOverlay ) -{ - m_pixmapOverlay = pmOverlay; - - updatePixmap(); -} - -const QPixmap& qjackctlSystemTray::pixmapOverlay (void) const -{ - return m_pixmapOverlay; -} - - -#ifndef QJACKCTL_QT4_SYSTEM_TRAY - -// Self-drawable methods. -void qjackctlSystemTray::paintEvent ( QPaintEvent * ) -{ - const QRect& rect = QWidget::rect(); - - QPainter(this).drawPixmap( - rect.x() + (rect.width() - m_pixmap.width()) / 2, - rect.y() + (rect.height() - m_pixmap.height()) / 2, - m_pixmap); -} - - -// Inherited mouse event. -void qjackctlSystemTray::mousePressEvent ( QMouseEvent *pMouseEvent ) -{ - if (!QWidget::rect().contains(pMouseEvent->pos())) - return; - - switch (pMouseEvent->button()) { - - case Qt::LeftButton: - // Toggle parent widget visibility. - emit clicked(); - break; - - case Qt::MidButton: - emit middleClicked(); - break; - - case Qt::RightButton: - // Just signal we're on to context menu. - emit contextMenuRequested(pMouseEvent->globalPos()); - break; - - default: - break; - } -} - -#endif - -// end of qjackctlSystemTray.cpp diff -Nru qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSystemTray.h qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSystemTray.h --- qjackctl-0.3.4/=unpacked-tar1=/src/qjackctlSystemTray.h 2007-12-04 10:41:46.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/src/qjackctlSystemTray.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,118 +0,0 @@ -// qjackctlSystemTray.h -// -/**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -*****************************************************************************/ - -#ifndef __qjackctlSystemTray_h -#define __qjackctlSystemTray_h - -#include - -#if QT_VERSION >= 0x040200 -#define QJACKCTL_QT4_SYSTEM_TRAY -#endif - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY -#include -#else -#include -#endif - - -//---------------------------------------------------------------------------- -// qjackctlSystemTray -- Custom system tray widget. - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY -class qjackctlSystemTray : public QSystemTrayIcon -#else -class qjackctlSystemTray : public QWidget -#endif -{ - Q_OBJECT - -public: - - // Constructor. - qjackctlSystemTray(QWidget *pParent = 0); - // Default destructor. - ~qjackctlSystemTray(); - - // Background mask methods. - void setBackground(const QColor& background); - const QColor& background() const; - - // Set system tray icon overlay. - void setPixmapOverlay(const QPixmap& pmOverlay); - const QPixmap& pixmapOverlay() const; - - // System tray icon/pixmaps update method. - void updatePixmap(); - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - - // Redirect to hide. - void close(); - -#endif - -signals: - - // Clicked signal. - void clicked(); - - // Xrun reset signal. - void middleClicked(); - - // Context menu signal. - void contextMenuRequested(const QPoint& pos); - -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - -protected slots: - - // Handle systeam tray activity. - void activated(QSystemTrayIcon::ActivationReason); - -#else - -protected: - - // Self-drawable methods. - void paintEvent(QPaintEvent *); - - // Overriden mouse event method. - void mousePressEvent(QMouseEvent *); - -#endif - -private: - - // Instance pixmap and background color. -#ifdef QJACKCTL_QT4_SYSTEM_TRAY - QIcon m_icon; -#endif - QPixmap m_pixmap; - QPixmap m_pixmapOverlay; - QColor m_background; -}; - - -#endif // __qjackctlSystemTray_h - -// end of qjackctlSystemTray.h diff -Nru qjackctl-0.3.4/=unpacked-tar1=/TODO qjackctl-0.3.6/=unpacked-tar1=/TODO --- qjackctl-0.3.4/=unpacked-tar1=/TODO 2005-04-01 15:07:54.000000000 +0100 +++ qjackctl-0.3.6/=unpacked-tar1=/TODO 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -QjackCtl - JACK Audio Connection Kit Qt GUI Interface ------------------------------------------------------ - -TODOs - -0.1.1 Backlog - -- Having some LADCCA support or awareness may be very welcome. - - -0.0.5 Backlog - -- Make available some translations, as some has been contributed already; - I'm missing "volunteers" for French (fr), German (de) and Spanish (es). - - -0.0.3 Backlog: - -- Display of current jackd version string. -- XRUN ticker visual charting. -- Any other feature one can think of ;) diff -Nru qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_de.ts qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_de.ts --- qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_de.ts 2008-12-04 22:46:59.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_de.ts 1970-01-01 01:00:00.000000000 +0100 @@ -1,3798 +0,0 @@ - - - - QObject - - - (default) - (voreingestellt) - - - - Usage: %1 [options] [command-and-args] - Benutzung: %1 [Optionen] [Kommandos und Argumente] - - - - Options: - Optionen: - - - - Start JACK audio server immediately - JACK Audioserver sofort starten - - - - Show help about command line options - Zeige Hilfe zu Kommandozeilenargumenten an - - - - Show version information - Zeige Versionsinformation an - - - - Option -p requires an argument (preset). - Option -p benötigt ein Argument (Preset). - - - - Qt: %1 - - Qt: %1 - - - - Set default settings preset name - - - - - qjackctlAboutForm - - - About QjackCtl - Über QjackCtl - - - - &Close - &Schließen - - - - Alt+C - Alt+S - - - - About Qt - Über Qt - - - - Version - Version - - - - Build - Build - - - - Debugging option enabled. - Debugging-Option aktiviert. - - - - System tray disabled. - Benachrichtigungsfeld deaktiviert. - - - - Transport status control disabled. - - - - - Realtime status disabled. - Realtime-Status deaktiviert. - - - - XRUN delay status disabled. - - - - - Maximum delay status disabled. - - - - - JACK MIDI support disabled. - JACK MIDI wird nicht unterstütz. - - - - ALSA/MIDI sequencer support disabled. - ALSA/MIDI Sequencer wird nicht unterstütz. - - - - Website - Webseite - - - - This program is free software; you can redistribute it and/or modify it - Dieses Programm ist freie Software; Sie können es gemäß der - - - - under the terms of the GNU General Public License version 2 or later. - GNU General Public License weiterverteilen und/oder modifizieren. - - - - qjackctlClientListView - - - Readable Clients / Output Ports - Lesbare Clients/Ausgänge - - - - Writable Clients / Input Ports - Beschreibbare Clients/Eingänge - - - - &Connect - &Verbinden - - - - Alt+C - Connect - Alt+V - - - - &Disconnect - &Trennen - - - - Alt+D - Disconnect - Alt+T - - - - Disconnect &All - &Alle trennen - - - - Alt+A - Disconect All - Alt+A - - - - Re&name - &Umbenennen - - - - Alt+N - Rename - Alt+U - - - - &Refresh - Au&ffrischen - - - - Alt+R - Refresh - Alt+E - - - - qjackctlConnect - - - Warning - Warnung - - - - This will suspend sound processing -from all client applications. - -Are you sure? - Hiermit wird die Klangverarbeitung -aller Client-Anwendungen unterbrochen. -Sind Sie sicher? - - - - Yes - Ja - - - - No - Nein - - - - qjackctlConnectionsForm - - - Connections - JACK Audio Connection Kit - Verbindungen - JACK Audio Connection Kit - - - - Audio - Audio - - - - Connect currently selected ports - Ausgewählte Anschlüsse verbinden - - - - &Connect - &Verbinden - - - - Alt+C - Alt+V - - - - Disconnect currently selected ports - Ausgewählte Anschlüsse trennen - - - - &Disconnect - &Trennen - - - - Alt+D - Alt+T - - - - Disconnect all currently connected ports - Alle verbundenen Anschlüsse trennen - - - - Disconnect &All - &Alle trennen - - - - Alt+A - Alt+A - - - - Refresh current connections view - Ansicht der bestehenden Verbindungen erneuern - - - - &Refresh - &Auffrischen - - - - Alt+R - Alt+A - - - - MIDI - JACK-MIDI - - - - ALSA - ALSA-MIDI - - - - Warning - Warnung - - - - The preset aliases have been changed: - -"%1" - -Do you want to save the changes? - - - - - Save - Speichern - - - - Discard - Verwerfen - - - - Cancel - Abbrechen - - - - qjackctlConnectorView - - - &Connect - &Verbinden - - - - Alt+C - Connect - Alt+V - - - - &Disconnect - &Trennen - - - - Alt+D - Disconnect - Trennen - - - - Disconnect &All - &Alle trennen - - - - Alt+A - Disconect All - Alt+A - - - - &Refresh - Au&ffrischen - - - - Alt+R - Refresh - Alt+F - - - - qjackctlMainForm - - - QjackCtl - QjackCtl - - - - Quit processing and exit - Signalverarbeitung und Programm beenden - - - - &Quit - &Beenden - - - - Alt+Q - Alt+B - - - - Start the JACK server - JACK-Server starten - - - - &Start - &Start - - - - Alt+S - Alt+S - - - - Stop the JACK server - JACK-Server beenden - - - - S&top - S&topp - - - - Alt+T - Alt+T - - - - Show/hide the extended status window - Erweitertes Statusfenster anzeigen/verbergen - - - - St&atus - St&atus... - - - - Show information about this application - Informationen über diese Anwendung anzeigen - - - - Ab&out... - &Über... - - - - Alt+B - Alt+Ü - - - - Show settings and options dialog - Dialogfenster für Enstellungen und Optionen anzeigen - - - - S&etup... - Konfi&guration... - - - - Alt+E - Alt+G - - - - Show/hide the messages log window - Protokollfenster für anfallende Nachrichten anzeigen/verbergen - - - - &Messages - &Meldungen... - - - - Alt+M - Alt+M - - - - Show/hide the patchbay editor window - Steckfeldfenster anzeigen/verbergen - - - - &Patchbay - &Steckfeld... - - - - Show/hide the actual connections patchbay window - Zeige/Verberge das Steckfeldfenster mit den vorhandenen Verbindungen - - - - &Connect - &Verbinden... - - - - Alt+C - Alt+V - - - - JACK server state - Status des JACK-Servers - - - - JACK server mode - Modus des JACK-Servers - - - - DSP Load - DSP-Last - - - - Sample rate - Abtastrate - - - - XRUN Count (notifications) - XRUN Anzahl (Benachrichtigungen) - - - - Time display - Zeitanzeige - - - - Transport state - Status Übermittlung - - - - Transport BPM - BPM Übermittlung - - - - Transport time - - - - - Backward transport - - - - - &Backward - &Rückwärts - - - - Forward transport - - - - - &Forward - &Forwärts - - - - Alt+F - Alt+F - - - - Rewind transport - - - - - &Rewind - &Zurückspulen - - - - Alt+R - Alt+Z - - - - Stop transport rolling - - - - - Pa&use - Pa&usieren - - - - Alt+U - Alt+U - - - - Start transport rolling - - - - - &Play - Abs&pielen - - - - Alt+P - Alt+P - - - - Could not open ALSA sequencer as a client. - -ALSA MIDI patchbay will be not available. - ALSA Sequencer konnte nicht als Client geöffnet werden. -Das ALSA-MIDI-Steckfeld wird nicht verfügbar sein. - - - - Information - Information - - - - The program will keep running in the system tray. - -To terminate the program, please choose "Quit" in the context menu of the system tray entry. - Programm läuft weiter sichtbar als Symbol im Benachrichtigungsfeld. -Zum Beenden des Programms, wählen Sie bitte "Beenden" im -Kontextmenü des Symbols im Benachrichtigungsfeld. - - - - Warning - Warnung - - - - JACK is currently running. - -Do you want to terminate the JACK audio server? - Der JACK-Server läuft noch. -Wollen Sie diesen beenden? - - - - Terminate - Beenden - - - - Cancel - Abbrechen - - - - successfully - erfolgreich - - - - with exit status=%1 - mit Rückgabewert = %1 - - - - Could not start JACK. - -Maybe JACK audio server is already started. - Konnte JACK nicht starten. -Möglicheweise läuft der JACK-Server schon. - - - - Stop - Stopp - - - - Kill - Beenden - - - - Could not load preset "%1". - -Retrying with default. - Konnte Einstellung "%1" nicht laden. -Versuche erneut mit Voreinstellung. - - - - Could not load default preset. - -Sorry. - Konnte leider die Voreinstellung nicht laden. - - - - Startup script... - - - - - Startup script terminated - - - - - JACK is starting... - JACK startet... - - - - Some client audio applications -are still active and connected. - -Do you want to stop the JACK audio server? - Einige Client-Audio-Anwendungen -sind noch aktiv und verbunden. -Wollen Sie den JACK-Server anhalten? - - - - JACK is stopping... - JACK fährt herunter... - - - - Shutdown script... - - - - - Shutdown script terminated - - - - - Post-shutdown script... - - - - - Post-shutdown script terminated - - - - - JACK was started with PID=%1. - JACK wurde mit PID = %1 gestartet. - - - - JACK is being forced... - JACK wird gezwungen... - - - - JACK was stopped - JACK wurde angehalten - - - - Error - Fehler - - - - Transport BBT (bar:beat.ticks) - BBT (bar:beat.ticks) Übermittlung - - - - Transport time code - Timecode Übermittlung - - - - Elapsed time since last reset - Seit dem letzten Zurücksetzen vergangene Zeit - - - - Elapsed time since last XRUN - Seit dem letzten XRUN vergangene Zeit - - - - Could not load active patchbay definition. - -Disabled. - Konnte aktive Steckfelddefinition nicht laden. -Ist deaktiviert. - - - - Patchbay activated. - Steckfeld aktiviert. - - - - Patchbay deactivated. - Steckfeld deaktiviert. - - - - Statistics reset. - Statistik zurückgesetzt. - - - - msec - ms - - - - JACK connection graph change. - Schaubild der JACK-Verbindungen geändert. - - - - XRUN callback (%1). - - - - - Buffer size change (%1). - Puffergröße geändert (%1). - - - - Shutdown notification. - Benachrichtigung zum Herunterfahren. - - - - Could not start JACK. - -Sorry. - Konnte JACCK nicht starten. - - - - JACK has crashed. - JACK ist abgestürzt. - - - - JACK timed out. - JACK Zeitüberschreitung - - - - JACK write error. - JACK Schreibfehler. - - - - JACK read error. - JACK Lesefehler. - - - - Unknown JACK error (%d). - Unbekannter JACK-Fehler - - - - ALSA connection graph change. - Schaubild der ALSA-Verbindungen geändert. - - - - JACK active patchbay scan - - - - - ALSA active patchbay scan - - - - - JACK connection change. - JACK-Verbindung geändert. - - - - ALSA connection change. - ALSA-Verbindung geändert. - - - - checked - überprüft - - - - connected - verbunden - - - - disconnected - getrennt - - - - failed - fehlerhaft - - - - A patchbay definition is currently active, -which is probable to redo this connection: - -%1 -> %2 - -Do you want to remove the patchbay connection? - - - - - Remove - Entfernen - - - - Ignore - Ignorieren - - - - Overall operation failed. - - - - - Invalid or unsupported option. - ungültige oder nicht unterstützte Option. - - - - Client name not unique. - Name des Clients nicht einzigartig. - - - - Server is started. - Server ist gestartet. - - - - Unable to connect to server. - Verbindungsaufnahme zum Server gescheitert. - - - - Server communication error. - Server-Kommunikationsfehler. - - - - Client does not exist. - Client existiert nicht. - - - - Unable to load internal client. - Interner Client konnte nicht geladen werden. - - - - Unable to initialize client. - Client konnte nicht initialisiert werden. - - - - Unable to access shared memory. - Kein Zugriff auf Shared Memory möglich. - - - - Client protocol version mismatch. - Unpassende Client-Protokollversion - - - - Could not connect to JACK server as client. -- %1 -Please check the messages window for more info. - Keine Verbindungsaufnahme als Client zum JACK-Server möglich. - %1 -Bitte sehen Sie im Meldungsfenster nach weiteren Informationen. - - - - Server configuration saved to "%1". - Serverkonfiguration nach "%1" gespeichert. - - - - Client activated. - Client aktiviert - - - - Post-startup script... - - - - - Post-startup script terminated - - - - - Command line argument... - Kommandozeilenargument... - - - - Command line argument started - Kommandozeilenargument gestartet - - - - Client deactivated. - Client deaktiviert. - - - - Transport rewind. - Übermittlung zurückspulen. - - - - Transport backward. - Übermittlung zurück. - - - - Starting - Startend - - - - Transport start. - Übermittlung starten. - - - - Stopping - Stoppe - - - - Transport stop. - Übermittlung anhalten. - - - - Transport forward. - - - - - Stopped - Steht - - - - %1 (%2%) - %1 (%2 %) - - - - %1 % - %1 % - - - - %1 Hz - %1 Hz - - - - %1 frames - %1 Frames - - - - Yes - Ja - - - - No - Nein - - - - RT - RT - - - - Rolling - - - - - Looping - - - - - %1 msec - %1 ms - - - - XRUN callback (%1 skipped). - - - - - Started - Läuft - - - - Active - Aktiv - - - - Activating - Aktivierend - - - - Inactive - Inaktiv - - - - &Hide - &Verbergen - - - - Mi&nimize - Mi&nimieren - - - - S&how - An&zeigen - - - - Rest&ore - Neu&laden - - - - &Stop - &Stopp - - - - &Reset - &Zurücksetzen - - - - &Presets - - - - - &Connections - &Verbindungen - - - - Patch&bay - Steck&feld - - - - &Transport - &Übermittlung - - - - Server settings will be only effective after -restarting the JACK audio server. - Die Server-Einstellungen werden erst nach einem -Neustart des JACK-Servers wirksam. - - - - OK - OK - - - - Some settings will be only effective -the next time you start this program. - Einige Einstellungen werden erst nach -einem Neustart des Programms wirksam. - - - - qjackctlMessagesForm - - - Messages - JACK Audio Connection Kit - Meldungen - JACK Audio Connection Kit - - - - Messages output log - Meldungsprotokoll - - - - Logging stopped --- %1 --- - Protokollierung angehalten --- %1 --- - - - - Logging started --- %1 --- - Protokollierung gestartet --- %1 --- - - - - qjackctlPatchbay - - - Warning - Warnung - - - - This will disconnect all sockets. - -Are you sure? - Diese Aktion wird alle Anschlüsse trennen. -Sind Sie sicher? - - - - Yes - Ja - - - - No - Nein - - - - qjackctlPatchbayForm - - - Patchbay - JACK Audio Connection Kit - Steckfeld - JACK Audio Connection Kit - - - - Move currently selected output socket down one position - Ausgewählten Ausgangsanschluß eine Position nach unten verschieben - - - - Down - Ab - - - - Create a new output socket - Einen neuen Ausgangsanschluß anlegen - - - - Add... - Hinzufügen... - - - - Edit currently selected input socket properties - Eigenschaften des gewählten Eingangsanschlusses bearbeiten - - - - Edit... - Bearbeiten... - - - - Move currently selected output socket up one position - Ausgewählten Ausgangsanschluß eine Position nach oben verschieben - - - - Up - Auf - - - - Remove currently selected output socket - Ausgewählten Ausgangsanschluss entfernen - - - - Remove - Entfernen - - - - Duplicate (copy) currently selected output socket - Dupliziere den gewählten Ausgangsanschluss - - - - Copy... - Kopieren... - - - - Remove currently selected input socket - Ausgewählten Eingangsanschluss entfernen - - - - Duplicate (copy) currently selected input socket - Dupliziere den gewählten Eingangsanschluss - - - - Create a new input socket - Einen neuen Eingangsanschluß anlegen - - - - Edit currently selected output socket properties - Eigenschaften des gewählten Ausgangsanschlusses bearbeiten - - - - Connect currently selected sockets - Gewählte Anschlüsse miteinander verbinden - - - - &Connect - &Verbinden - - - - Alt+C - Alt+V - - - - Disconnect currently selected sockets - Verbindung zwischen den gewählten Anschlüssen trennen - - - - &Disconnect - &Trennen - - - - Alt+D - Alt+T - - - - Disconnect all currently connected sockets - Alle verbundenen Anschlüsse trennen - - - - Disconnect &All - &Alle trennen - - - - Alt+A - Alt+A - - - - Refresh current patchbay view - Steckfeldansicht auffrischen - - - - &Refresh - Auf&frischen - - - - Alt+R - Alt+F - - - - Create a new patchbay profile - Neues Steckfeldprofil anlegen - - - - &New - &Neu - - - - Alt+N - Alt+N - - - - Load patchbay profile - Steckfeldprofil laden - - - - &Load... - &Laden... - - - - Alt+L - Alt+L - - - - Save current patchbay profile - Aktuelles Steckfeldprofil speichern - - - - &Save... - &Speichern... - - - - Alt+S - Alt+S - - - - Current (recent) patchbay profile(s) - Aktuelle (zuletzt verwendete) Steckfeldprofile - - - - Toggle activation of current patchbay profile - Aktivierung des aktuellen Steckfeldprofils umschalten - - - - Acti&vate - A&ktivieren - - - - Alt+V - Alt+V - - - - Warning - Warnung - - - - The patchbay definition has been changed: - -"%1" - -Do you want to save the changes? - Die Steckfelddefinition wurde verändert: -"%1" -Wollen Sie die Änderungen übernehmen? - - - - Save - Speichern - - - - Discard - Verwerfen - - - - Cancel - Abbrechen - - - - %1 [modified] - %1 [verändert] - - - - Untitled%1 - Unbenannt%1 - - - - Error - Fehler - - - - Could not load patchbay definition file: - -"%1" - Konnte Steckfelddefinitionsdatei nicht laden: -"%1" - - - - Could not save patchbay definition file: - -"%1" - Konnte Steckfelddefinitionsdatei nicht speichern: -"%1" - - - - New Patchbay definition - Neue Steckfelddefinition - - - - Create patchbay definition as a snapshot -of all actual client connections? - Steckfelddefinitionsdatei als Schnappschuss -der aktuell vorhandenen Verbindungen erstellen? - - - - Yes - Ja - - - - No - Nein - - - - Load Patchbay Definition - Steckfelddefinition laden - - - - Patchbay Definition files - Steckfelddefinitionsdateien - - - - Save Patchbay Definition - Speichere Steckfelddefinition - - - - active - aktiv - - - - qjackctlPatchbayView - - - Add... - Hinzufügen... - - - - Edit... - Bearbeiten... - - - - Copy... - Kopieren... - - - - Remove - Entfernen - - - - Exclusive - Exklusiv - - - - Forward - Weiterleiten - - - - (None) - (Keine) - - - - Move Up - Nach oben - - - - Move Down - Nach unten - - - - &Connect - &Verbinden - - - - Alt+C - Connect - Alt+V - - - - &Disconnect - &Trennen - - - - Alt+D - Disconnect - Alt+T - - - - Disconnect &All - &Alle trennen - - - - Alt+A - Disconect All - Alt+A - - - - &Refresh - Auf&frischen - - - - Alt+R - Refresh - Alt+A - - - - qjackctlSetupForm - - - Setup - JACK Audio Connection Kit - Einstellungen - JACK Audio Connection Kit - - - - Settings - Einstellungen - - - - Preset &Name: - &Benennung: - - - - Settings preset name - Benennung der Einstellung - - - - (default) - (voreinst.) - - - - Save settings as current preset name - Einstellungen mit aktueller Benennung speichern - - - - &Save - &Speichern - - - - Alt+S - Alt+S - - - - Delete current settings preset - Aktuelle Einstellung löschen - - - - &Delete - &Löschen - - - - Alt+D - Alt+L - - - - Server - Server - - - - Server &Path: - Server-&Pfad: - - - - The JACK Audio Connection Kit sound server path - Pfad zum JACK-Server - - - - jackd - jackd - - - - jackdmp - jackdmp - - - - jackstart - jackstart - - - - jackd-realtime - jackd-realtime - - - - Driv&er: - Trei&ber: - - - - The audio backend driver interface to use - - - - - dummy - dummy - - - - sun - sun - - - - oss - oss - - - - alsa - alsa - - - - portaudio - portaudio - - - - coreaudio - coreaudio - - - - freebob - freebob - - - - firewire - firewire - - - - Parameters - Parameter - - - - MIDI Driv&er: - MIDI-&Treiber: - - - - The ALSA MIDI backend driver to use - - - - - none - keiner - - - - raw - raw - - - - seq - seq - - - - Start De&lay (secs): - Startverz&ögerung (s): - - - - Time in seconds that client is delayed after server startup - Zeitverzögerung für den Client nach Start des Servers - - - - Latency: - Latenz: - - - - Output latency in milliseconds, calculated based on the period, rate and buffer settings - Ausgangslatenz in Millisekunden. Berechnung basiert auf Perioden-, Abtastraten- und Puffereinstellungen - - - - 0 - 0 - - - - Use realtime scheduling - Echtzeitverarbeitung nutzen - - - - &Realtime - Echt&zeit - - - - Alt+R - Alt+Z - - - - Do not attempt to lock memory, even if in realtime mode - Keinen Arbeitsspeicher sperren, auch nicht im Echtzeitmodus - - - - No Memory Loc&k - Spei&cher nicht sperren - - - - Alt+K - Alt+C - - - - Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) - Arbeitsspeicher von gängigen Bibliotheken (GTK+, QT, FLTK, Wine) entsperren - - - - &Unlock Memory - S&peicher entsperren - - - - Alt+U - Alt+P - - - - Ignore xruns reported by the backend driver - - - - - So&ft Mode - - - - - Alt+F - Alt+F - - - - Provide output monitor ports - - - - - &Monitor - - - - - Alt+M - Alt+M - - - - Force 16bit mode instead of failing over 32bit (default) - - - - - Force &16bit - &16 Bit erzwingen - - - - Alt+1 - Alt+1 - - - - Enable hardware monitoring of capture ports - - - - - H/W M&onitor - - - - - Alt+O - - - - - Enable hardware metering on cards that support it - - - - - H/&W Meter - - - - - Alt+W - - - - - Ignore hardware period/buffer size - Ignoriere Periode/Puffergröße der Hardware - - - - &Ignore H/W - &Ignoriere H/W - - - - Alt+I - Alt+I - - - - Whether to give verbose output on messages - - - - - &Verbose messages - Aus&führliche Meldungen - - - - Alt+V - Alt+F - - - - &Output Device: - A&usgabegerät: - - - - &Output Channels: - Aus&gangskanäle: - - - - &Interface: - S&chnittstelle: - - - - Maximum input audio hardware channels to allocate - Maximum belegbarer Audio-Hardware-Eingänge - - - - &Audio: - &Audio: - - - - &Input Latency: - &Eingangslatenz: - - - - Dit&her: - - - - - External output latency (frames) - Externe Ausgangslatenz (Frames) - - - - &Input Device: - Eingangsger&ät - - - - Provide either audio capture, playback or both - - - - - Duplex - Duplex - - - - Capture Only - Nur Aufnahme - - - - Playback Only - Nur Wiedergabe - - - - The PCM device name to use - Name des genutzten PCM-Gerätes - - - - hw:0 - hw:0 - - - - plughw:0 - plughw:0 - - - - /dev/audio - /dev/audio - - - - /dev/dsp - /dev/dsp - - - - Select output device for playback - - - - - > - > - - - - Alternate input device for capture - - - - - &Output Latency: - A&usgangslatenz: - - - - Maximum output audio hardware channels to allocate - - - - - Alternate output device for playback - - - - - &Input Channels: - E&ingangskanäle: - - - - Select input device for capture - - - - - Select PCM device name - Name des PCM-Gerätes wählen - - - - External input latency (frames) - Externe Eingangslatenz (Frames) - - - - Set dither mode - - - - - None - Keiner - - - - Rectangular - Rechteck - - - - Shaped - Hüllkurve - - - - Triangular - Dreieck - - - - Number of periods in the hardware buffer - - - - - Priorit&y: - Priorit&ät: - - - - &Frames/Period: - &Frames/Periode: - - - - Frames per period between process() calls - Frames pro Periode zwischen process() Aufrufen - - - - 16 - 16 - - - - 32 - 32 - - - - 64 - 64 - - - - 128 - 128 - - - - 256 - 256 - - - - 512 - 512 - - - - 1024 - 1024 - - - - 2048 - 2048 - - - - 4096 - 4096 - - - - Port Ma&ximum: - Ma&ximaler Port: - - - - &Channels: - &Kanäle: - - - - Number o microseconds to wait between engine processes (dummy) - - - - - 21333 - 21333 - - - - Sample rate in frames per second - Abtastrate in Frames pro Sekunde - - - - 22050 - 22050 - - - - 32000 - 32000 - - - - 44100 - 44100 - - - - 48000 - 48000 - - - - 88200 - 88200 - - - - 96000 - 96000 - - - - 192000 - 192000 - - - - Scheduler priority when running realtime - Priorität für die Echtzeitsteuerung - - - - &Word Length: - &Wortlänge: - - - - Periods/&Buffer: - Per&ioden/Puffer: - - - - Word length - Wortlänge - - - - Maximum number of ports the JACK server can manage - - - - - &Wait (usec): - &Warten (µs) - - - - Sample &Rate: - Abtast&rate: - - - - Maximum number of audio channels to allocate - Maximale Anzahl der belegbaren Audiokanäle festlegen - - - - &Timeout (msec): - &Timeout (ms): - - - - Set client timeout limit in miliseconds - Timeout-Limitierung für Clients festlegen; Angabe in Millisekunden - - - - 200 - 200 - - - - 500 - 500 - - - - 1000 - 1000 - - - - 2000 - 2000 - - - - 5000 - 5000 - - - - 10000 - 10000 - - - - Options - Optionen - - - - Scripting - Skript-Steuerung - - - - Whether to execute a custom shell script before starting up the JACK audio server. - Festlegen, ob ein angepasstes Shell-Skript vor dem Start des JACK-Servers ausgeführt werden soll - - - - Execute script on Start&up: - Skript &beim Start ausführen: - - - - Whether to execute a custom shell script after starting up the JACK audio server. - Festlegen, ob ein angepasstes Shell-Skript nach dem Start des JACK-Servers ausgeführt werden soll - - - - Execute script after &Startup: - Skript &nach Start ausführen: - - - - Whether to execute a custom shell script before shuting down the JACK audio server. - Festlegen, ob ein angepasstes Shell-Skript vor dem Herunterfahren des JACK-Servers ausgeführt werden soll - - - - Execute script on Shut&down: - Skript beim &Herunterfahren ausführen: - - - - Command line to be executed before starting up the JACK audio server - Vor dem Starten des JACK-Servers ausgeführte Kommandozeile - - - - Scripting argument meta-symbols - - - - - Browse for script to be executed before starting up the JACK audio server - Skript auswählen, dass vor dem Starten des JACK-Servers ausgeführt wird - - - - ... - ... - - - - Command line to be executed after starting up the JACK audio server - Nach dem Starten des JACK-Servers ausgeführte Kommandozeile - - - - Browse for script to be executed after starting up the JACK audio server - Skript auswählen, dass nach dem Starten des JACK-Servers ausgeführt wird - - - - Browse for script to be executed before shutting down the JACK audio server - Skript auswählen, dass vor dem Herunterfahen des JACK-Servers ausgeführt wird - - - - Command line to be executed before shutting down the JACK audio server - Vor dem Herunterfahren des JACK-Servers ausgeführte Kommandozeile - - - - Whether to execute a custom shell script after shuting down the JACK audio server. - Festlegen, ob ein angepasstes Shell-Skript nach dem Herunterfahren des JACK-Servers ausgeführt werden soll - - - - Execute script after Shu&tdown: - Skript nach dem Herunter&fahren ausführen: - - - - Alt+T - Alt+F - - - - Browse for script to be executed after shutting down the JACK audio server - Skript auswählen, dass nach dem Herunterfahen des JACK-Servers ausgeführt wird - - - - Command line to be executed after shutting down the JACK audio server - Nach dem Herunterfahren des JACK-Servers ausgeführte Kommandozeile - - - - Statistics - Statistik - - - - Whether to capture standard output (stdout/stderr) into messages window - Standardausgabe (stdout/stderr) in Meldungsfenster umleiten - - - - &Capture standard output - Standardausgabe &umleiten - - - - Alt+C - - - - - &XRUN detection regex: - - - - - Regular expression used to detect XRUNs on server output messages - Regulärer Ausdruck zur Erkennung von XRUNs in vom Server gesendeten Meldungen - - - - xrun of at least ([0-9|\.]+) msecs - - - - - Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) - - - - - &Ignore first XRUN occurrence on statistics - &Erstes XRUN-Auftreten in Statistik ignorieren - - - - Connections - Verbindungen - - - - Time in seconds between each auto-refresh cycle - - - - - 5 - 5 - - - - 10 - 10 - - - - 20 - 20 - - - - 30 - 30 - - - - 60 - 60 - - - - 120 - 120 - - - - Patchbay definition file to be activated as connection persistence profile - Steckfelddefinitionsdatei als beständiges Verbindungsprofil aktivieren - - - - Browse for a patchbay definition file to be activated - Eine Steckfelddefinitionsdatei zum aktivieren wählen - - - - Whether to refresh the connections patchbay automatically - Die Steckfelddarstellung automatisch aktualisieren - - - - &Auto refresh connections Patchbay, every (secs): - Steckfeld &automatisch aktualisieren, je (s): - - - - Alt+A - Alt+A - - - - Whether to activate a patchbay definition for connection persistence profile. - Ein beständiges Verbindungsprofil für das Steckfeld aktivieren. - - - - Activate &Patchbay persistence: - Steck&feldkonfiguration hat Bestand: - - - - Alt+P - Alt+F - - - - Logging - Protokollierung - - - - Messages log file - Protokolldatei für Meldungen - - - - Browse for the messages log file location - Speicherort für Protokolldatei wählen - - - - Whether to activate a messages logging to file. - Protokollierung der Meldungen festlegen - - - - &Messages log file: - &Protokolldatei: - - - - Display - Anzeige - - - - Time Display - Zeitanzeige - - - - Time F&ormat: - Zeit&format: - - - - The general time format on display - - - - - hh:mm:ss - hh:mm:ss - - - - hh:mm:ss.d - hh:mm:ss.d - - - - hh:mm:ss.dd - hh:mm:ss.dd - - - - hh:mm:ss.ddd - hh:mm:ss.ddd - - - - Transport &Time Code - - - - - Transport &BBT (bar:beat.ticks) - - - - - Alt+B - Alt+Ü - - - - Elapsed time since last &Reset - Seit dem letzten &Zurücksetzen verstrichene Zeit - - - - Elapsed time since last &XRUN - Seit dem letzten &XRUN verstrichene Zeit - - - - Alt+X - Alt+X - - - - Sample front panel normal display font - Beispielhafte Darstellung der normalen Anzeige - - - - Sample big time display font - Beispielhafte Darstellung der großen Anzeige - - - - Big Time display: - Große Zeitanzeige: - - - - Select font for front panel normal display - Schriftart für normale Anzeige wählen - - - - &Font... - &Schriftart... - - - - Select font for big time display - Schriftart für große Zeitanzeige wählen - - - - Normal display: - Normale Anzeige: - - - - Whether to enable a shiny glass light effect on the main display - Anzeige mit Schimmereffekt darstellen - - - - &Display shiny glass light effect - Schi&mmereffekt darstellen - - - - Whether to enable blinking (flashing) of the server mode (RT) indicator - Realtime-Indikator (RT) blinkend darstellen - - - - Blin&k server mode indicator - Ser&vermodus blinkend darstellen - - - - Messages Window - Meldungsfenster - - - - Sample messages text font display - Beispielhafte Darstellung des Textes im Meldungsfenster - - - - Select font for the messages text display - Schriftart für Text im Meldungsfenster wählen - - - - Whether to keep a maximum number of lines in the messages window - Maximale Anzahl der im Meldungsfenster angezeigten Zeilen festlegen - - - - &Messages limit: - &Nachrichtenmaximum: - - - - The maximum number of message lines to keep in view - Maximale Anzahl der Nachrichten im Meldungsfenster - - - - 100 - 100 - - - - 250 - 250 - - - - 2500 - 2500 - - - - Connections Window - Verbindungsübersicht - - - - Sample connections view font - Beispielhafte Darstellung der Schrift in der Verbindungsübersicht - - - - Select font for the connections view - Schriftart für Verbindungsübersicht wählen - - - - &Icon size: - &Symbolgröße: - - - - The icon size for each item of the connections view - Größe der einzelnen Symbole in der Verbindungsübersicht - - - - 16 x 16 - 16 x 16 - - - - 32 x 32 - 32 x 32 - - - - 64 x 64 - 64 x 64 - - - - Whether to enable in-place client/port name editing (rename) - Direktes Bearbeiten der Client/Anschluss-Alternativbezeichnung (Alias) erlauben - - - - Ena&ble client/port aliases editing (rename) - Bearbeiten von &Deckbezeichnungen für Client/Anschlüsse - - - - Whether to enable client/port name aliases on the connections window - Verwendung von Deckbezeichnungen (Alias) für Anschlüsse in der Verbindungsübersicht erlauben - - - - E&nable client/port aliases - Dec&kbezeichnungen (Alias) für Client/Anschlüsse - - - - Alt+N - Alt+K - - - - Whether to draw connection lines as cubic Bezier curves - Festlegen, ob Verbindungslinien als Bezier-Kurven gezeichnet werden sollen - - - - Draw connection and patchbay lines as Be&zier curves - Verbindungslinien als Be&zier-Kurven zeichen - - - - Alt+Z - Alt+Z - - - - Misc - Verschiedenes - - - - Other - Weiteres - - - - Whether to start JACK audio server immediately on application startup - JACK-Server unmittelbar bei Anwendungsstart starten - - - - &Start JACK audio server on application startup - JACK-&Server bei Anwendungsstart starten - - - - Whether to ask for confirmation on application exit - - - - - &Confirm application close - Beenden der An&wendung bestätigen - - - - Whether to keep all child windows on top of the main window - Alle Kindfenster oberhalb des Hauptfensters halten - - - - &Keep child windows always on top - &Kindfenster immer oben belassen - - - - Whether to enable the system tray icon - Anwendungssymbol im Benachrichtigungsfeld anzeigen - - - - &Enable system tray icon - S&ymbol im Benachrichtigungsfeld anzeigen - - - - Alt+E - Alt+Y - - - - Whether to start minimized to system tray - Anwendung minimiert als Symbol im Benachrichtigungsfeld starten - - - - Start minimi&zed to system tray - Minimiert im &Benachrichtigungsfeld starten - - - - Whether to delay window positioning at application startup - Verzögerung der Fensterpositionierung beim Anwendugsstart festlegen - - - - &Delay window positioning at startup - Fenster&positionierung beim Start verzögern - - - - Whether to save the JACK server command-line configuration into a local file (auto-start) - Kommandozeilenkonfiguration zum Starten des JACK-Servers in einer lokalen Datei speichern (auto-start) - - - - S&ave JACK audio server configuration to: - Konfi&guration für JACK-Server speichern unter: - - - - The server configuration local file name (auto-start) - Name der lokal gespeicherten Serverkonfigurationsdatei (auto-start) - - - - .jackdrc - .jackdrc - - - - Whether to exit once all clients have closed (auto-start) - Programm beenden, wenn alle Client-Verbindungen getrennt sind (auto-start) - - - - C&onfigure as temporary server - Als &temporären Server konfigurieren - - - - Whether to ask for confirmation on JACK audio server shutdown - Das Herunterfahren des JACK-Servers per Nachfrage bestätigen - - - - Confirm server sh&utdown - Herunter&fahren des Servers bestätigen - - - - Whether to enable ALSA Sequencer (MIDI) support on startup - - - - - E&nable ALSA Sequencer support - Unterstützung für ALSA-Se&quencer bereitstellen - - - - Buttons - Schaltflächen - - - - Whether to hide the left button group on the main window - Linke Schaltflächengruppe im Hauptfenster verbergen - - - - Hide main window &Left buttons - &Linke Schaltflächen des Hauptfensters verbergen - - - - Alt+L - Alt+L - - - - Whether to hide the right button group on the main window - Rechte Schaltflächengruppe im Hauptfenster verbergen - - - - Hide main window &Right buttons - &Rechte Schaltflächen des Hauptfensters verbergen - - - - Whether to hide the transport button group on the main window - Schaltflächen der Transportsteuerung im Hauptfenster verbergen - - - - Hide main window &Transport buttons - Schaltflächen für &Transportsteuerung verbergen - - - - Whether to hide the text labels on the main window buttons - Beschriftung der Schaltflächen im Hauptfenster verbergen - - - - Hide main window &button text labels - Besch&riftung der Schaltflächen verbergen - - - - OK - OK - - - - Cancel - Abbrechen - - - - Warning - Warnung - - - - Some settings have been changed: - -"%1" - -Do you want to save the changes? - Einige Einstellungen wurden verändert: -"%1" -Wollen Sie diese übernehmen? - - - - Save - Speichern - - - - Discard - Verwerfen - - - - Delete preset: - -"%1" - -Are you sure? - - - - - msec - ms - - - - n/a - n/a - - - - &Preset Name - - - - - &Server Path - &Serverpfad - - - - &Driver - Trei&ber - - - - &Interface - Sc&hnittstelle - - - - Sample &Rate - Abtast&rate - - - - &Frames/Period - &Frames/Periode - - - - Periods/&Buffer - Perioden/&Puffer - - - - Startup Script - - - - - Post-Startup Script - - - - - Shutdown Script - - - - - Post-Shutdown Script - - - - - Active Patchbay Definition - Aktive Steckfelddefinition - - - - Patchbay Definition files - Steckfelddefinitionsdateien - - - - Messages Log - Meldungsprotokoll - - - - Log files - Protokolldateien - - - - Some settings have been changed. - -Do you want to apply the changes? - Einige Einstellungen wurden verändert. -Wollen Sie diese übernehmen? - - - - Apply - Anwenden - - - - &JACK client/port aliases: - Deckbezeichnungen bei &JACK-Anschlüssen: - - - - JACK client/port aliases display mode - - - - - Default - Voreinstellung - - - - First - Erster - - - - Second - Zweiter - - - - Defaults - Voreinstellungen - - - - &Base font size: - &Basisschriftgröße - - - - Base application font size (pt.) - Generelle Schriftgröße (pt.) für die Anwendung festlegen - - - - 6 - 6 - - - - 7 - 7 - - - - 8 - 8 - - - - 9 - 9 - - - - 11 - 11 - - - - 12 - 12 - - - - qjackctlSocketForm - - - Socket - JACK Audio Connection Kit - Anschluss - JACK Audio Connection Kit - - - - &Socket - &Anschluss - - - - &Name (alias): - &Name (Alias): - - - - Socket name (an alias for client name) - Anschlussbenennung (Alias für Name des Clients) - - - - Client name (regular expression) - Name des Clients (Regulärer Ausdruck) - - - - Add plug to socket plug list - Füge Anschluss zur Liste hinzu - - - - Add P&lug - &Anschluss hinzufügen - - - - Alt+L - Alt+V - - - - &Plug: - A&nschluss: - - - - Port name (regular expression) - Anschlussbezeichnung (Regulärer Ausdruck) - - - - Socket plug list - Anschlussliste - - - - Socket Plugs / Ports - - - - - Edit currently selected plug - Ausgewählten Anschluss bearbeiten - - - - &Edit - &Bearbeiten - - - - Alt+E - Alt+B - - - - Remove currently selected plug from socket plug list - Ausgewählten Anschluss von der Liste entfernen - - - - &Remove - En&tfernen - - - - Alt+R - Alt+R - - - - &Client: - &Client: - - - - Move down currently selected plug in socket plug list - Ausgewählten Anschluss in Liste nach unten schieben - - - - &Down - A&b - - - - Alt+D - Alt+B - - - - Move up current selected plug in socket plug list - Ausgewählten Anschluss in Liste nach oben schieben - - - - &Up - Au&f - - - - Alt+U - Alt+U - - - - Enforce only one exclusive cable connection - Erzwinge eine singuläre Kabelverbindung - - - - E&xclusive - E&xklusiv - - - - Alt+X - Alt+X - - - - &Forward: - &Weiterleiten: - - - - Forward (clone) all connections from this socket - Alle Verbindungen dieses Anschlusses weiterleiten (klonen) - - - - Type - Typ - - - - Audio socket type (JACK) - JACK-Audio-Anbindung - - - - &Audio - &Audio - - - - Alt+A - Alt+A - - - - MIDI socket type (JACK) - JACK-MIDI-Anbindung - - - - &MIDI - &JACK-MIDI - - - - Alt+M - Alt+M - - - - MIDI socket type (ALSA) - ALSA-MIDI-Anbindung - - - - AL&SA - AL&SA-MIDI - - - - Alt+S - Alt+S - - - - OK - OK - - - - Cancel - Abbrechen - - - - Plugs / Ports - Anschlüsse - - - - Warning - Warnung - - - - Some settings have been changed. - -Do you want to apply the changes? - Einige Einstellungen wurden verändert. -Wollen Sie diese übernehmen? - - - - Apply - Anwenden - - - - Discard - Verwerfen - - - - Add Plug - Anschluss hinzufügen - - - - Edit - Bearbeiten - - - - Remove - Entfernen - - - - Move Up - Auf - - - - Move Down - Ab - - - - (None) - (Keiner) - - - - qjackctlSocketList - - - Output - Ausgang - - - - Input - Eingang - - - - Socket - Socket - - - - <New> - %1 - <Neu> %1 - - - - Warning - Warnung - - - - %1 about to be removed: - -"%2" - -Are you sure? - %1 soll entfernt werden: -"%2" -Sind Sie sicher? - - - - Yes - Ja - - - - No - Nein - - - - %1 <Copy> - %2 - %1 <Kopieren> - %2 - - - - qjackctlSocketListView - - - Output Sockets / Plugs - Ausgangsanschlüsse - - - - Input Sockets / Plugs - Eingangsanschlüsse - - - - qjackctlStatusForm - - - Status - JACK Audio Connection Kit - Status - JACK Audio Connection Kit - - - - Statistics since last server startup - Statistik seit dem letzten Serverstart - - - - Description - Beschreibung - - - - Value - Wert - - - - Reset XRUN statistic values - Daten der XRUN-Statistik zurücksetzen - - - - Re&set - &Zurücksetzen - - - - Alt+S - Alt+Z - - - - Refresh XRUN statistic values - Daten der XRUN-Statistik erneuern - - - - &Refresh - Auf&frischen - - - - Alt+R - Alt+E - - - - Server state - Serverstatus - - - - DSP Load - DSP-Last - - - - Sample Rate - Abtastrate - - - - Buffer Size - Puffergröße - - - - Realtime Mode - Realtime-Modus - - - - Transport state - Status Übermittlung - - - - Transport Timecode - Timecode Übermittlung - - - - Transport BBT - BBT Übermittlung - - - - Transport BPM - BPM Übermittlung - - - - XRUN count since last server startup - XRUN-Anzahl seit dem letzten Serverstart - - - - XRUN last time detected - Zeitpunkt der letzten XRUN-Beobachtung - - - - XRUN last - XRUN Letzter - - - - XRUN maximum - XRUN Maximum - - - - XRUN minimum - XRUN Minimum - - - - XRUN average - XRUN Durchschnitt - - - - XRUN total - XRUN Summe - - - - Maximum scheduling delay - Maximale Zeitverzögerung - - - - Time of last reset - Zeitpunkt der letzten Zurücksetzung - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_es.ts qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_es.ts --- qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_es.ts 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_es.ts 1970-01-01 01:00:00.000000000 +0100 @@ -1,3826 +0,0 @@ - - - - QObject - - - (default) - - - - - Start JACK audio server immediately - Iniciar servidor de audio JACK ahora - - - - Show help about command line options - Mostrar ayuda sobre las opciones de línea de comando - - - - Show version information - Mostrar información sobre esta versión - - - - Option -p requires an argument (preset). - La opción -p nececita un argumento (nombre de un preset). - - - - Usage: %1 [options] [command-and-args] - Uso: %1 [opciones] [comandos-y-argumentos] - - - - Options: - Opciones: - - - - Set default settings preset name - Establece el preset predeterminado - - - - Qt: %1 - - Qt: %1 - - - - - qjackctlAboutForm - - - About Qt - Acerca de QT - - - - &Close - &Cerrar - - - - Alt+C - Alt+C - - - - Version - Versión - - - - Build - Build - - - - Debugging option enabled. - Depuración habilitada. - - - - System tray disabled. - Bandeja del sistema deshabilitada. - - - - Transport status control disabled. - Reporte del estado de transporte deshabilitado. - - - - Realtime status disabled. - Estado de Realtime deshabilitado. - - - - XRUN delay status disabled. - Reporte del retardo de XRUN deshabilitado. - - - - Maximum delay status disabled. - Reporte del retardo máximo deshabilitado. - - - - ALSA/MIDI sequencer support disabled. - Soporte para secuenciador ALSA/MIDI deshabilitado. - - - - Website - Website - - - - This program is free software; you can redistribute it and/or modify it - Este programa es software libre; Usted puede redistribuirlo y/o modificarlo - - - - under the terms of the GNU General Public License version 2 or later. - bajo los términos de la Licencia Pública General GNU versión 2 o posterior. - - - - JACK MIDI support disabled. - Soporte MIDI en JACK deshabilitado. - - - - About QjackCtl - Acerca de QjackCtl - - - - qjackctlClientListView - - - &Connect - &Conectar - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Desconectar - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Desconectar &Todo - - - - Alt+A - Disconect All - Alt+T - - - - Re&name - Cambiar &Nombre - - - - Alt+N - Rename - Alt+N - - - - &Refresh - &Refrescar - - - - Alt+R - Refresh - Alt+R - - - - Readable Clients / Output Ports - Puertos de Salida / Clientes Leíbles - - - - Writable Clients / Input Ports - Puertos de Entrada / Clientes Escribibles - - - - qjackctlConnect - - - Warning - Advertencia - - - - Yes - Si - - - - No - No - - - - This will suspend sound processing -from all client applications. - -Are you sure? - Esto suspenderá el procesamiento de sonido -de todas las aplicaciones. -Está seguro? - - - - qjackctlConnectionsForm - - - Connections - JACK Audio Connection Kit - Conexiones - JACK Audio Connection Kit - - - - Audio - Audio - - - - &Connect - &Conectar - - - - Alt+C - Alt+C - - - - Connect currently selected ports - Conectar los puertos seleccionados - - - - &Disconnect - &Desconectar - - - - Alt+D - Alt+D - - - - Disconnect currently selected ports - Desconectar los puertos seleccionados - - - - Disconnect &All - Desconectar &Todo - - - - Alt+A - Alt+T - - - - Disconnect all currently connected ports - Desconectar todos los puertos seleccionados - - - - &Refresh - &Refrescar - - - - Alt+R - Alt+R - - - - Refresh current connections view - Refrescar la vista actual de conexiones - - - - MIDI - MIDI - - - - Warning - Advertencia - - - - Save - Guardar - - - - Discard - Descartar cambios - - - - Cancel - Cancelar - - - - The preset aliases have been changed: - -"%1" - -Do you want to save the changes? - Los alias de presets han cambiado: - -"%1" - -Desea guardar los cambios? - - - - ALSA - ALSA - - - - qjackctlConnectorView - - - &Connect - &Conectar - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Desconectar - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Desconectar &Todo - - - - Alt+A - Disconect All - Alt+T - - - - &Refresh - &Refrescar - - - - Alt+R - Refresh - Alt+R - - - - qjackctlMainForm - - - &Quit - &Salir - - - - Alt+Q - Alt+S - - - - Quit processing and exit - Terminar procesamiento y salir - - - - &Start - &Iniciar - - - - Alt+S - Alt+I - - - - Start the JACK server - Iniciar el servidor JACK - - - - S&top - &Detener - - - - Alt+T - Alt+D - - - - Stop the JACK server - Detener el servidor JACK - - - - St&atus - &Estado - - - - Show/hide the extended status window - Mostrar / ocultar la ventana de estado detallado - - - - Ab&out... - Ace&rca... - - - - Show information about this application - Mostrar información sobre esta aplicación - - - - S&etup... - Se&tup... - - - - Alt+E - Alt+T - - - - Show settings and options dialog - Mostrar el diálogo de opciones y preferencias - - - - &Messages - &Mensajes - - - - Alt+M - Alt+M - - - - Show/hide the messages log window - Mostrar / ocultar la ventana de mensajes - - - - Patch&bay - Patch&bay - - - - Alt+B - Alt+B - - - - Show/hide the patchbay editor window - Mostrar / ocultar el editor de patchbay - - - - &Connect - &Conexiones - - - - Alt+C - Alt+C - - - - Show/hide the actual connections patchbay window - Mostrar / ocultar el patchbay con las conexiones actuales - - - - JACK server state - Estado del servidor JACK - - - - JACK server mode - Modo del servidor JACK - - - - Sample rate - Frecuencia de muestreo - - - - Time display - Visor de tiempo - - - - Transport state - Estado del transporte - - - - Transport BPM - BPM del transporte - - - - Transport time - Tiempo del transporte - - - - Backward transport - Retroceder transporte - - - - Alt+F - Alt+L - - - - Forward transport - Avanzar transporte (Alt+L) - - - - Alt+R - Alt+K - - - - Rewind transport - Rebobinar transporte (Alt+K) - - - - Alt+U - Alt+. - - - - Stop transport rolling - Detener el transporte (Alt+ . [punto]) - - - - Alt+P - Alt+N - - - - Start transport rolling - Iniciar el transporte (Alt+N) - - - - Warning - Advertencia - - - - Terminate - Terminar - - - - Cancel - Cancelar - - - - successfully - satisfactoriamente - - - - with exit status=%1 - con estado %1 - - - - Stop - Detener - - - - Kill - Matar - - - - Could not load preset "%1". - -Retrying with default. - No se pudo cargar el preset "%1". -Probando con el predeterminado. - - - - Could not load default preset. - -Sorry. - Lo siento. -No se pudo cargar el preset predeterminado. - - - - Startup script... - Script de inicio... - - - - Startup script terminated - El script de inicio finalizó - - - - JACK is starting... - JACK está iniciándose... - - - - Could not start JACK. - -Sorry. - Lo siento. -No se pudo iniciar JACK. - - - - JACK is stopping... - JACK está deteniéndose... - - - - Shutdown script... - Script de apagado... - - - - Shutdown script terminated - El script de apagado finalizó - - - - JACK was stopped - JACK ha sido detenido - - - - Post-shutdown script... - Script de post - apagado... - - - - Post-shutdown script terminated - El script de post - apagado finalizó - - - - Error - Error - - - - Transport BBT (bar:beat.ticks) - BBT del transporte ( bar:beat:ticks ) - - - - Transport time code - Código de tiempo del transporte - - - - Elapsed time since last reset - Tiempo transcurrido desde el último reset - - - - Elapsed time since last XRUN - Tiempo transcurrido desde el último XRUN - - - - Could not load active patchbay definition. - -Disabled. - No se puede cargar el archivo con el esquema del patchbay activo. -Deshabilitándolo. - - - - Patchbay activated. - Patchbay activada. - - - - Patchbay deactivated. - Patchbay desactivada. - - - - Statistics reset. - Reiniciar estadísticas. - - - - msec - mseg - - - - XRUN callback (%1). - XRUN callback (%1). - - - - Buffer size change (%1). - Cambio en el tamaño de buffer (%1). - - - - Shutdown notification. - Notificación de apagado. - - - - checked - verificado - - - - connected - conectado - - - - disconnected - desconectado - - - - failed - falló - - - - Server configuration saved to "%1". - Configuración del servidor salvada en "%1". - - - - Client activated. - Cliente activado. - - - - Post-startup script... - Script de post - inicio... - - - - Post-startup script terminated - El script de post - inicio finalizó - - - - Command line argument... - Argumento de la línea de comando... - - - - Command line argument started - Argumento de la línea de comando iniciado - - - - Client deactivated. - Cliente desactivado. - - - - Transport rewind. - Rebobinar transporte. - - - - Transport backward. - Retroceder transporte. - - - - Starting - Iniciando - - - - Transport start. - Iniciar transporte. - - - - Stopping - Deteniendo - - - - Transport stop. - Detener transporte. - - - - Transport forward. - Avanzar transporte. - - - - Stopped - Detenido - - - - Yes - Si - - - - No - No - - - - RT - RT - - - - Rolling - Rolling - - - - Looping - Looping - - - - XRUN callback (%1 skipped). - XRUN callback (%1 omitidos). - - - - Started - Iniciado - - - - Active - Activo - - - - Activating - Activando - - - - Inactive - Inactivo - - - - &Hide - &Ocultar - - - - Mi&nimize - Mi&nimizar - - - - S&how - &Mostrar - - - - Rest&ore - &Restablecer - - - - &Stop - &Detener - - - - &Reset - &Reset - - - - &Connections - &Conexiones - - - - Server settings will be only effective after -restarting the JACK audio server. - La configuración sólo se hará efectiva -reiniciando el servidor JACK. - - - - OK - OK - - - - Information - Información - - - - Some settings will be only effective -the next time you start this program. - Algunas configuraciones sólo se aplicarán -la próxima vez que inicie este programa. - - - - Could not open ALSA sequencer as a client. - -ALSA MIDI patchbay will be not available. - No se puede abrir el secuenciador ALSA como cliente - -El patchbay MIDI de ALSA no estará disponible. - - - - The program will keep running in the system tray. - -To terminate the program, please choose "Quit" in the context menu of the system tray entry. - El programa seguirá corriendo en la bandeja del sistema. - -Para terminarlo, por favor seleccione "Salir" en el menú del ítem en la bandeja del sistema. - - - - JACK is currently running. - -Do you want to terminate the JACK audio server? - JACK se está ejecutando actualmente. - -Desea terminar el servidor de audio JACK? - - - - Could not start JACK. - -Maybe JACK audio server is already started. - No puede iniciarse JACK. - -Quizás el servidor de audio JACK ya haya sido iniciado. - - - - Some client audio applications -are still active and connected. - -Do you want to stop the JACK audio server? - Algunas aplicaciones de audio -están activas y conectadas. - -Desea detener el servidor de audio JACK? - - - - JACK was started with PID=%1. - JACK se inició con PID=%1. - - - - JACK is being forced... - JACK está siendo forzado... - - - - JACK connection graph change. - Cambió el gráfico de conexiones de JACK. - - - - JACK has crashed. - JACK ha petado. - - - - JACK timed out. - Tiempo de espera para JACK agotado. - - - - JACK write error. - Error de escritura JACK. - - - - JACK read error. - Error de lectura JACK. - - - - Unknown JACK error (%d). - Error JACK desconocido (%d). - - - - ALSA connection graph change. - Cambió el gráfico de conexiones ALSA. - - - - JACK active patchbay scan - Escaneo del patchbay JACK activo - - - - ALSA active patchbay scan - Escaneo del patchbay ALSA activo - - - - JACK connection change. - Cambios en las conexiones JACK. - - - - ALSA connection change. - Cambios en las conexiones ALSA. - - - - A patchbay definition is currently active, -which is probable to redo this connection: - -%1 -> %2 - -Do you want to remove the patchbay connection? - Una definición de patchbay está activa actualmente, -y es probable rehacer esta conexion: - -%1 -> %2 - -Desea remover la conexion? - - - - Remove - Remover - - - - Ignore - Ignorar - - - - Overall operation failed. - La operación global falló. - - - - Invalid or unsupported option. - Opción inválida o no soportada. - - - - Client name not unique. - El nombre de cliente no es único. - - - - Server is started. - El servidor está iniciado. - - - - Unable to connect to server. - No puede conectarse al servidor. - - - - Server communication error. - Error de comunicación con el servidor. - - - - Client does not exist. - El cliente no existe. - - - - Unable to load internal client. - No puede cargarse el cliente interno. - - - - Unable to initialize client. - No puede inicializarse el cliente. - - - - Unable to access shared memory. - No puede accederse a la memoria compartida. - - - - Client protocol version mismatch. - La versión del protocolo cliente no concuerda. - - - - Could not connect to JACK server as client. -- %1 -Please check the messages window for more info. - No puede conectarse al servidor JACK como cliente. -- %1 -Por favor revise la ventana de mensajes para mas información. - - - - %1 (%2%) - - - - - %1 % - - - - - %1 Hz - - - - - %1 frames - %1 cuadros - - - - %1 msec - - - - - &Presets - &Presets - - - - &Transport - &Transporte - - - - &Rewind - Re&bobinar - - - - &Play - &Reproducir - - - - Pa&use - Pa&usa - - - - QjackCtl - QjackCtl - - - - &Patchbay - &Patchbay - - - - DSP Load - Uso de CPU del DSP - - - - XRUN Count (notifications) - Cuenta de XRUN (notificaciones) - - - - &Backward - &Retroceder - - - - &Forward - &Avanzar - - - - qjackctlMessagesForm - - - Messages - JACK Audio Connection Kit - Mensajes de JACK Audio Connection Kit - - - - Logging stopped --- %1 --- - Registro detenido --- %1 --- - - - - Logging started --- %1 --- - Registro iniciado --- %1 --- - - - - Messages output log - Registro de mensajes - - - - qjackctlPatchbay - - - Warning - Advertencia - - - - Yes - Si - - - - No - No - - - - This will disconnect all sockets. - -Are you sure? - Esto desconectará todos los sockets. - -Está seguro? - - - - qjackctlPatchbayForm - - - Patchbay - JACK Audio Connection Kit - Patchbay - JACK Audio Connection Kit - - - - &New - &Nueva - - - - Alt+N - Alt+N - - - - Create a new patchbay profile - - - - - &Load... - &Abrir... - - - - Alt+L - Alt+A - - - - Load patchbay profile - Cargar perfil de patchbay - - - - &Save... - &Salvar... - - - - Alt+S - Alt+S - - - - Save current patchbay profile - Salvar el perfil actual del patchbay - - - - Acti&vate - Acti&var - - - - Alt+V - Alt+V - - - - Toggle activation of current patchbay profile - Conmutar la activación del esquema actual - - - - &Connect - &Conectar - - - - Alt+C - Alt+C - - - - Connect currently selected sockets - Conectar los puertos seleccionados - - - - &Disconnect - &Desconectar - - - - Alt+D - Alt+D - - - - Disconnect currently selected sockets - Desconectar los puertos seleccionados - - - - Disconnect &All - Desconectar &Todo - - - - Alt+A - Alt+T - - - - Disconnect all currently connected sockets - Desconectar los socket seleccionados - - - - &Refresh - &Refrescar - - - - Alt+R - Alt+R - - - - Refresh current patchbay view - Refrescar la vista actual - - - - Down - Bajar - - - - Move currently selected output socket down one position - Mover el socket de salida seleccionado una posición hacia abajo - - - - Add... - Añadir... - - - - Create a new output socket - Crear un nuevo socket de salida - - - - Edit... - Editar... - - - - Edit currently selected input socket properties - Editar las propiedades del socket de entrada seleccionado - - - - Up - Subir - - - - Move currently selected output socket up one position - Mover el socket de salida seleccionado una posición hacia arriba - - - - Remove - Remover - - - - Remove currently selected output socket - Remover el socket de salida seleccionado - - - - Copy... - Copiar... - - - - Duplicate (copy) currently selected output socket - Duplicar (copiar) el socket de salida seleccionado - - - - Remove currently selected input socket - Remover el socket de entrada seleccionado - - - - Duplicate (copy) currently selected input socket - Duplicar (copiar) el socket de entrada seleccionado - - - - Create a new input socket - Crear un nuevo socket de entrada - - - - Edit currently selected output socket properties - Editar las propiedades del socket de salida seleccionado - - - - Warning - Advertencia - - - - Save - Salvar - - - - Discard - Descartar cambios - - - - Cancel - Cancelar - - - - active - activa - - - - New Patchbay definition - Nuevo esquema de patchbay - - - - Yes - Si - - - - No - No - - - - Patchbay Definition files - Archivos de esquemas de patchbay - - - - Load Patchbay Definition - Cargar esquema de patchbay - - - - Save Patchbay Definition - Salvar esquema de patchbay - - - - The patchbay definition has been changed: - -"%1" - -Do you want to save the changes? - La definición del patchbay ha cambiado: - -"%1" - -Desea guardar los cambios? - - - - %1 [modified] - %1 [modificado] - - - - Untitled%1 - SinNombre%1 - - - - Error - Error - - - - Could not load patchbay definition file: - -"%1" - No se puede cargar el archivo con el esquema del patchbay: - -"%1" - - - - Could not save patchbay definition file: - -"%1" - No se puede guardar el archivo con el esquema del patchbay: "%1" - - - - Create patchbay definition as a snapshot -of all actual client connections? - Crear un esquema del patchbay en base a -una instantánea de las conexiones actuales? - - - - Current (recent) patchbay profile(s) - Perfil actual (reciente) de patchbay - - - - qjackctlPatchbayView - - - Add... - Añadir... - - - - Edit... - Editar... - - - - Copy... - Copiar... - - - - Remove - Remover - - - - Exclusive - Exclusivo - - - - Move Up - Subir - - - - Move Down - Bajar - - - - &Connect - &Conectar - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Desconectar - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Desconectar &Todo - - - - Alt+A - Disconect All - Alt+T - - - - &Refresh - &Refrescar - - - - Alt+R - Refresh - Alt+R - - - - Forward - Avanzar - - - - (None) - (Ninguno) - - - - qjackctlSetupForm - - - Setup - JACK Audio Connection Kit - Configuración - JACK Audio Connection Kit - - - - Settings - Configuraciones - - - - Preset &Name: - &Nombre del Preset: - - - - (default) - - - - - Settings preset name - Preset con las configuraciones - - - - &Save - &Salvar - - - - Alt+S - Alt+S - - - - Save settings as current preset name - Salvar configuraciones en el preset actual - - - - &Delete - &Eliminar - - - - Alt+D - Alt+E - - - - Delete current settings preset - Eliminar el preset con la configuración actual - - - - Server - Servidor - - - - Server &Path: - &Ruta del servidor: - - - - jackstart - jackstart - - - - jackd - jackd - - - - jackd-realtime - jackd-realtime - - - - The JACK Audio Connection Kit sound server path - Ruta hacia el servidor de audio JACK - - - - Driv&er: - Dri&ver: - - - - dummy - dummy - - - - oss - oss - - - - alsa - alsa - - - - portaudio - portaudio - - - - coreaudio - coreaudio - - - - Parameters - Parámetros - - - - Number of periods in the hardware buffer - Número de períodos en el buffer de hardware - - - - Priorit&y: - &Prioridad: - - - - &Frames/Period: - &Cuadros / Período: - - - - 16 - 16 - - - - 32 - 32 - - - - 64 - 64 - - - - 128 - 128 - - - - 256 - 256 - - - - 512 - 512 - - - - 1024 - 1024 - - - - 2048 - 2048 - - - - 4096 - 4096 - - - - Frames per period between process() calls - Cuadros por período entre llamadas a process() - - - - Port Ma&ximum: - Má&ximos Puertos: - - - - 21333 - 21333 - - - - Number o microseconds to wait between engine processes (dummy) - Número de microsegundos a esperar entre procesos (dummy) - - - - 22050 - 22050 - - - - 32000 - 32000 - - - - 44100 - 44100 - - - - 48000 - 48000 - - - - 88200 - 88200 - - - - 96000 - 96000 - - - - Sample rate in frames per second - Frecuencia de muestreo en cuadros por segundo - - - - Scheduler priority when running realtime - Prioridad del scheduler cuando se ejecuta en tiempo real - - - - &Word Length: - &Largo de palabra: - - - - Periods/&Buffer: - Períodos / &Buffer: - - - - Word length - Tamaño de palabra - - - - Maximum number of ports the JACK server can manage - Máximo número de puertos que podrá manejar el servidor JACK - - - - &Wait (usec): - &Retardo (microseg): - - - - Sample &Rate: - &Frecuencia de muestreo: - - - - &Timeout (msec): - Límite de &Tiempo (mseg): - - - - 200 - 200 - - - - 500 - 500 - - - - 1000 - 1000 - - - - 2000 - 2000 - - - - 5000 - 5000 - - - - 10000 - 10000 - - - - Set client timeout limit in miliseconds - Establece el límite de tiempo de los clientes en milisegundos - - - - &Realtime - Tiempo &Real - - - - Alt+R - Alt+R - - - - Use realtime scheduling - Usar prioridad(scheduling) de tiempo real - - - - No Memory Loc&k - No b&loquear memoria - - - - Alt+K - Alt+L - - - - Do not attempt to lock memory, even if in realtime mode - No intentar bloquear memoria, incluso en modo de tiempo real - - - - &Unlock Memory - &Desbloquear Memoria - - - - Alt+U - Alt+D - - - - Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) - No bloquear memoria de las librerías comunes (GTK+, QT, FLTK, Wine) - - - - So&ft Mode - Modo &Tolerante - - - - Alt+F - Alt+T - - - - Ignore xruns reported by the backend driver - Ignorar las xruns reportadas por el driver de sonido. JACK tendrá menos tendencia a desconectar los puertos que no respondan. Útil cuando no se corre en tiempo real - - - - &Monitor - &Monitorear - - - - Alt+M - Alt+M - - - - Provide output monitor ports - Proveer puertos para monitoreo de la salida - - - - Force &16bit - Forzar &16bit - - - - Alt+1 - Alt+1 - - - - Force 16bit mode instead of failing over 32bit (default) - Forzar modo 16 bit en lugar de 32 bit (predeterminado) - - - - H/W M&onitor - M&onitoreo por Hardware - - - - Alt+O - Alt+O - - - - Enable hardware monitoring of capture ports - Habilitar monitoreo por hardware de los puertos de captura - - - - H/&W Meter - Monitoreo por H/&W - - - - Alt+W - Alt+W - - - - Enable hardware metering on cards that support it - Habilita monitoreo por hardware en las placas que lo soporten - - - - &Ignore H/W - &Ignorar H/W - - - - Alt+I - Alt+I - - - - Ignore hardware period/buffer size - Ignorar el tamaño de bufer / período del hardware - - - - &Output Device: - Dispositiv&o de salida: - - - - &Output Channels: - Númer&o de canales de salida: - - - - &Interface: - &Interfaz: - - - - Maximum input audio hardware channels to allocate - Máximo número de canales de entrada por hardware a establecer - - - - &Audio: - &Audio: - - - - &Input Latency: - Latenc&ia de la entrada: - - - - Dit&her: - &Suavizado: - - - - External output latency (frames) - Latencia de la salida externa (cuadros) - - - - &Input Device: - D&ispositivo de entrada: - - - - Duplex - Duplex - - - - Capture Only - Sólo Captura - - - - Playback Only - Sólo Reproducción - - - - Provide either audio capture, playback or both - Proveer de puertos de audio para captura, reproducción o ambos - - - - hw:0 - - - - - The PCM device name to use - Nombre del dispositivo PCM a usar - - - - > - > - - - - Select output device for playback - Seleccionar dispositivo de salida para reproducción - - - - /dev/dsp - - - - - Alternate input device for capture - Dispositivo de entrada alternativo para captura - - - - &Output Latency: - Latencia de la sal&ida: - - - - Maximum output audio hardware channels to allocate - Máximo número de canales de salida por hardware a establecer - - - - Alternate output device for playback - Dispositivo de salida alternativo para reproducción - - - - &Input Channels: - &Canales de entrada: - - - - Select input device for capture - Seleccionar dispositivo de entrada para captura - - - - Select PCM device name - Seleccionar dispositivo PCM - - - - External input latency (frames) - Latencia de la entrada externa (cuadros) - - - - None - Ninguno - - - - Rectangular - Rectangular - - - - Shaped - - - - - Triangular - Triangular - - - - Set dither mode - Establecer método de suavizado - - - - Alt+V - Alt+V - - - - Whether to give verbose output on messages - Mostrar información mas detallada en los mensajes - - - - Start De&lay (secs): - Retardo Inicia&l (segs): - - - - Time in seconds that client is delayed after server startup - Tiempo en segundos que el cliente es demorado luego de iniciar el servidor - - - - Latency: - Latencia: - - - - 0 - 0 - - - - Output latency in milliseconds, calculated based on the period, rate and buffer settings - Latencia del sistema en milisegundos, calculada en base a la configuración de período, buffer y frecuencia de muestreo - - - - Options - Opciones - - - - Scripting - Scripting - - - - Execute script on Start&up: - Script a ejecutar al iniciar el servi&dor: - - - - Whether to execute a custom shell script before starting up the JACK audio server. - Ejecutar un script personalizado antes de iniciar el servidor JACK. - - - - Execute script after &Startup: - &Script a ejecutar luego de iniciar: - - - - Whether to execute a custom shell script after starting up the JACK audio server. - Ejecutar un script personalizado después de iniciar el servidor JACK. - - - - Execute script on Shut&down: - Script a ejecutar antes de d&etener: - - - - Whether to execute a custom shell script before shuting down the JACK audio server. - Ejecutar un script personalizado antes de detener el servidor JACK. - - - - Command line to be executed before starting up the JACK audio server - Comando a ejecutar antes de iniciar el servidor JACK - - - - Scripting argument meta-symbols - Variables especiales para pasar al script - - - - ... - ... - - - - Browse for script to be executed before starting up the JACK audio server - Buscar el script a ejecutar antes de iniciar el servidor de audio JACK - - - - Command line to be executed after starting up the JACK audio server - Comando a ejecutar luego de iniciar el servidor JACK - - - - Browse for script to be executed after starting up the JACK audio server - Buscar el script a ejecutar luego de iniciar el servidor de audio JACK - - - - Browse for script to be executed before shutting down the JACK audio server - Buscar el script a ejecutar antes de terminar el servidor de audio JACK - - - - Command line to be executed before shutting down the JACK audio server - Comando a ejecutar antes de detener el servidor JACK - - - - Execute script after Shu&tdown: - Script a ejecutar luego de &Terminar: - - - - Alt+T - Alt+T - - - - Whether to execute a custom shell script after shuting down the JACK audio server. - Ejecutar un script personalizado después de terminar el servidor JACK. - - - - Browse for script to be executed after shutting down the JACK audio server - Buscar el script a ejecutar luego de terminar el servidor de audio JACK - - - - Command line to be executed after shutting down the JACK audio server - Comando a ejecutar luego de detener el servidor JACK - - - - Statistics - Estadísticas - - - - &Capture standard output - &Capturar salida estándar - - - - Alt+C - Alt+C - - - - Whether to capture standard output (stdout/stderr) into messages window - Capturar la salida estándar de JACK en la ventana de mensajes - - - - &XRUN detection regex: - Expresión regular para detectar &XRUN: - - - - xrun of at least ([0-9|\.]+) msecs - xrun of at least ([0-9|\.]+) msecs - - - - Regular expression used to detect XRUNs on server output messages - Expresión regular usada para detectar XRUNs en los mensajes del servidor - - - - &Ignore first XRUN occurrence on statistics - &Ignorar las primeras XRUN en las estadísticas - - - - Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) - Ignorar las XRUN producidas durante el inicio del servidor (suele suceder en versiones anteriores a la 0.80.0 ) - - - - Connections - Conexiones - - - - 5 - 5 - - - - 10 - 10 - - - - 20 - 20 - - - - 30 - 30 - - - - 60 - 60 - - - - 120 - 120 - - - - Time in seconds between each auto-refresh cycle - Tiempo en segundos entre cada ciclo de auto - refresco - - - - Patchbay definition file to be activated as connection persistence profile - Esquemas de patchbay a activar como un perfil persistente de las conexiones - - - - Browse for a patchbay definition file to be activated - Buscar el esquema de patchbay para activar - - - - &Auto refresh connections Patchbay, every (secs): - &Auto refrescar las conexiones del Patchbay, cada (segs): - - - - Alt+A - Alt+A - - - - Whether to refresh the connections patchbay automatically - Automáticamente refresca el patchbay de conexiones - - - - Activate &Patchbay persistence: - Activar &Persistencia del patchbay: - - - - Alt+P - Alt+P - - - - Whether to activate a patchbay definition for connection persistence profile. - Utilizar un perfil para conservar el esquema del patchbay entre sesiones. - - - - Display - Display - - - - Time Display - Display de tiempo - - - - Time F&ormat: - F&ormato de tiempo: - - - - hh:mm:ss - hh:mm:ss - - - - hh:mm:ss.d - hh:mm:ss.d - - - - hh:mm:ss.dd - hh:mm:ss.dd - - - - hh:mm:ss.ddd - hh:mm:ss.ddd - - - - The general time format on display - El formato general para mostrar el tiempo - - - - Transport &Time Code - Código de Tiempo del &Transporte - - - - Transport &BBT (bar:beat.ticks) - &BBT del Transporte (bar:beat:ticks) - - - - Alt+B - Alt+B - - - - Elapsed time since last &Reset - Tiempo transcurrido desde el último &Reset - - - - Elapsed time since last &XRUN - Tiempo transcurrido desde la última &XRUN - - - - Alt+X - Alt+X - - - - Sample front panel normal display font - Muestra de la fuente para el panel frontal - - - - Sample big time display font - Muestra de la fuente para el display de tiempo grande - - - - Big Time display: - Display de tiempo grande: - - - - &Font... - Fuen&te... - - - - Select font for front panel normal display - Seleccionar fuente para el panel normal - - - - Select font for big time display - Seleccionar fuente para el display de tiempo grande - - - - Normal display: - Display normal: - - - - &Display shiny glass light effect - Usar &efecto de Resplandor Vítreo - - - - Whether to enable a shiny glass light effect on the main display - Dibujar la ventana principal con un efecto símil cristal - - - - Messages Window - Ventana de Mensajes - - - - Sample messages text font display - Muestra de la fuente para la ventana de mensajes - - - - Select font for the messages text display - Seleccionar fuente para el display de mensajes - - - - &Messages limit: - Límite de &Mensajes: - - - - Whether to keep a maximum number of lines in the messages window - Almacenar un número limitado de líneas en la ventana de mensajes - - - - 100 - 100 - - - - 250 - 250 - - - - 2500 - 2500 - - - - The maximum number of message lines to keep in view - Máximo número de líneas para mantener en la ventana de mensajes - - - - Connections Window - Ventana de conexiones - - - - Sample connections view font - Muestra de la fuente para la ventana de conexiones - - - - Select font for the connections view - Seleccionar fuente para la ventana de conexiones - - - - &Icon size: - Tamaño de &Icono: - - - - 16 x 16 - 16 x 16 - - - - 32 x 32 - 32 x 32 - - - - 64 x 64 - 64 x 64 - - - - The icon size for each item of the connections view - Tamaño de ícono para cada ítem en la vista de conexiones - - - - Ena&ble client/port aliases editing (rename) - Ha&bilitar la edición de alias para los puertos / clientes (renombrarlos) - - - - Whether to enable in-place client/port name editing (rename) - Permitir la edición in-situ de los nobres asignados a puertos o clientes - - - - E&nable client/port aliases - Habilitar alias para los nombres de &puertos / clientes - - - - Alt+N - Alt+P - - - - Whether to enable client/port name aliases on the connections window - Permitir alias para los puertos / clientes en la ventana de conexiones - - - - Draw connection and patchbay lines as Be&zier curves - Dibujar líneas en el Patchbay y ventana de conexiones como curvas Bé&zier - - - - Alt+Z - Alt+Z - - - - Whether to draw connection lines as cubic Bezier curves - Utilizar curvas cúbicas Bézier en lugar de rectas (más estilizado) - - - - Misc - Otras - - - - Other - Otro - - - - &Start JACK audio server on application startup - Iniciar el &servidor JACK al cargar qjackctl - - - - Whether to start JACK audio server immediately on application startup - Iniciar en forma automática JACK cuando se lanza qjackctl - - - - &Confirm application close - Pedir &Confirmación al salir - - - - Whether to ask for confirmation on application exit - Preguntar antes de salir de qjackctl - - - - &Keep child windows always on top - &Las ventanas hijas siempre arriba - - - - Whether to keep all child windows on top of the main window - Todas las ventanas creadas por qjackctl estarán sobre la ventana principal - - - - &Enable system tray icon - Habilitar ícono en band&eja del sistema - - - - Alt+E - Alt+E - - - - Whether to enable the system tray icon - Permitir íconos en la bandeja del sistema - - - - &Delay window positioning at startup - D&emorar la reubicación de las ventanas al iniciar - - - - Whether to delay window positioning at application startup - Esperar antes de ubicar las ventanas en su última posición al iniciar la aplicación - - - - S&ave JACK audio server configuration to: - S&alvar la configuración del servidor JACK en: - - - - Whether to save the JACK server command-line configuration into a local file (auto-start) - Guardar la línea de comando de JACK a un archivo (auto - inicio) - - - - .jackdrc - .jackdrc - - - - The server configuration local file name (auto-start) - El archivo con la configuración de JACK (auto - inicio) - - - - C&onfigure as temporary server - C&onfigurar como servidor temporal - - - - Whether to exit once all clients have closed (auto-start) - Salir una vez que todos los clientes hayan finalizado (auto - inicio) - - - - Whether to ask for confirmation on JACK audio server shutdown - Preguntar antes de detener JACK - - - - OK - OK - - - - Cancel - Cancelar - - - - Warning - Advertencia - - - - Save - Salvar - - - - Discard - Descartar cambios - - - - msec - mseg - - - - n/a - n/d - - - - &Preset Name - Nombre del &Preset - - - - &Server Path - Ruta hacia el &Servidor - - - - &Driver - &Driver - - - - &Interface - &Interfaz - - - - Sample &Rate - &Frecuencia de muestreo - - - - &Frames/Period - &Cuadros / Período - - - - Periods/&Buffer - Períodos / &Buffer - - - - Patchbay Definition files - Archivos de esquema de patchbay - - - - Apply - Aplicar - - - - Some settings have been changed: - -"%1" - -Do you want to save the changes? - Algunas configuraciones han cambiado: - -"%1" - -Desea guardarlas? - - - - Delete preset: - -"%1" - -Are you sure? - Borrar preset: - -"%1" - -Está seguro? - - - - Startup Script - Script de Inicio - - - - Post-Startup Script - Script de Post-Inicio - - - - Shutdown Script - Script de Apagado - - - - Post-Shutdown Script - Script de Post-Acabado - - - - Active Patchbay Definition - Definición Activa de Patchbay - - - - Messages Log - Registro de Mensajes - - - - Log files - Archivos de registros - - - - Some settings have been changed. - -Do you want to apply the changes? - Algunas configuraciones han cambiado.Desea aplicar los cambios? - - - - jackdmp - jackdmp - - - - The audio backend driver interface to use - El driver de audio a utilizar - - - - sun - - - - - freebob - - - - - firewire - - - - - MIDI Driv&er: - Driv&er MIDI: - - - - The ALSA MIDI backend driver to use - El driver MIDI de ALSA a utilizar - - - - none - ninguno - - - - raw - - - - - seq - - - - - &Verbose messages - Mensajes &Verbosos - - - - plughw:0 - - - - - /dev/audio - - - - - &Channels: - &Canales: - - - - 192000 - 192000 - - - - Maximum number of audio channels to allocate - El máximo número de canales de audio a utilizar - - - - Logging - Registro - - - - Messages log file - Archivo de registro de mensajes - - - - Browse for the messages log file location - Ir hasta la ubicación del archivo con el registro de mensajes - - - - Whether to activate a messages logging to file. - Si guardar los mensajes a un archivo. - - - - &Messages log file: - Archivo con los &Mensajes: - - - - Whether to enable blinking (flashing) of the server mode (RT) indicator - Si hablilitar el parpadeo del indicador de modo del servidor (RT) - - - - Blin&k server mode indicator - &Parpadeo del indicador de modo del servidor - - - - &JACK client/port aliases: - Alias de cliente/puerto para &JACK: - - - - JACK client/port aliases display mode - Modo de visualización de los alias cliente/puerto de JACK - - - - Default - Predeterminado - - - - First - Primero - - - - Second - Segundo - - - - Whether to start minimized to system tray - Si iniciar minimizado en la bandeja del sistema - - - - Start minimi&zed to system tray - Iniciar minimi&zado en la bandeja del sistema - - - - Confirm server sh&utdown - Confirmar apa&gado del servidor - - - - Whether to enable ALSA Sequencer (MIDI) support on startup - Si habilitar soporte para el Secuenciador ALSA (MIDI) al iniciar - - - - E&nable ALSA Sequencer support - Habilitar Secue&nciador ALSA - - - - Buttons - Botones - - - - Whether to hide the left button group on the main window - Si esconder el grupo de botones a la izquierda de la ventana principal - - - - Hide main window &Left buttons - Esconder botones de &la izquierda - - - - Alt+L - - - - - Whether to hide the right button group on the main window - Si esconder el grupo de botones a la derecha de la ventana principal - - - - Hide main window &Right buttons - Esconder botones de la de&recha - - - - Whether to hide the transport button group on the main window - Si esconder el grupo de botones del transporte en la ventana principal - - - - Hide main window &Transport buttons - Esconder los botones del &Transporte - - - - Whether to hide the text labels on the main window buttons - Si esconder las etiquetas en los botones de la ventana principal - - - - Hide main window &button text labels - Esconder etiquetas en los &botones - - - - Defaults - Predeterminados - - - - &Base font size: - Tamaño &básico de tipografías: - - - - Base application font size (pt.) - Tamaño básico de tipografías para la aplicación (pt.) - - - - 6 - 6 - - - - 7 - 7 - - - - 8 - 8 - - - - 9 - 9 - - - - 11 - 11 - - - - 12 - 12 - - - - qjackctlSocketForm - - - OK - OK - - - - Cancel - Cancelar - - - - &Socket - &Socket - - - - &Name (alias): - &Nombre (alias): - - - - Socket name (an alias for client name) - Nombre del socket (un alias para el nombre de cliente) - - - - Client name (regular expression) - Nombre del cliente (expresión regular) - - - - Add P&lug - Añadir p&Lug - - - - Alt+L - Alt+L - - - - Add plug to socket plug list - Añadir plug a la lista de sockets - - - - &Plug: - &Plug: - - - - Port name (regular expression) - Nombre del puerto (expresión regular) - - - - Socket Plugs / Ports - Socket Plug / Puerto - - - - Socket plug list - Lista de socket tipo plug - - - - &Edit - &Editar - - - - Alt+E - Alt+E - - - - &Remove - &Remover - - - - Alt+R - Alt+R - - - - Remove currently selected plug from socket plug list - Remover el plug seleccionado de la lista - - - - &Client: - &Cliente: - - - - &Down - &Bajar - - - - Alt+D - Alt+B - - - - &Up - &Subir - - - - Alt+U - Alt+S - - - - E&xclusive - E&xclusivo - - - - Alt+X - Alt+X - - - - Enforce only one exclusive cable connection - Permitir una conexión únicamente - - - - Type - Tipo - - - - &Audio - A&udio - - - - Alt+A - Alt+U - - - - Audio socket type (JACK) - Socket tipo audio (JACK) - - - - &MIDI - &MIDI - - - - Alt+M - Alt+M - - - - MIDI socket type (ALSA) - Socket tipo MIDI (ALSA) - - - - Plugs / Ports - Plugs / Puertos - - - - Add Plug - Añadir Plug - - - - Remove - Remover - - - - Edit - Editar - - - - Move Up - Subir - - - - Move Down - Bajar - - - - Warning - Advertencia - - - - Some settings have been changed. - -Do you want to apply the changes? - Algunas configuraciones han cambiado. - -Desea aplicar los cambios? - - - - Apply - Aplicar - - - - Discard - Descartar - - - - (None) - (Ninguno) - - - - Socket - JACK Audio Connection Kit - Sockets - JACK Audio Connection Kit - - - - Edit currently selected plug - Editar el plug seleccionado - - - - Move down currently selected plug in socket plug list - Mover hacia abajo en la lista el plug seleccionado - - - - Move up current selected plug in socket plug list - Mover hacia arriba en la lista el plug seleccionado - - - - &Forward: - &Avanzar: - - - - Forward (clone) all connections from this socket - Reenviar (clonar) todas las conexiones desde este socket - - - - MIDI socket type (JACK) - Tipo de socket MIDI (JACK) - - - - AL&SA - AL&SA - - - - Alt+S - - - - - qjackctlSocketList - - - Output - Salida - - - - Input - Entrada - - - - Socket - Socket - - - - Warning - Advertencia - - - - Yes - Si - - - - No - No - - - - <New> - %1 - <Nuevo> - %1 - - - - %1 about to be removed: - -"%2" - -Are you sure? - A punto de remover %1: - -"%2" - -Está seguro? - - - - %1 <Copy> - %2 - %1 <Copia> - %2 - - - - qjackctlSocketListView - - - Output Sockets / Plugs - Sockets de Salida / Plugs - - - - Input Sockets / Plugs - Sockets de Entrada / Plugs - - - - qjackctlStatusForm - - - Status - JACK Audio Connection Kit - Estado - JACK Audio Connection Kit - - - - Description - Descripción - - - - Value - Valor - - - - Statistics since last server startup - Estadísticas desde el último inicio de JACK - - - - Re&set - re&Iniciar - - - - Alt+S - Alt+I - - - - Reset XRUN statistic values - Reiniciar estadísticas de XRUN - - - - &Refresh - &Refrescar - - - - Alt+R - Alt+R - - - - Refresh XRUN statistic values - Refrescar estadísticas de XRUN - - - - Time of last reset - Tiempo desde el último reset - - - - Maximum scheduling delay - Máximo retardo de programación(scheduling) - - - - XRUN count since last server startup - XRUNs desde el último inicio - - - - XRUN total - Total de XRUN - - - - XRUN average - Promedio de XRUN - - - - XRUN minimum - Mínimo de XRUN - - - - XRUN maximum - Máximo de XRUN - - - - XRUN last - Última XRUN - - - - XRUN last time detected - Fecha de la última XRUN detectada - - - - Transport state - Estado del transporte - - - - Transport BPM - BPM del transporte - - - - Transport BBT - BBT del Transporte - - - - Transport Timecode - Código de tiempo del transporte - - - - Realtime Mode - Modo Realtime - - - - Buffer Size - Tamaño de Buffer - - - - Sample Rate - Frecuencia de muestreo - - - - Server state - Estado del Servidor - - - - DSP Load - Uso de CPU del DSP - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_fr.ts qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_fr.ts --- qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_fr.ts 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_fr.ts 1970-01-01 01:00:00.000000000 +0100 @@ -1,4176 +0,0 @@ - - - - QObject - - - (default) - (par défaut) - - - - Usage - Utilisation - - - - options - options - - - - command-and-args - commande-et-args - - - - Options - Options - - - - Start JACK audio server immediately - Démarrer immédiatement le serveur audio JACK - - - - Set default setings preset name - Régler le nom du préréglage des paramètres par défaut - - - - Show help about command line options - Montrer l'aide à propos des options en ligne de commande - - - - Show version information - Montrer les informations de version - - - - Option -p requires an argument (preset). - L'option -p nécessite un argument (préréglage). - - - - Usage: %1 [options] [command-and-args] - Utilisation : %1 [options] [commandes-et-args] - - - - Options: - Options : - - - - Qt: %1 - - Qt : %1 - - - - - Set default settings preset name - - - - - qjackctlAboutForm - - - About QjackCtl - À propos de QjackCtl - - - - About Qt - À propos de Qt - - - - &Close - &Fermer - - - - Alt+C - Alt+F - - - - Version - Version - - - - Build - Compilation - - - - Debugging option enabled. - Option de débogage activée. - - - - System tray disabled. - Zone de notification système désactivée. - - - - Transport status control disabled. - Contrôle du statut du déplacement désactivé. - - - - Realtime status disabled. - Statut temps réel désactivé. - - - - XRUN delay status disabled. - Statut du délai de désynchronisation (XRUN) désactivé. - - - - Maximum delay status disabled. - Statut du délai maximal désactivé. - - - - ALSA/MIDI sequencer support disabled. - Support du séquencer ALSA/MIDI désactivé. - - - - Website - Site web - - - - This program is free software; you can redistribute it and/or modify it - Ce programme est libre; vous pouvez le redistribuer et/ou le modifier - - - - under the terms of the GNU General Public License version 2 or later. - selon les termes de la Licence Publique Générale GNU version 2 ou ultérieure. - - - - JACK MIDI support disabled. - Support JACK MIDI désactivé. - - - - qjackctlClientListView - - - Readable Clients - Clients en lecture - - - - Output Ports - Ports de sortie - - - - Writable Clients - Clients en ecriture - - - - Input Ports - Ports d'entrée - - - - &Connect - &Connecter - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Déconnecter - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - &Tout déconnecter - - - - Alt+A - Disconect All - Alt+T - - - - Re&name - Re&nommer - - - - Alt+N - Rename - Alt+N - - - - &Refresh - &Rafraîchir - - - - Alt+R - Refresh - Alt+R - - - - Readable Clients / Output Ports - Clients en lecture / Ports de sortie - - - - Writable Clients / Input Ports - Clients en ecriture / Ports d'entrée - - - - qjackctlConnect - - - Warning - Attention - - - - This will suspend sound processing - Cela va suspendre le traitement du son - - - - from all client applications. - de toutes les applications clientes. - - - - Are you sure? - Êtes-vous certain? - - - - Yes - Oui - - - - No - Non - - - - This will suspend sound processing -from all client applications. - -Are you sure? - Cela va suspendre le traitement du son -de toutes les applications clientes. - -Êtes-vous certain? - - - - qjackctlConnectionsForm - - - Connections - JACK Audio Connection Kit - Connexions - JACK Audio Connection Kit - - - - Audio - Audio - - - - &Connect - &Connecter - - - - Alt+C - Alt+C - - - - Connect currently selected ports - Connecter les ports actuellement sélectionnés - - - - &Disconnect - &Déconnecter - - - - Alt+D - Alt+D - - - - Disconnect currently selected ports - Déconnecter les ports actuellement sélectionnés - - - - Disconnect &All - &Tout déconnecter - - - - Alt+A - Alt+T - - - - Disconnect all currently connected ports - Déconnecter tous les ports actuellement connectés - - - - &Refresh - &Rafraîchir - - - - Alt+R - Alt+R - - - - Refresh current connections view - Rafraîchir la vue actuelle des connexions - - - - MIDI - MIDI - - - - Warning - Attention - - - - The preset aliases have been changed: - Les alias de préréglage ont été changés: - - - - Do you want to save the changes? - Voulez-vous enregistrer les changements? - - - - Save - Enregistrer - - - - Discard - Ignorer - - - - Cancel - Annuler - - - - ALSA - ALSA - - - - The preset aliases have been changed: - -"%1" - -Do you want to save the changes? - Les alias de préréglage ont été changés : - -"%1" - -Voulez-vous enregistrer les changements? - - - - qjackctlConnectorView - - - &Connect - &Connecter - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Déconnecter - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - &Tout déconnecter - - - - Alt+A - Disconect All - Alt+T - - - - &Refresh - &Rafraîchir - - - - Alt+R - Refresh - Alt+R - - - - qjackctlMainForm - - - QjackCtl - QjackCtl - - - - Alt+Q - Alt+Q - - - - &Quit - &Quitter - - - - Quit processing and exit - Quitter le traitement et sortir - - - - Alt+S - Alt+D - - - - &Start - &Démarrer - - - - Start the JACK server - Démarrer le serveur JACK - - - - Alt+T - Alt+A - - - - S&top - &Arrêter - - - - Stop the JACK server - Arrêter le serveur JACK - - - - St&atus - S&tatut - - - - Show/hide the extended status window - Montrer/cacher la fenêtre de statut étendu - - - - Alt+B - Alt+R - - - - Ab&out... - À propo&s... - - - - Show information about this application - Montrer des informations à propos de cette application - - - - Alt+E - Alt+E - - - - S&etup... - R&églages... - - - - Show settings and options dialog - Montrer la fenêtre d'options et de paramètres - - - - Alt+M - Alt+M - - - - &Messages - &Messages - - - - Show/hide the messages log window - Montrer/cacher la fenêtre des messages - - - - &Patchbay - &Brassage - - - - Show/hide the patchbay editor window - Montrer/cacher la fenêtre de l'éditeur de baie de brassage - - - - Alt+C - Alt+C - - - - &Connect - &Connecter - - - - Show/hide the actual connections patchbay window - Montrer/cacher la fenêtre des connexions actuelles de la baie de brassage - - - - JACK server state - État du serveur JACK - - - - JACK server mode - Mode du serveur JACK - - - - CPU Load - Charge processeur - - - - Sample rate - Fréquence d'échantillonnage - - - - XRUN Count - Décompte des désynchronisations (XRUN) - - - - Time display - Horloge - - - - Transport state - État du déplacement - - - - Transport BPM - BPM du déplacement - - - - Transport time - Horaire du déplacement - - - - &Backward - A&rrière - - - - Backward transport - Déplacer en arrière - - - - Alt+F - Alt+V - - - - &Forward - A&vant - - - - Forward transport - Déplacer en avant - - - - Alt+R - Alt+O - - - - &Rewind - Remb&obiner - - - - Rewind transport - Rembobiner - - - - Alt+U - Alt+P - - - - Pa&use - Pa&use - - - - Stop transport rolling - Arrêter le déplacement - - - - Alt+P - Alt+L - - - - &Play - &Lecture - - - - Start transport rolling - Démarrer le déplacement - - - - Could not open ALSA sequencer as a client. - -MIDI patchbay will be not available. - Impossible d'ouvrir le sequenceur ALSA comme client. - -La baie de brassage MIDI ne sera pas disponible. - - - - Warning - Attention - - - - JACK is currently running. - JACK fonctionne actuellement. - - - - Do you want to terminate the JACK audio server? - Voulez-vous arrêter le serveur audio JACK? - - - - Terminate - Arrêter - - - - Leave - Laisser - - - - Cancel - Annuler - - - - successfully - avec succès - - - - with exit status=%1 - avec statut de sortie=%1 - - - - Could not start JACK. - Impossible de démarrer JACK. - - - - Maybe JACK audio server is already started. - Peut-être que le serveur audio JACK est déjà démarré. - - - - Stop - Arrêter - - - - Kill - Tuer - - - - Could not load preset "%1". - -Retrying with default. - Impossible de charger le préréglage "%1". - -Nouvel essai avec celui par défaut. - - - - Could not load default preset. - -Sorry. - Impossible de charger le préréglage par défaut. - -Désolé. - - - - Startup script... - Script de démarrage... - - - - Startup script terminated - Script de démarrage terminé - - - - JACK is starting... - JACK démarre... - - - - Could not start JACK. - -Sorry. - Impossible de démarrer JACK. - -Désolé. - - - - JACK was started with PID=%1 (0x%2). - JACK a été démarrer avec le PID=%1 (0x%2). - - - - Some client audio applications - Certaines applications audio clientes - - - - are still active and connected. - sont encore actives et connectées. - - - - Do you want to stop the JACK audio server? - Voulez-vous arrêter le serveur audio JACK? - - - - JACK is stopping... - JACK s'arrête... - - - - Shutdown script... - Script d'extinction... - - - - Shutdown script terminated - Script d'extinction terminé - - - - Post-shutdown script... - Script post-extinction... - - - - Post-shutdown script terminated - Script post-extinction terminé - - - - JACK was stopped - JACK a été arrêté - - - - Error - Erreur - - - - Transport BBT (bar:beat.ticks) - BBT (bar:beat.ticks) du déplacement - - - - Transport time code - Code temporel (Timecode) du déplacement - - - - Elapsed time since last reset - Temps écoulé depuis la dernière réinitialisation - - - - Elapsed time since last XRUN - Temps écoulé depuis la dernière désynchronisation (XRUN) - - - - Could not load active patchbay definition. - -Disabled. - Impossible de charger la définition de baie de brassage active. - -Désactivé. - - - - Patchbay activated. - Baie de brassage activée. - - - - Patchbay deactivated. - Baie de brassage désactivée. - - - - Statistics reset. - Réinitialisation des statistiques. - - - - msec - ms - - - - Audio connection graph change. - Changement du graphique des connexions audio. - - - - XRUN callback (%1). - Récupération désynchronisation (XRUN) (%1). - - - - Buffer size change (%1). - Changement de la taille du tampon (%1). - - - - Shutdown notification. - Notification d'extinction. - - - - MIDI connection graph change. - Changement du graphique des connexions MIDI. - - - - Audio active patchbay scan - Balayage de la baie de brassage audio active - - - - MIDI active patchbay scan - Balayage de la baie de brassage MIDI active - - - - Audio connection change. - Changement des connexions audio. - - - - MIDI connection change. - Changement des connexions MIDI. - - - - checked - vérifié - - - - connected - connecté - - - - disconnected - déconnecté - - - - failed - échoué - - - - Could not connect to JACK server as client. - -Please check the messages window for more info. - Impossible de connecter le serveur JACK comme client. - -Veuillez consulter la fenêtre des messages pour plus d'informations. - - - - Server configuration saved to "%1". - Configuration du serveur enregistrée dans "%1". - - - - Client activated. - Client activé. - - - - Post-startup script... - Script post-démarrage... - - - - Post-startup script terminated - Script post-démarrage terminé - - - - Command line argument... - Argument de ligne de commande... - - - - Command line argument started - Argument de ligne de commande démarré - - - - Client deactivated. - Client désactivé. - - - - Transport rewind. - Déplacement en rembobinage. - - - - Transport backward. - Déplacement en marche arrière. - - - - Starting - Démarre - - - - Transport start. - Déplacement démarré. - - - - Stopping - S'arrête - - - - Transport stop. - Déplacement arrêté. - - - - Transport forward. - Déplacement en marche avant. - - - - Stopped - Arrêté - - - - Hz - Hz - - - - frames - échantillons - - - - Yes - Oui - - - - No - Non - - - - RT - TR - - - - Rolling - Défile - - - - Looping - Boucle - - - - XRUN callback (%1 skipped). - Récupération de désynchronisation (XRUN) (%1 sauté). - - - - Started - Démarré - - - - Active - Actif - - - - Activating - Activation - - - - Inactive - Inactif - - - - &Hide - Cac&her - - - - Mi&nimize - Mi&nimiser - - - - S&how - M&ontrer - - - - Rest&ore - R&estaurer - - - - &Stop - &Arrêter - - - - &Reset - Ré&initialiser - - - - &Presets - &Préréglages - - - - &Connections - &Connexions - - - - Patch&bay - &Brassage - - - - &Transport - Déplacemen&t - - - - Server settings will be only effective after -restarting the JACK audio server. - Les paramètres du serveur ne seront effectifs -qu'après avoir redémarré le serveur audio JACK. - - - - OK - OK - - - - Information - Information - - - - Some settings will be only effective -the next time you start this program. - Certain paramètres ne seront effectifs -qu'au prochain démarrage de ce programme. - - - - DSP Load - Charge DSP - - - - XRUN Count (notifications) - Décompte des désynchronisations (notification XRUN) - - - - JACK connection graph change. - Changement du graphique des connexions JACK. - - - - ALSA connection graph change. - Changement du graphique des connexions ALSA. - - - - JACK connection change. - Changement des connexions JACK. - - - - ALSA connection change. - Changement des connexions ALSA. - - - - JACK is currently running. - -Do you want to terminate the JACK audio server? - JACK fonctionne actuellement. - -Voulez-vous arrêter le serveur audio JACK? - - - - Could not start JACK. - -Maybe JACK audio server is already started. - Impossible de démarrer JACK. - -Peut-être que le serveur audio JACK est déjà démarré. - - - - Some client audio applications -are still active and connected. - -Do you want to stop the JACK audio server? - Certaines applications audio clientes -sont encore actives et connectées. - -Voulez-vous arrêter le serveur audio JACK? - - - - JACK was started with PID=%1. - JACK a été démarrer avec le PID=%1. - - - - JACK is being forced... - JACK est forcé... - - - - JACK has crashed. - JACK a planté. - - - - JACK timed out. - JACK n'a pas répondu à temps. - - - - JACK write error. - Erreur d'écriture JACK. - - - - JACK read error. - Erreur de lecture JACK. - - - - Unknown JACK error (%d). - Erreur JACK inconnue (%d). - - - - Overall operation failed. - L'opération a échoué. - - - - Invalid or unsupported option. - Option invalide ou non supportée. - - - - Client name not unique. - Nom de client non unique. - - - - Server is started. - Le serveur est démarré. - - - - Unable to connect to server. - Incapable de se connecter au serveur. - - - - Server communication error. - Erreur de communication serveur. - - - - Client does not exist. - Le client n'existe pas. - - - - Unable to load internal client. - Incapable de charger le client interne. - - - - Unable to initialize client. - Incapable d'initialiser le client. - - - - Unable to access shared memory. - Incapable d'accéder à la mémoire partagée. - - - - Client protocol version mismatch. - Mauvaise version du protocole client. - - - - Could not connect to JACK server as client. -- %1 -Please check the messages window for more info. - Impossible de connecter le serveur JACK comme client. -- %1 -Veuillez consulter la fenêtre des messages pour plus d'informations. - - - - %1 (%2%) - %1 (%2%) - - - - %1 % - %1 % - - - - %1 Hz - %1 Hz - - - - %1 frames - %1 échantillons - - - - %1 msec - %1 ms - - - - Could not open ALSA sequencer as a client. - -ALSA MIDI patchbay will be not available. - - - - - The program will keep running in the system tray. - -To terminate the program, please choose "Quit" in the context menu of the system tray entry. - - - - - JACK active patchbay scan - - - - - ALSA active patchbay scan - - - - - A patchbay definition is currently active, -which is probable to redo this connection: - -%1 -> %2 - -Do you want to remove the patchbay connection? - - - - - Remove - Enlever - - - - Ignore - - - - - qjackctlMessagesForm - - - Messages - JACK Audio Connection Kit - Messages - JACK Audio Connection Kit - - - - Messages log - Messages - - - - Messages output log - Messages de sortie - - - - Logging stopped --- %1 --- - - - - - Logging started --- %1 --- - - - - - qjackctlPatchbay - - - Warning - Attention - - - - This will disconnect all sockets. - Cela va déconnecter toutes les prises. - - - - Are you sure? - Êtes vous certain? - - - - Yes - Oui - - - - No - Non - - - - This will disconnect all sockets. - -Are you sure? - Cela va déconnecter toutes les prises. - -Êtes vous certain? - - - - qjackctlPatchbayForm - - - Patchbay - JACK Audio Connection Kit - Baie de brassage - JACK Audio Connection Kit - - - - &New - &Nouveau - - - - Alt+N - Alt+N - - - - Create a new patchbay profile - Créer un nouveau profil de baie de brassage - - - - &Load... - &Charger... - - - - Alt+L - Alt+C - - - - Load patchbay profile - Charger un profil de baie de brassage - - - - &Save... - &Enregistrer... - - - - Alt+S - Alt+E - - - - Save current patchbay profile - Enregistrer le profil actuel de la baie de brassage - - - - Current (recent) patchbay profile(s) - Profil(s) actuel(s) (récent(s)) de la baie de brassage - - - - Acti&vate - Acti&ver - - - - Alt+V - Alt+V - - - - Toggle activation of current patchbay profile - Basculer l'activation du profil actuel de baie de brassage - - - - &Connect - &Connecter - - - - Alt+C - Alt+C - - - - Connect currently selected sockets - Connecter les prises actuellement sélectionnés - - - - &Disconnect - &Déconnecter - - - - Alt+D - Alt+D - - - - Disconnect currently selected sockets - Déconnecter les prises actuellement sélectionnés - - - - Disconnect &All - &Tout déconnecter - - - - Alt+A - Alt+T - - - - Disconnect all currently connected sockets - Déconnecter les prises actuellement connectées - - - - &Refresh - &Rafraîchir - - - - Alt+R - Alt+R - - - - Refresh current patchbay view - Rafraîchir la vue actuelle de la baie de brassage - - - - Down - Vers le Bas - - - - Move currently selected output socket down one position - Déplacer d'une position vers le bas la prise de sortie actuellement sélectionnée - - - - Add... - Ajouter... - - - - Create a new output socket - Créer une nouvelle prise de sortie - - - - Edit... - Editer... - - - - Edit currently selected input socket properties - Editer les propriétés de la prise d'entrée actuellement sélectionnée - - - - Up - Vers le haut - - - - Move currently selected output socket up one position - Déplacer d'une position vers le haut la prise de sortie actuellement sélectionnée - - - - Remove - Enlever - - - - Remove currently selected output socket - Enlever la prise de sortie actuellement sélectionnée - - - - Copy... - Copier... - - - - Duplicate (copy) currently selected output socket - Dupliquer (copier) la prise de sortie actuellement sélectionnée - - - - Remove currently selected input socket - Enlever la prise d'entrée actuellement sélectionnée - - - - Duplicate (copy) currently selected input socket - Dupliquer (copier) la prise d'entrée actuellement sélectionnée - - - - Create a new input socket - Créer une nouvelle prise d'entrée - - - - Edit currently selected output socket properties - Editer les propriétés de la prise de sortie actuellement sélectionnée - - - - Warning - Attention - - - - The patchbay definition has been changed: - La définition de baie de brassage a été changée: - - - - Do you want to save the changes? - Voulez-vous enregistrer les changements? - - - - Save - Enregistrer - - - - Discard - Ignorer - - - - Cancel - Annuler - - - - modified - modifié - - - - Untitled - Sans titre - - - - Error - Erreur - - - - Could not load patchbay definition file: - Impossible de charger le fichier de définition de baie de brassage: - - - - Could not save patchbay definition file: - Impossible d'enregistrer le fichier de définition de baie de brassage: - - - - New Patchbay definition - Nouvelle définition de baie de brassage - - - - Create patchbay definition as a snapshot - Prendre un cliché de toutes les connexions clientes actuelles - - - - of all actual client connections? - pour créer une définition de baie de brassage? - - - - Yes - Oui - - - - No - Non - - - - Patchbay Definition files - Fichiers de définition de baie de brassage - - - - Load Patchbay Definition - Charger une définition de baie de brassage - - - - Save Patchbay Definition - Enregistrer la définition de baie de brassage - - - - active - actif - - - - The patchbay definition has been changed: - -"%1" - -Do you want to save the changes? - La définition de baie de brassage a été changée : - -"%1" - -Voulez-vous enregistrer les changements? - - - - %1 [modified] - %1 [modifié] - - - - Untitled%1 - SansTitre%1 - - - - Could not load patchbay definition file: - -"%1" - Impossible de charger le fichier de définition de baie de brassage : - -"%1" - - - - Could not save patchbay definition file: - -"%1" - Impossible d'enregistrer le fichier de définition de baie de brassage : - -"%1" - - - - Create patchbay definition as a snapshot -of all actual client connections? - Prendre un cliché de toutes les connexions clientes actuelles -pour créer une définition de baie de brassage? - - - - qjackctlPatchbayView - - - Add... - Ajouter... - - - - Edit... - Editer... - - - - Copy... - Copier... - - - - Remove - Enlever - - - - Exclusive - Exclusif - - - - (None) - (Aucun) - - - - Forward - Renvoi - - - - Move Up - Vers le haut - - - - Move Down - Vers le bas - - - - &Connect - &Connecter - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Déconnecter - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - &Tout déconnecter - - - - Alt+A - Disconect All - Alt+T - - - - &Refresh - &Rafraîchir - - - - Alt+R - Refresh - Alt+R - - - - qjackctlSetupForm - - - Setup - JACK Audio Connection Kit - Réglages - JACK Audio Connection Kit - - - - Settings - Paramètres - - - - Preset &Name: - &Nom du préréglage: - - - - (default) - (par défaut) - - - - Settings preset name - Nom du préréglage des paramètres - - - - &Save - &Enregistrer - - - - Alt+S - Alt+E - - - - Save settings as current preset name - Enregistrer les paramètres sous le nom du préréglage actuel - - - - &Delete - E&ffacer - - - - Alt+D - Alt+F - - - - Delete current settings preset - Effacer le préréglage des paramètres actuel - - - - Server - Serveur - - - - Server &Path: - &Chemin du serveur: - - - - jackstart - jackstart - - - - jackd - jackd - - - - jackd-realtime - jackd-realtime - - - - The JACK Audio Connection Kit sound server path - Chemin du serveur de son JACK Audio Connection Kit - - - - Driv&er: - Pilot&e: - - - - dummy - factice - - - - oss - oss - - - - alsa - alsa - - - - portaudio - portaudio - - - - coreaudio - coreaudio - - - - freebob - freebob - - - - The software driver to use - Pilote logiciel à utiliser - - - - Parameters - Paramètres - - - - Number of periods in the hardware buffer - Nombre de périodes dans le tampon matériel - - - - Priorit&y: - Pri&orité: - - - - &Frames/Period: - &Échantillons/Période: - - - - 16 - 16 - - - - 32 - 32 - - - - 64 - 64 - - - - 128 - 128 - - - - 256 - 256 - - - - 512 - 512 - - - - 1024 - 1024 - - - - 2048 - 2048 - - - - 4096 - 4096 - - - - Frames per period between process() calls - Échantillons par période entre appels de process() - - - - Port Ma&ximum: - Nombre de port ma&ximal: - - - - &Channel: - &Canal: - - - - 21333 - 21333 - - - - Number o microseconds to wait between engine processes (dummy) - Nombre de microsecondes à attendre entre les traitements du moteur (factice) - - - - 22050 - 22050 - - - - 32000 - 32000 - - - - 44100 - 44100 - - - - 48000 - 48000 - - - - 88200 - 88200 - - - - 96000 - 96000 - - - - 192000 - 192000 - - - - Sample rate in frames per second - Fréquence d'échantillonage en échantillons par seconde - - - - Scheduler priority when running realtime - Priorité de l'ordonnanceur quand fonctionne en temps réel - - - - &Word Length: - &Résolution (bit): - - - - Periods/&Buffer: - Périodes/&Tampon: - - - - Word length - Résolution - - - - Maximum number of ports the JACK server can manage - Nombre maximal de ports que peut gérer le serveur JACK - - - - &Wait (usec): - &Attente (en µs): - - - - Sample &Rate: - &Fréquence d'échantillonnage (Hz): - - - - PCM channel - Canal PCM - - - - &Timeout (msec): - &Décompte (en ms): - - - - 200 - 200 - - - - 500 - 500 - - - - 1000 - 1000 - - - - 2000 - 2000 - - - - 5000 - 5000 - - - - 10000 - 10000 - - - - Set client timeout limit in miliseconds - Régler le limite du décompte client en millisecondes - - - - &Realtime - Temps &réel - - - - Alt+R - Alt+R - - - - Use realtime scheduling - Utiliser ordonnancement temps réel - - - - No Memory Loc&k - P&as de verrouillage mémoire - - - - Alt+K - Alt+A - - - - Do not attempt to lock memory, even if in realtime mode - Ne pas essayer de verrouiller la mémoire même en mode temps-réel - - - - &Unlock Memory - &Déverrouiller la mémoire - - - - Alt+U - Alt+D - - - - Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) - Déverrouiller la mémoire des librairies d'interface communes (GTK+, QT, FLTK, Wine) - - - - So&ft Mode - Mode &logiciel - - - - Alt+F - Alt+L - - - - Ignore xruns reported by the backend driver - Ignorer les désynchronisations (XRUN) rapportées par le pilote principal - - - - &Monitor - &Écoute de contrôle - - - - Alt+M - Alt+E - - - - Provide output monitor ports - Fournir des ports de sortie d'écoute de contrôle - - - - Force &16bit - Forcer &16bit - - - - Alt+1 - Alt+1 - - - - Force 16bit mode instead of failing over 32bit (default) - Forcer mode 16bit au lieu d'échouer sur 32bit (par défaut) - - - - H/W M&onitor - Éc&oute de contrôle matérielle - - - - Alt+O - Alt+O - - - - Enable hardware monitoring of capture ports - Activer l'écoute de contrôle matérielle des ports de capture - - - - H/&W Meter - Mes&ure matérielle - - - - Alt+W - Alt+U - - - - Enable hardware metering on cards that support it - Activer la mesure matérielle sur les cartes qui le supporte - - - - &Ignore H/W - &Ignorer matériel - - - - Alt+I - Alt+I - - - - Ignore hardware period/buffer size - Ignore la taille des période/tampon matériels - - - - &Output Device: - Périphérique de s&ortie: - - - - &Output Channels: - Canaux de s&ortie: - - - - &Interface: - &Interface: - - - - Maximum input audio hardware channels to allocate - Nombre maximal de canaux d'entrée audio matériels à allouer - - - - &Audio: - &Audio: - - - - &Input Latency: - Laten&ce d'entrée: - - - - Dit&her: - Bruit de dispertion (dit&her): - - - - External output latency (frames) - Latence de sortie externe (en échantillons) - - - - &Input Device: - Pér&iphérique d'entrée: - - - - Duplex - Duplex - - - - Capture Only - Capture seulement - - - - Playback Only - Reproduction seulement - - - - Provide either audio capture, playback or both - Fournir la capture audio, la reproduction audio ou les deux - - - - default - par défaut - - - - hw:0 - hw:0 - - - - hw:1 - hw:1 - - - - The PCM device name to use - Nom du périphérique PCM à utiliser - - - - > - > - - - - Select output device for playback - Sélectionner le périphérique de sortie pour la reproduction - - - - /dev/dsp - /dev/dsp - - - - Alternate input device for capture - Périphérique d'entrée alternatif pour la capture - - - - &Output Latency: - Laten&ce de sortie: - - - - Maximum output audio hardware channels to allocate - Nombre maximal de canaux de sortie audio matériels à allouer - - - - Alternate output device for playback - Périphérique de sortie alternatif pour la reproduction - - - - &Input Channels: - Canaux d'E&ntrée: - - - - Select input device for capture - Sélectionner le périphérique d'entrée pour la capture - - - - Select PCM device name - Sélectionner le nom du périphérique PCM - - - - External input latency (frames) - Latence d'entrée externe (en échantillons) - - - - None - Aucun - - - - Rectangular - Rectangulaire - - - - Shaped - Sinusoïdal - - - - Triangular - Triangulaire - - - - Set dither mode - Régler le mode du bruit de dispersion (dither) - - - - &Verbose messages output - Sortie de messages ba&varde - - - - Alt+V - Alt+V - - - - Whether to give verbose output on messages - Donner une sortie bavarde sur les messages - - - - Start De&lay (secs): - &Retard du démarrage (en s): - - - - Time in seconds that client is delayed after server startup - Temps en secondes dont le client est retardé après le démarrage du serveur - - - - Latency: - Latence: - - - - 0 - 0 - - - - Output latency in milliseconds, calculated based on the period, rate and buffer settings - Latence de sortie en millisecondes calculée à partir des réglages de la période, de la fréquence d'échantillonnage et du tampon - - - - Options - Options - - - - Scripting - Scripts - - - - Execute script on Start&up: - Exéc&uter un script au démarrage: - - - - Whether to execute a custom shell script before starting up the JACK audio server. - Exécuter un script de commande personnalisé avant de démarrer le serveur audio JACK. - - - - Execute script after &Startup: - Exécuter un &script après le démarrage: - - - - Whether to execute a custom shell script after starting up the JACK audio server. - Exécuter un script de commande personnalisé après avoir démarré le serveur audio JACK. - - - - Execute script on Shut&down: - Exécuter un script à l'extinctio&n: - - - - Whether to execute a custom shell script before shuting down the JACK audio server. - Exécuter un script de commande personnalisé avant d'éteindre le serveur audio JACK. - - - - Command line to be executed before starting up the JACK audio server - Ligne de commande à exécuter avant de démarrer le serveur audio JACK - - - - Scripting argument meta-symbols - Méta-symboles des arguments de script - - - - ... - ... - - - - Browse for script to be executed before starting up the JACK audio server - Pointer sur le script à éxécuter avant de démarrer le serveur audio JACK - - - - Command line to be executed after starting up the JACK audio server - Ligne de commande à exécuter après avoir démarré le serveur audio JACK - - - - Browse for script to be executed after starting up the JACK audio server - Pointer sur le script à éxécuter après avoir démarré le serveur audio JACK - - - - Browse for script to be executed before shutting down the JACK audio server - Pointer sur le script à éxécuter avant d'éteindre le serveur audio JACK - - - - Command line to be executed before shutting down the JACK audio server - Ligne de commande à exécuter avant d'éteindre le serveur audio JACK - - - - Execute script after Shu&tdown: - Exécuter un script après l'ex&tinction: - - - - Alt+T - Alt+T - - - - Whether to execute a custom shell script after shuting down the JACK audio server. - Exécuter un script de commande personnalisé après avoir éteint le serveur audio JACK. - - - - Browse for script to be executed after shutting down the JACK audio server - Pointer sur le script à éxécuter après avoir éteint le serveur audio JACK - - - - Command line to be executed after shutting down the JACK audio server - Ligne de commande à exécuter après avoir éteint le serveur audio JACK - - - - Statistics - Statistiques - - - - &Capture standard output - &Capturer la sortie standard - - - - Alt+C - Alt+C - - - - Whether to capture standard output (stdout/stderr) into messages window - Capturer la sortie standard (stdout/stderr) dans la fenêtre de messages - - - - &XRUN detection regex: - Regex de détection des désynchronisations (&XRUN): - - - - xrun of at least ([0-9|\.]+) msecs - désynchronisation (XRUN) d'au moins ([0-9|\.]+) ms - - - - Regular expression used to detect XRUNs on server output messages - Expression régulière utilisée pour détecter les désynchronisations (XRUN) dans les messages de sortie du serveur - - - - &Ignore first XRUN occurrence on statistics - &Ignorer la première occurence de désynchronisation (XRUN) dans les statistiques - - - - Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) - Ignorer la première désynchronisation (XRUN) au démarrage du serveur (susceptible de se produire sur les serveurs pre-0.80.0) - - - - Connections - Connexions - - - - 5 - 5 - - - - 10 - 10 - - - - 20 - 20 - - - - 30 - 30 - - - - 60 - 60 - - - - 120 - 120 - - - - Time in seconds between each auto-refresh cycle - Temps en secondes entre chaque cycle de rafraîchissement automatique - - - - Patchbay definition file to be activated as connection persistence profile - Fichier de définition de baie de brassage à activer comme profil de persistance de connexion - - - - Browse for a patchbay definition file to be activated - Pointer sur un fichier de définition de baie de brassage à activer - - - - &Auto refresh connections Patchbay, every (secs): - Rafraîchir &automatiquement les connexions de la baie de brassage toute les (en s): - - - - Alt+A - Alt+A - - - - Whether to refresh the connections patchbay automatically - Rafraîchir automatiquement les connexions de la baie de brassage - - - - Activate &Patchbay persistence: - Activer la &persistance de baie de brassage: - - - - Alt+P - Alt+L - - - - Whether to activate a patchbay definition for connection persistence profile. - Activer une définition de baie de brassage pour le profil de persistance de connexion. - - - - Display - Affichage - - - - Time Display - Horloge - - - - Time F&ormat: - F&ormat du temps: - - - - hh:mm:ss - hh:mm:ss - - - - hh:mm:ss.d - hh:mm:ss.d - - - - hh:mm:ss.dd - hh:mm:ss.dd - - - - hh:mm:ss.ddd - hh:mm:ss.ddd - - - - The general time format on display - Format général du temps affiché - - - - Transport &Time Code - Code &temporel (Timecode) du déplacement - - - - Transport &BBT (bar:beat.ticks) - &BBT (bar:beat.ticks) du déplacement - - - - Alt+B - Alt+D - - - - Elapsed time since last &Reset - Temps écoulé depuis la dernière &réinitialisation - - - - Elapsed time since last &XRUN - Temps écoulé depuis la dernière désynchronisation (&XRUN) - - - - Alt+X - Alt+X - - - - Sample front panel normal display font - Aperçu de l'affichage normal - - - - Sample big time display font - Aperçu de la grande horloge - - - - Big Time display: - Grande horloge: - - - - &Font... - &Police... - - - - Select font for front panel normal display - Sélectionner la police pour l'affichage normal - - - - Select font for big time display - Sélectionner la police pour la grande horloge - - - - Normal display: - Affichage normal: - - - - &Display shiny glass light effect - &Afficher un effet de vitre éclairée brillante - - - - Whether to enable a shiny glass light effect on the main display - Activer un effet de vitre éclairée brillante sur l'affichage principal - - - - Messages Window - Fenêtre de messages - - - - Sample messages text font display - Aperçu de la police du texte des messages - - - - Select font for the messages text display - Sélectionner la police pour le texte des messages - - - - &Messages limit: - Limite des &messages: - - - - Whether to keep a maximum number of lines in the messages window - Garder un nombre maximal de lignes dans la fenêtre de messages - - - - 100 - 100 - - - - 250 - 250 - - - - 2500 - 2500 - - - - The maximum number of message lines to keep in view - Nombre maximal de ligne de messages à garder dans la vue - - - - Connections Window - Fenêtre de connexions - - - - Sample connections view font - Aperçu de la police de la vue des connexions - - - - Select font for the connections view - Sélectionner la police pour la vue des connexions - - - - &Icon size: - Taille des &icônes: - - - - 16 x 16 - 16 x 16 - - - - 32 x 32 - 32 x 32 - - - - 64 x 64 - 64 x 64 - - - - The icon size for each item of the connections view - Taille de l'icône pour chaque élément de la vue des connexions - - - - Ena&ble client/port aliases editing (rename) - Activer l'é&dition (renommage) des aliases de client/port - - - - Whether to enable in-place client/port name editing (rename) - Activer l'édition (renommage) en place des aliases de client/port - - - - E&nable client/port aliases - Activer les aliases de client/p&ort - - - - Alt+N - Alt+O - - - - Whether to enable client/port name aliases on the connections window - Activer les aliases de client/port dans la fenêtre de connexions - - - - Draw connection and patchbay lines as Be&zier curves - Dessiner les lignes de connexion et de baie de brassage en courbes de Be&zier - - - - Alt+Z - Alt+Z - - - - Whether to draw connection lines as cubic Bezier curves - Dessiner les lignes de connexion et de baie de brassage en courbes de Bezier cubiques - - - - Misc - Divers - - - - Other - Autres - - - - &Start JACK audio server on application startup - &Démarrer le serveur audio JACK au démarrage de l'application - - - - Whether to start JACK audio server immediately on application startup - Démarrer le serveur audio JACK immédiatement au démarrage de l'application - - - - &Confirm application close - &Confirmer la fermeture de l'application - - - - Whether to ask for confirmation on application exit - Demander une confimation lors de la sortie de l'application - - - - &Keep child windows always on top - &Garder les fenêtres filles au premier plan - - - - Whether to keep all child windows on top of the main window - Garder les fenêtres filles au dessus de la fenêtre principale - - - - &Enable system tray icon - Activ&er l'icône de notification système - - - - Alt+E - Alt+E - - - - Whether to enable the system tray icon - Activer l'icône de notification système - - - - &Delay window positioning at startup - &Retarder le positionnement de la fenêtre au démarrage - - - - Whether to delay window positioning at application startup - Retarder le positionnement de la fenêtre au démarrage de l'application - - - - S&ave JACK audio server configuration to: - &Enregistrer la configuration du serveur audio JACK dans: - - - - Whether to save the JACK server command-line configuration into a local file (auto-start) - Enregistrer la configuration en ligne de commande du serveur JACK dans un fichier local (démarrage automatique) - - - - .jackdrc - .jackdrc - - - - The server configuration local file name (auto-start) - Nom du fichier local de configuration du serveur (démarrage automatique) - - - - C&onfigure as temporary server - C&onfigurer comme serveur temporaire - - - - Whether to exit once all clients have closed (auto-start) - Sortir dès que tous les clients ont fermé (démarrage automatique) - - - - Confirm server sh&utdown - Confirmer l'e&xtinction du serveur - - - - Whether to ask for confirmation on JACK audio server shutdown - Demander un confirmation à l'extinction du serveur audio JACK - - - - Buttons - Boutons - - - - Hide main window &Left buttons - Cacher les boutons de &gauche de la fenêtre principale - - - - Alt+L - Alt+G - - - - Whether to hide the left button group on the main window - Cacher le groupe de bouton de gauche sur la fenêtre principale - - - - Hide main window &Right buttons - Cacher les boutons de &droite de la fenêtre principale - - - - Whether to hide the right button group on the main window - Cacher le groupe de bouton de droite sur la fenêtre principale - - - - Hide main window &Transport buttons - Cacher les boutons de &déplacement de la fenêtre principale - - - - Whether to hide the transport button group on the main window - Cacher le groupe de bouton de déplacement sur la fenêtre principale - - - - Hide main window &button text labels - Cacher le texte des &boutons de la fenêtre principale - - - - Whether to hide the text labels on the main window buttons - Cacher le texte des boutons sur la fenêtre principale - - - - OK - OK - - - - Cancel - Annuler - - - - Warning - Attention - - - - Some settings have been changed: - Des paramètres ont été changés: - - - - Do you want to save the changes? - Voulez-vous enregistrer les changements? - - - - Save - Enregistrer - - - - Discard - Ignorer - - - - Delete preset: - Effacer préréglage: - - - - Are you sure? - Êtes vous certain? - - - - msec - ms - - - - n/a - n/a - - - - &Preset Name - &Nom du préréglage - - - - &Server Path - &Chemin du serveur - - - - &Driver - Pilot&e - - - - &Interface - &Interface - - - - Sample &Rate - &Fréquence d'échantillonnage - - - - &Frames/Period - &Échantillons/Période - - - - Periods/&Buffer - Périodes/&Tampon - - - - Startup Script - Script de démarrage - - - - Post-Startup Script - Script post-démarrage - - - - Shutdown Script - Script d'extinction - - - - Post-Shutdown Script - Script post-extinction - - - - Patchbay Definition files - Fichiers de définition de baie de brassage - - - - Active Patchbay Definition - Définition de baie de brassage à activer - - - - Some settings have been changed. - Des paramètres ont été modifiés. - - - - Do you want to apply the changes? - Voulez-vous appliquer les changements? - - - - Apply - Appliquer - - - - The audio backend driver interface to use - Le pilote d'interface audio à utiliser - - - - &Verbose messages - Messages ba&vards - - - - MIDI Driv&er: - Pilot&e MIDI : - - - - none - aucun - - - - raw - brut - - - - seq - seq - - - - The ALSA MIDI backend driver to use - Le pilote ALSA MIDI à utiliser - - - - jackdmp - jackdmp - - - - firewire - firewire - - - - plughw:0 - plughw:0 - - - - Some settings have been changed: - -"%1" - -Do you want to save the changes? - Des paramètres ont été modifiés : - -"%1" - -Voulez-vous enregistrer les changements? - - - - Delete preset: - -"%1" - -Are you sure? - Effecer préréglage : - -"%1" - -Êtes vous certain? - - - - Some settings have been changed. - -Do you want to apply the changes? - Des paramètres ont été modifiés. - -Voulez-vous appliquer les changements? - - - - Messages Log - - - - - Log files - - - - - sun - - - - - /dev/audio - - - - - &Channels: - - - - - Maximum number of audio channels to allocate - - - - - Logging - - - - - Messages log file - - - - - Browse for the messages log file location - - - - - Whether to activate a messages logging to file. - - - - - &Messages log file: - - - - - Whether to enable blinking (flashing) of the server mode (RT) indicator - - - - - Blin&k server mode indicator - - - - - &JACK client/port aliases: - - - - - JACK client/port aliases display mode - - - - - Default - - - - - First - - - - - Second - - - - - Whether to start minimized to system tray - - - - - Start minimi&zed to system tray - - - - - Whether to enable ALSA Sequencer (MIDI) support on startup - - - - - E&nable ALSA Sequencer support - - - - - Defaults - - - - - &Base font size: - - - - - Base application font size (pt.) - - - - - 6 - 6 - - - - 7 - 7 - - - - 8 - 8 - - - - 9 - 9 - - - - 11 - 11 - - - - 12 - 12 - - - - qjackctlSocketForm - - - Socket - JACK Audio Connection Kit - Prise - JACK Audio Connection Kit - - - - OK - OK - - - - Cancel - Annuler - - - - &Socket - &Prise - - - - &Name (alias): - &Nom (alias): - - - - Socket name (an alias for client name) - Nom de la prise (un alias pour le nom du client) - - - - Client name (regular expression) - Nom du client (expression régulière) - - - - Add P&lug - Ajouter une &fiche - - - - Alt+L - Alt+F - - - - Add plug to socket plug list - Ajouter la fiche à la liste des prises - - - - &Plug: - &Fiche: - - - - Port name (regular expression) - Nom du port (expression régulière) - - - - Socket Plugs / Ports - Prises / Ports - - - - Socket plug list - Liste des prises - - - - &Edit - &Éditer - - - - Alt+E - Alt+E - - - - Edit currently selected plug/port - Éditer la fiche/le port actuellement sélectionné - - - - &Remove - Enleve&r - - - - Alt+R - Alt+R - - - - Remove currently selected plug from socket plug list - Enlever la fiche actuellement sélectionnée de la liste des prises - - - - &Client: - &Client: - - - - &Down - Vers le &bas - - - - Alt+D - Alt+B - - - - Move down currently selected plug socket plugst - Déplacer vers le bas la fiche actuellement sélectionnée dans la liste des prises - - - - &Up - Vers le &haut - - - - Alt+U - Alt+H - - - - Move up current selected plug socket plugst - Déplacer vers le haut la fiche actuellement sélectionnée dans la liste des prises - - - - E&xclusive - E&xclusif - - - - Alt+X - Alt+X - - - - Enforce only one exclusive cable connection - S'assurer de l'utilisation d'une seule connexion cablée exclusive - - - - &Forward: - Renvo&i: - - - - Forward (clone) all connections from this socket - Renvoyer (cloner) toutes les connexions depuis cette prise - - - - Type - Type - - - - &Audio - &Audio - - - - Alt+A - Alt+A - - - - Audio socket type (JACK) - Type de prise audio (JACK) - - - - &MIDI - &MIDI - - - - Alt+M - Alt+M - - - - MIDI socket type (ALSA) - Type de prise MIDI (ALSA) - - - - Plugs / Ports - Fiches / Ports - - - - Add Plug - Ajouter une Fiche - - - - Remove - Enlever - - - - Edit - Éditer - - - - Move Up - Vers le haut - - - - Move Down - Vers le bas - - - - (None) - (Aucun) - - - - Edit currently selected plug - Éditer la fiche actuellement sélectionnée - - - - Move down currently selected plug in socket plug list - Déplacer vers le bas la fiche actuellement sélectionnée dans la liste des prises - - - - Move up current selected plug in socket plug list - Déplacer vers le haut la fiche actuellement sélectionnée dans la liste des prises - - - - Warning - Attention - - - - Some settings have been changed. - -Do you want to apply the changes? - Des paramètres ont été modifiés.Voulez-vous appliquer les changements? - - - - Apply - Appliquer - - - - Discard - Ignorer - - - - MIDI socket type (JACK) - - - - - AL&SA - - - - - Alt+S - - - - - qjackctlSocketList - - - Output - Sortie - - - - Input - Entrée - - - - Socket - Prise - - - - New - Nouvelle - - - - Warning - Attention - - - - about to be removed - sur le point d'être enlevée - - - - Are you sure? - Êtes-vous certain? - - - - Yes - Oui - - - - No - Non - - - - Copy - Copie - - - - <New> - %1 - <Nouvelle> - %1 - - - - %1 about to be removed: - -"%2" - -Are you sure? - %1 sur le point d'être enlevée : - -"%2" -Êtes-vous certain? - - - - %1 <Copy> - %2 - %1 <Copie> - %2 - - - - qjackctlSocketListView - - - Output Sockets - Prises de Sortie - - - - Plugs - Fiches - - - - Input Sockets - Prises d'Entrée - - - - Output Sockets / Plugs - Prises de Sortie / Fiches - - - - Input Sockets / Plugs - Prises d'Entrée / Fiches - - - - qjackctlStatusForm - - - Status - JACK Audio Connection Kit - Statut - JACK Audio Connection Kit - - - - Description - Description - - - - Value - Valeur - - - - Statistics since last server startup - Statistiques depuis le dernier démarrage du serveur - - - - Re&set - Réinitiali&ser - - - - Alt+S - Alt+S - - - - Reset XRUN statistic values - Réinitialiser les valeurs statistiques des désynchronisations (XRUN) - - - - &Refresh - &Rafraîchir - - - - Alt+R - Alt+R - - - - Refresh XRUN statistic values - Rafraîchir les valeurs statistiques des désynchronisations (XRUN) - - - - Time of last reset - Temps depuis la dernière réinitialisation - - - - Maximum scheduling delay - Délai d'ordonnancement maximal - - - - XRUN count since last server startup - Décompte des désynchronisations (XRUN) depuis le dernier démarrage du serveur - - - - XRUN total - Nombre total de désynchronisation (XRUN) - - - - XRUN average - Moyenne de désynchronisation (XRUN) - - - - XRUN minimum - Nombre minimal de désynchronisation (XRUN) - - - - XRUN maximum - Nombre maximal de désynchronisation (XRUN) - - - - XRUN last - Dernière désynchronisation (XRUN) - - - - XRUN last time detected - Horaire de la dernière désynchronisation (XRUN) détectée - - - - Transport state - État du déplacement - - - - Transport BPM - BPM du déplacement - - - - Transport BBT - BBT du déplacement - - - - Transport Timecode - Code temporel (Timecode) du déplacement - - - - Realtime Mode - Mode temps réel - - - - Buffer Size - Taille du tampon - - - - Sample Rate - Fréquence d'échantillonnage - - - - CPU Load - Charge processeur - - - - Server state - État du serveur - - - - DSP Load - Charge DSP - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_ru.ts qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_ru.ts --- qjackctl-0.3.4/=unpacked-tar1=/translations/qjackctl_ru.ts 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/translations/qjackctl_ru.ts 1970-01-01 01:00:00.000000000 +0100 @@ -1,4272 +0,0 @@ - - - - QObject - - - Usage - Использование - - - - options - параметры - - - - Options - Параметры - - - - Show help about command line options - Показать справку по использованию параметров командной строки - - - - Start JACK audio server immediately - Немедленно запустить JACK-сервер - - - - Show version information - Показать информацию о версии - - - - Option -p requires an argument (preset). - Ключ -p требует аргумента (пресет). - - - - (default) - (по умолчанию) - - - - Usage: %1 [options] [command-and-args] - - - - - Options: - Параметры: - - - - Set default settings preset name - - - - - Qt: %1 - - Qt: %1 - - - - - qjackctlAboutForm - - - About qjackctl - О qjackctl - - - - About Qt - О Qt - - - - &Close - &Закрыть - - - - Alt+C - Alt+C - - - - Version - Версия - - - - Build - Сборка - - - - Transport status control disabled. - Статус управления транспортом отключён. - - - - Realtime status disabled. - Статус режима реального времени отключён. - - - - Website - Домашняя страница - - - - This program is free software; you can redistribute it and/or modify it - Это программа является свободной; вы можете распространять -и/или изменять её без ограничений - - - - under the terms of the GNU General Public License version 2 or later. - на условиях лицензии GNU General Public License версии 2 или более новой. - - - - Debugging option enabled. - Параметр отладки включен. - - - - System tray disabled. - Область уведомления отключена. - - - - XRUN delay status disabled. - Статус задержки XRUN отключен. - - - - Maximum delay status disabled. - Статус максимальной задержки отключен. - - - - JACK MIDI support disabled. - Поддержка JACK MIDI отключена. - - - - ALSA/MIDI sequencer support disabled. - Поддержка секвенсера ALSA/MIDI отключена. - - - - About QjackCtl - о QJackCtl - - - - qjackctlClientListView - - - Readable Clients - Читабельные клиенты - - - - Output Ports - Порты выхода - - - - Writable Clients - Писабельные порты - - - - Input Ports - Порты входа - - - - Readable Clients / Output Ports - - - - - Writable Clients / Input Ports - - - - - &Connect - - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Рассоединить - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Disconect All - Alt+A - - - - Re&name - - - - - Alt+N - Rename - Alt+N - - - - &Refresh - &Обновить - - - - Alt+R - Refresh - Alt+R - - - - qjackctlConnect - - - Warning - Предупреждение - - - - This will suspend sound processing - Это приостановит обработку звука - - - - from all client applications. - от всех клиентских приложений. - - - - Are you sure? - Вы уверены? - - - - Yes - Да - - - - No - Нет - - - - This will suspend sound processing -from all client applications. - -Are you sure? - - - - - qjackctlConnectView - - - &Connect - &Соединить - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Рассоединить - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Disconect All - Alt+A - - - - &Refresh - &Обновить - - - - Alt+R - Refresh - Alt+R - - - - qjackctlConnectionsForm - - - Connections - JACK Audio Connection Kit - Соединения - JACK Audio Connection Kit - - - - &Connect - &Соединить - - - - Alt+C - Alt+C - - - - Connect currently selected ports - Соединить выбранные сейчас порты - - - - &Disconnect - &Рассоединить - - - - Alt+D - Alt+D - - - - Disconnect currently selected ports - Рассоединить выбранные сейчас порты - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Alt+A - - - - Disconnect all currently connected ports - Рассоединить все соединённые сейчас порты - - - - &Refresh - &Обновить - - - - Alt+R - Alt+R - - - - Refresh current connections view - Обновить отображение текущих соединений - - - - Audio - Звук - - - - MIDI - MIDI - - - - Warning - Предупреждение - - - - The preset aliases have been changed: - -"%1" - -Do you want to save the changes? - - - - - Save - Сохранить - - - - Discard - Отказаться - - - - Cancel - Отменить - - - - ALSA - ALSA - - - - qjackctlConnectorView - - - &Connect - - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Рассоединить - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Disconect All - Alt+A - - - - &Refresh - &Обновить - - - - Alt+R - Refresh - Alt+R - - - - qjackctlMainForm - - - JACK Audio Connection Kit - Qt GUI Interface - JACK Audio Connection Kit - Графический интерфейс на Qt - - - - &Start - Загру&зить - - - - Start the JACK server - Запустить JACK-сервер - - - - S&top - Ос&тановить - - - - Stop the JACK server - Остановить JACK-сервер - - - - &Quit - В&ыйти - - - - Quit processing and exit - Остановить сервер и выйти из программы - - - - Stop - Остановка - - - - Kill - Уничтожить - - - - Cancel - Отменить - - - - JACK is starting... - JACK запускается ... - - - - Could not start JACK. Sorry. - Не удалось запустить JACK. Извините. - - - - PID - PID - - - - JACK is stopping... - JACK останавливается ... - - - - msec - мс - - - - Hz - Гц - - - - Error - Ошибка - - - - Could not create port notification pipe. - Не удалось создать канал уведомления порта. - - - - Could not create XRUN notification pipe. - Не удалось создать канал уведомления xrun. - - - - Could not create shutdown notification pipe. - Не удалось создать канал уведомления о закрытии. - - - - JACK server state - Состояние JACK-сервера - - - - Sample rate - Частота семплирования - - - - XRUN Count - Количество рассинхронизаций - - - - Time display - Время - - - - Transport state - Состояние транспорта - - - - Transport BPM - BPM транспорта - - - - Transport time - Время транспорта - - - - Alt+Q - Alt+Q - - - - Alt+S - Alt+S - - - - Alt+T - Alt+T - - - - &Play - &Воспроизвести - - - - Alt+P - Alt+P - - - - Start transport rolling - Начать воспроизведение с транспорта - - - - Pa&use - Пау&за - - - - Alt+U - Alt+U - - - - Stop transport rolling - Остановить воспроизведение с транспорта - - - - St&atus - С&татус - - - - Show/hide the extended status window - Показать/спрятать расширенное окно статуса - - - - Ab&out... - О про&грамме... - - - - Alt+O - Alt+O - - - - Show information about this application - Показать информацию о приложении - - - - S&etup... - &Настроить... - - - - Alt+E - Alt+E - - - - Show settings and options dialog - Показать диалог настроек и параметров - - - - &Messages - &Сообщения - - - - Show/hide the messages log window - Показать/спрятать окно с журналом сообщений - - - - Patch&bay - Patch&bay - - - - Alt+B - Alt+B - - - - Show/hide the patchbay editor window - Показать/спрятать окно редактора patchbay - - - - &Connections - Сое&динения - - - - Alt+C - Alt+C - - - - Show/hide the actual connections patchbay window - Показать/спрятать окно patchbay с актуальными соединениями - - - - JACK is currently running. - JACK-сервер сейчас запущен. - - - - OK - ОК - - - - successfully - успешно - - - - with exit status - со статусом выхода - - - - Could not start JACK. - Не удалось запустить JACK. - - - - Maybe JACK audio server is already started. - Возможно, JACK-сервер уже запущен. - - - - Activating - Активируется - - - - Starting - Запускается - - - - Startup script... - Сценарий, выполняемый при запуске... - - - - Startup script terminated - Выполнение стартового сценария прекращено - - - - with - с - - - - JACK was started - JACK был запущен - - - - Started - Запущен - - - - Stopping - Остановка... - - - - JACK was stopped - JACK-сервер остановлен - - - - Shutdown script... - Послеостановочный сценарий... - - - - Shutdown script terminated - Выполнение послеостановочного сценария прекращено - - - - Inactive - Не активен - - - - Active - Активен - - - - Stopped - Остановлен - - - - Transport BBT (bar:beat.ticks) - BBT транспорта (bar:beat.ticks) - - - - Could not load active patchbay definition. Disabled. - Не удалось загрузить активное описание patchbay. Отключено. - - - - Statistics reset. - Перезапуск статистики - - - - XRUN callback. - Обратный вызов рассинхронизации - - - - Buffer size change. - Изменение размера буфера - - - - Shutdown notification. - Уведомление об остановке - - - - checked - проверено - - - - connected - соединено - - - - failed - не удалось - - - - Could not create buffer size notification pipe. - Не удалось создать канал уведомления размера буфера - - - - Could not connect to JACK server as client. - Не удалось соединиться с JACK-сервером в качестве клиента - - - - Client activated. - Клиент активирован - - - - Post-startup script... - Послестартовый сценарий... - - - - Post-startup script terminated - Выполнение послестартового сценария прекращено - - - - Client deactivated. - Клиент деактивирован - - - - Transport start. - Транспорт запущен - - - - Transport stop. - Транспорт остановлен - - - - frames - кадров - - - - Yes - Да - - - - No - Нет - - - - Rolling - Воспроизводится - - - - Looping - Зацикливается - - - - Could not load preset - Не удалось загрузить предустановку - - - - Retrying with default. - Попытка использовать стандартные настройки... - - - - Could not load default preset. Sorry. - Извините, но загрузить стандартную предустановку не удалось. - - - - Transport time code - Тайм-код транспорта - - - - Elapsed time since last reset - Времени с последней перезагрузки - - - - Elapsed time since last XRUN - Времени с последнего XRUN - - - - disconnected - рассоединено - - - - Terminate - Завершить - - - - Leave - Оставить - - - - Command line argument... - Аргумент для командной строки... - - - - Command line argument started - - - - - Information - Информация - - - - Some settings will be only effective -the next time you start this program. - - - - - JACK server mode - Режим JACK-сервера - - - - Server settings will be only effective after -restarting the JACK audio server. - - - - - RT - - - - - &Hide - - - - - S&how - - - - - &Stop - &Стоп - - - - Could not open ALSA sequencer as a client. - -ALSA MIDI patchbay will be not available. - - - - - The program will keep running in the system tray. - -To terminate the program, please choose "Quit" in the context menu of the system tray entry. - - - - - Warning - Предупреждение - - - - JACK is currently running. - -Do you want to terminate the JACK audio server? - - - - - with exit status=%1 - - - - - Could not start JACK. - -Maybe JACK audio server is already started. - - - - - Could not load preset "%1". - -Retrying with default. - - - - - Could not load default preset. - -Sorry. - - - - - Some client audio applications -are still active and connected. - -Do you want to stop the JACK audio server? - - - - - Post-shutdown script... - - - - - Post-shutdown script terminated - - - - - JACK was started with PID=%1. - - - - - JACK is being forced... - - - - - Could not load active patchbay definition. - -Disabled. - - - - - Patchbay activated. - - - - - Patchbay deactivated. - - - - - JACK connection graph change. - - - - - XRUN callback (%1). - - - - - Buffer size change (%1). - - - - - Could not start JACK. - -Sorry. - - - - - JACK has crashed. - - - - - JACK timed out. - - - - - JACK write error. - - - - - JACK read error. - - - - - Unknown JACK error (%d). - - - - - ALSA connection graph change. - - - - - JACK active patchbay scan - - - - - ALSA active patchbay scan - - - - - JACK connection change. - - - - - ALSA connection change. - - - - - A patchbay definition is currently active, -which is probable to redo this connection: - -%1 -> %2 - -Do you want to remove the patchbay connection? - - - - - Remove - Удалить - - - - Ignore - - - - - Overall operation failed. - - - - - Invalid or unsupported option. - - - - - Client name not unique. - - - - - Server is started. - - - - - Unable to connect to server. - - - - - Server communication error. - - - - - Client does not exist. - - - - - Unable to load internal client. - - - - - Unable to initialize client. - - - - - Unable to access shared memory. - - - - - Client protocol version mismatch. - - - - - Could not connect to JACK server as client. -- %1 -Please check the messages window for more info. - - - - - Server configuration saved to "%1". - - - - - Transport rewind. - - - - - Transport backward. - - - - - Transport forward. - - - - - %1 (%2%) - - - - - %1 % - - - - - %1 Hz - - - - - %1 frames - - - - - %1 msec - - - - - XRUN callback (%1 skipped). - - - - - Mi&nimize - - - - - Rest&ore - - - - - &Reset - - - - - &Presets - - - - - &Transport - - - - - &Rewind - - - - - QjackCtl - - - - - Alt+M - Alt+M - - - - &Patchbay - - - - - &Connect - - - - - DSP Load - - - - - XRUN Count (notifications) - - - - - Backward transport - - - - - &Backward - - - - - Forward transport - - - - - &Forward - - - - - Alt+F - Alt+F - - - - Rewind transport - - - - - Alt+R - Alt+R - - - - qjackctlMessagesForm - - - Messages - JACK Audio Connection Kit - Сообщения - JACK Audio Connection Kit - - - - Messages log - Журнал сообщений - - - - Logging stopped --- %1 --- - Журналирование остановлено --- %1 --- - - - - Logging started --- %1 --- - Журналирование запущено --- %1 --- - - - - Messages output log - Журнал выведенных сообщений - - - - qjackctlPatchbay - - - Warning - Предупреждение - - - - This will disconnect all sockets. - Это приведёт к рассоединению всех сокетов - - - - Are you sure? - Вы уверены? - - - - Yes - Да - - - - No - Нет - - - - This will disconnect all sockets. - -Are you sure? - Все сокеты будут рассоединены. - -Продолжить? - - - - qjackctlPatchbayForm - - - Patchbay - JACK Audio Connection Kit - Patchbay - JACK Audio Connection Kit - - - - &New - &Новая - - - - Alt+N - Alt+N - - - - Create a new patchbay profile - Создать новый профиль patchbay - - - - &Load... - &Загрузить... - - - - Alt+L - Alt+L - - - - Load patchbay profile - Загрузить профиль patchbay - - - - &Save... - &Сохранить... - - - - Alt+S - Alt+S - - - - Save current patchbay profile - Сохранить текущий профиль patchbay - - - - Current patchbay profile name - Имя текущего профиля patchbay - - - - Acti&vate - &Активировать - - - - Alt+V - Alt+V - - - - Activate current patchbay profile - Активировать текущий профиль patchbay - - - - &Connect - &Соединить&Соединить - - - - Alt+C - Alt+C - - - - Connect currently selected sockets - Соединить выбранные сейчас сокеты - - - - &Disconnect - &Рассоединить - - - - Alt+D - Alt+D - - - - Disconnect currently selected sockets - Рассоединить выбранные сейчас сокеты - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Alt+A - - - - Disconnect all currently connected sockets - Рассоединить все соединённые сейчас сокеты - - - - &Refresh - &Обновить - - - - Alt+R - Alt+R - - - - Refresh current patchbay view - Обновить текущий вид patchbay - - - - Down - Вниз - - - - Move currently selected output socket down one position - Переместить выбранный сейчас сокет вниз на одну позицию - - - - Add... - Добавить... - - - - Create a new output socket - Создать новый сокет выхода - - - - Edit... - Изменить... - - - - Edit currently selected input socket properties - Изменить свойства выбранного сейчас сокета входа - - - - Up - Вверх - - - - Move currently selected output socket up one position - Переместить выбранный сейчас сокет вверх на одну позицию - - - - Remove - Удалить - - - - Remove currently selected output socket - Удалить выбранный сейчас сокет выхода - - - - Remove currently selected input socket - Удалить выбранный сейчас сокет входа - - - - Create a new input socket - Создать новый сокет входа - - - - Edit currently selected output socket properties - Изменить свойства выбранного сейчас сокета выхода - - - - Warning - Предупреждение - - - - The patchbay definition has been changed: - Описание patchbay было изменено: - - - - Do you want to save the changes? - Вы хотите сохранить изменения? - - - - Save - Сохранить - - - - Discard - Отказаться - - - - Cancel - Отменить - - - - modified - изменено - - - - active - активно - - - - Untitled - БезИмени - - - - Load error - Ошибка при загрузке - - - - Could not load patchbay definition file: - Не удалось загрузить файл описания patchbay: - - - - Save error - Ошибка при сохранении - - - - Could not save patchbay definition file: - Не удалось сохранить файл описания patchbay: - - - - New Patchbay definition - Новое описание patchbay - - - - of all actual client connections? - всех существующих соединений клиентов - - - - Yes - Да - - - - No - Нет - - - - Patchbay Definition files - Файл описания patchbay - - - - Load Patchbay Definition - Загрузить описание patchbay - - - - Save Patchbay Definition - Сохранить описание patchbay - - - - Create patchbay definition as a snapshot - Создать определение patchbay как снапшот - - - - The patchbay definition has been changed: - -"%1" - -Do you want to save the changes? - - - - - %1 [modified] - - - - - Untitled%1 - - - - - Error - Ошибка - - - - Could not load patchbay definition file: - -"%1" - - - - - Could not save patchbay definition file: - -"%1" - - - - - Create patchbay definition as a snapshot -of all actual client connections? - - - - - Duplicate (copy) currently selected output socket - - - - - Copy... - Скопировать... - - - - Duplicate (copy) currently selected input socket - - - - - Current (recent) patchbay profile(s) - - - - - Toggle activation of current patchbay profile - - - - - qjackctlPatchbayView - - - Add... - Добавить... - - - - Edit... - Изменить... - - - - Remove - Удалить - - - - Move Up - Выше - - - - Move Down - Ниже - - - - &Connect - &Соединить - - - - Alt+C - Connect - Alt+C - - - - &Disconnect - &Рассоединить - - - - Alt+D - Disconnect - Alt+D - - - - Disconnect &All - Рассоединить &все - - - - Alt+A - Disconect All - Alt+A - - - - &Refresh - &Обновить - - - - Alt+R - Refresh - Alt+R - - - - Exclusive - - - - - Copy... - Скопировать... - - - - Forward - - - - - (None) - (Нет) - - - - qjackctlSetupForm - - - Setup - JACK Audio Connection Kit - Настройка - JACK Audio Connection Kit - - - - OK - ОК - - - - Cancel - Отменить - - - - Settings - Настройки - - - - Server - Сервер - - - - jackstart - jackstart - - - - jackd - jackd - - - - jackd-realtime - jackd-realtime - - - - The JACK Audio Connection Kit sound server path - Путь к серверу JACK Audio Connection Kit - - - - dummy - псевдо - - - - alsa - ALSA - - - - portaudio - PortAudio - - - - The software driver to use - Используемый программный драйвер - - - - Parameters - Параметры - - - - 22050 - 22050 - - - - 32000 - 32000 - - - - 44100 - 44100 - - - - 48000 - 48000 - - - - 88200 - 88200 - - - - 96000 - 96000 - - - - Sample rate in frames per second - Частота дискретизации выборок в секунду) - - - - 0 - 0 - - - - 1 - 1 - - - - 2 - 2 - - - - 3 - 3 - - - - 4 - 4 - - - - 5 - 5 - - - - 6 - 6 - - - - 7 - 7 - - - - 8 - 8 - - - - 9 - 9 - - - - 10 - 10 - - - - Scheduler priority when running realtime - Приоритет планировщика в режиме реального времени - - - - 21333 - 21333 - - - - 16 - 16 - - - - 32 - 32 - - - - Priorit&y: - П&риоритет: - - - - &Wait (usec): - О&жидание (мсек): - - - - &Frames/Period: - &Выборок в буфере: - - - - 64 - 64 - - - - 128 - 128 - - - - 256 - 256 - - - - 512 - 512 - - - - 1024 - 1024 - - - - 2048 - 2048 - - - - 4096 - 4096 - - - - Frames per period between process() calls - Выборок в период между вызовами process() - - - - Sample &Rate: - &Частота дискр.: - - - - H/&W Meter - Аппаратный &счётчик - - - - Alt+W - Alt+W - - - - None - Ничего - - - - Rectangular - Прямоугольное - - - - Shaped - По очертаниям - - - - Triangular - Треугольное - - - - Duplex - Дуплекс - - - - Capture - Захват - - - - Playback - Воспроизведение - - - - Provide either audio capture, playback or both - Разрешить захват звука, его воспроизведение или всё сразу - - - - default - по умолчанию - - - - hw:0 - hw:0 - - - - The ALSA pcm device name to use - Имя используемого устройства ALSA pcm - - - - &Timeout (msec): - &Тайм-аут (мс): - - - - Dit&her: - Сглажи&вание: - - - - 200 - 200 - - - - 500 - 500 - - - - 1000 - 1000 - - - - 2000 - 2000 - - - - 5000 - 5000 - - - - 10000 - 10000 - - - - Set client timeout limit in miliseconds - Установить тайм-аут для клиента в миллисекундах - - - - &Interface: - &Интерфейс: - - - - So&ft Mode - &Программный режим - - - - Alt+F - Alt+F - - - - Ignore xruns reported by the ALSA driver - Игнорировать рассинхронизации, сообщаемые драйвером ALSA - - - - &Monitor - &Мониторинг - - - - Alt+M - Alt+M - - - - Provide output monitor ports - Задействовать порты мониторинга выхода - - - - &Realtime - Режим &реал. времени - - - - Alt+R - Alt+R - - - - Use realtime scheduling - Использовать планирование в реал. времени - - - - Alt+A - Alt+A - - - - (default) - (по умолчанию) - - - - &Verbose messages output - По&дробный вывод сообщений - - - - Alt+V - Alt+V - - - - Whether to give verbose output on messages - Подробно ли выводить сообщения - - - - Latency: - Задержка: - - - - Output latency in milliseconds, calculated based on the period, rate and buffer settings - Задержка выхода в мс, расчитанных на основе настроек периода, частоты и буфера - - - - Options - Параметры - - - - Scripting - Сценарии - - - - Execute script on Start&up: - Выполнять сценарий при &запуске: - - - - Alt+U - Alt+U - - - - Whether to execute a custom shell script before starting up the JACK audio server. - Выполнять ли собственный сценарий перед запуском JACK-сервера. - - - - Execute script after &Startup: - Выполнять сценарий после з&апуска: - - - - Alt+S - Alt+S - - - - Whether to execute a custom shell script after starting up the JACK audio server. - Выполнять ли собственный сценарий после запуска JACK-сервера. - - - - Execute script after Shut&down: - Выполнять сценарий после &остановки: - - - - Alt+D - Alt+D - - - - Whether to execute a custom shell script after shuting down the JACK audio server. - Выполнять ли собственный сценарий после остановки JACK-сервера. - - - - Command line to be executed before starting up the JACK audio server - Команда, выполняемая перед запуском JACK-сервера - - - - ... - ... - - - - Browse for script to be executed before starting up the JACK audio server - Указать сценарий, выполняемый перед запуском JACK-сервера - - - - Command line to be executed after starting up the JACK audio server - Команда, выполняемая после запуска JACK-сервера - - - - Browse for script to be executed after starting up the JACK audio server - Указать сценарий, выполняемый после запуска JACK-сервера - - - - Browse for script to be executed after shutting down the JACK audio server - Указать сценарий, выполняемый после остановки JACK-сервера - - - - Command line to be executed after shutting down the JACK audio server - Команда, выполняемая после остановки JACK-сервера - - - - Statistics - Статистика - - - - &XRUN detection regex: - Рег.выражение для определения -&рассинхронизации: - - - - xrun of at least ([0-9|\.]+) msecs - xrun of at least ([0-9|\.]+) msecs - - - - Regular expression used to detect XRUNs on server output messages - Регулярное выражение для определения рассинхронизаций -среди сообщений от сервера - - - - Alt+I - Alt+I - - - - Whether to ignore the first XRUN on server startup (most likely to occur on pre-0.80.0 servers) - Игнорировать ли первую рассинхронизацию при запуске сервера -(весьма вероятно в случае с JACK до версии 0.80.0) - - - - Connections - Соединения - - - - 20 - 20 - - - - 30 - 30 - - - - 60 - 60 - - - - 120 - 120 - - - - Time in seconds between each auto-refresh cycle - Время в секундах между каждым циклом автообновления - - - - Patchbay definition file to be activated as connection persistence profile - Описательный файл patchbay, активируемый как профиль постоянного соединения - - - - Browse for a patchbay definition file to be activated - Указать описательный файл patchbay для его активации - - - - &Auto refresh connections Patchbay, every (secs): - &Автоматически обновлять соединения в patchbay, каждые (сек): - - - - Whether to refresh the connections patchbay automatically - Обновлять ли соединения в patchbay автоматически - - - - Activate &Patchbay persistence: - Активировать &постоянный patchbay: - - - - Alt+P - Alt+P - - - - Whether to activate a patchbay definition for connection persistence profile. - Активировать ли описание patchbay для профиля постоянного соединения. - - - - Display - Отображение - - - - Alt+T - Alt+T - - - - Transport &BBT (bar:beat.ticks) - &BBT Транспорта (bar:beat.ticks) - - - - Alt+B - Alt+B - - - - Elapsed time since last &Reset - Время, прошедшее с последнего &сброса - - - - Elapsed time since last &XRUN - Время, пошедшее с последней &рассинхронизации - - - - Alt+X - Alt+X - - - - Messages Window - Окно сообщений - - - - Sample messages text font display - Каким будет шрифт для вывода сообщений сервера - - - - &Font... - &Шрифт... - - - - Select font for the messages text display - Выберите шрифт для отображения сообщений сервера - - - - msec - мс - - - - n/a - н/д - - - - Startup script - Сценарий, выполняемый при запуске - - - - Post-startup script - Сценарий, выполняемый после запуске - - - - Shutdown script - Сценарий, выполняемый после остановки - - - - Patchbay Definition files - Файлы описания patchbay - - - - Active Patchbay definition - Активировать описание patchbay - - - - Server &Path: - & Путь к серверу: - - - - Driv&er: - &Драйвер: - - - - Preset &Name: - Имя &предустановки: - - - - Settings preset name - Имя предустановки настроек - - - - &Save - &Сохранить - - - - Save settings as current preset name - Сохранить настройки в текущую предустановку - - - - &Delete - &Удалить - - - - Delete current settings preset - Удалить текущую предустановку - - - - &Audio: - &Звук: - - - - H/W M&onitor - Аппаратный &мониторинг - - - - Alt+O - Alt+O - - - - Force &16bit - Принудительно &16бит - - - - Alt+1 - Alt+1 - - - - Force 16bit mode instead of failing over 32bit (default) - Принудительно использовать 16бит-режим вместо 32бит (по умолчанию) - - - - Periods/&Buffer: - Периодов на &буфер: - - - - &Input Channels: - Каналов на &входе: - - - - &Output Channels: - Каналов на в&ыходе: - - - - Start De&lay (secs): - Задержка за&пуска (с): - - - - Time in seconds that client is delayed after server startup - Сколько секунд клиент ждёт после запуска сервера - - - - > - > - - - - Scripting argument meta-symbols - Метасимволы аргументов в сценариях - - - - &Capture standard output - &Захватывать стандартный вывод - - - - Alt+C - Alt+C - - - - Whether to capture standard output (stdout/stderr) into messages window - Захватывать ли стандартный вывод (stdout/stderr) - - - - hh:mm:ss - чч:мм:сс - - - - Other - Другое - - - - &Confirm application close - За&прашивать подтверждение на выход - - - - Whether to ask for confirmation on application exit - Спрашивать ли подтверждение на выход из программы - - - - &Preset Name - Имя &предустановки - - - - &Server Path - &Путь к серверу - - - - &Driver - &Драйвер - - - - &Interface - &Интерфейс - - - - Sample &Rate - &Частота семпл. - - - - &Frames/Period - &Фреймов на период - - - - Periods/&Buffer - Периодов на &буфер - - - - oss - OSS - - - - Port Ma&ximum: - &Макс. кол-во портов: - - - - Maximum number of ports the JACK server can manage - Максимальное кол-во портов, обрабатываемых JACK-сервером - - - - hw:1 - hw:1 - - - - &Input Device: - Устройство &входа: - - - - &Output Device: - Устройство в&ыхода: - - - - Set dither mode (alsa, portaudio) - Установить режим сглаживания (для ALSA, PortAudio) - - - - /dev/dsp - /dev/dsp - - - - Output device for playback (oss, portaudio) - Устройство выхода для воспроизведения (OSS, PortAudio) - - - - Input device for capture (oss, portaudio) - Устройство входа для захвата (OSS, PortAudio) - - - - No Memory Loc&k - - - - - Alt+K - Alt+K - - - - Do not attempt to lock memory, even if in realtime mode - - - - - &Ignore H/W - - - - - &Word Length: - - - - - Number o microseconds to wait between engine processes (dummy) - - - - - &Channel: - &Канал: - - - - &Ignore first XRUN occurrence on statistics - - - - - Time Display - - - - - Transport &Time Code - - - - - Sample front panel normal display font - - - - - Sample big time display font - - - - - Normal display: - - - - - Big Time display: - - - - - Time F&ormat: - &Формат времени: - - - - hh:mm:ss.d - чч:мм:сс.д - - - - hh:mm:ss.dd - чч:мм:сс.дд - - - - hh:mm:ss.ddd - чч:мм:сс.ддд - - - - The general time format on display - Общий формат вывода времени на дисплей - - - - &Messages limit: - Предел кол-ва &сообщений: - - - - Whether to keep a maximum number of lines in the messages window - Ограничивать ли количество строк в окне сообщений - - - - 100 - 100 - - - - 250 - 250 - - - - 2500 - 2500 - - - - The maximum number of message lines to keep in view - Максимальное количество строк сообщений, доступное при просмотре - - - - &Start JACK audio server on application startup - &Запускать звуковой JACK-сервер при старте программы - - - - Whether to start JACK audio server immediately on application startup - Запускать ли JACK-сервер при старте QJackCtl - - - - &Keep child windows always on top - - - - - Whether to keep all child windows on top of the main window - - - - - &Enable system tray icon - &Включить область уведомления - - - - Alt+E - Alt+E - - - - Whether to enable the system tray icon - Включать ли область уведомления -(системный лоток, system tray) - - - - S&ave JACK audio server configuration to: - - - - - Whether to save the JACK server command-line configuration into a local file (auto-start) - - - - - .jackdrc - .jackdrc - - - - The server configuration local file name (auto-start) - - - - - C&onfigure as temporary server - - - - - Whether to exit once all clients have closed (auto-start) - - - - - Warning - Предупреждение - - - - Some settings have been changed: - Некоторые настройки изменились: - - - - Do you want to save the changes? - Вы хотите сохранить изменения? - - - - Save - Сохранить - - - - Discard - Отказаться - - - - Delete preset: - Удалить пресет: - - - - Are you sure? - Вы уверены? - - - - Some settings have been changed. - Некоторые настройки изменились. - - - - Do you want to apply the changes? - Вы хотите учесть изменения? - - - - Apply - Учесть - - - - Some settings have been changed: - -"%1" - -Do you want to save the changes? - - - - - Delete preset: - -"%1" - -Are you sure? - - - - - Startup Script - - - - - Post-Startup Script - - - - - Shutdown Script - - - - - Post-Shutdown Script - - - - - Active Patchbay Definition - - - - - Messages Log - - - - - Log files - - - - - Some settings have been changed. - -Do you want to apply the changes? - - - - - jackdmp - - - - - The audio backend driver interface to use - - - - - sun - - - - - coreaudio - - - - - freebob - - - - - firewire - - - - - MIDI Driv&er: - - - - - The ALSA MIDI backend driver to use - - - - - none - - - - - raw - - - - - seq - - - - - Unlock memory of common toolkit libraries (GTK+, QT, FLTK, Wine) - - - - - &Unlock Memory - - - - - Ignore xruns reported by the backend driver - - - - - Enable hardware monitoring of capture ports - - - - - Enable hardware metering on cards that support it - - - - - Ignore hardware period/buffer size - - - - - &Verbose messages - - - - - Maximum input audio hardware channels to allocate - - - - - &Input Latency: - - - - - External output latency (frames) - - - - - Capture Only - - - - - Playback Only - - - - - The PCM device name to use - - - - - plughw:0 - - - - - /dev/audio - - - - - Select output device for playback - - - - - Alternate input device for capture - - - - - &Output Latency: - - - - - Maximum output audio hardware channels to allocate - - - - - Alternate output device for playback - - - - - Select input device for capture - - - - - Select PCM device name - - - - - External input latency (frames) - - - - - Set dither mode - - - - - Number of periods in the hardware buffer - - - - - &Channels: - - - - - 192000 - 192000 - - - - Word length - - - - - Maximum number of audio channels to allocate - - - - - Whether to execute a custom shell script before shuting down the JACK audio server. - - - - - Execute script on Shut&down: - - - - - Browse for script to be executed before shutting down the JACK audio server - - - - - Command line to be executed before shutting down the JACK audio server - - - - - Execute script after Shu&tdown: - - - - - Logging - - - - - Messages log file - - - - - Browse for the messages log file location - - - - - Whether to activate a messages logging to file. - - - - - &Messages log file: - - - - - Select font for front panel normal display - - - - - Select font for big time display - - - - - Whether to enable a shiny glass light effect on the main display - - - - - &Display shiny glass light effect - - - - - Whether to enable blinking (flashing) of the server mode (RT) indicator - - - - - Blin&k server mode indicator - - - - - Connections Window - - - - - Sample connections view font - - - - - Select font for the connections view - - - - - &Icon size: - - - - - The icon size for each item of the connections view - - - - - 16 x 16 - - - - - 32 x 32 - - - - - 64 x 64 - - - - - Whether to enable in-place client/port name editing (rename) - - - - - Ena&ble client/port aliases editing (rename) - - - - - Whether to enable client/port name aliases on the connections window - - - - - E&nable client/port aliases - - - - - Alt+N - Alt+N - - - - Whether to draw connection lines as cubic Bezier curves - - - - - Draw connection and patchbay lines as Be&zier curves - - - - - Alt+Z - - - - - Misc - - - - - Whether to start minimized to system tray - - - - - Start minimi&zed to system tray - - - - - Whether to delay window positioning at application startup - - - - - &Delay window positioning at startup - - - - - Whether to ask for confirmation on JACK audio server shutdown - - - - - Confirm server sh&utdown - - - - - Whether to enable ALSA Sequencer (MIDI) support on startup - - - - - E&nable ALSA Sequencer support - - - - - Buttons - - - - - Whether to hide the left button group on the main window - - - - - Hide main window &Left buttons - - - - - Alt+L - Alt+L - - - - Whether to hide the right button group on the main window - - - - - Hide main window &Right buttons - - - - - Whether to hide the transport button group on the main window - - - - - Hide main window &Transport buttons - - - - - Whether to hide the text labels on the main window buttons - - - - - Hide main window &button text labels - - - - - &JACK client/port aliases: - - - - - JACK client/port aliases display mode - - - - - Default - - - - - First - - - - - Second - - - - - Defaults - - - - - &Base font size: - - - - - Base application font size (pt.) - - - - - 11 - 11 - - - - 12 - 12 - - - - qjackctlSocketForm - - - Socket - Сокет - - - - OK - ОК - - - - Cancel - Отменить - - - - &Socket - &Сокет - - - - &Client: - &Клиент: - - - - Socket name (an alias for client name) - Имя сокета (псевдоним имени клиента) - - - - &Name (alias): - &Имя (псевдоним): - - - - Socket Plugs / Ports - Сокетовые штепсели / Порты - - - - Socket plug list - Список штепселей сокета - - - - &Down - В&низ - - - - Alt+D - Alt+D - - - - Move down currently selected plug socket plugst - Переместить вниз выбранный штепсель - - - - &Up - В&верх - - - - Alt+U - Alt+U - - - - Move up current selected plug socket plugst - Переместить вверх выбранный штепсель - - - - Alt+A - Alt+A - - - - Add plug to socket plug list - Добавить штепсель в список штепселей сокета - - - - &Plug: - &Штепсель: - - - - &Edit - И&зменить - - - - Alt+E - Alt+E - - - - Edit currently selected plug/port - Изменить выбранный штепсель/порт - - - - &Remove - &Удалить - - - - Alt+R - Alt+R - - - - Remove currently selected plug from socket plug list - Удалить выбранный штепсель из списка штепселей сокета - - - - Plugs / Ports - Штепсели / Порты - - - - Add Plug - Добавить штепсель - - - - Remove - Удалить - - - - Edit - Изменить - - - - Move Up - Переместить выше - - - - Move Down - Переместить ниже - - - - Client name (regular expression) - Имя клиента (регулярное выражение) - - - - Add P&lug - Добавить &штепсель - - - - Alt+L - Alt+L - - - - Port name (regular expression) - Имя порта (регулярное выражение) - - - - Alt+X - Alt+X - - - - Type - Тип - - - - &Audio - &Звук - - - - Audio socket type (JACK) - Тип звукового сокета (JACK) - - - - &MIDI - &MIDI - - - - Alt+M - Alt+M - - - - MIDI socket type (ALSA) - Тип MIDI-сокета (ALSA) - - - - E&xclusive - - - - - Enforce only one exclusive cable connection - - - - - Warning - Предупреждение - - - - Some settings have been changed. - -Do you want to apply the changes? - - - - - Apply - Учесть - - - - Discard - Отказаться - - - - (None) - (Нет) - - - - Socket - JACK Audio Connection Kit - - - - - Edit currently selected plug - - - - - Move down currently selected plug in socket plug list - - - - - Move up current selected plug in socket plug list - - - - - &Forward: - - - - - Forward (clone) all connections from this socket - - - - - MIDI socket type (JACK) - - - - - AL&SA - - - - - Alt+S - Alt+S - - - - qjackctlSocketList - - - Output - Выход - - - - Input - Вход - - - - Socket - Сокет - - - - New - Новый - - - - Warning - Предупреждение - - - - about to be removed - будет удалён - - - - Are you sure? - Вы уверены? - - - - Yes - Да - - - - No - Нет - - - - <New> - %1 - - - - - %1 about to be removed: - -"%2" - -Are you sure? - - - - - %1 <Copy> - %2 - - - - - qjackctlSocketListView - - - Output Sockets - Сокеты выхода - - - - Plugs - Штепсели - - - - Input Sockets - Сокеты входа - - - - Output Sockets / Plugs - - - - - Input Sockets / Plugs - - - - - qjackctlStatusForm - - - Status - JACK Audio Connection Kit - Статус - JACK Audio Connection Kit - - - - Description - Описание - - - - Value - Значение - - - - Statistics since last server startup - Статистика с последнего запуска сервера - - - - Re&set - С&бросить - - - - Alt+S - Alt+S - - - - Reset XRUN statistic values - Обнулить статистику по рассинхронизации - - - - &Refresh - &Обновить - - - - Alt+R - Alt+R - - - - Refresh XRUN statistic values - Обновить статистику по рассинхронизации - - - - Time of last reset - Время последнего сброса - - - - XRUN count since last server startup - Рассинхронизаций с последнего запуска сервера - - - - XRUN total - Всего рассинхронизаций - - - - XRUN average - Средний размер рассинхронизаций - - - - XRUN minimum - Минимальная рассинхронизация - - - - XRUN maximum - Максимальная рассинхронизация - - - - XRUN last - Последняя рассинхронизация - - - - XRUN last time detected - Последняя обнаруженная рассинхронизация - - - - Transport state - Состояние транспорта - - - - Transport BPM - BPM транспорта - - - - Transport BBT - BBT транспорта - - - - Transport Timecode - Тайм-код транспорта - - - - Realtime Mode - Режим реального времени - - - - Buffer Size - Размер буфера - - - - Sample Rate - Частота семплирования - - - - CPU Load - Загрузка процессора - - - - Server state - Статус сервера - - - - DSP Load - - - - - Maximum scheduling delay - - - - diff -Nru qjackctl-0.3.4/=unpacked-tar1=/TRANSLATORS qjackctl-0.3.6/=unpacked-tar1=/TRANSLATORS --- qjackctl-0.3.4/=unpacked-tar1=/TRANSLATORS 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/TRANSLATORS 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -French (fr) - Raphael Doursenaud - -German (de) - Guido Scholz - -Russian (ru) - Alexandre Prokoudine - -Spanish (es) - Adrian Pardini diff -Nru qjackctl-0.3.4/=unpacked-tar1=/win32/config.h qjackctl-0.3.6/=unpacked-tar1=/win32/config.h --- qjackctl-0.3.4/=unpacked-tar1=/win32/config.h 2008-12-05 08:18:08.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/win32/config.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ - -#define PACKAGE_NAME "QjackCtl" -#define PACKAGE_VERSION "0.3.4" - -#define CONFIG_PREFIX "." -#define CONFIG_DEBUG 1 - -#define CONFIG_SYSTEM_TRAY - -#define CONFIG_JACK_TRANSPORT -#define CONFIG_JACK_REALTIME -#define CONFIG_JACK_STATISTICS -#define CONFIG_JACK_XRUN_DELAY -#define CONFIG_JACK_MAX_DELAY - -#undef CONFIG_JACK_MIDI -#undef CONFIG_ALSA_SEQ -#undef CONFIG_ROUND diff -Nru qjackctl-0.3.4/=unpacked-tar1=/win32/qjackctl.pro qjackctl-0.3.6/=unpacked-tar1=/win32/qjackctl.pro --- qjackctl-0.3.4/=unpacked-tar1=/win32/qjackctl.pro 2008-12-02 22:56:05.000000000 +0000 +++ qjackctl-0.3.6/=unpacked-tar1=/win32/qjackctl.pro 1970-01-01 01:00:00.000000000 +0100 @@ -1,73 +0,0 @@ -INCPATH += ../src - -HEADERS += ../src/qjackctlAbout.h \ - ../src/qjackctlAlsaConnect.h \ - ../src/qjackctlConnect.h \ - ../src/qjackctlConnectAlias.h \ - ../src/qjackctlJackConnect.h \ - ../src/qjackctlPatchbay.h \ - ../src/qjackctlPatchbayFile.h \ - ../src/qjackctlPatchbayRack.h \ - ../src/qjackctlSetup.h \ - ../src/qjackctlStatus.h \ - ../src/qjackctlSystemTray.h \ - ../src/qjackctlAboutForm.h \ - ../src/qjackctlConnectionsForm.h \ - ../src/qjackctlMainForm.h \ - ../src/qjackctlMessagesForm.h \ - ../src/qjackctlPatchbayForm.h \ - ../src/qjackctlSetupForm.h \ - ../src/qjackctlSocketForm.h \ - ../src/qjackctlStatusForm.h - -SOURCES += ../src/main.cpp \ - ../src/qjackctlAlsaConnect.cpp \ - ../src/qjackctlConnect.cpp \ - ../src/qjackctlConnectAlias.cpp \ - ../src/qjackctlJackConnect.cpp \ - ../src/qjackctlPatchbay.cpp \ - ../src/qjackctlPatchbayFile.cpp \ - ../src/qjackctlPatchbayRack.cpp \ - ../src/qjackctlSetup.cpp \ - ../src/qjackctlSystemTray.cpp \ - ../src/qjackctlAboutForm.cpp \ - ../src/qjackctlConnectionsForm.cpp \ - ../src/qjackctlMainForm.cpp \ - ../src/qjackctlMessagesForm.cpp \ - ../src/qjackctlPatchbayForm.cpp \ - ../src/qjackctlSetupForm.cpp \ - ../src/qjackctlSocketForm.cpp \ - ../src/qjackctlStatusForm.cpp - -FORMS = ../src/qjackctlAboutForm.ui \ - ../src/qjackctlConnectionsForm.ui \ - ../src/qjackctlMainForm.ui \ - ../src/qjackctlMessagesForm.ui \ - ../src/qjackctlPatchbayForm.ui \ - ../src/qjackctlSetupForm.ui \ - ../src/qjackctlSocketForm.ui \ - ../src/qjackctlStatusForm.ui - -RESOURCES += ../icons/qjackctl.qrc - - -TEMPLATE = app -CONFIG += qt thread warn_on release -LANGUAGE = C++ - -win32 { - CONFIG += console - INCPATH += C:\usr\local\include - LIBS += -LC:\usr\local\lib -} - -LIBS += -ljackmp - -TRANSLATIONS = \ - ../translations/qjackctl_de.ts \ - ../translations/qjackctl_es.ts \ - ../translations/qjackctl_fr.ts \ - ../translations/qjackctl_ru.ts - -# XML/DOM support -QT += xml