qsampler-0.3.1/PaxHeaders.6862/aclocal.m40000644000000000000000000000013212554456161014672 xustar0030 mtime=1437752433.904090091 30 atime=1437752433.904090091 30 ctime=1437752433.904090091 qsampler-0.3.1/aclocal.m40000644000175000001440000002042212554456161015516 0ustar00rncbcusers00000000000000# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR qsampler-0.3.1/PaxHeaders.6862/AUTHORS0000644000000000000000000000013212554456160014101 xustar0030 mtime=1437752432.752090072 30 atime=1437752432.752090072 30 ctime=1437752432.752090072 qsampler-0.3.1/AUTHORS0000644000175000001440000000013712554456160014726 0ustar00rncbcusers00000000000000Rui Nuno Capela Christian Schoenebeck qsampler-0.3.1/PaxHeaders.6862/autogen.sh0000644000000000000000000000013212554456160015027 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/autogen.sh0000755000175000001440000000004412554456160015654 0ustar00rncbcusers00000000000000#!/bin/sh # make -f Makefile.git $* qsampler-0.3.1/PaxHeaders.6862/ChangeLog0000644000000000000000000000013212554456160014603 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.752090072 30 ctime=1437752432.753090072 qsampler-0.3.1/ChangeLog0000644000175000001440000004132712554456160015436 0ustar00rncbcusers00000000000000Qsampler - A LinuxSampler Qt GUI Interface ------------------------------------------ ChangeLog 0.3.1 2015-07-19 Summer'15 release frenzy. * Fixed configure script's Qt include directory lookup for some 64bit Linux flavours. * Prefer Qt5 over Qt4 by default with configure script. * A new top-level widget window geometry state save and restore sub-routine is now in effect. (EXPERIMENTAL) * Fixed for some strict tests for Qt4 vs. Qt5 configure builds. 0.3.0 2015-03-25 Pre-LAC2015 release frenzy. * Added application description as freedesktop.org's AppData. * Added this "Don't ask/show this again" option to some if not most of the nagging warning/error message boxes. * Mac OS X: Fixed default path of linuxsampler binary. * When closing qsampler and showing the user the dialog whether to stop the LinuxSampler backend, set the default selection to "Yes". * Master volume slider now getting proper layout when changing its main toolbar orientation. * Messages standard output capture has been slightly improved as for non-blocking i/o, whenever available. * Adjusted configure check for libgig to detect the new --includedir. * A man page has beed added (making up Matt Flax's work on debian, thanks). * Translations install directory change. * Added support for SF2 instrument names/preset enumeration. * Added instrument list popup on channel strip which shows up when the instrument name is clicked. Allows faster switching among instruments of the same file. * Adjusted configure check for libgig to detect its new --libdir (impolitely forcing the user now to have at least libgig 3.3.0). 0.2.3 2013-12-31 A fifth of a Jubilee. * Allow the build system to include an user specified LDFLAGS. * More preparations for Qt5 configure build. * Standard scalable format (SVG) and MIME type icons support for session files (*.lscp) is now being added. * Preparations for Qt5 migration. * Added include to shut up gcc 4.7 build failures. * Make(ing) -jN parallel builds now available for the masses. * Fixed Makefile.in handling of installation directories to the configure script eg. --datadir, --localedir. * Made lookup of translation files work inside a Mac OS X bundle. * Minor Mac OS X compilation error fix. * Debugging stacktrace now applies to all working threads. * Made lookup of translation files more robust on Windows. * Fixes for cross compiling and building for Windows with configure and make. * libX11 is now being added explicitly to the build link phase, as seen necessary on some bleeding-edge distros eg. Fedora 13, Debian 6. * Moving from old deprecated Qt3'ish custom event post handling into regular asynchronous signal/slot strategy. * Sampler channel and instrument file requester support for other than GIG engine instrument files (*gig; *.dls) has been added, making roads for the newer SFZ and SF2 engines instrument files (*.sfz; *.sf2). * General standard dialog buttons layout is now in place. * Initial widget geometry and visibility persistence logic has been slightly revised as much to avoid crash failures due to wrong main widget hidden state. * General source tree layout and build configuration change. * 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). * Attempt to fix broken instrument list model/view on Qt >= 4.6. * Device parameter spin-box default maximum has been set higher: now at a magic 24-bit limit (16777216) instead of older 16-bit (65536), possibly fixing bug #136. * LADISH Level 1 support has been added: SIGUSR1 signal trap just makes it a shortcut to File/Save. * MIDI Device Status menu is disabled when no MIDI device exists; a menu separator has been added. * Window manager's close button was found missing from the Devices and Instruments widgets when on Qt >= 4.5, now fixed. * MIDI activity indicator on channel strips and MIDI device status widgets is now implemented as a flashing green LED, instead of a lame green solid background :). * Global configuration state is now explicitly saved/committed to disk when View/Options... dialog changes are accepted and applied. * Czech (cs) translation added (by Pavel Fric). 0.2.2 2009-08-01 New release cycle. * Russian (qsampler_ru.ts by Alexandre Prokoudine) makes it as brand first translation delivered. Thanks and welcomes whom ever may follow ;) * Converted obsolete QMessageBox forms to standard buttons. * Added support for runtime max. voices / disk streams setting (accessible from the "Options..." dialog). Those fine tuning settings will be saved in case the user modified them and automatically restored to the sampler when reconnecting to a sampler the next time. * Grayed/disabled palette color group fix for dark color themes. * Fait-divers: desktop menu file touched to openSUSE conventions. * 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: View/Options... /Display/Other/Base font size (default none). * 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). * 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 automatically (Qt/X11 platform only). * Messages file logging makes its first long overdue appearance, with user configurable settings in View/Options.../Server/Logging. * Bugfix in sampler channel dialog, driver combo boxes' content were screwed. * Automatically add & remove channel strips as they were removed e.g. by other frontends. * Refresh device management dialog when device informations changed, e.g. on changes caused by other frontends (fixes segfault on device changes) * Implemented MIDI device activity windows, selectable from the "View" main menu. * Implemented MIDI activity indicator on channel strips. * Added FX Sends Dialog to Channel Strips. * Color pallete fix for the instrument name display in channel strip, particularly notorious on Mac OS X builds. * Added dialog when the application exits which lets the user decide whether to keep the LinuxSampler running or not. 0.2.1 2007-12-06 Qt4 migration was complete. * Added recent new support of libgig for retrieving instrument names in avery fast way. If libgig provides this feature, then the respective name retrieval setting in qsampler is enabled by default. * The current selected/activated channel-strip is now visually evident while in the application workspace (highlighting). * Make View/Menubar and Toolbar shortcuts accessible even though the main menu and toobar are not visible. * Audio routing table is initially hidden in the dialog, when creating a new sampler channel. * README requirements and configuration notes update. * Disable OK button in sampler channel form and MIDI instrument form if no valid engine is selected (to avoid bothering newbie users with confusing LSCP syntax errors when using the UI the first time). * Fixed creation of devices (don't try to set device parameters which the user did not touch in the device creation dialog). * Added Windows file path support. * Fixed win32/qmakefile and win32/config.h so that it compiles under win32. * Qt4 port of the application. 0.1.5 2007-10-15 Five months later a fifth is heard. * Added support for LSCP escape sequences to allow loading and mapping instrument files with special characters in their filename, as well as special characters for instrument names and instrument map names (requires LSCP v1.2 on sampler side). * Added new button "Edit" to the channel strips, which probably does exactly what you think it does: it opens an appropriate instrument editor application; the channel instrument editor tool is also accessible from the main menu and toolbar. * 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. * Crash fix on double-clicking on a empty instrument list. 0.1.4 2007-05-04 Almost another year has gone by. * Channel button colors have changed: yellow for mute and cyan for solo is now the rule, but note that this color highlighting is only rendered on some widget styles. * Master sampler volume slider/spinbox combo is now featured. * Initial support for sampler channel FX sends, while saving the session state, only at code-level. * Sampler channel setup dialog does not mandate for valid nor existing instrument file name. * Revised error verbosity in general and on session load/save; hour-glass wait cursor is now displayed on session load/save; keyboard shortcuts changed on MIDI instruments view context; improved channel strip arrangement on session open/load; instrument map entry removal confirmation (as optional); corrected some tooltip text strings. * Most top-level widgets were missing the normal-widget flag, which were causing some sticky size behavior while on some window managers. * Added preliminary MIDI instrument mapping support; now with an instrument list widget and editing capabilities; MIDI instrumeent map program numbers are now displayed in the range 1-128, instead of the internal 0-127. * GPL address update. 0.1.3 2006-06-01 Its been a long year isn't it? * Changed deprecated copyright attribute to license, on qsampler.spec (RPM). * Added configure support for x86_64 libraries (UNTESTED). * Optional specification of alternate liblscp and libgig installation paths have been added to configure command arguments (--with-liblscp, --with-libgig). * Whenever the listing of actual instrument names is not an option (e.g. due to lack of libgig support), the whole number of selectable instrument items is now being graciously increased from just the bare 8 (eight) right up through 100 (one hundred), on the sampler channel setup dialog. * The selection buttons, on the right of the Instrument, Audio and MIDI devices combo-boxes, on the sampler channel dialog, are now expected to be a little better looking than it was before, at least for those Mac OS X eyes. * Minor fixing on the initial messages dock-window height. * Audio output channel routing configuration finally hits the sampler channel dialog, at last! (EXPERIMENTAL). * All widget captions changed to include proper application title name 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. * 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. * Added MUTE/SOLO buttons to individual channel strips. * Fixed compilation error which occured when Qt was compiled with -no-stl. 0.1.2 2005-06-23 Even minor workings needs a rest. * Fixed output disability when messages limit option is turned off (thanks to Wolfgang Woehl for spotting this one, while on qjackctl). * Added CHANNEL_INFO event feedback notification handling; minor stream/voice usage auto-refresh cycle optimization. 0.1.1 2005-06-12 The mantra of bugfixes. * New improved and full-featured application icon, thanks to Christian Schoenebeck design. * Fixed refresh cycle of channel strips that are found in an error state, which was preventing correct channel info updates. * Device configuration now accessible on toolbar. Added buddy text label to device port/channel combobox on the device dialog. * Include libgig version info on command line request (-v). * 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.1.0 2005-05-23 Device configuration breakthrough. * Device configuration is now complete (EXPERIMENTAL). * [bug #9] Fixed for a LSCP command syntax convention consistency, regarding the enumeration of available sampler engines, Audio and MIDI drivers. * [bug #13] Update instrument names list when a new instrument file is select on the channel setup dialog. * Show appropriate message in channel strip while loading an instrument. * Show libgig version in About box (in case libgig is used). 0.0.5 2005-03-04 Fifth alpha-release. * Fixed device driver type channel information gathering, which was severely flawed, dropping all channel session configurations to the default audio driver type (which is ALSA) unexpectedly. * Channels are now properly renumbered when saving to a session LSCP script, assuming that it should be always loaded from scratch (i.e. zero channels). * Disabled MIDI port setting on channel dialog, and on session file save, as its use is still troublesome. * Added new menu and toolbar option: Reset All Channels. * Channel setup changes are now properly filtered, as for only those settings that are actually changed gets applied; change information are now also posted to messages window. * Drag-and-drop of either session files (LSCP scripts) or instrument files (GIG) are now supported. Multiple files drop is allowed, but it only makes sense for instrument files, each one prompting to create a new sampler channel. * Drag-and-drop to an existing channel strip is now also featured, allowing the in-place change of the channel sampler instrument file. * Actual instrument names are now optionally retrieved from the instrument file, even though libgig is available, avoiding excessively annoying load times while on the channel dialog, when huge instrument files are selected. * Set to ignore the SIGPIPE ("Broken pipe") signal, where available, as the default handler is usually fatal when a JACK client is zombified abruptly. * 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. 0.0.4 2004-11-19 Fourth alpha-release. * Instrument index selection now made via combo box widget; actual instrument names are now properly retrieved from the instrument file, provided if libgig is available. * Sampler channels strips are just created if, and only if, the respective channel setup dialog is actually accepted, following common user-interface guidelines. * Almost complete rewrite of sampler channel strips internal control structures. * Sampler reset command action added to menu and toolbar. * MIDI channel selection is now a dropdown list, allowing the explicit selection for "All" channels input per sampler channel (omni mode). * Channel strip display glass effect has changed background color to black (was green), being now an user option. * Minor configure fixes. 0.0.3 2004-07-06 Third alpha-release. * Mon-modal intrument file loading and status support. * Effective MIDI input port setting on channel dialog, and on session file save. * Channel dialog gets sensible engine and driver defaults on create time. * Implied channel reset on successful instrument load. 0.0.2 2004-06-15 Pre-revolutionary release. * The channel context menu is also accessible by right-clicking over the empty workspace area. * Added small wait event loop on qsamplerMainForm::stopServer(), so let local server terminate gracefully and stabilize, and avoiding a probable segfault on exit, which was preventing the correct salvage of settings and configuration. * Maximum channel volume percent setting is now a global option, provided to override the default (which is 100%). * Client/server transaction timeout option upper limit has been increased from 5000 to 60000 milliseconds. * A channel context menu is now featured, by right-clicking over each sampler channel strip. * Commented SET CHANNEL MIDI_INPUT_PORT command from qsamplerMainForm::saveSessionFile(), it has no effect. * Insert a n #include on qsamplerMessages.cpp, between a #if !defined(WIN32) clause. * An initial non zero value (0.8) is now set for volume of every new sampler channel strip. * The order to load/save and setup channel settings is now as suggested in the following lines: SET CHANNEL AUDIO_OUTPUT_TYPE ... SET CHANNEL MIDI_INPUT_TYPE ... SET CHANNEL MIDI_INPUT_CHANNEL ... LOAD ENGINE ... LOAD INSTRUMENT ... SET CHANNEL VOLUME ... 0.0.1 2004-06-05 Primordial alpha release. qsampler-0.3.1/PaxHeaders.6862/configure0000644000000000000000000000013012554456162014735 xustar0030 mtime=1437752434.593090102 28 atime=1437752434.4860901 30 ctime=1437752434.593090102 qsampler-0.3.1/configure0000755000175000001440000060302012554456162015567 0ustar00rncbcusers00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Qsampler 0.3.1. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 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 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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (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 # 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. as_myself= 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="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_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and rncbc@rncbc.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { 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_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi 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'` # 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_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # 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; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # 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'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/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= # Identity of this package. PACKAGE_NAME='Qsampler' PACKAGE_TARNAME='qsampler' PACKAGE_VERSION='0.3.1' PACKAGE_STRING='Qsampler 0.3.1' PACKAGE_BUGREPORT='rncbc@rncbc.org' PACKAGE_URL='' ac_unique_file="src/qsampler.cpp" 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_ldflags ac_cflags ac_incpath ac_libs LIBGIG_LIBS LIBGIG_CFLAGS ac_lrelease ac_lupdate ac_uic ac_moc ac_cv_qmake ac_qmake PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG EGREP GREP CXXCPP ac_ct_CXX CXXFLAGS CXX CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC 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_URL 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_qt4 enable_qt5 enable_libgig enable_stacktrace with_qt4 with_qt5 with_liblscp with_libgig ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBGIG_CFLAGS LIBGIG_LIBS' # 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= ;; *) 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_fn_error $? "invalid feature name: $ac_useropt" 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_fn_error $? "invalid feature name: $ac_useropt" 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_fn_error $? "invalid package name: $ac_useropt" 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_fn_error $? "invalid package name: $ac_useropt" 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_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac 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_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $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_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 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_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 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 Qsampler 0.3.1 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/qsampler] --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 Qsampler 0.3.1:";; 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-qt4 enable Qt4 build (default=no) --enable-qt5 enable Qt5 build (default=yes) --enable-libgig enable libgig 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-qt4=PATH use alternate Qt4 install path --with-qt5=PATH use alternate Qt5 install path --with-liblscp=PATH use alternate liblscp install path --with-libgig=PATH use alternate libgig 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 (Objective) C/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 PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBGIG_CFLAGS C compiler flags for LIBGIG, overriding pkg-config LIBGIG_LIBS linker flags for LIBGIG, overriding pkg-config 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 Qsampler configure 0.3.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 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 ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 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 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------ ## ## Report this to rncbc@rncbc.org ## ## ------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* 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 $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func 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 Qsampler $as_me 0.3.1, which was generated by GNU Autoconf 2.69. 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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 $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" 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:${as_lineno-$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= ;; #( *) { eval $ac_var=; 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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" 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 $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" 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 $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" 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'; as_fn_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 $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _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 # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac 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 /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$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" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$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_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 src/config.h" ac_config_files="$ac_config_files Makefile qsampler.spec src/src.pri src/qsampler.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 $as_echo "#define CONFIG_DEBUG 1" >>confdefs.h ac_stacktrace="yes" ac_debug="debug" else ac_stacktrace="no" ac_debug="release" fi # Enable Qt4/5 availability. # Check whether --enable-qt4 was given. if test "${enable_qt4+set}" = set; then : enableval=$enable_qt4; ac_qt4="$enableval" else ac_qt4="no" fi # Check whether --enable-qt5 was given. if test "${enable_qt5+set}" = set; then : enableval=$enable_qt5; ac_qt5="$enableval" else ac_qt5="yes" fi # Enable libgig availability. # Check whether --enable-libgig was given. if test "${enable_libgig+set}" = set; then : enableval=$enable_libgig; ac_libgig="$enableval" else ac_libgig="yes" 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. if test "$cross_compiling" = yes; then ac_with_paths="" else ac_with_paths="/usr /usr/local" fi # Set for alternate Qt4/5 installation dir. # Check whether --with-qt4 was given. if test "${with_qt4+set}" = set; then : withval=$with_qt4; ac_qt4_path="$withval" else ac_qt4_path="no" fi # Check whether --with-qt5 was given. if test "${with_qt5+set}" = set; then : withval=$with_qt5; ac_qt5_path="$withval" else ac_qt5_path="no" fi if test "x$ac_qt4_path" != "xno"; then ac_with_paths="$ac_with_paths $ac_qt4_path" ac_qt4="yes" fi if test "x$ac_qt5_path" != "xno"; then ac_with_paths="$ac_with_paths $ac_qt5_path" ac_qt5="yes" fi if test "x$ac_qt5" = "xno"; then ac_qt4="yes" fi if test "x$ac_qt4" = "xyes"; then ac_qt5="no" fi # Set for alternate liblscp installation dir. # Check whether --with-liblscp was given. if test "${with_liblscp+set}" = set; then : withval=$with_liblscp; ac_with_paths="$ac_with_paths $withval" fi # Set for alternate libgig installation dir. # Check whether --with-libgig was given. if test "${with_libgig+set}" = set; then : withval=$with_libgig; ac_with_paths="$ac_with_paths $withval" fi # Honor user specified flags. ac_cflags=$CFLAGS ac_ldflags=$LDFLAGS # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$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 ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else 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:${as_lineno-$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:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes 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:${as_lineno-$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:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg 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:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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=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:${as_lineno-$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 ${ac_cv_prog_CPP+:} false; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$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 ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else 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:${as_lineno-$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:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes 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:${as_lineno-$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:${as_lineno-$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 ${ac_cv_prog_CXXCPP+:} false; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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:${as_lineno-$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 ${ac_cv_path_GREP+:} false; 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" as_fn_executable_p "$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 as_fn_arith $ac_count + 1 && ac_count=$as_val 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_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; 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" as_fn_executable_p "$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 as_fn_arith $ac_count + 1 && ac_count=$as_val 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_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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:${as_lineno-$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 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check for proper flags. ac_arch=`uname -m` # Check for install paths and alternatives... ac_libdirs="lib" if test "x$ac_arch" = "xx86_64"; then ac_libdirs="$ac_libdirs lib64" fi CFLAGS="-fPIC $CFLAGS" CPPFLAGS="-fPIC $CPPFLAGS" # 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 -d $X/include; then CFLAGS="-I$X/include $CFLAGS " CPPFLAGS="-I$X/include $CPPFLAGS" ac_incpath="$X/include $ac_incpath" fi for Y in $ac_libdirs; do if test -d $X/$Y; then LIBS="-L$X/$Y $LIBS" ac_libs="-L$X/$Y $ac_libs" fi done done # A common error message: ac_errmsg="not found in current PATH. Maybe QT development environment isn't available." if test "x$ac_qt4" = "xyes"; then # Extract the first word of "qmake-qt4", so it can be a program name with args. set dummy qmake-qt4; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_qmake+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_qmake="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_qmake" >&5 $as_echo "$ac_qmake" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$ac_qt5" = "xyes"; then # Extract the first word of "qmake-qt5", so it can be a program name with args. set dummy qmake-qt5; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_qmake+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_qmake="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_qmake" >&5 $as_echo "$ac_qmake" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$ac_qmake" = "xno"; then # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_cv_qmake+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_cv_qmake in [\\/]* | ?:[\\/]*) ac_cv_path_ac_cv_qmake="$ac_cv_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_cv_qmake="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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_cv_qmake" && ac_cv_path_ac_cv_qmake="no" ;; esac fi ac_cv_qmake=$ac_cv_path_ac_cv_qmake if test -n "$ac_cv_qmake"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_qmake" >&5 $as_echo "$ac_cv_qmake" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_qmake=$ac_cv_qmake fi if test "x$ac_qmake" = "xno"; then as_fn_error $? "qmake $ac_errmsg" "$LINENO" 5 fi # Check for proper Qt4/5 major version. ac_qt_version_major=`$ac_qmake -query QT_VERSION | cut -d. -f1` if test "x$ac_qt4" = "xyes" -a "x$ac_qt_version_major" != "x4"; then as_fn_error $? "qmake-qt4 $ac_errmsg (qt4-devel)" "$LINENO" 5 fi if test "x$ac_qt5" = "xyes" -a "x$ac_qt_version_major" != "x5"; then as_fn_error $? "qmake-qt5 $ac_errmsg (qt5-devel)" "$LINENO" 5 fi ac_qt_install_bins=`$ac_qmake -query QT_INSTALL_BINS` if test -d $ac_qt_install_bins; then ac_path="$ac_qt_install_bins:$ac_path" fi # Check it again, now with updated PATH, just in case... # 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_cv_qmake+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_cv_qmake in [\\/]* | ?:[\\/]*) ac_cv_path_ac_cv_qmake="$ac_cv_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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_cv_qmake="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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_cv_qmake" && ac_cv_path_ac_cv_qmake="no" ;; esac fi ac_cv_qmake=$ac_cv_path_ac_cv_qmake if test -n "$ac_cv_qmake"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_qmake" >&5 $as_echo "$ac_cv_qmake" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_qmake=$ac_cv_qmake if test "x$ac_qmake" = "xno"; then as_fn_error $? "qmake $ac_errmsg" "$LINENO" 5 fi ac_qt_install_headers=`$ac_qmake -query QT_INSTALL_HEADERS` if test -d $ac_qt_install_headers; then CFLAGS="-I$ac_qt_install_headers $CFLAGS " CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS" ac_incpath="$ac_qt_install_headers $ac_incpath" fi ac_qt_install_libs=`$ac_qmake -query QT_INSTALL_LIBS` if test -d $ac_qt_install_libs; then LIBS="-L$ac_qt_install_libs $LIBS" ac_libs="-L$ac_qt_install_libs $ac_libs" fi # Check for proper Qt4/5 version. if test "x$ac_qt4" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt library version >= 4.4" >&5 $as_echo_n "checking for Qt library version >= 4.4... " >&6; } if ${ac_cv_qtversion+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "QtCore/qglobal.h" int main () { #if QT_VERSION < 0x040400 || QT_VERSION >= 0x050000 #error Qt library 4.4 or greater required. #endif ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_qtversion="yes" else echo "no; Qt 4.4 or greater is required" exit 1 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_qtversion" >&5 $as_echo "$ac_cv_qtversion" >&6; } fi if test "x$ac_qt5" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt library version >= 5.1" >&5 $as_echo_n "checking for Qt library version >= 5.1... " >&6; } if ${ac_cv_qtversion+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "QtCore/qglobal.h" int main () { #if QT_VERSION < 0x050100 || QT_VERSION >= 0x060000 #error Qt library 5.1 or greater required. #endif ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_qtversion="yes" else echo "no; Qt 5.1 or greater is required" exit 1 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_qtversion" >&5 $as_echo "$ac_cv_qtversion" >&6; } 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_moc+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_moc="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_moc" >&5 $as_echo "$ac_moc" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_moc" = "xno"; then as_fn_error $? "moc $ac_errmsg" "$LINENO" 5 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_uic+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_uic="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_uic" >&5 $as_echo "$ac_uic" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_uic" = "xno"; then as_fn_error $? "uic $ac_errmsg" "$LINENO" 5 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_lupdate+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_lupdate="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_lupdate" >&5 $as_echo "$ac_lupdate" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_lupdate" = "xno"; then as_fn_error $? "lupdate $ac_errmsg" "$LINENO" 5 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_lrelease+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_lrelease="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_lrelease" >&5 $as_echo "$ac_lrelease" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_release" = "xno"; then as_fn_error $? "lrelease $ac_errmsg" "$LINENO" 5 fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lX11" >&5 $as_echo_n "checking for main in -lX11... " >&6; } if ${ac_cv_lib_X11_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_X11_main=yes else ac_cv_lib_X11_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_main" >&5 $as_echo "$ac_cv_lib_X11_main" >&6; } if test "x$ac_cv_lib_X11_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXext" >&5 $as_echo_n "checking for main in -lXext... " >&6; } if ${ac_cv_lib_Xext_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_Xext_main=yes else ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_main" >&5 $as_echo "$ac_cv_lib_Xext_main" >&6; } if test "x$ac_cv_lib_Xext_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF LIBS="-lXext $LIBS" fi # Check for round math function. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for round in -lm" >&5 $as_echo_n "checking for round in -lm... " >&6; } if ${ac_cv_lib_m_round+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 round (); int main () { return round (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_round=yes else ac_cv_lib_m_round=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_round" >&5 $as_echo "$ac_cv_lib_m_round" >&6; } if test "x$ac_cv_lib_m_round" = xyes; then : ac_round="yes" else ac_round="no" fi if test "x$ac_round" = "xyes"; then $as_echo "#define CONFIG_ROUND 1" >>confdefs.h fi # Check for mandatory libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llscp" >&5 $as_echo_n "checking for main in -llscp... " >&6; } if ${ac_cv_lib_lscp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_main=yes else ac_cv_lib_lscp_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_main" >&5 $as_echo "$ac_cv_lib_lscp_main" >&6; } if test "x$ac_cv_lib_lscp_main" = xyes; then : ac_liblscp="yes" else ac_liblscp="no" fi if test "x$ac_liblscp" = "xno"; then as_fn_error $? "LSCP library not found." "$LINENO" 5 fi ac_libs="$ac_libs -llscp" case "{$host}" in *mingw*) ac_libs="$ac_libs -lws2_32" LIBS="$LIBS -lws2_32" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrument_name in lscp_channel_info_t" >&5 $as_echo_n "checking for instrument_name in lscp_channel_info_t... " >&6; } if ${ac_cv_instrument_name+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; info.instrument_name = 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_instrument_name="yes" else ac_cv_instrument_name="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_instrument_name" >&5 $as_echo "$ac_cv_instrument_name" >&6; } ac_instrument_name=$ac_cv_instrument_name if test "x$ac_instrument_name" = "xyes"; then $as_echo "#define CONFIG_INSTRUMENT_NAME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mute/solo in lscp_channel_info_t" >&5 $as_echo_n "checking for mute/solo in lscp_channel_info_t... " >&6; } if ${ac_cv_mute_solo+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; info.mute = 0; info.solo = 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_mute_solo="yes" else ac_cv_mute_solo="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mute_solo" >&5 $as_echo "$ac_cv_mute_solo" >&6; } ac_mute_solo=$ac_cv_mute_solo if test "x$ac_mute_solo" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_set_channel_mute in -llscp" >&5 $as_echo_n "checking for lscp_set_channel_mute in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_set_channel_mute+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_set_channel_mute (); int main () { return lscp_set_channel_mute (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_set_channel_mute=yes else ac_cv_lib_lscp_lscp_set_channel_mute=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_set_channel_mute" >&5 $as_echo "$ac_cv_lib_lscp_lscp_set_channel_mute" >&6; } if test "x$ac_cv_lib_lscp_lscp_set_channel_mute" = xyes; then : ac_mute_solo="yes" else ac_mute_solo="no" fi fi if test "x$ac_mute_solo" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_set_channel_solo in -llscp" >&5 $as_echo_n "checking for lscp_set_channel_solo in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_set_channel_solo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_set_channel_solo (); int main () { return lscp_set_channel_solo (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_set_channel_solo=yes else ac_cv_lib_lscp_lscp_set_channel_solo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_set_channel_solo" >&5 $as_echo "$ac_cv_lib_lscp_lscp_set_channel_solo" >&6; } if test "x$ac_cv_lib_lscp_lscp_set_channel_solo" = xyes; then : ac_mute_solo="yes" else ac_mute_solo="no" fi fi if test "x$ac_mute_solo" = "xyes"; then $as_echo "#define CONFIG_MUTE_SOLO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_map_midi_instrument in -llscp" >&5 $as_echo_n "checking for lscp_map_midi_instrument in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_map_midi_instrument+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_map_midi_instrument (); int main () { return lscp_map_midi_instrument (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_map_midi_instrument=yes else ac_cv_lib_lscp_lscp_map_midi_instrument=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_map_midi_instrument" >&5 $as_echo "$ac_cv_lib_lscp_lscp_map_midi_instrument" >&6; } if test "x$ac_cv_lib_lscp_lscp_map_midi_instrument" = xyes; then : ac_midi_instrument="yes" else ac_midi_instrument="no" fi if test "x$ac_midi_instrument" = "xyes"; then $as_echo "#define CONFIG_MIDI_INSTRUMENT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_create_fxsend in -llscp" >&5 $as_echo_n "checking for lscp_create_fxsend in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_create_fxsend+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_create_fxsend (); int main () { return lscp_create_fxsend (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_create_fxsend=yes else ac_cv_lib_lscp_lscp_create_fxsend=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_create_fxsend" >&5 $as_echo "$ac_cv_lib_lscp_lscp_create_fxsend" >&6; } if test "x$ac_cv_lib_lscp_lscp_create_fxsend" = xyes; then : ac_fxsend="yes" else ac_fxsend="no" fi if test "x$ac_fxsend" = "xyes"; then $as_echo "#define CONFIG_FXSEND 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FX send level in lscp_fxsend_info_t" >&5 $as_echo_n "checking for FX send level in lscp_fxsend_info_t... " >&6; } if ${ac_cv_fxsend_level+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_fxsend_info_t info; info.level = 0.0f; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_fxsend_level="yes" else ac_cv_fxsend_level="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fxsend_level" >&5 $as_echo "$ac_cv_fxsend_level" >&6; } ac_fxsend_level=$ac_cv_fxsend_level if test "x$ac_fxsend_level" = "xyes"; then $as_echo "#define CONFIG_FXSEND_LEVEL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_set_fxsend_name in -llscp" >&5 $as_echo_n "checking for lscp_set_fxsend_name in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_set_fxsend_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_set_fxsend_name (); int main () { return lscp_set_fxsend_name (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_set_fxsend_name=yes else ac_cv_lib_lscp_lscp_set_fxsend_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_set_fxsend_name" >&5 $as_echo "$ac_cv_lib_lscp_lscp_set_fxsend_name" >&6; } if test "x$ac_cv_lib_lscp_lscp_set_fxsend_name" = xyes; then : ac_fxsend_rename="yes" else ac_fxsend_rename="no" fi if test "x$ac_fxsend_rename" = "xyes"; then $as_echo "#define CONFIG_FXSEND_RENAME 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audio_routing array type" >&5 $as_echo_n "checking for audio_routing array type... " >&6; } if ${ac_cv_audio_routing+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" int main () { lscp_channel_info_t info; char ch = info.audio_routing[0][0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_audio_routing="no" else ac_cv_audio_routing="yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_audio_routing" >&5 $as_echo "$ac_cv_audio_routing" >&6; } ac_audio_routing=$ac_cv_audio_routing if test "x$ac_audio_routing" = "xyes"; then $as_echo "#define CONFIG_AUDIO_ROUTING 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_set_volume in -llscp" >&5 $as_echo_n "checking for lscp_set_volume in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_set_volume+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_set_volume (); int main () { return lscp_set_volume (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_set_volume=yes else ac_cv_lib_lscp_lscp_set_volume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_set_volume" >&5 $as_echo "$ac_cv_lib_lscp_lscp_set_volume" >&6; } if test "x$ac_cv_lib_lscp_lscp_set_volume" = xyes; then : ac_volume="yes" else ac_volume="no" fi if test "x$ac_volume" = "xyes"; then $as_echo "#define CONFIG_VOLUME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_edit_channel_instrument in -llscp" >&5 $as_echo_n "checking for lscp_edit_channel_instrument in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_edit_channel_instrument+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_edit_channel_instrument (); int main () { return lscp_edit_channel_instrument (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_edit_channel_instrument=yes else ac_cv_lib_lscp_lscp_edit_channel_instrument=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_edit_channel_instrument" >&5 $as_echo "$ac_cv_lib_lscp_lscp_edit_channel_instrument" >&6; } if test "x$ac_cv_lib_lscp_lscp_edit_channel_instrument" = xyes; then : ac_edit_instrument="yes" else ac_edit_instrument="no" fi if test "x$ac_edit_instrument" = "xyes"; then $as_echo "#define CONFIG_EDIT_INSTRUMENT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHANNEL_MIDI LSCP event support in liblscp" >&5 $as_echo_n "checking for CHANNEL_MIDI LSCP event support in liblscp... " >&6; } if ${ac_cv_channel_midi_event+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" #include "lscp/event.h" int main () { lscp_event_t ev; ev = LSCP_EVENT_CHANNEL_MIDI; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_channel_midi_event="yes" else ac_cv_channel_midi_event="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_channel_midi_event" >&5 $as_echo "$ac_cv_channel_midi_event" >&6; } ac_channel_midi_event=$ac_cv_channel_midi_event if test "x$ac_channel_midi_event" = "xyes"; then $as_echo "#define CONFIG_EVENT_CHANNEL_MIDI 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEVICE_MIDI LSCP event support in liblscp" >&5 $as_echo_n "checking for DEVICE_MIDI LSCP event support in liblscp... " >&6; } if ${ac_cv_device_midi_event+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "lscp/client.h" #include "lscp/event.h" int main () { lscp_event_t ev; ev = LSCP_EVENT_DEVICE_MIDI; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_device_midi_event="yes" else ac_cv_device_midi_event="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_device_midi_event" >&5 $as_echo "$ac_cv_device_midi_event" >&6; } ac_device_midi_event=$ac_cv_device_midi_event if test "x$ac_device_midi_event" = "xyes"; then $as_echo "#define CONFIG_EVENT_DEVICE_MIDI 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lscp_get_voices in -llscp" >&5 $as_echo_n "checking for lscp_get_voices in -llscp... " >&6; } if ${ac_cv_lib_lscp_lscp_get_voices+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llscp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 lscp_get_voices (); int main () { return lscp_get_voices (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lscp_lscp_get_voices=yes else ac_cv_lib_lscp_lscp_get_voices=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lscp_lscp_get_voices" >&5 $as_echo "$ac_cv_lib_lscp_lscp_get_voices" >&6; } if test "x$ac_cv_lib_lscp_lscp_get_voices" = xyes; then : ac_max_voices="yes" else ac_max_voices="no" fi if test "x$ac_max_voices" = "xyes"; then $as_echo "#define CONFIG_MAX_VOICES 1" >>confdefs.h fi # Check for optional libraries. if test "x$ac_libgig" = "xyes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGIG" >&5 $as_echo_n "checking for LIBGIG... " >&6; } if test -n "$LIBGIG_CFLAGS"; then pkg_cv_LIBGIG_CFLAGS="$LIBGIG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gig >= 3.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gig >= 3.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGIG_CFLAGS=`$PKG_CONFIG --cflags "gig >= 3.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGIG_LIBS"; then pkg_cv_LIBGIG_LIBS="$LIBGIG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gig >= 3.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gig >= 3.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGIG_LIBS=`$PKG_CONFIG --libs "gig >= 3.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gig >= 3.3.0" 2>&1` else LIBGIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gig >= 3.3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGIG_PKG_ERRORS" >&5 ac_libgig="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_libgig="no" else LIBGIG_CFLAGS=$pkg_cv_LIBGIG_CFLAGS LIBGIG_LIBS=$pkg_cv_LIBGIG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_libgig="yes" fi if test "x$ac_libgig" = "xyes"; then $as_echo "#define CONFIG_LIBGIG 1" >>confdefs.h ac_cflags="$ac_cflags $LIBGIG_CFLAGS" ac_libs="$ac_libs $LIBGIG_LIBS" $as_echo "#define CONFIG_LIBGIG_SETAUTOLOAD 1" >>confdefs.h ac_libgig_setautoload="yes" fi fi # Check for round math function. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lroundf in -lm" >&5 $as_echo_n "checking for lroundf in -lm... " >&6; } if ${ac_cv_lib_m_lroundf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_lroundf=yes else ac_cv_lib_m_lroundf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_lroundf" >&5 $as_echo "$ac_cv_lib_m_lroundf" >&6; } if test "x$ac_cv_lib_m_lroundf" = xyes; then : ac_round="yes" else ac_round="no" fi if test "x$ac_round" = "xyes"; then $as_echo "#define CONFIG_ROUND 1" >>confdefs.h fi # Check for debugging stack-trace. if test "x$ac_stacktrace" = "xyes"; then $as_echo "#define CONFIG_STACKTRACE 1" >>confdefs.h fi # Some recent distros (eg. fedora, debian) require this. if test "x$ac_cv_lib_X11_main" = "xyes"; then ac_libs="$ac_libs -lX11" fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$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 ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$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 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h 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` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = 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 signal.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_cxx_check_header_mongrel "$LINENO" "lscp/client.h" "ac_cv_header_lscp_client_h" "$ac_includes_default" if test "x$ac_cv_header_lscp_client_h" = xyes; then : ac_lscp_h="yes" else ac_lscp_h="no" fi if test "x$ac_lscp_h" = "xno"; then as_fn_error $? "LSCP headers not found." "$LINENO" 5 fi if test "x$ac_libgig" = "xyes"; then ac_fn_cxx_check_header_mongrel "$LINENO" "libgig/SF.h" "ac_cv_header_libgig_SF_h" "$ac_includes_default" if test "x$ac_cv_header_libgig_SF_h" = xyes; then : ac_libgig_sf2="yes" else ac_libgig_sf2="no" fi if test "x$ac_libgig_sf2" = "xyes"; then $as_echo "#define CONFIG_LIBGIG_SF2 1" >>confdefs.h fi fi # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST # Checks for library functions. for ac_func in system do : ac_fn_cxx_check_func "$LINENO" "system" "ac_cv_func_system" if test "x$ac_cv_func_system" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSTEM 1 _ACEOF fi done # Finally produce a configure header file and the makefiles. 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:${as_lineno-$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= ;; #( *) { eval $ac_var=; 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 if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$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= U= 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. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append 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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_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 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 # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (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 # 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. as_myself= 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 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi 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'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { 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_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # 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 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 Qsampler $as_me 0.3.1, which was generated by GNU Autoconf 2.69. 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 and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, 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_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Qsampler config.status 0.3.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= 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 ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; 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"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append 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 as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --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_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append 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 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "qsampler.spec") CONFIG_FILES="$CONFIG_FILES qsampler.spec" ;; "src/src.pri") CONFIG_FILES="$CONFIG_FILES src/src.pri" ;; "src/qsampler.desktop") CONFIG_FILES="$CONFIG_FILES src/qsampler.desktop" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # 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=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi 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 {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 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_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 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 >>"\$ac_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 >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// 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 >"$ac_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_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 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_fn_error $? "could not setup config headers machinery" "$LINENO" 5 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_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[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="$ac_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_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append 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:${as_lineno-$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 >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 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"; as_fn_mkdir_p 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:${as_lineno-$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 "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$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 "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$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 " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name" echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo" echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument" echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend" echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level" echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename" echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing" echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume" echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" if test "x$ac_libgig" = "xyes"; then echo " libgig supports fast information retrieval . . . .: $ac_libgig_setautoload" echo " libgig supports SoundFont2 instruments files . . .: $ac_libgig_sf2" fi echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" 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 qsampler-0.3.1/PaxHeaders.6862/configure.ac0000644000000000000000000000013212554456160015317 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/configure.ac0000644000175000001440000003531512554456160016152 0ustar00rncbcusers00000000000000# Process this file with autoconf to produce a configure script. AC_INIT(Qsampler, 0.3.1, rncbc@rncbc.org, qsampler) AC_CONFIG_SRCDIR(src/qsampler.cpp) AC_CONFIG_HEADERS(src/config.h) AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.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) # Enable Qt4/5 availability. AC_ARG_ENABLE(qt4, AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=no)]), [ac_qt4="$enableval"], [ac_qt4="no"]) AC_ARG_ENABLE(qt5, AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=yes)]), [ac_qt5="$enableval"], [ac_qt5="yes"]) # Enable libgig availability. AC_ARG_ENABLE(libgig, AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), [ac_libgig="$enableval"], [ac_libgig="yes"]) # 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. if test "$cross_compiling" = yes; then ac_with_paths="" else ac_with_paths="/usr /usr/local" fi # Set for alternate Qt4/5 installation dir. AC_ARG_WITH(qt4, AC_HELP_STRING([--with-qt4=PATH], [use alternate Qt4 install path]), [ac_qt4_path="$withval"], [ac_qt4_path="no"]) AC_ARG_WITH(qt5, AC_HELP_STRING([--with-qt5=PATH], [use alternate Qt5 install path]), [ac_qt5_path="$withval"], [ac_qt5_path="no"]) if test "x$ac_qt4_path" != "xno"; then ac_with_paths="$ac_with_paths $ac_qt4_path" ac_qt4="yes" fi if test "x$ac_qt5_path" != "xno"; then ac_with_paths="$ac_with_paths $ac_qt5_path" ac_qt5="yes" fi if test "x$ac_qt5" = "xno"; then ac_qt4="yes" fi if test "x$ac_qt4" = "xyes"; then ac_qt5="no" fi # Set for alternate liblscp installation dir. AC_ARG_WITH(liblscp, AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), [ac_with_paths="$ac_with_paths $withval"]) # Set for alternate libgig installation dir. AC_ARG_WITH(libgig, AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), [ac_with_paths="$ac_with_paths $withval"]) # Honor user specified flags. ac_cflags=$CFLAGS ac_ldflags=$LDFLAGS # 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 PKG_PROG_PKG_CONFIG # Check for proper flags. ac_arch=`uname -m` # Check for install paths and alternatives... ac_libdirs="lib" if test "x$ac_arch" = "xx86_64"; then ac_libdirs="$ac_libdirs lib64" fi CFLAGS="-fPIC $CFLAGS" CPPFLAGS="-fPIC $CPPFLAGS" # 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 -d $X/include; then CFLAGS="-I$X/include $CFLAGS " CPPFLAGS="-I$X/include $CPPFLAGS" ac_incpath="$X/include $ac_incpath" fi for Y in $ac_libdirs; do if test -d $X/$Y; then LIBS="-L$X/$Y $LIBS" ac_libs="-L$X/$Y $ac_libs" fi done done # A common error message: ac_errmsg="not found in current PATH. Maybe QT development environment isn't available." if test "x$ac_qt4" = "xyes"; then AC_PATH_PROG(ac_qmake, qmake-qt4, [no], $ac_path) fi if test "x$ac_qt5" = "xyes"; then AC_PATH_PROG(ac_qmake, qmake-qt5, [no], $ac_path) fi if test "x$ac_qmake" = "xno"; then AC_PATH_PROG(ac_cv_qmake, qmake, [no], $ac_path) ac_qmake=$ac_cv_qmake fi if test "x$ac_qmake" = "xno"; then AC_MSG_ERROR([qmake $ac_errmsg]) fi # Check for proper Qt4/5 major version. ac_qt_version_major=`$ac_qmake -query QT_VERSION | cut -d. -f1` if test "x$ac_qt4" = "xyes" -a "x$ac_qt_version_major" != "x4"; then AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)]) fi if test "x$ac_qt5" = "xyes" -a "x$ac_qt_version_major" != "x5"; then AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)]) fi ac_qt_install_bins=`$ac_qmake -query QT_INSTALL_BINS` if test -d $ac_qt_install_bins; then ac_path="$ac_qt_install_bins:$ac_path" fi # Check it again, now with updated PATH, just in case... AC_PATH_PROG(ac_cv_qmake, qmake, [no], $ac_path) ac_qmake=$ac_cv_qmake if test "x$ac_qmake" = "xno"; then AC_MSG_ERROR([qmake $ac_errmsg]) fi AC_SUBST(ac_qmake) ac_qt_install_headers=`$ac_qmake -query QT_INSTALL_HEADERS` if test -d $ac_qt_install_headers; then CFLAGS="-I$ac_qt_install_headers $CFLAGS " CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS" ac_incpath="$ac_qt_install_headers $ac_incpath" fi ac_qt_install_libs=`$ac_qmake -query QT_INSTALL_LIBS` if test -d $ac_qt_install_libs; then LIBS="-L$ac_qt_install_libs $LIBS" ac_libs="-L$ac_qt_install_libs $ac_libs" fi # Check for proper Qt4/5 version. if test "x$ac_qt4" = "xyes"; then AC_CACHE_CHECK([for Qt library version >= 4.4], ac_cv_qtversion, [ AC_TRY_LINK([#include "QtCore/qglobal.h"], [ #if QT_VERSION < 0x040400 || QT_VERSION >= 0x050000 #error Qt library 4.4 or greater required. #endif ], ac_cv_qtversion="yes", [ echo "no; Qt 4.4 or greater is required" exit 1 ]) ]) fi if test "x$ac_qt5" = "xyes"; then AC_CACHE_CHECK([for Qt library version >= 5.1], ac_cv_qtversion, [ AC_TRY_LINK([#include "QtCore/qglobal.h"], [ #if QT_VERSION < 0x050100 || QT_VERSION >= 0x060000 #error Qt library 5.1 or greater required. #endif ], ac_cv_qtversion="yes", [ echo "no; Qt 5.1 or greater is required" exit 1 ]) ]) fi # 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, round, [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 mandatory libraries. AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"]) if test "x$ac_liblscp" = "xno"; then AC_MSG_ERROR([LSCP library not found.]) fi ac_libs="$ac_libs -llscp" case "{$host}" in *mingw*) ac_libs="$ac_libs -lws2_32" LIBS="$LIBS -lws2_32" ;; esac AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], ac_cv_instrument_name, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; info.instrument_name = 0; ], ac_cv_instrument_name="yes", ac_cv_instrument_name="no") ]) ac_instrument_name=$ac_cv_instrument_name if test "x$ac_instrument_name" = "xyes"; then AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) fi AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], ac_cv_mute_solo, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; info.mute = 0; info.solo = 0; ], ac_cv_mute_solo="yes", ac_cv_mute_solo="no") ]) ac_mute_solo=$ac_cv_mute_solo if test "x$ac_mute_solo" = "xyes"; then AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"]) fi if test "x$ac_mute_solo" = "xyes"; then AC_CHECK_LIB(lscp, lscp_set_channel_solo, [ac_mute_solo="yes"], [ac_mute_solo="no"]) fi if test "x$ac_mute_solo" = "xyes"; then AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.]) fi AC_CHECK_LIB(lscp, lscp_map_midi_instrument, [ac_midi_instrument="yes"], [ac_midi_instrument="no"]) if test "x$ac_midi_instrument" = "xyes"; then AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.]) fi AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"]) if test "x$ac_fxsend" = "xyes"; then AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], ac_cv_fxsend_level, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_fxsend_info_t info; info.level = 0.0f; ], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no") ]) ac_fxsend_level=$ac_cv_fxsend_level if test "x$ac_fxsend_level" = "xyes"; then AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) fi AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"]) if test "x$ac_fxsend_rename" = "xyes"; then AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.]) fi fi AC_CACHE_CHECK([for audio_routing array type], ac_cv_audio_routing, [ AC_TRY_COMPILE([#include "lscp/client.h"], [ lscp_channel_info_t info; char ch = info.audio_routing[0][0]; ], ac_cv_audio_routing="no", ac_cv_audio_routing="yes") ]) ac_audio_routing=$ac_cv_audio_routing if test "x$ac_audio_routing" = "xyes"; then AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) fi AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"]) if test "x$ac_volume" = "xyes"; then AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.]) fi AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"]) if test "x$ac_edit_instrument" = "xyes"; then AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.]) fi AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], ac_cv_channel_midi_event, [ AC_TRY_COMPILE([ #include "lscp/client.h" #include "lscp/event.h" ], [ lscp_event_t ev; ev = LSCP_EVENT_CHANNEL_MIDI; ], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no") ]) ac_channel_midi_event=$ac_cv_channel_midi_event if test "x$ac_channel_midi_event" = "xyes"; then AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) fi AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp], ac_cv_device_midi_event, [ AC_TRY_COMPILE([ #include "lscp/client.h" #include "lscp/event.h" ], [ lscp_event_t ev; ev = LSCP_EVENT_DEVICE_MIDI; ], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no") ]) ac_device_midi_event=$ac_cv_device_midi_event if test "x$ac_device_midi_event" = "xyes"; then AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.]) fi AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"]) if test "x$ac_max_voices" = "xyes"; then AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.]) fi # Check for optional libraries. if test "x$ac_libgig" = "xyes"; then PKG_CHECK_MODULES(LIBGIG, gig >= 3.3.0, [ac_libgig="yes"], [ac_libgig="no"]) if test "x$ac_libgig" = "xyes"; then AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) AC_SUBST(LIBGIG_CFLAGS) AC_SUBST(LIBGIG_LIBS) ac_cflags="$ac_cflags $LIBGIG_CFLAGS" ac_libs="$ac_libs $LIBGIG_LIBS" AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) ac_libgig_setautoload="yes" fi fi # 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 debugging stack-trace. if test "x$ac_stacktrace" = "xyes"; then AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) fi # Some recent distros (eg. fedora, debian) require this. if test "x$ac_cv_lib_X11_main" = "xyes"; then ac_libs="$ac_libs -lX11" fi AC_SUBST(ac_libs) AC_SUBST(ac_incpath) AC_SUBST(ac_cflags) AC_SUBST(ac_ldflags) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h) AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) if test "x$ac_lscp_h" = "xno"; then AC_MSG_ERROR([LSCP headers not found.]) fi if test "x$ac_libgig" = "xyes"; then AC_CHECK_HEADER(libgig/SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"]) if test "x$ac_libgig_sf2" = "xyes"; then AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig/SF.h is available.]) fi fi # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST # Checks for library functions. AC_CHECK_FUNCS(system) # Finally produce a configure header file and the makefiles. 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 " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name" echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo" echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument" echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend" echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level" echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename" echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing" echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume" echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" if test "x$ac_libgig" = "xyes"; then echo " libgig supports fast information retrieval . . . .: $ac_libgig_setautoload" echo " libgig supports SoundFont2 instruments files . . .: $ac_libgig_sf2" fi echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" 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 qsampler-0.3.1/PaxHeaders.6862/COPYING0000644000000000000000000000013212554456160014064 xustar0030 mtime=1437752432.752090072 30 atime=1437752432.752090072 30 ctime=1437752432.752090072 qsampler-0.3.1/COPYING0000644000175000001440000004310312554456160014711 0ustar00rncbcusers00000000000000 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. qsampler-0.3.1/PaxHeaders.6862/INSTALL0000644000000000000000000000013212554456160014062 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/INSTALL0000644000175000001440000003634012554456160014714 0ustar00rncbcusers00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. 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 you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' 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. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. 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 can use 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 `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer 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. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= 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'. 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. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS 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 machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. 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. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. qsampler-0.3.1/PaxHeaders.6862/Makefile.git0000644000000000000000000000013212554456160015253 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/Makefile.git0000644000175000001440000000051712554456160016102 0ustar00rncbcusers00000000000000all: configure configure: Makefile.in configure.ac @aclocal @autoheader @autoconf @rm -rf *.cache clean: @if [ -f Makefile ]; then make clean; fi || true @rm -rvf Makefile configure config.* src/.ui src/.obj src/.moc @rm -rvf src/Makefile src/config.* src/*.pri src/*.desktop @rm -rvf *.cache *.log *.status *.spec *.m4 .m4 qsampler-0.3.1/PaxHeaders.6862/Makefile.in0000644000000000000000000000013212554456160015076 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/Makefile.in0000644000175000001440000000565712554456160015737 0ustar00rncbcusers00000000000000prefix = @ac_prefix@ qmake = @ac_qmake@ lupdate = @ac_lupdate@ lrelease = @ac_lrelease@ name = qsampler target = src/$(name) headers = \ src/config.h \ src/qsamplerAbout.h \ src/qsamplerOptions.h \ src/qsamplerChannel.h \ src/qsamplerMessages.h \ src/qsamplerInstrument.h \ src/qsamplerInstrumentList.h \ src/qsamplerDevice.h \ src/qsamplerFxSend.h \ src/qsamplerFxSendsModel.h \ src/qsamplerUtilities.h \ src/qsamplerInstrumentForm.h \ src/qsamplerInstrumentListForm.h \ src/qsamplerDeviceForm.h \ src/qsamplerDeviceStatusForm.h \ src/qsamplerChannelStrip.h \ src/qsamplerChannelForm.h \ src/qsamplerChannelFxForm.h \ src/qsamplerOptionsForm.h \ src/qsamplerMainForm.h sources = \ src/qsampler.cpp \ src/qsamplerOptions.cpp \ src/qsamplerChannel.cpp \ src/qsamplerMessages.cpp \ src/qsamplerInstrument.cpp \ src/qsamplerInstrumentList.cpp \ src/qsamplerDevice.cpp \ src/qsamplerFxSend.cpp \ src/qsamplerFxSendsModel.cpp \ src/qsamplerUtilities.cpp \ src/qsamplerInstrumentForm.cpp \ src/qsamplerInstrumentListForm.cpp \ src/qsamplerDeviceForm.cpp \ src/qsamplerDeviceStatusForm.cpp \ src/qsamplerChannelStrip.cpp \ src/qsamplerChannelForm.cpp \ src/qsamplerChannelFxForm.cpp \ src/qsamplerOptionsForm.cpp \ src/qsamplerMainForm.cpp forms = \ src/qsamplerInstrumentForm.ui \ src/qsamplerInstrumentListForm.ui \ src/qsamplerDeviceForm.ui \ src/qsamplerChannelStrip.ui \ src/qsamplerChannelForm.ui \ src/qsamplerChannelFxForm.ui \ src/qsamplerOptionsForm.ui \ src/qsamplerMainForm.ui resources = \ src/qsampler.qrc translations_sources = \ src/translations/qsampler_cs.ts \ src/translations/qsampler_ru.ts translations_targets = \ src/translations/qsampler_cs.qm \ src/translations/qsampler_ru.qm export datarootdir = @datarootdir@ export datadir = @datadir@ export mandir = @mandir@ translations_dir = $(datadir)/$(name)/translations all: $(target) $(target): $(name).mak $(resources) ${forms} $(sources) $(headers) @$(MAKE) -f $(name).mak $(name).mak: $(name).pro @$(qmake) -o $(name).mak $(name).pro translations_lupdate: $(name).pro @$(lupdate) -verbose $(name).pro translations_lrelease: translations_lupdate $(translations_targets) %.qm: %.ts @$(lrelease) -verbose $< -qm $@ install: $(target) translations_lrelease $(name).1 @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak install @install -d -v -m 0755 $(DESTDIR)$(translations_dir) @install -d -v -m 0755 $(DESTDIR)$(mandir)/man1 @install -v -m 0644 $(translations_targets) $(DESTDIR)$(translations_dir) @install -v -m 0644 $(name).1 $(DESTDIR)$(mandir)/man1 @gzip -vf $(DESTDIR)$(mandir)/man1/$(name).1 uninstall: $(DESTDIR)$(prefix)/bin/$(name) @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak uninstall @rm -rvf $(DESTDIR)$(translations_dir) @rm -vf $(DESTDIR)$(mandir)/man1/$(name).* clean: $(name).mak @$(MAKE) -f $(name).mak clean @rm -f $(target) $(target).mak $(name).mak @rm -rf *.cache *.log *.status $(translations_targets) qsampler-0.3.1/PaxHeaders.6862/qsampler.10000644000000000000000000000013212554456160014737 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/qsampler.10000644000175000001440000000321112554456160015560 0ustar00rncbcusers00000000000000.TH QSAMPLER 1 "June 17, 2014" .SH NAME Qsampler \- A LinuxSampler Qt GUI Interface .SH SYNOPSIS .B qsampler [\fIoptions\fR] [\fIsession-file\fR] .SH DESCRIPTION This manual page documents briefly the .B qsampler command. .PP \fBQsampler\fP is a LinuxSampler GUI front-end application written in C++ around the Qt framework using Qt Designer. At the moment it just wraps as a client reference interface for the LinuxSampler Control Protocol (LSCP). .PP \fBLinuxSampler\fP is a work in progress. The goal is to produce a free, open source pure software audio sampler with professional grade features, comparable to both hardware and commercial Windows/Mac software samplers. .PP The initial platform will be Linux because it is one of the most promising open source multimedia operating systems. Thanks to various kernel patches and the Jack Audio Connection Kit, Linux is currently able to deliver rock solid sub-5 millisecond MIDI-to-Audio response. .SH OPTIONS .HP \fB\-s, \fB\-\-start\fR .IP Start linuxsampler server locally .HP \fB\-h, \fB\-\-hostname\fR=[\fIhost\fR] .IP Specify linuxsampler server hostname (default = localhost) .HP \fB\-p, \fB\-\-port\fR=[\fIport\fR] .IP Specify linuxsampler server port number (default = 8888) .HP \fB\-?, \fB\-\-help\fR .IP Show help about command line options .HP \fB\-v, \fB\-\-version\fR .IP Show version information .SH FILES Configuration settings are stored in ~/.config/rncbc.org/Qsampler.conf .SH SEE ALSO .BR linuxsampler (1) .SH AUTHOR Qsampler was written by Rui Nuno Capela, Christian Schoenebeck. .PP This manual page was written by Matt Flax , for the Debian project (but may be used by others). qsampler-0.3.1/PaxHeaders.6862/qsampler.pro0000644000000000000000000000013212554456160015377 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/qsampler.pro0000644000175000001440000000034212554456160016222 0ustar00rncbcusers00000000000000# qsampler.pro # QMAKEVERSION = $$[QMAKE_VERSION] ISQT4 = $$find(QMAKEVERSION, ^[2-9]) isEmpty( ISQT4 ) { error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4"); } TEMPLATE = subdirs SUBDIRS = src qsampler-0.3.1/PaxHeaders.6862/qsampler.spec.in0000644000000000000000000000013212554456160016136 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/qsampler.spec.in0000644000175000001440000001027412554456160016766 0ustar00rncbcusers00000000000000%define name @PACKAGE_TARNAME@ %define version @PACKAGE_VERSION@ %define release 16 %define _prefix @ac_prefix@ Summary: A LinuxSampler Qt GUI interface Name: %{name} Version: %{version} Release: %{release} License: GPL-2.0+ Group: Productivity/Multimedia/Sound/Midi Source0: %{name}-%{version}.tar.gz URL: http://qsampler.sourceforge.net/ #Packager: rncbc.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot #BuildRequires: libqt4-devel >= 4.4 %if %{defined fedora} BuildRequires: qt5-qtbase-devel >= 5.1, qt5-linguist %else BuildRequires: libqt5-qtbase-devel >= 5.1, libqt5-linguist %endif BuildRequires: liblscp-devel >= 0.5.6 BuildRequires: libgig-devel >= 3.3.0 %description Qsampler is a LinuxSampler GUI front-end application written in C++ around the Qt framework using Qt Designer. For the moment it just wraps the client interface of LinuxSampler Control Protocol (LSCP) (http://www.linuxsampler.org). %prep %setup [ -f Makefile.git ] && %__make -f Makefile.git %build %configure %__make %install %__make DESTDIR=%{buildroot} install %clean [ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog README TODO #dir %{_datadir}/mime #dir %{_datadir}/mime/packages #dir %{_datadir}/applications %dir %{_datadir}/icons/hicolor %dir %{_datadir}/icons/hicolor/32x32 %dir %{_datadir}/icons/hicolor/32x32/apps %dir %{_datadir}/icons/hicolor/32x32/mimetypes %dir %{_datadir}/icons/hicolor/scalable %dir %{_datadir}/icons/hicolor/scalable/apps %dir %{_datadir}/icons/hicolor/scalable/mimetypes %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/translations %dir %{_datadir}/appdata #dir %{_datadir}/man #dir %{_datadir}/man/man1 %{_bindir}/%{name} %{_datadir}/mime/packages/%{name}.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/32x32/apps/%{name}.png %{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}*.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/icons/hicolor/scalable/mimetypes/application-x-%{name}*.svg %{_datadir}/%{name}/translations/%{name}_*.qm %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/man/man1/%{name}.1.gz %changelog * Sun Jul 19 2015 Rui Nuno Capela 0.3.1 - Summer'15 release frenzy. * Wed Mar 25 2015 Rui Nuno Capela 0.3.0 - Pre-LAC2015 release frenzy. * Tue Dec 31 2013 Rui Nuno Capela 0.2.3 - A fifth of a Jubilee release. * Mon May 17 2010 Rui Nuno Capela - Standard desktop icon fixing. * Sat Aug 1 2009 Rui Nuno Capela 0.2.2 - New 0.2.2 release. * Thu Dec 6 2007 Rui Nuno Capela - Qt4 migration 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. * Mon Jan 15 2007 Rui Nuno Capela - Added sampler channel FX send support at session save code-level. - Global sampler volume slider/spinbox combo is now featured. * Sun Dec 17 2006 Rui Nuno Capela - Added preliminary MIDI instrument mapping support. * Thu Jun 01 2006 Rui Nuno Capela - Take a chance for a new 0.1.3 release. - Changed deprecated copyright attribute to license. * Wed Aug 24 2005 Rui Nuno Capela - Prepared auto-generation from configure. * Tue Aug 16 2005 Rui Nuno Capela - Get in sync with latest offerings from liblscp (0.3.1) and specially libgig (2.0.2) which broke previous ABI, somewhat. * Thu Jun 23 2005 Rui Nuno Capela - Even minor workings needs a rest. * Mon Jun 13 2005 Rui Nuno Capela - The mantra of bugfixes. * Mon May 23 2005 Rui Nuno Capela - Device configuration breakthrough. * Fri Mar 4 2005 Rui Nuno Capela - Fifth alpha-release. * Tue Nov 16 2004 Rui Nuno Capela - Prepared for the fourth alpha release. * Tue Nov 16 2004 Rui Nuno Capela - Prepared for the fourth alpha release. * Wed Jun 2 2004 Rui Nuno Capela - Created initial qsampler.spec qsampler-0.3.1/PaxHeaders.6862/README0000644000000000000000000000013212554456160013711 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/README0000644000175000001440000000555612554456160014550 0ustar00rncbcusers00000000000000Qsampler - A LinuxSampler Qt GUI Interface ------------------------------------------ Qsampler is a LinuxSampler GUI front-end application written in C++ around the Qt framework using Qt Designer. At the moment it just wraps as a client reference interface for the LinuxSampler Control Protocol (LSCP). LinuxSampler is a work in progress. The goal is to produce a free, open source pure software audio sampler with professional grade features, comparable to both hardware and commercial Windows/Mac software samplers. The initial platform will be Linux because it is one of the most promising open source multimedia operating systems. Thanks to various kernel patches and the Jack Audio Connection Kit, Linux is currently able to deliver rock solid sub-5 millisecond MIDI-to-Audio response. Homepage: http://qsampler.sourceforge.net See also: http://www.linuxsampler.org License: GNU General Public License (GPL) Requirements ------------ The software requirements for build and runtime are listed as follows: Mandatory: - Qt framework, C++ class library and tools for cross-platform application and UI development http://qt.io/ - liblscp, C library for LinuxSampler control protocol API. http://www.linuxsampler.org/ Optional (opted-in at build time): - libgig, C++ library for loading and modifying Gigasampler and DLS files. http://www.linuxsampler.org/libgig/ Installation ------------ The installation procedure follows the standard for source distributions. Unpack the tarball and in the extracted source directory: ./configure [--prefix=/usr/local] make and optionally as root: make install This procedure will end installing the following couple of files: ${prefix}/bin/qsampler ${prefix}/share/pixmaps/qsampler.png ${prefix}/share/applications/qsampler.desktop ${prefix}/share/locale/qsampler_*.qm Just launch ${prefix}/bin/qsampler and you're off (hopefully). Note that the default installation path ${prefix} is /usr/local. If you're checking out from Git, you'll have to prepare the configure script just before you proceed with the above instructions: make -f Makefile.git Configuration ------------- Qsampler holds its settings and configuration state per user, in a file located as $HOME/.config/linuxsampler.org/Qsampler.conf . Normally, there's no need to edit this file, as it is recreated and rewritten everytime qsampler is run. Bugs ---- Plenty as this is still alpha software. Bug reports should be posted on LinuxSampler bug tracker (http://bugs.linuxsampler.org). Support ------- Qsampler 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 LinuxSampler project site (http://www.linuxsampler.org). Enjoy. rncbc aka Rui Nuno Capela rncbc at rncbc dot org qsampler-0.3.1/PaxHeaders.6862/src0000644000000000000000000000013212554456162013545 xustar0030 mtime=1437752434.304090097 30 atime=1437752432.755090073 30 ctime=1437752434.304090097 qsampler-0.3.1/src/0000755000175000001440000000000012554456162014446 5ustar00rncbcusers00000000000000qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelForm.h0000644000000000000000000000013212554456160017732 xustar0030 mtime=1437752432.758090073 30 atime=1437752432.757090073 30 ctime=1437752432.758090073 qsampler-0.3.1/src/qsamplerChannelForm.h0000644000175000001440000000526712554456160020570 0ustar00rncbcusers00000000000000// qsamplerChannelForm.h // /**************************************************************************** Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerChannelForm_h #define __qsamplerChannelForm_h #include "ui_qsamplerChannelForm.h" #include "qsamplerDevice.h" #include "qsamplerChannel.h" #include "qsamplerDeviceForm.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::Channelform -- Channel form interface. // class ChannelForm : public QDialog { Q_OBJECT public: ChannelForm(QWidget* pParent = NULL); ~ChannelForm(); void setup(Channel* pChannel); void setupDevice(Device* pDevice, Device::DeviceType deviceTypeMode, const QString& sDriverName); void selectMidiDriverItem(const QString& sMidiDriver); void selectMidiDeviceItem(int iMidiItem); void selectAudioDriverItem(const QString& sAudioDriver); void selectAudioDeviceItem(int iAudioItem); protected slots: void accept(); void reject(); void openInstrumentFile(); void updateInstrumentName(); void selectMidiDriver(const QString& sMidiDriver); void selectMidiDevice(int iMidiItem); void setupMidiDevice(); void selectAudioDriver(const QString& sAudioDriver); void selectAudioDevice(int iAudioItem); void setupAudioDevice(); void updateDevices(); void optionsChanged(); void stabilizeForm(); void updateTableCellRenderers(); void updateTableCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); private: Ui::qsamplerChannelForm m_ui; Channel* m_pChannel; int m_iDirtySetup; int m_iDirtyCount; QList m_audioDevices; QList m_midiDevices; DeviceForm* m_pDeviceForm; ChannelRoutingModel m_routingModel; ChannelRoutingDelegate m_routingDelegate; }; } // namespace QSampler #endif // __qsamplerChannelForm_h // end of qsamplerChannelForm.h qsampler-0.3.1/src/PaxHeaders.6862/images0000644000000000000000000000013212554456160015010 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.755090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/0000755000175000001440000000000012554456160015711 5ustar00rncbcusers00000000000000qsampler-0.3.1/src/images/PaxHeaders.6862/displaybg1.png0000644000000000000000000000013212554456160017632 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/displaybg1.png0000644000175000001440000001762012554456160020464 0ustar00rncbcusers00000000000000PNG  IHDR@@kWIDATx]]qpV䯰%_I!)$@] }興t"+*+ug8N ib ##H$@@uKM>*} 6n;z~P(^)Tf~ >[p |zCk=kH@^ ?t_?o?Oşg\^?y8c&)Hj$#O@ J&{%2oW2L~+=(Z7>#q}Ɨ{'c9 Ѝ!y o q΃z˃+j`P(>buKH<yfx:;_}3}"^_&Nn8pApAA>s0H F,`lSR֢ȸ/Ĕ }C҂pxm]l+iƃ "C1ȞVd}Tb?|BzY(ނ{f5khT[!ԁ`]?k=ELO>:J8b"%Fb2 \Lͮ5:\+ `,o)l4n:$yY!ƈi"ia "wq. cבK1Mt>{c&Dc"P1MYI?wK`NW=JRɚ=Kh,'{ W9n`y{+gi(e2S;`OOi{e?K<ж? DS62c蘀pžՙaHM>\?5rzyifb9`$sKy~̦ȔÀPIT"O˰g&ePIC=ƮdD:1dGZ!p3>%,u<`D˿e`\2LXH53K""!@+TLbC`סv%@_HWʸ`'x,K=숞[,;C d_Z 7 eM P(CLW\ovɕV%BgC#2;K OۮJq4#V'0܁1._ɔ&!*"a>urAMY$7,P9: bp|PuQ=[aa-hu6]]4ۻ8}5~%IJGp8w}YmH) 6H9uFdƒ]Kr#MpDݍ[Xic@ %W'JVR$}1xoqA:2@'&W .M'c9n*F5u%ISb4S Hf(.vtzRp8,}nD%“xo<Ϙir[F - h>@H/MDQ$@m(ۺ[bPjݫe!by2ͧl B:EzXwdqBJ1!zU,Aezٰy<}!9fsp?#p^n 8'`foj_i7aa Oe5~)Jbc6gJrl664Cua~{;Yfҫ;;ʫhM=7]̣[T/mi‡'*w ; ŴYL^ȞpT ]>Ǵs&g|,ieVHlj3͊10\<ٸ Cf_ lbzd:{0P+uݬIK׈y_W|u{HMZ=3FQ"@_zI Huktd55MeuPr`F\[pUx_2t`34XVck@ocS!:8a L\."_^t 8Dw}[qrҨX`~e*!&)V.ZYYVmJ-&hg՘s iQ+IA)-Y*K(5Gη県2֬]b-!j# `ju1se' yA)0>DHL7!P5zBd>-)c{rvbEw3sj|ZS\B~OHM>=&pCt[==OOq`C?@hF $V L t, &Wqժ7+\.3X0,>,q6n+1'h:QH_C`z?ח/o^8/zsEasLACRH>{eٌQ,k!uy!YB8i1#YQ͛8X,xLn2ƝP?Q;^P/= Zuu?c 21/ Ox~麄 YS%.QP*fD!n,S APYpfQ/h͙+n1&k3àÐNG`#} 5vͻ"i5/Os;f~è2r|{$>oW0θ\gp7GI=;DX,+XEBTj5+,EbadK ]aW`P]5swlji4m7IJ T̽PJ $8_ x{y˴$>y3ABtgVX~b, mpiK2@LUdyjQBijW ifg5m.v3)*X w9ֻ@ҟE+屰Yxh6-g YےItP/GIJW8@̓cϗ;]FS3@4ay^2IaH7P) 7ۑDgW%gUJ=:̵Fd7xVBSlz Xii{cOR舑) hv x>HK:,S3Ds8py59Wq0]'Dkca7]5T0,|_*YK2̆g@{Bb|;d.D%}Hx,Gz =+܋ްҺ`Ԡr0cy4;utE`ث% =/%1qZ +7(fL=25 LY>.P2@ .,=:;,z 0 p-| 4Jm{FNaxf`u&Huf\tְ}l |U1Uח[ YR XN4d(Pn.1: qfZX2;Q0V:68E[Zbby_ʎ\F_ivxa9+$wmI]"Q5V-Mx˅UF9O8ҕ!#wJs˳zݮ海7rt* 8aR48U~!FMENt@%6P3AdH-G\"3O W,T5Lnh,[D6 RZB+J9Vt>9nʢ}v/e8>&y Ig [ Kb\^(~OQ\K+ف0=%J T[i9(~~V&l9L "~ꅮi C:bXk;2x(DzH I;яG~TQGgճkHfPEВJ6dfQ4g{iϥzr)M:e7TyGeP7'ܽc7{w2e{Ƕ&AVy;]냴ՔxeoMQSԡi[Z&:t.sUu='7a588 EckW8^6B#ًAҾ,p #V5doܒT#EYg"bh /2gZiA0[ wv*Vt`Cs/z!]FGzvW~Y`s\*p^n4cD=(L !aBԺd6 ) 5v1STYefZ2)4:MjA!Ye[ߞ?י8<;`@88q/2qe}P S$/M"Ok~R2Kˬ) 5/1px3; M6вF'deѕǸȗAª/~0XJREY޶ $vVz9!\W,Qs珒KXJl5PA,U[!(zVy;wk3c;&Fa+&f-"!!i|^Gaoϼzb&2 Y[Xp✑Pj Dq@CtZna! >CO>@; oϧtk\"Mh=OXV{aaIuB.0cV]^p`uXJ^9ٍoT-XkW" j `[ )Bxw^X,Đ#h{ u^b0aѬyk[٣2VhT\Ŋ닝UF.za]1cy'hǗJٗؾ_!Ά屆 -1j"[?i"g+JgZV (PB-M]f,iLuf;#]ןMA zƖQ`gSd';uZ&%ߛf +.EvH Xxy461`'4H-m.לe|4t`m2-e6cOP-h>#Iƙ!1Qe}j+:ٷ5wR2u-JQ+cż#jgiyr954+Pa+3 z l Yΰj9SYkY &ДڭZC,io݄@IGl XPY9wC$6T\ai <;uLTAx@v*DˁJzk+k}/C`waTkzUǧ)[n0*c+"I)23MLE]%ˁ,1 m_tYbb8*{ciG[KfF%X6edo4As`v:wfp\V[Ga9d|F$t=`jy1wyQ'[ jeMfaJzP"e-IM`GwzZZEt}OY~G#~4 =j&Ycn2>bQߧC]Z (\bX>b"P?e-3jsx=X؜'Q -f~fw^G}vEf|v͑d\{lI9Tmy:e(81j$JZYDcD+k=֭&tjN횾N~FVX _9+$ah[BkHS"+]J[ŮR>ǖ)A[/&YI#lI<$3Ώ4Q@&-˓J iKr=P{l !{y[K̝pViSUI52@(r/ϣs2 f5!0 InrfjAgbJQr]CaQP,𳆢udяDc U dY xZa>/76*$փIcf>s;&ce_ۏa^n dhZbMAUqH2RBV[ڬ6.B{IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/qsamplerInstrument.png0000644000000000000000000000013212554456160021510 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/qsamplerInstrument.png0000644000175000001440000000045212554456160022335 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME 6gb|IDAT8A 0?kYX~uJZ51K?BgPEUe !bFUif$I\55qzz?Z $sg@D|#=?v<%y2^C3V |7|g?TqxxüJs[VIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/ledon1.png0000644000000000000000000000013212554456160016755 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/ledon1.png0000644000175000001440000000125012554456160017577 0ustar00rncbcusers00000000000000PNG  IHDRabKGD pHYs  tIME&k;>5IDATx͒MkQ{g26 jlJSB#tD(n+Kw A]P]ٸ&&I?&ׅTk=s}x:ȟJ2fP K[d(6j_777EZ->'XXGgVM8V҅;N޻_b[٩z9^fۨ+DQvC'֯WLw-疲 E$@s^f8[q;j|[ƶT>%5!' óCu $JZ~=4Tv( %.XFLbԇ/;HR.8HD@a'R]bWā|>}Zq@]j6f)O4.EK @ M)˙K9k 5"ZFxl6_8m; |[ R|\pMmLwh<,__\.OW@ ,a8Eݶ?[u*~^IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/qsamplerChannel.png0000644000000000000000000000013212554456160020710 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/qsamplerChannel.png0000644000175000001440000000024712554456160021537 0ustar00rncbcusers00000000000000PNG  IHDRĴl;nIDATx 0D/1e2V%iC9RKi|_"q@C{H^yn;P)DAH"g&P՞^U10`=|{q ]l.i/kd%%MNIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/editAddChannel.png0000644000000000000000000000013212554456160020422 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/editAddChannel.png0000644000175000001440000000053712554456160021253 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME" t(IDAT8푱m0EMU4=XFic>]Њ!9I;??/`g/AX Ƙok瓯Cc4+1:? 9dfKhfxw+2M!یι};!oft5c(9>mL)agvBDx]i{*P*( R^ 32ﭷ9-{HIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/ledoff1.png0000644000000000000000000000013212554456160017113 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/ledoff1.png0000644000175000001440000000123112554456160017734 0ustar00rncbcusers00000000000000PNG  IHDRabKGD pHYs  tIME,Q &IDATx͒?oP{vҦBRT))  P &>#_ LlCi&n:NJ-3ޫ{~:ҽs6x0 !mם}|h4φc .DY'Pn.\u%S.:\e/z'~t4gVq8493݃c 핺}|: 4@Aq0 ,..=gEGA3XR(%0+>\\Uw۝|fqRh #IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/formReject.png0000644000000000000000000000013212554456160017673 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/formReject.png0000644000175000001440000000033012554456160020513 0ustar00rncbcusers00000000000000PNG  IHDRasRGBIDAT8RA +|?3gM 3U77u-[@<0X}&+^G-ةTEȟAG[v ,29kw';saE浶Dn7b rs>'`65IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/itemGroupNew.png0000644000000000000000000000013212554456160020220 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/itemGroupNew.png0000644000175000001440000000143212554456160021044 0ustar00rncbcusers00000000000000PNG  IHDRabKGD pHYs  tIME &3JIDATx}KlLQsw,!JYX4iTBDAlD#%^i$3Z@ bBHԫD=J[:c14S)|%> D"~S+W(DkN&K^ktuuS޾ϝuuu?Y [ZkN4hs/n_rz)޾a)x<DCCCtI <b1_p7𸣓 I/"ǐ{,Kb+g$wx + cO&"sϗ' Q W@)a+< A-ݏ5Ҥm XP!103r-4qRvACD9r_SS35$Ta1T%)\٥[5랞9skoo6 оOPk(0 P'>|ukV6˟$i)leaX.B`.-}(\e.wИIS9Rg_KfWb'c `UۢS,B@ww<}v9?~@LjIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/editEditChannel.png0000644000000000000000000000013212554456160020617 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/editEditChannel.png0000644000175000001440000000064212554456160021445 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME+ 4# "IDAT81J@"X V9I9MǘvsI=@oj 73{<_oR p| J0Fc]9Yھ$ɲ,)C[Z ߀ޜ ɫO}~0pʩ1ftND+;v(zfR@$9zGVDQW4|p۶UPJC< hkpwB Ir7*{[cL[SHDFῨWY;c IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/itemNew.png0000644000000000000000000000013212554456160017203 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/itemNew.png0000644000175000001440000000100312554456160020021 0ustar00rncbcusers00000000000000PNG  IHDRabKGD pHYs  tIME #!leIDATxڕOkA,{ZD؅,$D:G/U^H`5kY?Ib2I9{t]ΞkQ0nă,s0EM!7A(9u_fs_4_%P{bN|. +UJIŸ ?¯%#E蜇|k(j̿a 10E?IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/deviceDelete.png0000644000000000000000000000013212554456160020155 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/deviceDelete.png0000644000175000001440000000062712554456160021006 0ustar00rncbcusers00000000000000PNG  IHDRasRGBbKGD pHYs  tIMEIDAT8˵m0 ]"shgg Q! wq y ( AQw<$?bFP7=VJєݖ0boB_/ޫsADp"|mʶb MxP8s@OdHlnB0RT;1Lo>G}P]/ŵ7Hi|v*$U?"ܰ3,'c&IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/deviceCreate.png0000644000000000000000000000013212554456160020156 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/deviceCreate.png0000644000175000001440000000063012554456160021001 0ustar00rncbcusers00000000000000PNG  IHDRasRGBbKGD pHYs  tIME6`IDAT8˵u! D?ynۆ p6P цS@ 62Gff-ߙ֩,qZ 4!e0@wg9*9am,N(^sXmܣB++ZI @Jge!<2 DU FE Hk&qmȒϤ L)7Ek;^JMdQJO_Ƿ,IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/fileOpen.png0000644000000000000000000000013212554456160017334 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/fileOpen.png0000644000175000001440000000041112554456160020154 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBIDAT8U 0 tnb;k蛱YTn0 Y9D?.U,"ht>-"RV23bLy5r"U@!* 3H~}n"tO&l8oCFHP }/]ŷķz+n%u3*gf91> f:@IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/formEdit.png0000644000000000000000000000013212554456160017344 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/formEdit.png0000644000175000001440000000042712554456160020173 0ustar00rncbcusers00000000000000PNG  IHDRasRGBbKGD pHYs  tIME :/J1JIDAT8 ȥP&E1yKgV⁴sp'(7V@)%Ia8ڶÿv{fFn%03UT|.@SJvHzPs\_/@:xex+< \y*IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/itemGroupOpen.png0000644000000000000000000000013212554456160020370 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/itemGroupOpen.png0000644000175000001440000000156212554456160021220 0ustar00rncbcusers00000000000000PNG  IHDRa9IDAT8˅hu_{vtSk#Z R !psXʒ fհIDm퇮nλ_mgw=L{o|t]/JIII]MM񦦦/W˫=JͧN/Y4m}mmGl6[FWF"a!Dv?q;*-4Y[z )7 m0?vtaWN}|Y#)6R -*Y5ճl%ףe)R8}0u}g.ۖgt]޾{=?/qgvWgG2/\-ֵgrr hl~S<ݹSg .2qz4[oxl3E0ahΏ{=} Xm]D<*&B ѩ,8?ԏ+ӏwi»VI74M U W2soώ_ x8WjP @JR B!pؘ3] Lr)( @4)+* 0v}H)BHuZF-("l!i"ulM0 oc#" =Woy P; y~/ضPMNE{0As̪(lBtYʸts٤t96g~%OSHzZ<{[xk(!1hٞD# ~xJ)R03~YI99}ײWs3zN{lż:IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/qsamplerDevice.png0000644000000000000000000000013212554456160020537 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/qsamplerDevice.png0000644000175000001440000000053012554456160021361 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME$IDAT8A0 E_G8׀cا;g,ڊhYX/+@D%p|k}O`xk "2x>?T5y@.y2,kEB! ⲏ.^fJ5q -^g/1Tl e7^-NyS1fNwھzL2lc=tjUr.IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/formRefresh.png0000644000000000000000000000013212554456160020055 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/formRefresh.png0000644000175000001440000000112712554456160020702 0ustar00rncbcusers00000000000000PNG  IHDRaIDATxڭ]HSm(ZB7Ѣ~"N!AJ Ih٢Ңd˥qqc3s8μxޏﵰ*"MՃ jh1g%ڼ jxiG o4>ʴ 4X;'xK( ÀzmO$иjfH Qg+a&_H`a i jsBZ@A H ΐ^GhJ@aGr"~ͣs[fPXփYUHB~b&@T=T Rxȥ#8|ǩ M@[2UW$XU{k~*j+`i7ꃨ18rS g!.Cr_5~ \6;wѹ0ͤ> pS S^wPUŬb v&Dc9݁"b+ d|= U,d4;s-oJfIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/qsampler.svg0000644000000000000000000000013212554456160017432 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/qsampler.svg0000644000175000001440000002501112554456160020255 0ustar00rncbcusers00000000000000 image/svg+xml qsampler-0.3.1/src/images/PaxHeaders.6862/audio2.png0000644000000000000000000000013212554456160016756 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/audio2.png0000644000175000001440000000034112554456160017600 0ustar00rncbcusers00000000000000PNG  IHDRaIDAT8˕SQ ^7fYd Y׭07胄IJK$/4IKmYtYbGmAoR{ Cdܺv2eQƅ$DtgSDRwY*6MҜȉQxU )5''@iL&˜ՅIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/itemFile.png0000644000000000000000000000013212554456160017331 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/itemFile.png0000644000175000001440000000060412554456160020155 0ustar00rncbcusers00000000000000PNG  IHDRaKIDAT8ˍJ@ ^,4P]H *ϣc>Mׂ}xAjf.EM60|󟙉b>tށ6@2m;[Br B  NSјYV Ew qA'P̧ZLA`C%pQ,GLCQZ;/K[hLAuLjW]$$QӴKVR1 1XIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/editSetupChannel.png0000644000000000000000000000013212554456160021032 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/editSetupChannel.png0000644000175000001440000000047412554456160021663 0ustar00rncbcusers00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIMEIDAT8 E0TFa,=XC%K`Ë?"ר"yY "Fe-g4МׂOPٴO:[1]5À# m xΩ1nQZAgX.{}J|y|84g3@Dx9DiQ|DD(,s(k{ )30V?K-5! IENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/formAccept.png0000644000000000000000000000013212554456160017656 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/formAccept.png0000644000175000001440000000027312554456160020504 0ustar00rncbcusers00000000000000PNG  IHDRasRGBuIDAT8 D#u]Ùt&U04J?{ ;/~BLD0@hd l dp wA뵏cb{X6#aQshĂz$GP NӾUB [ OU3 %!ړ$c;/_>oe'7P+ՊCRpV "'l^ؾ\@cKW`aッ+36':& X8F@4[8& ʦ46VN :H8a)Z&{-âڏ`yΝ|١Z Cjz@ҢZ7ZW|g8 Ε y6y&Th- '.|M\ |pݦ]v'܎8~‘7O1? Ϗi:!z8kU&I+^5+QQ 4 Cߦ^}=kM gDJ PzzEѨiO2lH6Ie0u} m&B-VTFgaE VP~&9a!i`Y&uc F BYg&uo4| =&섳3aF9dӧf>bY.V tdHefkYs?6t 揞g!oVu+K0љHC}>8k+8N?lz^s(smܽ2ÎF,qc "Ni)L8Y9rSڼm%T#~`*4b闾O' !CFX? X^H VD0p/UDX©sgBr" ubiS|x~ލ)MsA4.a21AE:MRmHByǽ}ov KցBSa5n!-9iACJuBE l} sגm莥EA|!rS۷}<4Fr2q{_m/{܀f,0l8DJZ Ȃe*˴</.AWj'+^b!QJ b:@ TZ`:D r%,`z1&0\GȬډ\rTJT3\qj*o@y/ pÜ_Ksk0Fׁ\ f?ZfA !D8GY_ȦߥYIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/midi2.png0000644000000000000000000000013212554456160016577 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/images/midi2.png0000644000175000001440000000035712554456160017430 0ustar00rncbcusers00000000000000PNG  IHDRaIDAT8œ 0 D_9333G,WU[(H+>;9/c:%=Z. $$3y{fv 7;f$"INf "0"bHuQ2S֐tzm13i|ܷIWGSx*(kXw_ӗ_<, EIENDB`qsampler-0.3.1/src/images/PaxHeaders.6862/fileRestart.png0000644000000000000000000000013212554456160020057 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/images/fileRestart.png0000644000175000001440000000111712554456160020703 0ustar00rncbcusers00000000000000PNG  IHDRĴl;IDATxOhqw~63(9spX98I)rpܔ?)vp1L(R!3ofc~~v~C^zFAI;~Q # |iC9 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_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_SOCKET_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 home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelForm.ui0000644000000000000000000000013212554456160020120 xustar0030 mtime=1437752432.758090073 30 atime=1437752432.758090073 30 ctime=1437752432.758090073 qsampler-0.3.1/src/qsamplerChannelForm.ui0000644000175000001440000005374212554456160020757 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2005-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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. qsamplerChannelForm 0 0 460 320 7 1 0 0 Qt::StrongFocus Qsampler: Channel :/images/qsamplerChannel.png 9 6 0 6 0 0 0 0 24 24 26 26 Qt::TabFocus Browse for instrument filename :/images/fileOpen.png 7 0 0 0 320 0 Instrument name &Engine: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false EngineNameComboBox 7 0 0 0 Engine name &Filename: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentFileComboBox &Instrument: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentNrComboBox 7 0 0 0 320 0 Instrument filename true MIDI / Input 9 6 0 4 7 0 0 0 MIDI input device 0 0 0 0 24 24 26 26 Qt::TabFocus MIDI input device setup :/images/midi1.png &Map: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiMapComboBox &Device: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiDeviceComboBox 0 4 7 0 0 0 Instrument map Qt::Horizontal QSizePolicy::Expanding 160 20 &Type: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiDriverComboBox 0 4 5 0 0 0 MIDI input driver type Qt::Horizontal QSizePolicy::Expanding 20 20 &Port: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiPortSpinBox MIDI input port number &Channel: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiChannelComboBox MIDI input channel 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 All Audio / Output 9 6 0 6 0 4 7 0 0 0 Audio output device 0 0 0 0 24 24 26 26 Qt::TabFocus Audio output device setup :/images/audio1.png &Device: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioDeviceComboBox 0 4 5 0 0 0 Audio output driver type Qt::Horizontal QSizePolicy::Expanding 20 20 &Type: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioDriverComboBox 7 7 0 0 Audio routing table 320 80 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok EngineNameComboBox InstrumentFileComboBox InstrumentFileToolButton InstrumentNrComboBox DialogButtonBox qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannel.cpp0000644000000000000000000000013212554456160017441 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsamplerChannel.cpp0000644000175000001440000007045712554456160020302 0ustar00rncbcusers00000000000000// qsamplerChannel.cpp // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerChannel.h" #include "qsamplerUtilities.h" #include "qsamplerMainForm.h" #include "qsamplerChannelForm.h" #include #include #ifdef CONFIG_LIBGIG #include "gig.h" #ifdef CONFIG_LIBGIG_SF2 #include "SF.h" #endif #endif namespace QSampler { #define QSAMPLER_INSTRUMENT_MAX 128 #define UNICODE_RIGHT_ARROW QChar(char(0x92), char(0x21)) //------------------------------------------------------------------------- // QSampler::Channel - Sampler channel structure. // // Constructor. Channel::Channel ( int iChannelID ) { m_iChannelID = iChannelID; // m_sEngineName = noEngineName(); // m_sInstrumentName = noInstrumentName(); // m_sInstrumentFile = m_sInstrumentName; m_iInstrumentNr = -1; m_iInstrumentStatus = -1; m_sMidiDriver = "ALSA"; m_iMidiDevice = -1; m_iMidiPort = -1; m_iMidiChannel = -1; m_iMidiMap = -1; m_sAudioDriver = "ALSA"; m_iAudioDevice = -1; m_fVolume = 0.0f; m_bMute = false; m_bSolo = false; } // Default destructor. Channel::~Channel (void) { } // Create a new sampler channel, if not already. bool Channel::addChannel (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Are we a new channel? if (m_iChannelID < 0) { m_iChannelID = ::lscp_add_channel(pMainForm->client()); if (m_iChannelID < 0) { appendMessagesClient("lscp_add_channel"); appendMessagesError( QObject::tr("Could not add channel.\n\nSorry.")); } // Otherwise it's created... else appendMessages(QObject::tr("added.")); } // Return whether we're a valid channel... return (m_iChannelID >= 0); } // Remove sampler channel. bool Channel::removeChannel (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Are we an existing channel? if (m_iChannelID >= 0) { if (::lscp_remove_channel(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_remove_channel"); appendMessagesError(QObject::tr("Could not remove channel.\n\nSorry.")); } else { // Otherwise it's removed. appendMessages(QObject::tr("removed.")); m_iChannelID = -1; } } // Return whether we've removed the channel... return (m_iChannelID < 0); } // Channel-ID (aka Sammpler-Channel) accessors. int Channel::channelID (void) const { return m_iChannelID; } void Channel::setChannelID ( int iChannelID ) { m_iChannelID = iChannelID; } // Readable channel name. QString Channel::channelName (void) const { return (m_iChannelID < 0 ? QObject::tr("New Channel") : QObject::tr("Channel %1").arg(m_iChannelID)); } // Engine name accessors. const QString& Channel::engineName (void) const { return m_sEngineName; } bool Channel::loadEngine ( const QString& sEngineName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sEngineName == sEngineName) return true; if (::lscp_load_engine(pMainForm->client(), sEngineName.toUtf8().constData(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_load_engine"); return false; } appendMessages(QObject::tr("Engine: %1.").arg(sEngineName)); m_sEngineName = sEngineName; return true; } // Instrument filename accessor. const QString& Channel::instrumentFile (void) const { return m_sInstrumentFile; } // Instrument index accessor. int Channel::instrumentNr (void) const { return m_iInstrumentNr; } // Instrument name accessor. const QString& Channel::instrumentName (void) const { return m_sInstrumentName; } // Instrument status accessor. int Channel::instrumentStatus (void) const { return m_iInstrumentStatus; } // Instrument file loader. bool Channel::loadInstrument ( const QString& sInstrumentFile, int iInstrumentNr ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (!QFileInfo(sInstrumentFile).exists()) return false; if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr) return true; if (::lscp_load_instrument_non_modal( pMainForm->client(), qsamplerUtilities::lscpEscapePath( sInstrumentFile).toUtf8().constData(), iInstrumentNr, m_iChannelID ) != LSCP_OK) { appendMessagesClient("lscp_load_instrument"); return false; } appendMessages(QObject::tr("Instrument: \"%1\" (%2).") .arg(sInstrumentFile).arg(iInstrumentNr)); return setInstrument(sInstrumentFile, iInstrumentNr); } // Special instrument file/name/number settler. bool Channel::setInstrument ( const QString& sInstrumentFile, int iInstrumentNr ) { m_sInstrumentFile = sInstrumentFile; m_iInstrumentNr = iInstrumentNr; #ifdef CONFIG_INSTRUMENT_NAME m_sInstrumentName = QString::null; // We'll get it, maybe later, on channel_info... #else m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true); #endif m_iInstrumentStatus = 0; return true; } // MIDI driver type accessors (DEPRECATED). const QString& Channel::midiDriver (void) const { return m_sMidiDriver; } bool Channel::setMidiDriver ( const QString& sMidiDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sMidiDriver == sMidiDriver) return true; if (::lscp_set_channel_midi_type(pMainForm->client(), m_iChannelID, sMidiDriver.toUtf8().constData()) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_type"); return false; } appendMessages(QObject::tr("MIDI driver: %1.").arg(sMidiDriver)); m_sMidiDriver = sMidiDriver; return true; } // MIDI device accessors. int Channel::midiDevice (void) const { return m_iMidiDevice; } bool Channel::setMidiDevice ( int iMidiDevice ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiDevice == iMidiDevice) return true; if (::lscp_set_channel_midi_device(pMainForm->client(), m_iChannelID, iMidiDevice) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_device"); return false; } appendMessages(QObject::tr("MIDI device: %1.").arg(iMidiDevice)); m_iMidiDevice = iMidiDevice; return true; } // MIDI port number accessor. int Channel::midiPort (void) const { return m_iMidiPort; } bool Channel::setMidiPort ( int iMidiPort ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiPort == iMidiPort) return true; if (::lscp_set_channel_midi_port(pMainForm->client(), m_iChannelID, iMidiPort) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_port"); return false; } appendMessages(QObject::tr("MIDI port: %1.").arg(iMidiPort)); m_iMidiPort = iMidiPort; return true; } // MIDI channel accessor. int Channel::midiChannel (void) const { return m_iMidiChannel; } bool Channel::setMidiChannel ( int iMidiChannel ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiChannel == iMidiChannel) return true; if (::lscp_set_channel_midi_channel(pMainForm->client(), m_iChannelID, iMidiChannel) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_channel"); return false; } appendMessages(QObject::tr("MIDI channel: %1.").arg(iMidiChannel)); m_iMidiChannel = iMidiChannel; return true; } // MIDI instrument map accessor. int Channel::midiMap (void) const { return m_iMidiMap; } bool Channel::setMidiMap ( int iMidiMap ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iMidiMap == iMidiMap) return true; #ifdef CONFIG_MIDI_INSTRUMENT if (::lscp_set_channel_midi_map(pMainForm->client(), m_iChannelID, iMidiMap) != LSCP_OK) { appendMessagesClient("lscp_set_channel_midi_map"); return false; } #endif appendMessages(QObject::tr("MIDI map: %1.").arg(iMidiMap)); m_iMidiMap = iMidiMap; return true; } // Audio device accessor. int Channel::audioDevice (void) const { return m_iAudioDevice; } bool Channel::setAudioDevice ( int iAudioDevice ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_iAudioDevice == iAudioDevice) return true; if (::lscp_set_channel_audio_device(pMainForm->client(), m_iChannelID, iAudioDevice) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_device"); return false; } appendMessages(QObject::tr("Audio device: %1.").arg(iAudioDevice)); m_iAudioDevice = iAudioDevice; return true; } // Audio driver type accessors (DEPRECATED). const QString& Channel::audioDriver (void) const { return m_sAudioDriver; } bool Channel::setAudioDriver ( const QString& sAudioDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_sAudioDriver == sAudioDriver) return true; if (::lscp_set_channel_audio_type(pMainForm->client(), m_iChannelID, sAudioDriver.toUtf8().constData()) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_type"); return false; } appendMessages(QObject::tr("Audio driver: %1.").arg(sAudioDriver)); m_sAudioDriver = sAudioDriver; return true; } // Channel volume accessors. float Channel::volume (void) const { return m_fVolume; } bool Channel::setVolume ( float fVolume ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_fVolume == fVolume) return true; if (::lscp_set_channel_volume(pMainForm->client(), m_iChannelID, fVolume) != LSCP_OK) { appendMessagesClient("lscp_set_channel_volume"); return false; } appendMessages(QObject::tr("Volume: %1.").arg(fVolume)); m_fVolume = fVolume; return true; } // Sampler channel mute state. bool Channel::channelMute (void) const { return m_bMute; } bool Channel::setChannelMute ( bool bMute ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && ((m_bMute && bMute) || (!m_bMute && !bMute))) return true; #ifdef CONFIG_MUTE_SOLO if (::lscp_set_channel_mute(pMainForm->client(), m_iChannelID, bMute) != LSCP_OK) { appendMessagesClient("lscp_set_channel_mute"); return false; } appendMessages(QObject::tr("Mute: %1.").arg((int) bMute)); m_bMute = bMute; return true; #else return false; #endif } // Sampler channel solo state. bool Channel::channelSolo (void) const { return m_bSolo; } bool Channel::setChannelSolo ( bool bSolo ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && ((m_bSolo && bSolo) || (!m_bSolo && !bSolo))) return true; #ifdef CONFIG_MUTE_SOLO if (::lscp_set_channel_solo(pMainForm->client(), m_iChannelID, bSolo) != LSCP_OK) { appendMessagesClient("lscp_set_channel_solo"); return false; } appendMessages(QObject::tr("Solo: %1.").arg((int) bSolo)); m_bSolo = bSolo; return true; #else return false; #endif } // Audio routing accessors. int Channel::audioChannel ( int iAudioOut ) const { return m_audioRouting[iAudioOut]; } bool Channel::setAudioChannel ( int iAudioOut, int iAudioIn ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (m_iInstrumentStatus == 100 && m_audioRouting[iAudioOut] == iAudioIn) return true; if (::lscp_set_channel_audio_channel(pMainForm->client(), m_iChannelID, iAudioOut, iAudioIn) != LSCP_OK) { appendMessagesClient("lscp_set_channel_audio_channel"); return false; } appendMessages(QObject::tr("Audio Channel: %1 -> %2.") .arg(iAudioOut).arg(iAudioIn)); m_audioRouting[iAudioOut] = iAudioIn; return true; } // The audio routing map itself. const ChannelRoutingMap& Channel::audioRouting (void) const { return m_audioRouting; } // Istrument name remapper. void Channel::updateInstrumentName (void) { #ifndef CONFIG_INSTRUMENT_NAME m_sInstrumentName = getInstrumentName(m_sInstrumentFile, m_iInstrumentNr, (options() && options()->bInstrumentNames)); #endif } // Update whole channel info state. bool Channel::updateChannelInfo (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; // Read channel information. lscp_channel_info_t *pChannelInfo = ::lscp_get_channel_info(pMainForm->client(), m_iChannelID); if (pChannelInfo == NULL) { appendMessagesClient("lscp_get_channel_info"); appendMessagesError(QObject::tr("Could not get channel information.\n\nSorry.")); return false; } #ifdef CONFIG_INSTRUMENT_NAME // We got all actual instrument datum... m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix(pChannelInfo->instrument_file); m_iInstrumentNr = pChannelInfo->instrument_nr; m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw(pChannelInfo->instrument_name); #else // First, check if intrument name has changed, // taking care that instrument name lookup might be expensive, // so we better make it only once and when really needed... if ((m_sInstrumentFile != pChannelInfo->instrument_file) || (m_iInstrumentNr != pChannelInfo->instrument_nr)) { m_sInstrumentFile = pChannelInfo->instrument_file; m_iInstrumentNr = pChannelInfo->instrument_nr; updateInstrumentName(); } #endif // Cache in other channel information. m_sEngineName = pChannelInfo->engine_name; m_iInstrumentStatus = pChannelInfo->instrument_status; m_iMidiDevice = pChannelInfo->midi_device; m_iMidiPort = pChannelInfo->midi_port; m_iMidiChannel = pChannelInfo->midi_channel; #ifdef CONFIG_MIDI_INSTRUMENT m_iMidiMap = pChannelInfo->midi_map; #endif m_iAudioDevice = pChannelInfo->audio_device; m_fVolume = pChannelInfo->volume; #ifdef CONFIG_MUTE_SOLO m_bMute = pChannelInfo->mute; m_bSolo = pChannelInfo->solo; #endif // Some sanity checks. if (m_sEngineName == "NONE" || m_sEngineName.isEmpty()) m_sEngineName = QString::null; if (m_sInstrumentFile == "NONE" || m_sInstrumentFile.isEmpty()) { m_sInstrumentFile = QString::null; m_sInstrumentName = QString::null; } // Time for device info grabbing... lscp_device_info_t *pDeviceInfo; const QString sNone = QObject::tr("(none)"); // Audio device driver type. pDeviceInfo = ::lscp_get_audio_device_info(pMainForm->client(), m_iAudioDevice); if (pDeviceInfo == NULL) { appendMessagesClient("lscp_get_audio_device_info"); m_sAudioDriver = sNone; } else { m_sAudioDriver = pDeviceInfo->driver; } // MIDI device driver type. pDeviceInfo = ::lscp_get_midi_device_info(pMainForm->client(), m_iMidiDevice); if (pDeviceInfo == NULL) { appendMessagesClient("lscp_get_midi_device_info"); m_sMidiDriver = sNone; } else { m_sMidiDriver = pDeviceInfo->driver; } // Set the audio routing map. m_audioRouting.clear(); #ifdef CONFIG_AUDIO_ROUTING int *piAudioRouting = pChannelInfo->audio_routing; for (int i = 0; piAudioRouting && piAudioRouting[i] >= 0; i++) m_audioRouting[i] = piAudioRouting[i]; #else char **ppszAudioRouting = pChannelInfo->audio_routing; for (int i = 0; ppszAudioRouting && ppszAudioRouting[i]; i++) m_audioRouting[i] = ::atoi(ppszAudioRouting[i]); #endif return true; } // Reset channel method. bool Channel::channelReset (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (::lscp_reset_channel(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_reset_channel"); return false; } appendMessages(QObject::tr("reset.")); return true; } // Spawn instrument editor method. bool Channel::editChannel (void) { #ifdef CONFIG_EDIT_INSTRUMENT MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL || m_iChannelID < 0) return false; if (::lscp_edit_channel_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_edit_channel_instrument"); appendMessagesError(QObject::tr( "Could not launch an appropriate instrument editor " "for the given instrument!\n\n" "Make sure you have an appropriate " "instrument editor like 'gigedit' installed " "and that it placed its mandatory DLL file " "into the sampler's plugin directory.") ); return false; } appendMessages(QObject::tr("edit instrument.")); return true; #else appendMessagesError(QObject::tr( "Sorry, QSampler was compiled for a version of liblscp " "which lacks this feature.\n\n" "You may want to update liblscp and recompile QSampler afterwards.") ); return false; #endif } // Channel setup dialog form. bool Channel::channelSetup ( QWidget *pParent ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; bool bResult = false; appendMessages(QObject::tr("setup...")); ChannelForm *pChannelForm = new ChannelForm(pParent); if (pChannelForm) { pChannelForm->setup(this); bResult = pChannelForm->exec(); delete pChannelForm; } return bResult; } // Redirected messages output methods. void Channel::appendMessages ( const QString& sText ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessages(channelName() + ' ' + sText); } void Channel::appendMessagesColor ( const QString& sText, const QString& sColor ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesColor(channelName() + ' ' + sText, sColor); } void Channel::appendMessagesText ( const QString& sText ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesText(channelName() + ' ' + sText); } void Channel::appendMessagesError ( const QString& sText ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesError(channelName() + "\n\n" + sText); } void Channel::appendMessagesClient ( const QString& sText ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesClient(channelName() + ' ' + sText); } // Context menu event handler. void Channel::contextMenuEvent ( QContextMenuEvent *pEvent ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->contextMenuEvent(pEvent); } // FIXME: Check whether a given file is an instrument file (DLS only). bool Channel::isDlsInstrumentFile ( const QString& sInstrumentFile ) { bool bResult = false; QFile file(sInstrumentFile); if (file.open(QIODevice::ReadOnly)) { char achHeader[16]; if (file.read(achHeader, 16) > 0) { bResult = (::memcmp(&achHeader[0], "RIFF", 4) == 0 && ::memcmp(&achHeader[8], "DLS LIST", 8) == 0); } file.close(); } return bResult; } // FIXME: Check whether a given file is an instrument file (SF2 only). bool Channel::isSf2InstrumentFile ( const QString& sInstrumentFile ) { bool bResult = false; QFile file(sInstrumentFile); if (file.open(QIODevice::ReadOnly)) { char achHeader[12]; if (file.read(achHeader, 12) > 0) { bResult = (::memcmp(&achHeader[0], "RIFF", 4) == 0 && ::memcmp(&achHeader[8], "sfbk", 4) == 0); } file.close(); } return bResult; } // Retrieve the instrument list of a instrument file (.gig). QStringList Channel::getInstrumentList ( const QString& sInstrumentFile, bool bInstrumentNames ) { QStringList instlist; const QFileInfo fi(sInstrumentFile); if (!fi.exists()) { instlist.append(noInstrumentName()); return instlist; } #ifdef CONFIG_LIBGIG if (bInstrumentNames) { if (isDlsInstrumentFile(sInstrumentFile)) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); gig::File *pGig = new gig::File(pRiff); #ifdef CONFIG_LIBGIG_SETAUTOLOAD // prevent sleepy response time on large .gig files pGig->SetAutoLoad(false); #endif gig::Instrument *pInstrument = pGig->GetFirstInstrument(); while (pInstrument) { instlist.append((pInstrument->pInfo)->Name.c_str()); pInstrument = pGig->GetNextInstrument(); } delete pGig; delete pRiff; } #ifdef CONFIG_LIBGIG_SF2 else if (isSf2InstrumentFile(sInstrumentFile)) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); sf2::File *pSf2 = new sf2::File(pRiff); const int iPresetCount = pSf2->GetPresetCount(); for (int iIndex = 0; iIndex < iPresetCount; ++iIndex) { sf2::Preset *pPreset = pSf2->GetPreset(iIndex); if (pPreset) { instlist.append(pPreset->Name.c_str()); } else { instlist.append(fi.fileName() + " [" + QString::number(iIndex) + "]"); } } delete pSf2; delete pRiff; } #endif } #endif if (instlist.isEmpty()) { for (int iIndex = 0; iIndex < QSAMPLER_INSTRUMENT_MAX; ++iIndex) { instlist.append(fi.fileName() + " [" + QString::number(iIndex) + "]"); } } return instlist; } // Retrieve the spacific instrument name of a instrument file (.gig), given its index. QString Channel::getInstrumentName ( const QString& sInstrumentFile, int iInstrumentNr, bool bInstrumentNames ) { const QFileInfo fi(sInstrumentFile); if (!fi.exists()) return noInstrumentName(); QString sInstrumentName; #ifdef CONFIG_LIBGIG if (bInstrumentNames) { if (isDlsInstrumentFile(sInstrumentFile)) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); gig::File *pGig = new gig::File(pRiff); #ifdef CONFIG_LIBGIG_SETAUTOLOAD // prevent sleepy response time on large .gig files pGig->SetAutoLoad(false); #endif int iIndex = 0; gig::Instrument *pInstrument = pGig->GetFirstInstrument(); while (pInstrument) { if (iIndex == iInstrumentNr) { sInstrumentName = (pInstrument->pInfo)->Name.c_str(); break; } iIndex++; pInstrument = pGig->GetNextInstrument(); } delete pGig; delete pRiff; } #ifdef CONFIG_LIBGIG_SF2 else if (isSf2InstrumentFile(sInstrumentFile)) { RIFF::File *pRiff = new RIFF::File(sInstrumentFile.toUtf8().constData()); sf2::File *pSf2 = new sf2::File(pRiff); sf2::Preset *pPreset = pSf2->GetPreset(iInstrumentNr); if (pPreset) sInstrumentName = pPreset->Name.c_str(); delete pSf2; delete pRiff; } #endif } #endif if (sInstrumentName.isEmpty()) { sInstrumentName = fi.fileName(); sInstrumentName += " [" + QString::number(iInstrumentNr) + "]"; } return sInstrumentName; } // Common invalid name-helpers. QString Channel::noEngineName (void) { return QObject::tr("(No engine)"); } QString Channel::noInstrumentName (void) { return QObject::tr("(No instrument)"); } QString Channel::loadingInstrument (void) { return QObject::tr("(Loading instrument...)"); } //------------------------------------------------------------------------- // QSampler::ChannelRoutingModel - data model for audio routing // (used for QTableView) ChannelRoutingModel::ChannelRoutingModel ( QObject *pParent ) : QAbstractTableModel(pParent), m_pDevice(NULL) { } int ChannelRoutingModel::rowCount ( const QModelIndex& /*parent*/) const { return (m_pDevice) ? m_routing.size() : 0; } int ChannelRoutingModel::columnCount ( const QModelIndex& /*parent*/) const { return 1; } Qt::ItemFlags ChannelRoutingModel::flags ( const QModelIndex& /*index*/) const { return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled; } bool ChannelRoutingModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; m_routing[index.row()] = value.toInt(); emit dataChanged(index, index); return true; } QVariant ChannelRoutingModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); if (index.column() != 0) return QVariant(); ChannelRoutingItem item; // The common device port item list. DevicePortList& ports = m_pDevice->ports(); QListIterator iter(ports); while (iter.hasNext()) { DevicePort *pPort = iter.next(); item.options.append( m_pDevice->deviceTypeName() + ' ' + m_pDevice->driverName() + ' ' + pPort->portName() ); } item.selection = m_routing[index.row()]; return QVariant::fromValue(item); } QVariant ChannelRoutingModel::headerData ( int section, Qt::Orientation orientation, int role) const { if (role != Qt::DisplayRole) return QVariant(); switch (orientation) { case Qt::Horizontal: return UNICODE_RIGHT_ARROW + QObject::tr(" Device Channel"); case Qt::Vertical: return QObject::tr("Audio Channel ") + QString::number(section) + " " + UNICODE_RIGHT_ARROW; default: return QVariant(); } } void ChannelRoutingModel::refresh ( Device *pDevice, const ChannelRoutingMap& routing ) { m_pDevice = pDevice; m_routing = routing; // inform the outer world (QTableView) that our data changed #if QT_VERSION < 0x050000 QAbstractTableModel::reset(); #else QAbstractTableModel::beginResetModel(); QAbstractTableModel::endResetModel(); #endif } //------------------------------------------------------------------------- // QSampler::ChannelRoutingDelegate - table cell renderer for audio routing // ChannelRoutingDelegate::ChannelRoutingDelegate ( QObject *pParent ) : QItemDelegate(pParent) { } QWidget* ChannelRoutingDelegate::createEditor ( QWidget *pParent, const QStyleOptionViewItem & option, const QModelIndex& index ) const { if (!index.isValid()) return NULL; if (index.column() != 0) return NULL; ChannelRoutingItem item = index.model()->data(index, Qt::DisplayRole).value(); QComboBox* pComboBox = new QComboBox(pParent); pComboBox->addItems(item.options); pComboBox->setCurrentIndex(item.selection); pComboBox->setEnabled(true); pComboBox->setGeometry(option.rect); return pComboBox; } void ChannelRoutingDelegate::setEditorData ( QWidget *pEditor, const QModelIndex &index) const { ChannelRoutingItem item = index.model()->data(index, Qt::DisplayRole).value (); QComboBox* pComboBox = static_cast (pEditor); pComboBox->setCurrentIndex(item.selection); } void ChannelRoutingDelegate::setModelData ( QWidget* pEditor, QAbstractItemModel *pModel, const QModelIndex& index ) const { QComboBox *pComboBox = static_cast (pEditor); pModel->setData(index, pComboBox->currentIndex()); } void ChannelRoutingDelegate::updateEditorGeometry ( QWidget *pEditor, const QStyleOptionViewItem& option, const QModelIndex &/* index */) const { pEditor->setGeometry(option.rect); } } // namespace QSampler // end of qsamplerChannel.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerFxSend.cpp0000644000000000000000000000013212554456160017260 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerFxSend.cpp0000644000175000001440000001505712554456160020114 0ustar00rncbcusers00000000000000// qsamplerFxSend.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerFxSend.h" #include "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" namespace QSampler { // marks FxSend objects which don't exist on sampler side yet #define NEW_FX_SEND -1 FxSend::FxSend(int SamplerChannelID, int FxSendID) : m_iSamplerChannelID(SamplerChannelID), m_iFxSendID(FxSendID), m_bDelete(false), m_bModified(false) { m_MidiCtrl = 91; m_Depth = 0.0f; } FxSend::FxSend(int SamplerChannelID) : m_iSamplerChannelID(SamplerChannelID), m_iFxSendID(NEW_FX_SEND), m_bDelete(false), m_bModified(true) { m_MidiCtrl = 91; m_Depth = 0.0f; } FxSend::~FxSend() { } int FxSend::id() const { return m_iFxSendID; } bool FxSend::isNew() const { return m_iFxSendID == NEW_FX_SEND; } void FxSend::setDeletion(bool bDelete) { m_bDelete = bDelete; m_bModified = true; } bool FxSend::deletion() const { return m_bDelete; } void FxSend::setName(const QString& sName) { m_FxSendName = sName; m_bModified = true; } bool FxSend::isModified() const { return m_bModified; } const QString& FxSend::name() const { return m_FxSendName; } void FxSend::setSendDepthMidiCtrl(int iMidiController) { m_MidiCtrl = iMidiController; m_bModified = true; } int FxSend::sendDepthMidiCtrl() const { return m_MidiCtrl; } void FxSend::setCurrentDepth(float depth) { m_Depth = depth; m_bModified = true; } float FxSend::currentDepth() const { return m_Depth; } int FxSend::audioChannel(int iAudioSrc) const { if (iAudioSrc < 0 || iAudioSrc >= m_AudioRouting.size()) return -1; return m_AudioRouting[iAudioSrc]; } bool FxSend::setAudioChannel(int iAudioSrc, int iAudioDst) { if (iAudioSrc < 0 || iAudioSrc >= m_AudioRouting.size()) return false; m_AudioRouting[iAudioSrc] = iAudioDst; m_bModified = true; return true; } const FxSendRoutingMap& FxSend::audioRouting() const { return m_AudioRouting; } bool FxSend::getFromSampler() { #if CONFIG_FXSEND m_bModified = false; // in case this is a new, actually not yet existing FX send, ignore update if (isNew()) return true; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return false; lscp_fxsend_info_t* pFxSendInfo = ::lscp_get_fxsend_info( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID); if (!pFxSendInfo) { pMainForm->appendMessagesClient("lscp_get_fxsend_info"); return false; } m_FxSendName = qsamplerUtilities::lscpEscapedTextToRaw(pFxSendInfo->name); m_MidiCtrl = pFxSendInfo->midi_controller; m_Depth = pFxSendInfo->level; m_AudioRouting.clear(); if (pFxSendInfo->audio_routing) for (int i = 0; pFxSendInfo->audio_routing[i] != -1; ++i) m_AudioRouting[i] = pFxSendInfo->audio_routing[i]; return true; #else // CONFIG_FXSEND return false; #endif // CONFIG_FXSEND } bool FxSend::applyToSampler() { #if CONFIG_FXSEND MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return false; // in case FX send doesn't exist on sampler side yet, create it if (isNew()) { // doesn't exist and scheduled for deletion? nothing to do if (deletion()) { m_bModified = false; return true; } int result = ::lscp_create_fxsend( pMainForm->client(), m_iSamplerChannelID, m_MidiCtrl, NULL ); if (result == -1) { pMainForm->appendMessagesClient("lscp_create_fxsend"); return false; } m_iFxSendID = result; } lscp_status_t result; // delete FX send on sampler side if (deletion()) { result = ::lscp_destroy_fxsend( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_destroy_fxsend"); return false; } m_bModified = false; return true; } // set FX send depth MIDI controller result = ::lscp_set_fxsend_midi_controller( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, m_MidiCtrl ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_midi_controller"); return false; } #if CONFIG_FXSEND_RENAME // set FX send's name result = ::lscp_set_fxsend_name( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, qsamplerUtilities::lscpEscapeText( m_FxSendName ).toUtf8().constData() ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_name"); return false; } #endif // CONFIG_FXSEND_RENAME // set FX send current send level result = ::lscp_set_fxsend_level( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, m_Depth ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_level"); return false; } // set FX send's audio routing for (int i = 0; i < m_AudioRouting.size(); ++i) { result = ::lscp_set_fxsend_audio_channel( pMainForm->client(), m_iSamplerChannelID, m_iFxSendID, i, /*audio source*/ m_AudioRouting[i] /*audio destination*/ ); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_fxsend_audio_channel"); return false; } } m_bModified = false; return true; #else // CONFIG_FXSEND return false; #endif // CONFIG_FXSEND } QList FxSend::allFxSendsOfSamplerChannel(int samplerChannelID) { QList sends; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return sends; #ifdef CONFIG_FXSEND int *piSends = ::lscp_list_fxsends(pMainForm->client(), samplerChannelID); if (!piSends) { if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_list_fxsends"); } else { for (int iSend = 0; piSends[iSend] >= 0; ++iSend) sends.append(piSends[iSend]); } #endif // CONFIG_FXSEND return sends; } } // namespace QSampler // end of qsamplerFxSend.cpp qsampler-0.3.1/src/PaxHeaders.6862/mimetypes0000644000000000000000000000013212554456160015557 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.756090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/mimetypes/0000755000175000001440000000000012554456160016460 5ustar00rncbcusers00000000000000qsampler-0.3.1/src/mimetypes/PaxHeaders.6862/application-x-qsampler-session.svg0000644000000000000000000000013212554456160024430 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.756090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/mimetypes/application-x-qsampler-session.svg0000644000175000001440000003142412554456160025260 0ustar00rncbcusers00000000000000 image/svg+xmlqsampler-0.3.1/src/mimetypes/PaxHeaders.6862/application-x-qsampler-session.png0000644000000000000000000000013212554456160024415 xustar0030 mtime=1437752432.756090073 30 atime=1437752432.756090073 30 ctime=1437752432.756090073 qsampler-0.3.1/src/mimetypes/application-x-qsampler-session.png0000644000175000001440000000363412554456160025247 0ustar00rncbcusers00000000000000PNG  IHDR szzcIDATXåklwf^ۀ$$5HM$U $AшoT 釖FX<pHN!)P ~lk]ﲻ3cΌt&فk~{ӔRĄ(3 3&3s=Rf1Cm۶u(~s@6 \ ׋eY!f/޺uh7XJʣ3@)JJ{{px֯_zkPJ!faJ)H$(**rZjR666^|)@i3^X,i,[={ORǏ Sh@Ĭ6B:dRE/_ξ}ڵklbk,njmmhT`0ؽ{BѣGߟكnGB!(I ;wm8?X1_Ӂ<Ͼ8 6̂0t)(LLD6+,Iaa d4M9@p:!\zh4˥SQQ /TRLάt0U&Txz9v#NBX89)M)M`|@GKmlS㟯RBhoKb X*z8ח ߄JNH,8No}X>u(^st炙s ==qz?wbnD/B6 hJB98rgvr+u7 F'ܓ '@)@S2E M`/oK ^h'JʫG-|u!IR/d"W`"> &3'|g R!þGt4M+W|5w OYe sP)в͉0CAwM! ZO@"DJ5ȁ( 09|=BWXY':D!v bJvS\^Jgt 4 2R3b!ro iF)¯ .S FsJti F3.pa`9܍(˖W~3B 9- Y@ b|+A);.mp9FA9l޸gsz _4:M0j Ҿ8c²,Qt>7Rr'Q;wa*s^< X#;8tH)OiZp2My<^}e!nOl~%%%sizpјSU$"Vy] gq X(t:˕Î/t<IN zdI #F%28`H7[_)RYaGNa{Jm =[+*9/̎_v-0°RLhR5 ?W[nr4GU(&[#k~O7 L@&8!,07o𯍍w>|lUlYdV&!5-Ӵi4#)3Letʆ#K7ˀ]/uK=LD"0-o/w~`ryn Qsampler session (LSCP) qsampler-0.3.1/src/PaxHeaders.6862/qsampler.desktop.in0000644000000000000000000000013212554456160017444 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsampler.desktop.in0000644000175000001440000000042612554456160020272 0ustar00rncbcusers00000000000000[Desktop Entry] Name=@PACKAGE_NAME@ Version=1.0 GenericName=LinuxSampler GUI Comment=Qsampler is a LinuxSampler Qt GUI Interface Exec=@ac_prefix@/bin/qsampler Icon=qsampler Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;Qt; Terminal=false Type=Application X-SuSE-translate=true qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDeviceStatusForm.cpp0000644000000000000000000000013212554456160021320 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.760090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDeviceStatusForm.cpp0000644000175000001440000001551112554456160022147 0ustar00rncbcusers00000000000000// qsamplerDeviceStatusForm.cpp // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck Copyright (C) 2010-2013, 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 "qsamplerAbout.h" #include "qsamplerDeviceStatusForm.h" #include "qsamplerMainForm.h" #include #if QT_VERSION < 0x040500 namespace Qt { const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); } #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::MidiActivityLED -- Graphical indicator for MIDI activity. // // MIDI activity pixmap common resources. int MidiActivityLED::g_iMidiActivityRefCount = 0; QPixmap *MidiActivityLED::g_pMidiActivityLedOn = NULL; QPixmap *MidiActivityLED::g_pMidiActivityLedOff = NULL; MidiActivityLED::MidiActivityLED ( QString sText, QWidget *pParent ) : QLabel(sText, pParent) { if (++g_iMidiActivityRefCount == 1) { g_pMidiActivityLedOn = new QPixmap(":/images/ledon1.png"); g_pMidiActivityLedOff = new QPixmap(":/images/ledoff1.png"); } setPixmap(*g_pMidiActivityLedOff); #ifndef CONFIG_EVENT_DEVICE_MIDI setToolTip("MIDI Activity disabled"); #endif m_timer.setSingleShot(true); QObject::connect(&m_timer, SIGNAL(timeout()), SLOT(midiActivityLedOff()) ); } MidiActivityLED::~MidiActivityLED (void) { if (--g_iMidiActivityRefCount == 0) { if (g_pMidiActivityLedOn) delete g_pMidiActivityLedOn; g_pMidiActivityLedOn = NULL; if (g_pMidiActivityLedOff) delete g_pMidiActivityLedOff; g_pMidiActivityLedOff = NULL; } } void MidiActivityLED::midiActivityLedOn (void) { setPixmap(*g_pMidiActivityLedOn); m_timer.start(100); } void MidiActivityLED::midiActivityLedOff (void) { setPixmap(*g_pMidiActivityLedOff); } //------------------------------------------------------------------------- // QSampler::DeviceStatusForm -- Device status informations window. // std::map DeviceStatusForm::g_instances; DeviceStatusForm::DeviceStatusForm ( int DeviceID, QWidget *pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { m_pDevice = new Device(Device::Midi, DeviceID); setLayout(new QGridLayout(/*this*/)); updateGUIPorts(); // build the GUI m_pVisibleAction = new QAction(this); m_pVisibleAction->setCheckable(true); m_pVisibleAction->setChecked(false); m_pVisibleAction->setText(m_pDevice->deviceName()); m_pVisibleAction->setToolTip( QString("MIDI Device ID: ") + QString::number(m_pDevice->deviceID()) ); QObject::connect(m_pVisibleAction, SIGNAL(toggled(bool)), SLOT(setVisible(bool)) ); setWindowTitle(tr("%1 Status").arg(m_pDevice->deviceName())); } void DeviceStatusForm::updateGUIPorts (void) { // refresh device informations m_pDevice->setDevice(m_pDevice->deviceType(), m_pDevice->deviceID()); DevicePortList ports = m_pDevice->ports(); // clear the GUI QGridLayout *pLayout = static_cast (layout()); for (int i = pLayout->count() - 1; i >= 0; --i) { QLayoutItem *pItem = pLayout->itemAt(i); if (pItem) { pLayout->removeItem(pItem); if (pItem->widget()) delete pItem->widget(); delete pItem; } } m_midiActivityLEDs.clear(); // rebuild the GUI for (int i = 0; i < ports.size(); ++i) { MidiActivityLED *pLED = new MidiActivityLED(); m_midiActivityLEDs.push_back(pLED); pLayout->addWidget(pLED, i, 0); QLabel *pLabel = new QLabel( m_pDevice->deviceTypeName() + ' ' + m_pDevice->driverName() + ' ' + ports[i]->portName()); pLayout->addWidget(pLabel, i, 1, Qt::AlignLeft); } } DeviceStatusForm::~DeviceStatusForm (void) { if (m_pDevice) delete m_pDevice; } QAction* DeviceStatusForm::visibleAction (void) { return m_pVisibleAction; } void DeviceStatusForm::closeEvent ( QCloseEvent *pCloseEvent ) { m_pVisibleAction->setChecked(false); pCloseEvent->accept(); } void DeviceStatusForm::midiArrived ( int iPort ) { if (uint(iPort) >= m_midiActivityLEDs.size()) return; m_midiActivityLEDs[iPort]->midiActivityLedOn(); } DeviceStatusForm *DeviceStatusForm::getInstance ( int iDeviceID ) { std::map::iterator iter = g_instances.find(iDeviceID); return ((iter != g_instances.end()) ? iter->second : NULL); } const std::map& DeviceStatusForm::getInstances (void) { return g_instances; } void DeviceStatusForm::deleteAllInstances (void) { std::map::iterator iter = g_instances.begin(); for ( ; iter != g_instances.end(); ++iter) { iter->second->hide(); delete iter->second; } g_instances.clear(); } void DeviceStatusForm::onDevicesChanged (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm && pMainForm->client()) { std::set deviceIDs = Device::getDeviceIDs(pMainForm->client(), Device::Midi); // hide and delete status forms whose device has been destroyed std::map::iterator iter = g_instances.begin(); for ( ; iter != g_instances.end(); ++iter) { if (deviceIDs.find(iter->first) == deviceIDs.end()) { iter->second->hide(); delete iter->second; g_instances.erase(iter); } } // create status forms for new devices std::set::iterator it = deviceIDs.begin(); for ( ; it != deviceIDs.end(); ++it) { if (g_instances.find(*it) == g_instances.end()) { // What style do we create these forms? Qt::WindowFlags wflags = Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint; Options *pOptions = pMainForm->options(); if (pOptions && pOptions->bKeepOnTop) wflags |= Qt::Tool; // Create the form, giving it the device id. DeviceStatusForm *pStatusForm = new DeviceStatusForm(*it, NULL, wflags); g_instances[*it] = pStatusForm; } } } } void DeviceStatusForm::onDeviceChanged ( int iDeviceID ) { DeviceStatusForm *pStatusForm = DeviceStatusForm::getInstance(iDeviceID); if (pStatusForm) pStatusForm->updateGUIPorts(); } } // namespace QSampler // end of qsamplerDeviceStatusForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/src.pri.in0000644000000000000000000000013212554456160015530 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/src.pri.in0000644000175000001440000000030112554456160016346 0ustar00rncbcusers00000000000000# qsampler.pri # PREFIX = @ac_prefix@ CONFIG += @ac_debug@ INCLUDEPATH += @ac_incpath@ LIBS += @ac_libs@ # Extra optimization flags QMAKE_CXXFLAGS += @ac_cflags@ QMAKE_LFLAGS += @ac_ldflags@ qsampler-0.3.1/src/PaxHeaders.6862/qsampler.qrc0000644000000000000000000000013212554456160016153 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsampler.qrc0000644000175000001440000000307112554456160017000 0ustar00rncbcusers00000000000000 images/audio1.png images/audio2.png images/channelsArrange.png images/deviceCreate.png images/deviceDelete.png images/displaybg1.png images/editAddChannel.png images/editEditChannel.png images/editRemoveChannel.png images/editResetAllChannels.png images/editResetChannel.png images/editSetupChannel.png images/fileNew.png images/fileOpen.png images/fileReset.png images/fileRestart.png images/fileSave.png images/formAccept.png images/formEdit.png images/formRefresh.png images/formReject.png images/formRemove.png images/itemFile.png images/itemGroup.png images/itemGroupNew.png images/itemGroupOpen.png images/itemNew.png images/ledoff1.png images/ledon1.png images/midi1.png images/midi2.png images/qsampler.png images/qsamplerChannel.png images/qsamplerDevice.png images/qsamplerInstrument.png qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentList.cpp0000644000000000000000000000013212554456160021075 xustar0030 mtime=1437752432.762090073 30 atime=1437752432.761090073 30 ctime=1437752432.762090073 qsampler-0.3.1/src/qsamplerInstrumentList.cpp0000644000175000001440000002471712554456160021734 0ustar00rncbcusers00000000000000// qsamplerInstrumentList.cpp // /**************************************************************************** Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentList.h" #include "qsamplerInstrument.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentListModel - data model for MIDI prog mappings // InstrumentListModel::InstrumentListModel ( QObject *pParent ) : QAbstractItemModel(pParent), m_iMidiMap(LSCP_MIDI_MAP_ALL) { // QAbstractItemModel::reset(); } InstrumentListModel::~InstrumentListModel (void) { clear(); } int InstrumentListModel::rowCount ( const QModelIndex& /*parent*/) const { int nrows = 0; if (m_iMidiMap == LSCP_MIDI_MAP_ALL) { InstrumentMap::const_iterator itMap = m_instruments.constBegin(); for ( ; itMap != m_instruments.constEnd(); ++itMap) nrows += (*itMap).size(); } else { InstrumentMap::const_iterator itMap = m_instruments.find(m_iMidiMap); if (itMap != m_instruments.constEnd()) nrows += (*itMap).size(); } return nrows; } int InstrumentListModel::columnCount ( const QModelIndex& /*parent*/) const { return 9; } QVariant InstrumentListModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); const Instrument *pInstr = static_cast (index.internalPointer()); if (pInstr && role == Qt::DisplayRole) { switch (index.column()) { case 0: return pInstr->name(); case 1: return QVariant::fromValue(pInstr->map()); case 2: return QVariant::fromValue(pInstr->bank()); case 3: return QVariant::fromValue(pInstr->prog() + 1); case 4: return pInstr->engineName(); case 5: return pInstr->instrumentFile(); case 6: return QVariant::fromValue(pInstr->instrumentNr()); case 7: return QString::number(pInstr->volume() * 100.0) + " %"; case 8: { switch (pInstr->loadMode()) { case 3: return tr("Persistent"); case 2: return tr("On Demand Hold"); case 1: return tr("On Demand"); } } default: break; } } return QVariant(); } QModelIndex InstrumentListModel::index ( int row, int col, const QModelIndex& /*parent*/ ) const { const Instrument *pInstr = NULL; if (m_iMidiMap == LSCP_MIDI_MAP_ALL) { int nrows = 0; InstrumentMap::const_iterator itMap = m_instruments.constBegin(); for ( ; itMap != m_instruments.constEnd(); ++itMap) { const InstrumentList& list = *itMap; nrows += list.size(); if (row < nrows) { pInstr = list.at(row + list.size() - nrows); break; } } } else { // Resolve MIDI instrument map... InstrumentMap::const_iterator itMap = m_instruments.find(m_iMidiMap); if (itMap != m_instruments.constEnd()) { const InstrumentList& list = *itMap; if (row < list.size()) pInstr = list.at(row); } } if (pInstr) return createIndex(row, col, (void *) pInstr); else return QModelIndex(); } QModelIndex InstrumentListModel::parent ( const QModelIndex& /*child*/ ) const { return QModelIndex(); } QVariant InstrumentListModel::headerData ( int section, Qt::Orientation orientation, int role ) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { case 0: return tr("Name"); case 1: return tr("Map"); case 2: return tr("Bank"); case 3: return tr("Prog"); case 4: return tr("Engine"); case 5: return tr("File"); case 6: return tr("Nr"); case 7: return tr("Vol"); case 8: return tr("Mode"); } } return QAbstractItemModel::headerData(section, orientation, role); } void InstrumentListModel::setMidiMap ( int iMidiMap ) { if (iMidiMap < 0) iMidiMap = LSCP_MIDI_MAP_ALL; m_iMidiMap = iMidiMap; } int InstrumentListModel::midiMap (void) const { return m_iMidiMap; } const Instrument *InstrumentListModel::addInstrument ( int iMap, int iBank, int iProg ) { // Check it there's already one instrument item // with the very same key (bank, program); // if yes, just remove it without prejudice... InstrumentList& list = m_instruments[iMap]; int i = 0; for ( ; i < list.size(); ++i) { const Instrument *pInstr = list.at(i); if (pInstr->bank() == iBank && pInstr->prog() == iProg) { delete pInstr; list.removeAt(i); break; } } // Resolve the appropriate place, we keep the list sorted that way... for (i = 0; i < list.size(); ++i) { const Instrument *pInstr = list.at(i); if (iBank < pInstr->bank() || (iBank == pInstr->bank() && iProg < pInstr->prog())) { break; } } Instrument *pInstr = new Instrument(iMap, iBank, iProg); if (pInstr->getInstrument()) { list.insert(i, pInstr); } else { delete pInstr; pInstr = NULL; } return pInstr; } void InstrumentListModel::removeInstrument ( Instrument *pInstrument ) { const int iMap = pInstrument->map(); if (m_instruments.contains(iMap)) { InstrumentList& list = m_instruments[iMap]; for (int i = 0; i < list.size(); ++i) { if (pInstrument == list.at(i)) { delete pInstrument; list.removeAt(i); break; } } } } void InstrumentListModel::updateInstrument ( Instrument *pInstrument ) { pInstrument->getInstrument(); } // Reposition the instrument in the model (called when map/bank/prg changed) void InstrumentListModel::resortInstrument ( Instrument *pInstrument ) { const int iMap = pInstrument->map(); const int iBank = pInstrument->bank(); const int iProg = pInstrument->prog(); // Remove given instrument from its current list... removeInstrument(pInstrument); // Re-add the instrument... addInstrument(iMap, iBank, iProg); } void InstrumentListModel::refresh (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); clear(); // Load the whole bunch of instrument items... lscp_midi_instrument_t *pInstrs = ::lscp_list_midi_instruments(pMainForm->client(), m_iMidiMap); for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; ++iInstr) { const int iMap = pInstrs[iInstr].map; const int iBank = pInstrs[iInstr].bank; const int iProg = pInstrs[iInstr].prog; addInstrument(iMap, iBank, iProg); // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } QApplication::restoreOverrideCursor(); if (pInstrs == NULL && ::lscp_client_get_errno(pMainForm->client())) { pMainForm->appendMessagesClient("lscp_list_midi_instruments"); pMainForm->appendMessagesError( tr("Could not get current list of MIDI instrument mappings.\n\nSorry.")); } } void InstrumentListModel::beginReset (void) { #if QT_VERSION >= 0x040600 QAbstractItemModel::beginResetModel(); #endif } void InstrumentListModel::endReset (void) { #if QT_VERSION >= 0x040600 QAbstractItemModel::endResetModel(); #else QAbstractItemModel::reset(); #endif } // Map clear. void InstrumentListModel::clear (void) { InstrumentMap::iterator itMap = m_instruments.begin(); for ( ; itMap != m_instruments.end(); ++itMap) { InstrumentList& list = itMap.value(); qDeleteAll(list); list.clear(); } m_instruments.clear(); } //------------------------------------------------------------------------- // QSampler::InstrumentListView - list view for MIDI prog mappings // // Constructor. InstrumentListView::InstrumentListView ( QWidget *pParent ) : QTreeView(pParent) { m_pListModel = new InstrumentListModel(this); QTreeView::setModel(m_pListModel); QTreeView::setRootIsDecorated(false); QTreeView::setUniformRowHeights(true); QTreeView::setAlternatingRowColors(true); QTreeView::setSelectionBehavior(QAbstractItemView::SelectRows); QTreeView::setSelectionMode(QAbstractItemView::SingleSelection); QTreeView::setItemsExpandable(false); QHeaderView *pHeader = QTreeView::header(); pHeader->setDefaultAlignment(Qt::AlignLeft); #if QT_VERSION < 0x050000 pHeader->setMovable(false); #endif pHeader->setStretchLastSection(true); pHeader->resizeSection(0, 120); // Name QTreeView::resizeColumnToContents(1); // Map QTreeView::resizeColumnToContents(2); // Bank QTreeView::resizeColumnToContents(3); // Prog QTreeView::resizeColumnToContents(4); // Engine pHeader->resizeSection(5, 240); // File QTreeView::resizeColumnToContents(6); // Nr pHeader->resizeSection(7, 60); // Vol } // Destructor. InstrumentListView::~InstrumentListView (void) { delete m_pListModel; } void InstrumentListView::setMidiMap ( int iMidiMap ) { m_pListModel->setMidiMap(iMidiMap); } int InstrumentListView::midiMap (void) const { return m_pListModel->midiMap(); } const Instrument *InstrumentListView::addInstrument ( int iMap, int iBank, int iProg ) { m_pListModel->beginReset(); const Instrument *pInstrument = m_pListModel->addInstrument(iMap, iBank, iProg); m_pListModel->endReset(); return pInstrument; } void InstrumentListView::removeInstrument ( Instrument *pInstrument ) { m_pListModel->beginReset(); m_pListModel->removeInstrument(pInstrument); m_pListModel->endReset(); } void InstrumentListView::updateInstrument ( Instrument *pInstrument ) { m_pListModel->beginReset(); m_pListModel->updateInstrument(pInstrument); m_pListModel->endReset(); } // Reposition the instrument in the model (called when map/bank/prg changed) void InstrumentListView::resortInstrument ( Instrument *pInstrument ) { m_pListModel->beginReset(); m_pListModel->resortInstrument(pInstrument); m_pListModel->endReset(); } // Refreshener. void InstrumentListView::refresh (void) { m_pListModel->beginReset(); m_pListModel->refresh(); m_pListModel->endReset(); } } // namespace QSampler // end of qsamplerInstrumentList.cpp qsampler-0.3.1/src/PaxHeaders.6862/appdata0000644000000000000000000000013212554456160015155 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/appdata/0000755000175000001440000000000012554456160016056 5ustar00rncbcusers00000000000000qsampler-0.3.1/src/appdata/PaxHeaders.6862/qsampler.appdata.xml0000644000000000000000000000013212554456160021211 xustar0030 mtime=1437752432.755090073 30 atime=1437752432.755090073 30 ctime=1437752432.755090073 qsampler-0.3.1/src/appdata/qsampler.appdata.xml0000644000175000001440000000173712554456160022045 0ustar00rncbcusers00000000000000 qsampler.desktop GPL-2.0+ GPL-2.0+ Qsampler A LinuxSampler Qt GUI interface

QSampler is a LinuxSampler GUI front-end application written in C++ around the Qt4 toolkit using Qt Designer. For the moment it just wraps the client interface of LinuxSampler Control Protocol (LSCP) (http://www.linuxsampler.org).

http://qsampler.sourceforge.net/qsampler-screenshot1.png The main window showing the application in action http://qsampler.sourceforge.net rncbc@rncbc.org linuxsampler.org
qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrument.cpp0000644000000000000000000000013212554456160020241 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerInstrument.cpp0000644000175000001440000001665412554456160021101 0ustar00rncbcusers00000000000000// qsamplerInstrument.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerInstrument.h" #include "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::Instrument - MIDI instrument map structure. // // Constructor. Instrument::Instrument ( int iMap, int iBank, int iProg ) { m_iMap = iMap; m_iBank = iBank; m_iProg = iProg; m_iInstrumentNr = 0; m_fVolume = 1.0f; m_iLoadMode = 0; } // Default destructor. Instrument::~Instrument (void) { } // Instrument accessors. void Instrument::setMap ( int iMap ) { m_iMap = iMap; } int Instrument::map (void) const { return m_iMap; } void Instrument::setBank ( int iBank ) { m_iBank = iBank; } int Instrument::bank (void) const { return m_iBank; } void Instrument::setProg ( int iProg ) { m_iProg = iProg; } int Instrument::prog (void) const { return m_iProg; } void Instrument::setName ( const QString& sName ) { m_sName = sName; } const QString& Instrument::name (void) const { return m_sName; } void Instrument::setEngineName ( const QString& sEngineName ) { m_sEngineName = sEngineName; } const QString& Instrument::engineName (void) const { return m_sEngineName; } void Instrument::setInstrumentFile ( const QString& sInstrumentFile ) { m_sInstrumentFile = sInstrumentFile; } const QString& Instrument::instrumentFile (void) const { return m_sInstrumentFile; } const QString& Instrument::instrumentName (void) const { return m_sInstrumentName; } void Instrument::setInstrumentNr ( int iInstrumentNr ) { m_iInstrumentNr = iInstrumentNr; } int Instrument::instrumentNr (void) const { return m_iInstrumentNr; } void Instrument::setVolume ( float fVolume ) { m_fVolume = fVolume; } float Instrument::volume (void) const { return m_fVolume; } void Instrument::setLoadMode ( int iLoadMode ) { m_iLoadMode = iLoadMode; } int Instrument::loadMode (void) const { return m_iLoadMode; } // Sync methods. bool Instrument::mapInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); lscp_load_mode_t load_mode; switch (m_iLoadMode) { case 3: load_mode = LSCP_LOAD_PERSISTENT; break; case 2: load_mode = LSCP_LOAD_ON_DEMAND_HOLD; break; case 1: load_mode = LSCP_LOAD_ON_DEMAND; break; case 0: default: load_mode = LSCP_LOAD_DEFAULT; break; } if (::lscp_map_midi_instrument(pMainForm->client(), &instr, m_sEngineName.toUtf8().constData(), qsamplerUtilities::lscpEscapePath( m_sInstrumentFile).toUtf8().constData(), m_iInstrumentNr, m_fVolume, load_mode, m_sName.toUtf8().constData()) != LSCP_OK) { pMainForm->appendMessagesClient("lscp_map_midi_instrument"); return false; } return true; #else return false; #endif } bool Instrument::unmapInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); if (::lscp_unmap_midi_instrument(pMainForm->client(), &instr) != LSCP_OK) { pMainForm->appendMessagesClient("lscp_unmap_midi_instrument"); return false; } return true; #else return false; #endif } bool Instrument::getInstrument (void) { #ifdef CONFIG_MIDI_INSTRUMENT if (m_iMap < 0 || m_iBank < 0 || m_iProg < 0) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; lscp_midi_instrument_t instr; instr.map = m_iMap; instr.bank = (m_iBank & 0x0fff); instr.prog = (m_iProg & 0x7f); lscp_midi_instrument_info_t *pInstrInfo = ::lscp_get_midi_instrument_info(pMainForm->client(), &instr); if (pInstrInfo == NULL) { pMainForm->appendMessagesClient("lscp_get_midi_instrument_info"); return false; } m_sName = qsamplerUtilities::lscpEscapedTextToRaw(pInstrInfo->name); m_sEngineName = pInstrInfo->engine_name; m_sInstrumentName = qsamplerUtilities::lscpEscapedTextToRaw( pInstrInfo->instrument_name); m_sInstrumentFile = qsamplerUtilities::lscpEscapedPathToPosix( pInstrInfo->instrument_file); m_iInstrumentNr = pInstrInfo->instrument_nr; m_fVolume = pInstrInfo->volume; switch (pInstrInfo->load_mode) { case LSCP_LOAD_PERSISTENT: m_iLoadMode = 3; break; case LSCP_LOAD_ON_DEMAND_HOLD: m_iLoadMode = 2; break; case LSCP_LOAD_ON_DEMAND: m_iLoadMode = 1; break; case LSCP_LOAD_DEFAULT: default: m_iLoadMode = 0; break; } // Fix something. if (m_sName.isEmpty()) m_sName = m_sInstrumentName; return true; #else return false; #endif } // Instrument map name enumerator. QStringList Instrument::getMapNames (void) { QStringList maps; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return maps; if (pMainForm->client() == NULL) return maps; #ifdef CONFIG_MIDI_INSTRUMENT int *piMaps = ::lscp_list_midi_instrument_maps(pMainForm->client()); if (piMaps == NULL) { if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_list_midi_instruments"); } else { for (int iMap = 0; piMaps[iMap] >= 0; iMap++) { const QString& sMapName = getMapName(piMaps[iMap]); if (!sMapName.isEmpty()) maps.append(sMapName); } } #endif return maps; } // Instrument map name enumerator. QString Instrument::getMapName ( int iMidiMap ) { QString sMapName; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return sMapName; if (pMainForm->client() == NULL) return sMapName; #ifdef CONFIG_MIDI_INSTRUMENT const char *pszMapName = ::lscp_get_midi_instrument_map_name(pMainForm->client(), iMidiMap); if (pszMapName == NULL) { pszMapName = " -"; if (::lscp_client_get_errno(pMainForm->client())) pMainForm->appendMessagesClient("lscp_get_midi_instrument_name"); } sMapName = QString("%1 - %2").arg(iMidiMap) .arg(qsamplerUtilities::lscpEscapedTextToRaw(pszMapName)); #endif return sMapName; } } // namespace QSampler // end of qsamplerInstrument.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerOptions.h0000644000000000000000000000013212554456160017171 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerOptions.h0000644000175000001440000000704212554456160020020 0ustar00rncbcusers00000000000000// qsamplerOptions.h // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007,2015 Christian Schoenebeck 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 __qsamplerOptions_h #define __qsamplerOptions_h #include #include class QWidget; class QComboBox; namespace QSampler { //------------------------------------------------------------------------- // QSampler::Options - Prototype settings class. // class Options { public: // Constructor. Options(); // Default destructor. ~Options(); // The settings object accessor. QSettings& settings(); // explicit I/O methods. void loadOptions(); void saveOptions(); // Command line arguments parser. bool parse_args(const QStringList& args); // Command line usage helper. void print_usage(const QString& arg0); // Startup supplied session file. QString sSessionFile; // Server options... QString sServerHost; int iServerPort; int iServerTimeout; bool bServerStart; QString sServerCmdLine; int iStartDelay; // Logging options... bool bMessagesLog; QString sMessagesLogPath; // Display options... QString sDisplayFont; bool bDisplayEffect; bool bAutoRefresh; int iAutoRefreshTime; int iMaxVolume; QString sMessagesFont; bool bMessagesLimit; int iMessagesLimitLines; bool bConfirmRemove; bool bConfirmReset; bool bConfirmRestart; bool bConfirmError; bool bKeepOnTop; bool bStdoutCapture; bool bCompletePath; bool bInstrumentNames; int iBaseFontSize; // View options... bool bMenubar; bool bToolbar; bool bStatusbar; bool bAutoArrange; // Default options... QString sSessionDir; QString sInstrumentDir; QString sEngineName; QString sAudioDriver; QString sMidiDriver; int iMidiMap; int iMidiBank; int iMidiProg; int iVolume; int iLoadMode; // Recent file list. int iMaxRecentFiles; QStringList recentFiles; // Widget geometry persistence helper prototypes. void saveWidgetGeometry(QWidget *pWidget, bool bVisible = false); void loadWidgetGeometry(QWidget *pWidget, bool bVisible = false); // Combo box history persistence helper prototypes. void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); int getMaxVoices(); int getEffectiveMaxVoices(); void setMaxVoices(int iMaxVoices); int getMaxStreams(); int getEffectiveMaxStreams(); void setMaxStreams(int iMaxStreams); void sendFineTuningSettings(); private: // Settings member variables. QSettings m_settings; // Tuning int iMaxVoices; int iMaxStreams; }; } // namespace QSampler #endif // __qsamplerOptions_h // end of qsamplerOptions.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelFxForm.cpp0000644000000000000000000000013212554456160020563 xustar0030 mtime=1437752432.758090073 30 atime=1437752432.758090073 30 ctime=1437752432.758090073 qsampler-0.3.1/src/qsamplerChannelFxForm.cpp0000644000175000001440000002675712554456160021430 0ustar00rncbcusers00000000000000// qsamplerChannelFxForm.cpp // /**************************************************************************** Copyright (C) 2010-2013, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerChannelFxForm.h" #include "qsamplerFxSendsModel.h" // let's not reinvent the wheel for audio routing #include "qsamplerChannel.h" #include #include #include #include #include namespace { // private namespace static const char* _midiControllerName(int iMidiCtrl) { switch (iMidiCtrl) { case 0: return "Bank select MSB"; case 1: return "Modulation MSB"; case 2: return "Breath Controller"; case 4: return "Foot Controller MSB"; case 5: return "Portamento Time MSB"; case 6: return "(N)RPN Data Byte"; case 7: return "Main Volume"; case 8: return "Balance"; case 10: return "Panorama"; case 11: return "Expression"; case 12: return "Effect Control 1"; case 13: return "Effect Control 2"; case 16: return "General Purpose Controller 1"; case 17: return "General Purpose Controller 2"; case 18: return "General Purpose Controller 3"; case 19: return "General Purpose Controller 4"; case 32: return "Bank select LSB"; case 63: return "LSB for Controllers 0?31"; case 64: return "Hold 1"; case 65: return "Portamento"; case 66: return "Sostenuto"; case 67: return "Soft Pedal"; case 68: return "Legato Footswitch"; case 69: return "Hold 2"; case 70: return "Sound Controller 1 (Sound Variation)"; case 71: return "Sound Controller 2 (Harmonic Content)"; case 72: return "Sound Controller 3 (Release Time)"; case 73: return "Sound Controller 4 (Attack Time)"; case 74: return "Sound Controller 5 (Brightness)"; case 75: return "Sound Controller 6"; case 76: return "Sound Controller 7"; case 77: return "Sound Controller 8"; case 78: return "Sound Controller 9"; case 79: return "Sound Controller 10"; case 80: return "General Purpose 5"; case 81: return "General Purpose 6"; case 82: return "General Purpose 7"; case 83: return "General Purpose 8"; case 84: return "Portamento Control"; case 91: return "Effects 1 Depth"; case 92: return "Effects 2 Depth"; case 93: return "Effects 3 Depth"; case 94: return "Effects 4 Depth"; case 95: return "Effects 5 Depth"; case 96: return "Data Increment (N)RPN"; case 97: return "Data Decrement (N)RPN"; case 98: return "NRPN LSB"; case 99: return "NRPN MSB"; case 100: return "RPN LSB"; case 101: return "RPN MSB"; case 120: return "All Sounds Off"; case 121: return "Controller Reset"; case 122: return "Local Control on/off"; case 123: return "All Notes Off"; case 124: return "Omni Off"; case 125: return "Omni On"; case 126: return "Mono On / Poly Off"; case 127: return "Poly On / Mono Off"; default: return ""; } } } // private namespace namespace QSampler { ChannelFxForm::ChannelFxForm ( Channel* pSamplerChannel, QWidget* pParent, Qt::WindowFlags wflags ) : QDialog(pParent, wflags) { m_ui.setupUi(this); m_pSamplerChannel = pSamplerChannel; m_pAudioDevice = NULL; FxSendsModel* pModel = new FxSendsModel(m_pSamplerChannel->channelID(), m_ui.SendsListView); m_ui.SendsListView->setModel(pModel); m_ui.SendsListView->setSelectionRectVisible(true); const int iRowHeight = m_ui.audioRoutingTable->fontMetrics().height() + 4; m_ui.audioRoutingTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.audioRoutingTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); ChannelRoutingModel* pRoutingModel = new ChannelRoutingModel(m_ui.audioRoutingTable); m_ui.audioRoutingTable->setModel(pRoutingModel); ChannelRoutingDelegate* pRoutingDelegate = new ChannelRoutingDelegate(m_ui.audioRoutingTable); m_ui.audioRoutingTable->setItemDelegate(pRoutingDelegate); #if QT_VERSION >= 0x050000 m_ui.audioRoutingTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); #else m_ui.audioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); #endif // m_ui.audioRoutingTable->verticalHeader()->hide(); QAbstractButton* pApplyButton = m_ui.buttonBox->button(QDialogButtonBox::Apply); pApplyButton->setEnabled(false); pApplyButton->setIcon(QIcon(":/images/formEdit.png")); QAbstractButton* pCancelButton = m_ui.buttonBox->button(QDialogButtonBox::Cancel); pCancelButton->setIcon(QIcon(":/images/formRemove.png")); QAbstractButton* pOkButton = m_ui.buttonBox->button(QDialogButtonBox::Ok); pOkButton->setIcon(QIcon(":/images/formAccept.png")); QAbstractButton* pResetButton = m_ui.buttonBox->button(QDialogButtonBox::Reset); pResetButton->setEnabled(false); pResetButton->setToolTip("Revert all changes."); m_ui.destroyPushButton->setEnabled(false); m_ui.mainParametersGroupBox->setEnabled(false); m_ui.audioRoutingGroupBox->setEnabled(false); for (int i = 0; i < 128; ++i) { m_ui.depthCtrlComboBox->addItem( QString("[") + QString::number(i) + "] " + _midiControllerName(i) ); } connect( m_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(onButtonClicked(QAbstractButton*)) ); connect( m_ui.createPushButton, SIGNAL(clicked()), this, SLOT(onCreateFxSend()) ); connect( m_ui.destroyPushButton, SIGNAL(clicked()), this, SLOT(onDestroyFxSend()) ); connect( pModel, SIGNAL(fxSendsDirtyChanged(bool)), pApplyButton, SLOT(setEnabled(bool)) ); connect( pModel, SIGNAL(fxSendsDirtyChanged(bool)), pResetButton, SLOT(setEnabled(bool)) ); connect( m_ui.SendsListView, SIGNAL(clicked(const QModelIndex&)), this, SLOT(onFxSendSelection(const QModelIndex&)) ); connect( m_ui.depthCtrlComboBox, SIGNAL(activated(int)), this, SLOT(onDepthCtrlChanged(int)) ); connect( m_ui.depthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onCurrentSendDepthChanged(int)) ); connect( pRoutingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(updateTableCellRenderers(const QModelIndex&, const QModelIndex&)) ); connect( pRoutingModel, SIGNAL(modelReset()), this, SLOT(updateTableCellRenderers()) ); connect( pRoutingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(onRoutingTableChanged()) ); } ChannelFxForm::~ChannelFxForm() { if (m_pAudioDevice) delete m_pAudioDevice; } void ChannelFxForm::onButtonClicked(QAbstractButton* button) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); switch (m_ui.buttonBox->buttonRole(button)) { case QDialogButtonBox::AcceptRole: case QDialogButtonBox::ApplyRole: pModel->applyToSampler(); // force a refresh of the parameter control elements onFxSendSelection(m_ui.SendsListView->currentIndex()); break; case QDialogButtonBox::ResetRole: pModel->cleanRefresh(); // force a refresh of the parameter control elements onFxSendSelection(m_ui.SendsListView->currentIndex()); break; default: // to avoid gcc warnings break; } } void ChannelFxForm::onFxSendSelection(const QModelIndex& index) { const bool bValid = index.isValid(); m_ui.destroyPushButton->setEnabled(bValid); m_ui.mainParametersGroupBox->setEnabled(bValid); m_ui.audioRoutingGroupBox->setEnabled(bValid); FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); FxSend* pFxSend = pModel->fxSend(index); // clear routing model ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); pRoutingModel->refresh(NULL, ChannelRoutingMap()); pRoutingModel->routingMap().clear(); // Reset routing change map. if (m_pAudioDevice) { delete m_pAudioDevice; m_pAudioDevice = NULL; } if (!pFxSend) return; // update routing model if (m_pSamplerChannel->audioDevice() >= 0) { m_pAudioDevice = new Device(Device::Audio, m_pSamplerChannel->audioDevice()); pRoutingModel->refresh(m_pAudioDevice, pFxSend->audioRouting()); } m_ui.depthCtrlComboBox->setCurrentIndex(pFxSend->sendDepthMidiCtrl()); m_ui.depthSpinBox->setValue( int(::round(pFxSend->currentDepth() * 100.0)) ); } void ChannelFxForm::onCreateFxSend() { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); pModel->addFxSend(); } void ChannelFxForm::onDestroyFxSend() { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); pModel->removeFxSend(m_ui.SendsListView->currentIndex()); } void ChannelFxForm::onDepthCtrlChanged(int iMidiCtrl) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) return; pFxSend->setSendDepthMidiCtrl(iMidiCtrl); pModel->onExternalModifiication(index); } void ChannelFxForm::onCurrentSendDepthChanged(int depthPercent) { FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) return; if (depthPercent == int( ::round(pFxSend->currentDepth() * 100.0) )) return; // nothing changed actually pFxSend->setCurrentDepth(double(depthPercent) / 100.0); pModel->onExternalModifiication(index); } void ChannelFxForm::onRoutingTableChanged() { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); if (pRoutingModel->routingMap().size() <= 0) return; // no changes FxSendsModel* pModel = (FxSendsModel*) m_ui.SendsListView->model(); const QModelIndex index = m_ui.SendsListView->currentIndex(); FxSend* pFxSend = pModel->fxSend(index); if (!pFxSend) { pRoutingModel->routingMap().clear(); // reset routing change map return; } ChannelRoutingMap routingMap = pRoutingModel->routingMap(); for ( ChannelRoutingMap::iterator iter = routingMap.begin(); iter != routingMap.end(); ++iter ) pFxSend->setAudioChannel(iter.key(), iter.value()); pRoutingModel->routingMap().clear(); // reset routing change map pModel->onExternalModifiication(index); } void ChannelFxForm::updateTableCellRenderers() { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); const int rows = pRoutingModel->rowCount(); const int cols = pRoutingModel->columnCount(); updateTableCellRenderers( pRoutingModel->index(0, 0), pRoutingModel->index(rows - 1, cols - 1) ); } void ChannelFxForm::updateTableCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { ChannelRoutingModel* pRoutingModel = (ChannelRoutingModel*) m_ui.audioRoutingTable->model(); for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = pRoutingModel->index(r, c); m_ui.audioRoutingTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerChannelFxForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerOptionsForm.cpp0000644000000000000000000000013212554456160020350 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerOptionsForm.cpp0000644000175000001440000003762412554456160021210 0ustar00rncbcusers00000000000000// qsamplerOptionsForm.cpp // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 "qsamplerOptionsForm.h" #include "qsamplerAbout.h" #include "qsamplerOptions.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::OptionsForm -- Options form implementation. // OptionsForm::OptionsForm ( QWidget* pParent ) : QDialog(pParent) { m_ui.setupUi(this); // No settings descriptor initially (the caller will set it). m_pOptions = NULL; // Initialize dirty control state. m_iDirtySetup = 0; m_iDirtyCount = 0; // Set dialog validators... m_ui.ServerPortComboBox->setValidator( new QIntValidator(m_ui.ServerPortComboBox)); // Try to restore old window positioning. adjustSize(); QObject::connect(m_ui.ServerHostComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerPortComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerTimeoutSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerStartCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ServerCmdLineComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.StartDelaySpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); 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.DisplayFontPushButton, SIGNAL(clicked()), SLOT(chooseDisplayFont())); QObject::connect(m_ui.DisplayEffectCheckBox, SIGNAL(toggled(bool)), SLOT(toggleDisplayEffect(bool))); QObject::connect(m_ui.AutoRefreshCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.AutoRefreshTimeSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxVolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesFontPushButton, SIGNAL(clicked()), SLOT(chooseMessagesFont())); QObject::connect(m_ui.MessagesLimitCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLimitLinesSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ConfirmRemoveCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ConfirmResetCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ConfirmRestartCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.ConfirmErrorCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.KeepOnTopCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.StdoutCaptureCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxRecentFilesSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.CompletePathCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.InstrumentNamesCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.BaseFontSizeComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.MaxVoicesSpinBox, SIGNAL(valueChanged(int)), SLOT(maxVoicesChanged(int))); QObject::connect(m_ui.MaxStreamsSpinBox, SIGNAL(valueChanged(int)), SLOT(maxStreamsChanged(int))); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); } OptionsForm::~OptionsForm() { } // Populate (setup) dialog controls from settings descriptors. void OptionsForm::setup ( Options *pOptions ) { // Set reference descriptor. m_pOptions = pOptions; // Start clean. m_iDirtyCount = 0; // Avoid nested changes. m_iDirtySetup++; // Load combo box history... m_pOptions->loadComboBoxHistory(m_ui.ServerHostComboBox); m_pOptions->loadComboBoxHistory(m_ui.ServerPortComboBox); m_pOptions->loadComboBoxHistory(m_ui.ServerCmdLineComboBox); m_pOptions->loadComboBoxHistory(m_ui.MessagesLogPathComboBox); // Load Server settings... m_ui.ServerHostComboBox->setEditText(m_pOptions->sServerHost); m_ui.ServerPortComboBox->setEditText(QString::number(m_pOptions->iServerPort)); m_ui.ServerTimeoutSpinBox->setValue(m_pOptions->iServerTimeout); m_ui.ServerStartCheckBox->setChecked(m_pOptions->bServerStart); m_ui.ServerCmdLineComboBox->setEditText(m_pOptions->sServerCmdLine); m_ui.StartDelaySpinBox->setValue(m_pOptions->iStartDelay); // Logging options... m_ui.MessagesLogCheckBox->setChecked(m_pOptions->bMessagesLog); m_ui.MessagesLogPathComboBox->setEditText(m_pOptions->sMessagesLogPath); // Load Display options... QFont font; QPalette pal; // Display font. if (m_pOptions->sDisplayFont.isEmpty() || !font.fromString(m_pOptions->sDisplayFont)) font = QFont("Sans Serif", 8); m_ui.DisplayFontTextLabel->setFont(font); m_ui.DisplayFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); // Display effect. m_ui.DisplayEffectCheckBox->setChecked(m_pOptions->bDisplayEffect); toggleDisplayEffect(m_pOptions->bDisplayEffect); // Auto-refresh and maximum volume options. m_ui.AutoRefreshCheckBox->setChecked(m_pOptions->bAutoRefresh); m_ui.AutoRefreshTimeSpinBox->setValue(m_pOptions->iAutoRefreshTime); m_ui.MaxVolumeSpinBox->setValue(m_pOptions->iMaxVolume); // Messages font. if (m_pOptions->sMessagesFont.isEmpty() || !font.fromString(m_pOptions->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())); // Messages limit option. m_ui.MessagesLimitCheckBox->setChecked(m_pOptions->bMessagesLimit); m_ui.MessagesLimitLinesSpinBox->setValue(m_pOptions->iMessagesLimitLines); // Other options finally. m_ui.ConfirmRemoveCheckBox->setChecked(m_pOptions->bConfirmRemove); m_ui.ConfirmRestartCheckBox->setChecked(m_pOptions->bConfirmRestart); m_ui.ConfirmResetCheckBox->setChecked(m_pOptions->bConfirmReset); m_ui.ConfirmErrorCheckBox->setChecked(m_pOptions->bConfirmError); m_ui.KeepOnTopCheckBox->setChecked(m_pOptions->bKeepOnTop); m_ui.StdoutCaptureCheckBox->setChecked(m_pOptions->bStdoutCapture); m_ui.CompletePathCheckBox->setChecked(m_pOptions->bCompletePath); m_ui.InstrumentNamesCheckBox->setChecked(m_pOptions->bInstrumentNames); m_ui.MaxRecentFilesSpinBox->setValue(m_pOptions->iMaxRecentFiles); if (m_pOptions->iBaseFontSize > 0) m_ui.BaseFontSizeComboBox->setEditText(QString::number(m_pOptions->iBaseFontSize)); else m_ui.BaseFontSizeComboBox->setCurrentIndex(0); #ifndef CONFIG_LIBGIG m_ui.InstrumentNamesCheckBox->setEnabled(false); #endif bMaxVoicesModified = bMaxStreamsModified = false; #ifdef CONFIG_MAX_VOICES const bool bMaxVoicesSupported = m_pOptions->getEffectiveMaxVoices() >= 0; const bool bMaxStreamsSupported = m_pOptions->getEffectiveMaxStreams() >= 0; m_ui.MaxVoicesSpinBox->setEnabled(bMaxVoicesSupported); m_ui.MaxVoicesSpinBox->setValue(m_pOptions->getMaxVoices()); if (!bMaxVoicesSupported) m_ui.MaxVoicesSpinBox->setToolTip( tr("This parameter is not supported by the current sampler " "version in use.") ); else m_ui.MaxVoicesSpinBox->setToolTip( tr("The max. amount of voices the sampler shall process " "simultaniously.") ); m_ui.MaxStreamsSpinBox->setEnabled(bMaxStreamsSupported); m_ui.MaxStreamsSpinBox->setValue(m_pOptions->getMaxStreams()); if (!bMaxStreamsSupported) m_ui.MaxStreamsSpinBox->setToolTip( tr("This parameter is not supported by the current sampler " "version in use.") ); else m_ui.MaxStreamsSpinBox->setToolTip( tr("The max. amount of disk streams the sampler shall process " "simultaniously.") ); #else m_ui.MaxVoicesSpinBox->setEnabled(false); m_ui.MaxStreamsSpinBox->setEnabled(false); m_ui.MaxVoicesSpinBox->setToolTip( tr("QSampler was built without support for this parameter.") ); m_ui.MaxStreamsSpinBox->setToolTip( tr("QSampler was built without support for this parameter.") ); #endif // CONFIG_MAX_VOICES // Done. m_iDirtySetup--; stabilizeForm(); } // Accept settings (OK button slot). void OptionsForm::accept (void) { // Save options... if (m_iDirtyCount > 0) { // Server settings.... m_pOptions->sServerHost = m_ui.ServerHostComboBox->currentText().trimmed(); m_pOptions->iServerPort = m_ui.ServerPortComboBox->currentText().toInt(); m_pOptions->iServerTimeout = m_ui.ServerTimeoutSpinBox->value(); m_pOptions->bServerStart = m_ui.ServerStartCheckBox->isChecked(); m_pOptions->sServerCmdLine = m_ui.ServerCmdLineComboBox->currentText().trimmed(); m_pOptions->iStartDelay = m_ui.StartDelaySpinBox->value(); // Logging options... m_pOptions->bMessagesLog = m_ui.MessagesLogCheckBox->isChecked(); m_pOptions->sMessagesLogPath = m_ui.MessagesLogPathComboBox->currentText(); // Channels options... m_pOptions->sDisplayFont = m_ui.DisplayFontTextLabel->font().toString(); m_pOptions->bDisplayEffect = m_ui.DisplayEffectCheckBox->isChecked(); m_pOptions->bAutoRefresh = m_ui.AutoRefreshCheckBox->isChecked(); m_pOptions->iAutoRefreshTime = m_ui.AutoRefreshTimeSpinBox->value(); m_pOptions->iMaxVolume = m_ui.MaxVolumeSpinBox->value(); // Messages options... m_pOptions->sMessagesFont = m_ui.MessagesFontTextLabel->font().toString(); m_pOptions->bMessagesLimit = m_ui.MessagesLimitCheckBox->isChecked(); m_pOptions->iMessagesLimitLines = m_ui.MessagesLimitLinesSpinBox->value(); // Other options... m_pOptions->bConfirmRemove = m_ui.ConfirmRemoveCheckBox->isChecked(); m_pOptions->bConfirmRestart = m_ui.ConfirmRestartCheckBox->isChecked(); m_pOptions->bConfirmReset = m_ui.ConfirmResetCheckBox->isChecked(); m_pOptions->bConfirmError = m_ui.ConfirmErrorCheckBox->isChecked(); m_pOptions->bKeepOnTop = m_ui.KeepOnTopCheckBox->isChecked(); m_pOptions->bStdoutCapture = m_ui.StdoutCaptureCheckBox->isChecked(); m_pOptions->bCompletePath = m_ui.CompletePathCheckBox->isChecked(); m_pOptions->bInstrumentNames = m_ui.InstrumentNamesCheckBox->isChecked(); m_pOptions->iMaxRecentFiles = m_ui.MaxRecentFilesSpinBox->value(); m_pOptions->iBaseFontSize = m_ui.BaseFontSizeComboBox->currentText().toInt(); // Reset dirty flag. m_iDirtyCount = 0; } // if the user modified the limits, apply them to the sampler // (and store it later in qsampler's configuration) if (bMaxVoicesModified && m_ui.MaxVoicesSpinBox->isEnabled()) m_pOptions->setMaxVoices(m_ui.MaxVoicesSpinBox->value()); if (bMaxStreamsModified && m_ui.MaxStreamsSpinBox->isEnabled()) m_pOptions->setMaxStreams(m_ui.MaxStreamsSpinBox->value()); // Save combobox history... m_pOptions->saveComboBoxHistory(m_ui.ServerHostComboBox); m_pOptions->saveComboBoxHistory(m_ui.ServerPortComboBox); m_pOptions->saveComboBoxHistory(m_ui.ServerCmdLineComboBox); m_pOptions->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); // Save/commit to disk. m_pOptions->saveOptions(); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void OptionsForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), 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 settings. void OptionsForm::optionsChanged (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void OptionsForm::stabilizeForm (void) { bool bValid = (m_iDirtyCount > 0); bool bEnabled = m_ui.ServerStartCheckBox->isChecked(); m_ui.ServerCmdLineTextLabel->setEnabled(bEnabled); m_ui.ServerCmdLineComboBox->setEnabled(bEnabled); m_ui.StartDelayTextLabel->setEnabled(bEnabled); m_ui.StartDelaySpinBox->setEnabled(bEnabled); 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.AutoRefreshTimeSpinBox->setEnabled( m_ui.AutoRefreshCheckBox->isChecked()); m_ui.MessagesLimitLinesSpinBox->setEnabled( m_ui.MessagesLimitCheckBox->isChecked()); m_ui.DialogButtonBox->button(QDialogButtonBox::Ok)->setEnabled(bValid); } // Messages log path browse slot. void OptionsForm::browseMessagesLogPath (void) { 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()) { m_ui.MessagesLogPathComboBox->setEditText(sFileName); m_ui.MessagesLogPathComboBox->setFocus(); optionsChanged(); } } // The channel display font selection dialog. void OptionsForm::chooseDisplayFont (void) { bool bOk = false; QFont font = QFontDialog::getFont(&bOk, m_ui.DisplayFontTextLabel->font(), this); if (bOk) { m_ui.DisplayFontTextLabel->setFont(font); m_ui.DisplayFontTextLabel->setText(font.family() + ' ' + QString::number(font.pointSize())); optionsChanged(); } } // The messages font selection dialog. void OptionsForm::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 channel display effect demo changer. void OptionsForm::toggleDisplayEffect ( bool bOn ) { QPalette pal; pal.setColor(QPalette::Foreground, Qt::green); if (bOn) { QPixmap pm(":/images/displaybg1.png"); pal.setBrush(QPalette::Background, QBrush(pm)); } else { pal.setColor(QPalette::Background, Qt::black); } m_ui.DisplayFontTextLabel->setPalette(pal); optionsChanged(); } void OptionsForm::maxVoicesChanged(int /*iMaxVoices*/) { bMaxVoicesModified = true; optionsChanged(); } void OptionsForm::maxStreamsChanged(int /*iMaxStreams*/) { bMaxStreamsModified = true; optionsChanged(); } } // namespace QSampler // end of qsamplerOptionsForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerFxSendsModel.h0000644000000000000000000000013212554456160020071 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerFxSendsModel.h0000644000175000001440000000434112554456160020717 0ustar00rncbcusers00000000000000// qsamplerFxSendList.h // /**************************************************************************** Copyright (C) 2010-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerFxSendList_h #define __qsamplerFxSendList_h #include #include #include "qsamplerFxSend.h" namespace QSampler { class FxSendsModel : public QAbstractListModel { Q_OBJECT public: FxSendsModel(int SamplerChannelID, QObject* pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent) const; QVariant data(const QModelIndex& index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex& index) const; // Own methods FxSend* addFxSend(); FxSend* fxSend(const QModelIndex& index); void removeFxSend(const QModelIndex& index); signals: void fxSendsDirtyChanged(bool); public slots: void cleanRefresh(); void applyToSampler(); // not pretty, but more efficient than wiring connections for each element void onExternalModifiication(const QModelIndex& index); private: typedef QList FxSendsList; int m_SamplerChannelID; FxSendsList m_FxSends; }; } // namespace QSampler #endif // __qsamplerFxSendList_h // end of qsamplerFxSendList.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDevice.cpp0000644000000000000000000000013212554456160017270 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.759090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDevice.cpp0000644000175000001440000010201612554456160020114 0ustar00rncbcusers00000000000000// qsamplerDevice.cpp // /**************************************************************************** Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerDevice.h" #include "qsamplerMainForm.h" #include "qsamplerDeviceForm.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceParam - MIDI/Audio Device parameter structure. // // Constructors. DeviceParam::DeviceParam ( lscp_param_info_t *pParamInfo, const char *pszValue ) { setParam(pParamInfo, pszValue); } // Default destructor. DeviceParam::~DeviceParam (void) { } // Initializer. void DeviceParam::setParam ( lscp_param_info_t *pParamInfo, const char *pszValue ) { if (pParamInfo == NULL) return; // Info structure field members. type = pParamInfo->type; if (pParamInfo->description) description = pParamInfo->description; else description = QString::null; mandatory = (bool) pParamInfo->mandatory; fix = (bool) pParamInfo->fix; multiplicity = (bool) pParamInfo->multiplicity; depends.clear(); for (int i = 0; pParamInfo->depends && pParamInfo->depends[i]; i++) depends.append(pParamInfo->depends[i]); if (pParamInfo->defaultv) defaultv = pParamInfo->defaultv; else defaultv = QString::null; if (pParamInfo->range_min) range_min = pParamInfo->range_min; else range_min = QString::null; if (pParamInfo->range_max) range_max = pParamInfo->range_max; else range_max = QString::null; possibilities.clear(); for (int i = 0; pParamInfo->possibilities && pParamInfo->possibilities[i]; i++) possibilities.append(pParamInfo->possibilities[i]); // The current parameter value. if (pszValue) value = pszValue; else value = QString::null; } //------------------------------------------------------------------------- // QSampler::Device - MIDI/Audio Device structure. // // Constructor. Device::Device ( DeviceType deviceType, int iDeviceID ) { // m_ports.setAutoDelete(true); setDevice(deviceType, iDeviceID); } // Default destructor. Device::~Device (void) { qDeleteAll(m_ports); m_ports.clear(); } // Copy constructor. Device::Device ( const Device& device ) : m_params(device.m_params), m_ports(device.m_ports) { m_iDeviceID = device.m_iDeviceID; m_deviceType = device.m_deviceType; m_sDeviceType = device.m_sDeviceType; m_sDriverName = device.m_sDriverName; m_sDeviceName = device.m_sDeviceName; } // Initializer. void Device::setDevice ( DeviceType deviceType, int iDeviceID ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Device id and type should be always set. m_iDeviceID = iDeviceID; m_deviceType = deviceType; // Reset device parameters and ports anyway. m_params.clear(); qDeleteAll(m_ports); m_ports.clear(); // Retrieve device info, if any. lscp_device_info_t *pDeviceInfo = NULL; switch (deviceType) { case Device::Audio: m_sDeviceType = QObject::tr("Audio"); if (m_iDeviceID >= 0 && (pDeviceInfo = ::lscp_get_audio_device_info( pMainForm->client(), m_iDeviceID)) == NULL) appendMessagesClient("lscp_get_audio_device_info"); break; case Device::Midi: m_sDeviceType = QObject::tr("MIDI"); if (m_iDeviceID >= 0 && (pDeviceInfo = ::lscp_get_midi_device_info( pMainForm->client(), m_iDeviceID)) == NULL) appendMessagesClient("lscp_get_midi_device_info"); break; case Device::None: m_sDeviceType = QString::null; break; } // If we're bogus, bail out... if (pDeviceInfo == NULL) { m_sDriverName = QString::null; m_sDeviceName = QObject::tr("New %1 device").arg(m_sDeviceType); return; } // Other device properties... m_sDriverName = pDeviceInfo->driver; m_sDeviceName = m_sDriverName + ' ' + QObject::tr("Device %1").arg(m_iDeviceID); // Grab device parameters... for (int i = 0; pDeviceInfo->params && pDeviceInfo->params[i].key; i++) { const QString sParam = pDeviceInfo->params[i].key; lscp_param_info_t *pParamInfo = NULL; switch (deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pDeviceInfo->params[i].value); } } // Refresh parameter dependencies... refreshParams(); // Set port/channel list... refreshPorts(); } // Driver name initializer/settler. void Device::setDriver ( const QString& sDriverName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Valid only for scratch devices. if (m_sDriverName == sDriverName) return; // Reset device parameters and ports anyway. m_params.clear(); qDeleteAll(m_ports); m_ports.clear(); // Retrieve driver info, if any. lscp_driver_info_t *pDriverInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pDriverInfo = ::lscp_get_audio_driver_info(pMainForm->client(), sDriverName.toUtf8().constData())) == NULL) appendMessagesClient("lscp_get_audio_driver_info"); break; case Device::Midi: if ((pDriverInfo = ::lscp_get_midi_driver_info(pMainForm->client(), sDriverName.toUtf8().constData())) == NULL) appendMessagesClient("lscp_get_midi_driver_info"); break; case Device::None: break; } // If we're bogus, bail out... if (pDriverInfo == NULL) return; // Remember device parameters... m_sDriverName = sDriverName; // Grab driver parameters... for (int i = 0; pDriverInfo->parameters && pDriverInfo->parameters[i]; i++) { const QString sParam = pDriverInfo->parameters[i]; lscp_param_info_t *pParamInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), NULL)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pParamInfo->defaultv); } } // Refresh parameter dependencies... refreshParams(); // Set port/channel list... refreshPorts(); } // Device property accessors. int Device::deviceID (void) const { return m_iDeviceID; } Device::DeviceType Device::deviceType (void) const { return m_deviceType; } const QString& Device::deviceTypeName (void) const { return m_sDeviceType; } const QString& Device::driverName (void) const { return m_sDriverName; } // Special device name formatter. QString Device::deviceName (void) const { QString sPrefix; if (m_iDeviceID >= 0) sPrefix += m_sDeviceType + ' '; return sPrefix + m_sDeviceName; } // Set the proper device parameter value. bool Device::setParam ( const QString& sParam, const QString& sValue ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Set proper device parameter. m_params[sParam.toUpper()].value = sValue; // If the device already exists, things get immediate... int iRefresh = 0; if (m_iDeviceID >= 0 && sValue != QString::null) { // we need temporary byte arrrays with the final strings, because // i.e. QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QByteArray finalParamKey = sParam.toUtf8(); QByteArray finalParamVal = sValue.toUtf8(); // Prepare parameter struct. lscp_param_t param; param.key = (char *) finalParamKey.constData(); param.value = (char *) finalParamVal.constData(); // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_deviceType) { case Device::Audio: if (sParam == "CHANNELS") iRefresh++; if ((ret = ::lscp_set_audio_device_param(pMainForm->client(), m_iDeviceID, ¶m)) != LSCP_OK) appendMessagesClient("lscp_set_audio_device_param"); break; case Device::Midi: if (sParam == "PORTS") iRefresh++; if ((ret = ::lscp_set_midi_device_param(pMainForm->client(), m_iDeviceID, ¶m)) != LSCP_OK) appendMessagesClient("lscp_set_midi_device_param"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { appendMessages(QString("%1: %2.").arg(sParam).arg(sValue)); // Special care for specific parameter changes... if (iRefresh > 0) iRefresh += refreshPorts(); iRefresh += refreshDepends(sParam); } else { // Oops... appendMessagesError( QObject::tr("Could not set device parameter value.\n\nSorry.")); } } // Return whether we're need a view refresh. return (iRefresh > 0); } // Device parameter accessor. const DeviceParamMap& Device::params (void) const { return m_params; } // Device port/channel list accessor. DevicePortList& Device::ports (void) { return m_ports; } // Create a new device, as a copy of this current one. bool Device::createDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // we need temporary lists with the final strings, because i.e. // QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QList finalKeys; QList finalVals; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) { if (iter.value().value == QString::null) continue; finalKeys.push_back(iter.key().toUtf8()); finalVals.push_back(iter.value().value.toUtf8()); } // yeah, we DO HAVE to do the two loops separately ! // Build the parameter list... lscp_param_t *pParams = new lscp_param_t [finalKeys.count() + 1]; int iParam; for (iParam = 0; iParam < finalKeys.count(); iParam++) { pParams[iParam].key = (char *) finalKeys[iParam].constData(); pParams[iParam].value = (char *) finalVals[iParam].constData(); } // Null terminated. pParams[iParam].key = NULL; pParams[iParam].value = NULL; // Now it depends on the device type... switch (m_deviceType) { case Device::Audio: if ((m_iDeviceID = ::lscp_create_audio_device(pMainForm->client(), m_sDriverName.toUtf8().constData(), pParams)) < 0) appendMessagesClient("lscp_create_audio_device"); break; case Device::Midi: if ((m_iDeviceID = ::lscp_create_midi_device(pMainForm->client(), m_sDriverName.toUtf8().constData(), pParams)) < 0) appendMessagesClient("lscp_create_midi_device"); break; case Device::None: break; } // Free used parameter array. delete pParams; // Show result. if (m_iDeviceID >= 0) { // Refresh our own stuff... setDevice(m_deviceType, m_iDeviceID); appendMessages(QObject::tr("created.")); } else { appendMessagesError(QObject::tr("Could not create device.\n\nSorry.")); } // Return whether we're a valid device... return (m_iDeviceID >= 0); } // Destroy existing device. bool Device::deleteDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_deviceType) { case Device::Audio: if ((ret = ::lscp_destroy_audio_device(pMainForm->client(), m_iDeviceID)) != LSCP_OK) appendMessagesClient("lscp_destroy_audio_device"); break; case Device::Midi: if ((ret = ::lscp_destroy_midi_device(pMainForm->client(), m_iDeviceID)) != LSCP_OK) appendMessagesClient("lscp_destroy_midi_device"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { appendMessages(QObject::tr("deleted.")); m_iDeviceID = -1; } else { appendMessagesError(QObject::tr("Could not delete device.\n\nSorry.")); } // Return whether we've done it.. return (ret == LSCP_OK); } // Device parameter dependencies refreshner. int Device::refreshParams (void) { // This should only make sense for scratch devices... if (m_iDeviceID >= 0) return 0; // Refresh all parameters that have dependencies... int iParams = 0; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) iParams += refreshParam(iter.key()); // Return how many parameters have been refreshed... return iParams; } // Device port/channel list refreshner. int Device::refreshPorts (void) { // This should only make sense for actual devices... if (m_iDeviceID < 0) return 0; // Port/channel count determination... int iPorts = 0; switch (m_deviceType) { case Device::Audio: iPorts = m_params["CHANNELS"].value.toInt(); break; case Device::Midi: iPorts = m_params["PORTS"].value.toInt(); break; case Device::None: break; } // Retrieve port/channel information... qDeleteAll(m_ports); m_ports.clear(); for (int iPort = 0; iPort < iPorts; iPort++) m_ports.append(new DevicePort(*this, iPort)); // Return how many ports have been refreshed... return iPorts; } // Refresh/set dependencies given that some parameter has changed. int Device::refreshDepends ( const QString& sParam ) { // This should only make sense for scratch devices... if (m_iDeviceID >= 0) return 0; // Refresh all parameters that depend on this one... int iDepends = 0; DeviceParamMap::ConstIterator iter; for (iter = m_params.begin(); iter != m_params.end(); ++iter) { const QStringList& depends = iter.value().depends; if (depends.indexOf(sParam) >= 0) iDepends += refreshParam(iter.key()); } // Return how many dependencies have been refreshed... return iDepends; } // Refresh/set given parameter based on driver supplied dependencies. int Device::refreshParam ( const QString& sParam ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return 0; if (pMainForm->client() == NULL) return 0; // Check if we have dependencies... DeviceParam& param = m_params[sParam.toUpper()]; if (param.depends.isEmpty()) return 0; int iRefresh = 0; // Build dependency list... lscp_param_t *pDepends = new lscp_param_t [param.depends.count() + 1]; int iDepend = 0; // we need temporary lists with the final strings, because i.e. // QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QList finalKeys; QList finalVals; for (int i = 0; i < param.depends.count(); i++) { const QString& sDepend = param.depends[i]; finalKeys.push_back(sDepend.toUtf8()); finalVals.push_back(m_params[sDepend.toUpper()].value.toUtf8()); } // yeah, we DO HAVE to do those two loops separately ! for (int i = 0; i < param.depends.count(); i++) { pDepends[iDepend].key = (char *) finalKeys[i].constData(); pDepends[iDepend].value = (char *) finalVals[i].constData(); ++iDepend; } // Null terminated. pDepends[iDepend].key = NULL; pDepends[iDepend].value = NULL; // FIXME: Some parameter dependencies (e.g.ALSA CARD) // are blocking for no reason, causing potential timeout-crashes. // hopefully this gets mitigated if this dependency hell is only // carried out for scratch devices... // Retrieve some modern parameters... lscp_param_info_t *pParamInfo = NULL; switch (m_deviceType) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), pDepends)) == NULL) appendMessagesClient("lscp_get_audio_driver_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_driver_param_info( pMainForm->client(), m_sDriverName.toUtf8().constData(), sParam.toUtf8().constData(), pDepends)) == NULL) appendMessagesClient("lscp_get_midi_driver_param_info"); break; case Device::None: break; } if (pParamInfo) { param = DeviceParam(pParamInfo, param.value.isEmpty() ? NULL : param.value.toUtf8().constData()); iRefresh++; } // Free used parameter array. delete pDepends; // Return whether the parameters has been changed... return iRefresh; } // Redirected messages output methods. void Device::appendMessages( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessages(deviceName() + ' ' + s); } void Device::appendMessagesColor( const QString& s, const QString& c ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesColor(deviceName() + ' ' + s, c); } void Device::appendMessagesText( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesText(deviceName() + ' ' + s); } void Device::appendMessagesError( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesError(deviceName() + "\n\n" + s); } void Device::appendMessagesClient( const QString& s ) const { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->appendMessagesClient(deviceName() + ' ' + s); } // Device ids enumerator. int *Device::getDevices ( lscp_client_t *pClient, DeviceType deviceType ) { int *piDeviceIDs = NULL; switch (deviceType) { case Device::Audio: piDeviceIDs = ::lscp_list_audio_devices(pClient); break; case Device::Midi: piDeviceIDs = ::lscp_list_midi_devices(pClient); break; case Device::None: break; } return piDeviceIDs; } std::set Device::getDeviceIDs(lscp_client_t *pClient, DeviceType deviceType) { std::set result; int* piDeviceIDs = getDevices(pClient, deviceType); if (!piDeviceIDs) return result; for (int i = 0; piDeviceIDs[i] != -1; ++i) result.insert(piDeviceIDs[i]); return result; } // Driver names enumerator. QStringList Device::getDrivers ( lscp_client_t *pClient, DeviceType deviceType ) { QStringList drivers; const char **ppszDrivers = NULL; switch (deviceType) { case Device::Audio: ppszDrivers = ::lscp_list_available_audio_drivers(pClient); break; case Device::Midi: ppszDrivers = ::lscp_list_available_midi_drivers(pClient); break; case Device::None: break; } for (int iDriver = 0; ppszDrivers && ppszDrivers[iDriver]; iDriver++) drivers.append(ppszDrivers[iDriver]); return drivers; } //------------------------------------------------------------------------- // QSampler::DevicePort - MIDI/Audio Device port/channel structure. // // Constructor. DevicePort::DevicePort ( Device& device, int iPortID ) : m_device(device) { setDevicePort(iPortID); } // Default destructor. DevicePort::~DevicePort (void) { } // Initializer. void DevicePort::setDevicePort ( int iPortID ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Device port id should be always set. m_iPortID = iPortID; // Reset port parameters anyway. m_params.clear(); // Retrieve device port/channel info, if any. lscp_device_port_info_t *pPortInfo = NULL; switch (m_device.deviceType()) { case Device::Audio: if ((pPortInfo = ::lscp_get_audio_channel_info(pMainForm->client(), m_device.deviceID(), m_iPortID)) == NULL) m_device.appendMessagesClient("lscp_get_audio_channel_info"); break; case Device::Midi: if ((pPortInfo = ::lscp_get_midi_port_info(pMainForm->client(), m_device.deviceID(), m_iPortID)) == NULL) m_device.appendMessagesClient("lscp_get_midi_port_info"); break; case Device::None: break; } // If we're bogus, bail out... if (pPortInfo == NULL) { m_sPortName = QString::null; return; } // Set device port/channel properties... m_sPortName = pPortInfo->name; // Grab device port/channel parameters... m_params.clear(); for (int i = 0; pPortInfo->params && pPortInfo->params[i].key; i++) { const QString sParam = pPortInfo->params[i].key; lscp_param_info_t *pParamInfo = NULL; switch (m_device.deviceType()) { case Device::Audio: if ((pParamInfo = ::lscp_get_audio_channel_param_info( pMainForm->client(), m_device.deviceID(), m_iPortID, sParam.toUtf8().constData())) == NULL) m_device.appendMessagesClient("lscp_get_audio_channel_param_info"); break; case Device::Midi: if ((pParamInfo = ::lscp_get_midi_port_param_info( pMainForm->client(), m_device.deviceID(), m_iPortID, sParam.toUtf8().constData())) == NULL) m_device.appendMessagesClient("lscp_get_midi_port_param_info"); break; case Device::None: break; } if (pParamInfo) { m_params[sParam.toUpper()] = DeviceParam(pParamInfo, pPortInfo->params[i].value); } } } // Device port/channel property accessors. int DevicePort::portID (void) const { return m_iPortID; } const QString& DevicePort::portName (void) const { return m_sPortName; } // Device port/channel parameter accessor. const DeviceParamMap& DevicePort::params (void) const { return m_params; } // Set the proper device port/channel parameter value. bool DevicePort::setParam ( const QString& sParam, const QString& sValue ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return false; if (pMainForm->client() == NULL) return false; // Set proper port/channel parameter. m_params[sParam.toUpper()].value = sValue; // If the device already exists, things get immediate... int iRefresh = 0; if (m_device.deviceID() >= 0 && m_iPortID >= 0) { // we need temporary byte arrrays with the final strings, because // i.e. QString::toUtf8() only returns a temporary object and the // C-style char* pointers for liblscp would immediately be invalidated QByteArray finalParamKey = sParam.toUtf8(); QByteArray finalParamVal = sValue.toUtf8(); // Prepare parameter struct. lscp_param_t param; param.key = (char *) finalParamKey.constData(); param.value = (char *) finalParamVal.constData(); // Now it depends on the device type... lscp_status_t ret = LSCP_FAILED; switch (m_device.deviceType()) { case Device::Audio: if ((ret = ::lscp_set_audio_channel_param(pMainForm->client(), m_device.deviceID(), m_iPortID, ¶m)) != LSCP_OK) m_device.appendMessagesClient("lscp_set_audio_channel_param"); break; case Device::Midi: if ((ret = ::lscp_set_midi_port_param(pMainForm->client(), m_device.deviceID(), m_iPortID, ¶m)) != LSCP_OK) m_device.appendMessagesClient("lscp_set_midi_port_param"); break; case Device::None: break; } // Show result. if (ret == LSCP_OK) { m_device.appendMessages(m_sPortName + ' ' + QString("%1: %2.").arg(sParam).arg(sValue)); iRefresh++; } else { m_device.appendMessagesError( QObject::tr("Could not set %1 parameter value.\n\n" "Sorry.").arg(m_sPortName)); } } // Return whether we're need a view refresh. return (iRefresh > 0); } //------------------------------------------------------------------------- // QSampler::DeviceItem - QTreeWidget device item. // // Constructors. DeviceItem::DeviceItem ( QTreeWidget* pTreeWidget, Device::DeviceType deviceType ) : QTreeWidgetItem(pTreeWidget, QSAMPLER_DEVICE_ITEM), m_device(deviceType) { switch(m_device.deviceType()) { case Device::Audio: setIcon(0, QPixmap(":/images/audio1.png")); setText(0, QObject::tr("Audio Devices")); break; case Device::Midi: setIcon(0, QPixmap(":/images/midi1.png")); setText(0, QObject::tr("MIDI Devices")); break; case Device::None: break; } // Root items are not selectable... setFlags(flags() & ~Qt::ItemIsSelectable); } DeviceItem::DeviceItem ( QTreeWidgetItem* pItem, Device::DeviceType deviceType, int iDeviceID ) : QTreeWidgetItem(pItem, QSAMPLER_DEVICE_ITEM), m_device(deviceType, iDeviceID) { switch(m_device.deviceType()) { case Device::Audio: setIcon(0, QPixmap(":/images/audio2.png")); break; case Device::Midi: setIcon(0, QPixmap(":/images/midi2.png")); break; case Device::None: break; } setText(0, m_device.deviceName()); } // Default destructor. DeviceItem::~DeviceItem () { } // Instance accessors. Device& DeviceItem::device () { return m_device; } //------------------------------------------------------------------------- // QSampler::AbstractDeviceParamModel - data model base class for device parameters // AbstractDeviceParamModel::AbstractDeviceParamModel ( QObject* pParent ) : QAbstractTableModel(pParent), m_bEditable(false) { m_pParams = NULL; } int AbstractDeviceParamModel::rowCount ( const QModelIndex& /*parent*/) const { //std::cout << "model size=" << params.size() << "\n" << std::flush; return (m_pParams ? m_pParams->size() : 0); } int AbstractDeviceParamModel::columnCount ( const QModelIndex& /*parent*/) const { return 3; } Qt::ItemFlags AbstractDeviceParamModel::flags ( const QModelIndex& /*index*/) const { return Qt::ItemIsEditable | Qt::ItemIsEnabled; } QVariant AbstractDeviceParamModel::headerData ( int section, Qt::Orientation orientation, int role) const { if (role != Qt::DisplayRole) return QVariant(); if (orientation == Qt::Horizontal) { switch (section) { case 0: return tr("Parameter"); case 1: return tr("Value"); case 2: return tr("Description"); default: return QVariant(); } } return QVariant(); } void AbstractDeviceParamModel::refresh ( const DeviceParamMap* pParams, bool bEditable ) { m_pParams = pParams; m_bEditable = bEditable; // inform the outer world (QTableView) that our data changed #if QT_VERSION < 0x050000 QAbstractTableModel::reset(); #else QAbstractTableModel::beginResetModel(); QAbstractTableModel::endResetModel(); #endif } void AbstractDeviceParamModel::clear (void) { m_pParams = NULL; // inform the outer world (QTableView) that our data changed #if QT_VERSION < 0x050000 QAbstractTableModel::reset(); #else QAbstractTableModel::beginResetModel(); QAbstractTableModel::endResetModel(); #endif } //------------------------------------------------------------------------- // QSampler::DeviceParamModel - data model for device parameters // (used for QTableView) DeviceParamModel::DeviceParamModel ( QObject *pParent ) : AbstractDeviceParamModel(pParent) { m_pDevice = NULL; } QVariant DeviceParamModel::data ( const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); DeviceParameterRow item; item.name = m_pParams->keys()[index.row()]; item.param = (*m_pParams)[item.name]; item.alive = (m_pDevice && m_pDevice->deviceID() >= 0); return QVariant::fromValue(item); } bool DeviceParamModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; QString key = m_pParams->keys()[index.row()]; //m_pParams[key].value = value.toString(); m_pDevice->setParam(key, value.toString()); emit dataChanged(index, index); return true; } void DeviceParamModel::refresh ( Device* pDevice, bool bEditable ) { m_pDevice = pDevice; AbstractDeviceParamModel::refresh(&pDevice->params(), bEditable); } void DeviceParamModel::clear (void) { AbstractDeviceParamModel::clear(); m_pDevice = NULL; } //------------------------------------------------------------------------- // QSampler::PortParamModel - data model for port parameters // (used for QTableView) PortParamModel::PortParamModel ( QObject *pParent) : AbstractDeviceParamModel(pParent) { m_pPort = NULL; } QVariant PortParamModel::data ( const QModelIndex &index, int role ) const { if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); DeviceParameterRow item; item.name = m_pParams->keys()[index.row()]; item.param = (*m_pParams)[item.name]; item.alive = (m_pPort && m_pPort->portID() >= 0); return QVariant::fromValue(item); } bool PortParamModel::setData ( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; QString key = m_pParams->keys()[index.row()]; //params[key].value = value.toString(); m_pPort->setParam(key, value.toString()); emit dataChanged(index, index); return true; } void PortParamModel::refresh ( DevicePort* pPort, bool bEditable ) { m_pPort = pPort; AbstractDeviceParamModel::refresh(&pPort->params(), bEditable); } void PortParamModel::clear (void) { AbstractDeviceParamModel::clear(); m_pPort = NULL; } //------------------------------------------------------------------------- // QSampler::DeviceParamDelegate - table cell renderer for device/port parameters // DeviceParamDelegate::DeviceParamDelegate ( QObject *pParent) : QItemDelegate(pParent) { } QWidget* DeviceParamDelegate::createEditor ( QWidget *pParent, const QStyleOptionViewItem& /* option */, const QModelIndex& index ) const { if (!index.isValid()) return NULL; DeviceParameterRow r = index.model()->data(index, Qt::DisplayRole).value(); const bool bEnabled = (r.alive) ? !r.param.fix : true; QString val = (r.alive) ? r.param.value : r.param.defaultv; switch (index.column()) { case 0: return new QLabel(r.name, pParent); case 1: { if (r.param.type == LSCP_TYPE_BOOL) { QCheckBox *pCheckBox = new QCheckBox(pParent); if (val != QString::null) pCheckBox->setChecked(val.toLower() == "true"); pCheckBox->setEnabled(bEnabled); return pCheckBox; } else if (r.param.possibilities.count() > 0) { QStringList opts = r.param.possibilities; if (r.param.multiplicity) opts.prepend(tr("(none)")); QComboBox *pComboBox = new QComboBox(pParent); pComboBox->addItems(opts); if (r.param.value.isEmpty()) pComboBox->setCurrentIndex(0); else pComboBox->setCurrentIndex(pComboBox->findText(val)); pComboBox->setEnabled(bEnabled); return pComboBox; } else if (r.param.type == LSCP_TYPE_INT && bEnabled) { QSpinBox *pSpinBox = new QSpinBox(pParent); pSpinBox->setMinimum( (!r.param.range_min.isEmpty()) ? r.param.range_min.toInt() : 0 // or better a negative default min value ? ); pSpinBox->setMaximum( (!r.param.range_max.isEmpty()) ? r.param.range_max.toInt() : (1 << 24) // or better a higher default max value ? ); pSpinBox->setValue(val.toInt()); return pSpinBox; } else if (bEnabled) { QLineEdit *pLineEdit = new QLineEdit(val, pParent); return pLineEdit; } else { QLabel *pLabel = new QLabel(val, pParent); return pLabel; } } case 2: return new QLabel(r.param.description, pParent); default: return NULL; } } void DeviceParamDelegate::setEditorData ( QWidget* /*pEditor*/, const QModelIndex& /*index*/) const { // Unused, since we set the editor data already in createEditor() } void DeviceParamDelegate::setModelData ( QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index ) const { if (index.column() == 1) { DeviceParameterRow r = index.model()->data(index, Qt::DisplayRole).value (); if (pEditor->metaObject()->className() == QString("QCheckBox")) { QCheckBox *pCheckBox = static_cast (pEditor); pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked)); } else if (pEditor->metaObject()->className() == QString("QComboBox")) { QComboBox *pComboBox = static_cast (pEditor); pModel->setData(index, pComboBox->currentText()); } else if (pEditor->metaObject()->className() == QString("QSpinBox")) { QSpinBox *pSpinBox = static_cast (pEditor); pModel->setData(index, pSpinBox->value()); } else if (pEditor->metaObject()->className() == QString("QLineEdit")) { QLineEdit *pLineEdit = static_cast (pEditor); pModel->setData(index, pLineEdit->text()); } else if (pEditor->metaObject()->className() == QString("QLabel")) { QLabel *pLabel = static_cast (pEditor); pModel->setData(index, pLabel->text()); } } } void DeviceParamDelegate::updateEditorGeometry ( QWidget *pEditor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const { if (pEditor) pEditor->setGeometry(option.rect); } } // namespace QSampler // end of qsamplerDevice.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelStrip.ui0000644000000000000000000000013212554456160020316 xustar0030 mtime=1437752432.759090073 30 atime=1437752432.759090073 30 ctime=1437752432.759090073 qsampler-0.3.1/src/qsamplerChannelStrip.ui0000644000175000001440000002775712554456160021164 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008, 2014 Christian Schoenebeck 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. qsamplerChannelStrip 0 0 815 61 0 0 Qt::StrongFocus Qsampler: Channel :/images/qsamplerChannel.png:/images/qsamplerChannel.png 4 4 100 0 120 32 Channel setup &Channel :/images/qsamplerChannel.png:/images/qsamplerChannel.png 0 0 180 0 320 64 true QFrame::StyledPanel QFrame::Sunken 2 0 -- 0 0 20 0 MIDI port / channel -- / -- Qt::AlignHCenter|Qt::AlignTop false 20 0 Instrument load status -- Qt::AlignCenter false 0 0 16 16 16 16 16 16 MIDI activity QFrame::NoFrame QFrame::Plain Qt::AlignCenter Instrument name text-align: left; margin: 0px; -- true 48 32 Channel mute &Mute true 48 32 Channel solo &Solo true 100 0 32767 32 Channel volume 100 Qt::Horizontal QSlider::TicksBothSides 10 60 0 120 24 Channel volume % 100 48 32 Edit Channel's Effect Settings &FX 48 32 Edit channel's instrument &Edit 0 0 64 0 32767 24 Least buffer fill stream usage (%) Qt::Horizontal 48 0 32767 32 Stream / Voice count true QFrame::StyledPanel QFrame::Sunken --/-- Qt::AlignCenter false ChannelSetupPushButton ChannelMutePushButton ChannelSoloPushButton VolumeSlider VolumeSpinBox ChannelEditPushButton qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelStrip.h0000644000000000000000000000013212554456160020130 xustar0030 mtime=1437752432.759090073 30 atime=1437752432.759090073 30 ctime=1437752432.759090073 qsampler-0.3.1/src/qsamplerChannelStrip.h0000644000175000001440000000575512554456160020770 0ustar00rncbcusers00000000000000// qsamplerChannelStrip.h // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008, 2014 Christian Schoenebeck 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 __qsamplerChannelStrip_h #define __qsamplerChannelStrip_h #include "ui_qsamplerChannelStrip.h" #include "qsamplerChannel.h" class QDragEnterEvent; class QTimer; class QMenu; namespace QSampler { //------------------------------------------------------------------------- // QSampler::ChannelStrip -- Channel strip form interface. // class ChannelStrip : public QWidget { Q_OBJECT public: ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~ChannelStrip(); void setup(Channel *pChannel); Channel *channel() const; void setDisplayFont(const QFont& font); QFont displayFont() const; void setDisplayEffect(bool bDisplayEffect); void setMaxVolume(int iMaxVolume); bool updateInstrumentName(bool bForce); bool updateChannelVolume(); bool updateChannelInfo(); bool updateChannelUsage(); void resetErrorCount(); // Channel strip activation/selection. void setSelected(bool bSelected); bool isSelected() const; signals: void channelChanged(ChannelStrip*); public slots: bool channelSetup(); bool channelMute(bool bMute); bool channelSolo(bool bSolo); void channelEdit(); bool channelFxEdit(); bool channelReset(); void volumeChanged(int iVolume); void midiActivityLedOn(); protected: void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); void dropEvent(QDropEvent* pDropEvent); void contextMenuEvent(QContextMenuEvent* pEvent); protected slots: void midiActivityLedOff(); void instrumentListPopupItemClicked(QAction* action); private: Ui::qsamplerChannelStrip m_ui; Channel *m_pChannel; int m_iDirtyChange; int m_iErrorCount; QMenu* m_instrumentListPopupMenu; QTimer *m_pMidiActivityTimer; // MIDI activity pixmap common resources. static int g_iMidiActivityRefCount; static QPixmap *g_pMidiActivityLedOn; static QPixmap *g_pMidiActivityLedOff; // Channel strip activation/selection. static ChannelStrip *g_pSelectedStrip; }; } // namespace QSampler #endif // __qsamplerChannelStrip_h // end of qsamplerChannelStrip.h qsampler-0.3.1/src/PaxHeaders.6862/src.pro0000644000000000000000000000013212554456160015131 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/src.pro0000644000175000001440000000530212554456160015755 0ustar00rncbcusers00000000000000# qsampler.pro # NAME = qsampler TARGET = $${NAME} TEMPLATE = app include(src.pri) #DEFINES += DEBUG HEADERS += config.h \ qsamplerAbout.h \ qsamplerOptions.h \ qsamplerChannel.h \ qsamplerMessages.h \ qsamplerInstrument.h \ qsamplerInstrumentList.h \ qsamplerDevice.h \ qsamplerFxSend.h \ qsamplerFxSendsModel.h \ qsamplerUtilities.h \ qsamplerInstrumentForm.h \ qsamplerInstrumentListForm.h \ qsamplerDeviceForm.h \ qsamplerDeviceStatusForm.h \ qsamplerChannelStrip.h \ qsamplerChannelForm.h \ qsamplerChannelFxForm.h \ qsamplerOptionsForm.h \ qsamplerMainForm.h SOURCES += \ qsampler.cpp \ qsamplerOptions.cpp \ qsamplerChannel.cpp \ qsamplerMessages.cpp \ qsamplerInstrument.cpp \ qsamplerInstrumentList.cpp \ qsamplerDevice.cpp \ qsamplerFxSend.cpp \ qsamplerFxSendsModel.cpp \ qsamplerUtilities.cpp \ qsamplerInstrumentForm.cpp \ qsamplerInstrumentListForm.cpp \ qsamplerDeviceForm.cpp \ qsamplerDeviceStatusForm.cpp \ qsamplerChannelStrip.cpp \ qsamplerChannelForm.cpp \ qsamplerChannelFxForm.cpp \ qsamplerOptionsForm.cpp \ qsamplerMainForm.cpp FORMS += \ qsamplerInstrumentForm.ui \ qsamplerInstrumentListForm.ui \ qsamplerDeviceForm.ui \ qsamplerChannelStrip.ui \ qsamplerChannelForm.ui \ qsamplerChannelFxForm.ui \ qsamplerOptionsForm.ui \ qsamplerMainForm.ui RESOURCES += \ qsampler.qrc TRANSLATIONS += \ translations/qsampler_cs.ts \ translations/qsampler_ru.ts unix { # variables OBJECTS_DIR = .obj MOC_DIR = .moc UI_DIR = .ui isEmpty(PREFIX) { PREFIX = /usr/local } BINDIR = $${PREFIX}/bin DATADIR = $$PREFIX/share DEFINES += DATADIR=\"$${DATADIR}\" # make install INSTALLS += target desktop icon appdata \ icon_scalable mimeinfo mimetypes mimetypes_scalable target.path = $${BINDIR} desktop.path = $${DATADIR}/applications desktop.files += $${NAME}.desktop icon.path = $${DATADIR}/icons/hicolor/32x32/apps icon.files += images/$${NAME}.png icon_scalable.path = $${DATADIR}/icons/hicolor/scalable/apps icon_scalable.files += images/$${NAME}.svg appdata.path = $${DATADIR}/appdata appdata.files += appdata/$${NAME}.appdata.xml mimeinfo.path = $${DATADIR}/mime/packages mimeinfo.files += mimetypes/$${NAME}.xml mimetypes.path = $${DATADIR}/icons/hicolor/32x32/mimetypes mimetypes.files += mimetypes/application-x-$${NAME}-session.png mimetypes_scalable.path = $${DATADIR}/icons/hicolor/scalable/mimetypes mimetypes_scalable.files += mimetypes/application-x-$${NAME}-session.svg } win32 { CONFIG(debug, debug|release): CONFIG += console INSTALLS += target target.path = $${PREFIX}/bin } macx { QMAKE_MAC_SDK = $$(SDKROOT) CONFIG += $$(QMAKE_ARCHS) } # QT5 support !lessThan(QT_MAJOR_VERSION, 5) { QT += widgets } qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDevice.h0000644000000000000000000000013212554456160016735 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.760090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDevice.h0000644000175000001440000002211712554456160017564 0ustar00rncbcusers00000000000000// qsamplerDevice.h // /**************************************************************************** Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 __qsamplerDevice_h #define __qsamplerDevice_h #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qsamplerOptions.h" namespace QSampler { class DevicePort; // Special QListViewItem::rtti() unique return value. #define QSAMPLER_DEVICE_ITEM 1001 //------------------------------------------------------------------------- // QSampler::DeviceParam - MIDI/Audio Device parameter structure. // class DeviceParam { public: // Constructor. DeviceParam(lscp_param_info_t *pParamInfo = NULL, const char *pszValue = NULL); // Default destructor. ~DeviceParam(); // Initializer. void setParam(lscp_param_info_t *pParamInfo, const char *pszValue = NULL); // Info structure field members. lscp_type_t type; QString description; bool mandatory; bool fix; bool multiplicity; QStringList depends; QString defaultv; QString range_min; QString range_max; QStringList possibilities; // The current parameter value. QString value; }; // Typedef'd parameter QMap. typedef QMap DeviceParamMap; // Typedef'd device port/channels QList. typedef QList DevicePortList; //------------------------------------------------------------------------- // QSampler::Device - MIDI/Audio Device structure. // class Device { public: // We use the same class for MIDI and audio device management enum DeviceType { None, Midi, Audio }; // Constructor. Device(DeviceType deviceType, int iDeviceID = -1); // Copy constructor. Device(const Device& device); // Default destructor. ~Device(); // Initializer. void setDevice(DeviceType deviceType, int iDeviceID = -1); // Driver name initializer. void setDriver(const QString& sDriverName); // Device property accessors. int deviceID() const; DeviceType deviceType() const; const QString& deviceTypeName() const; const QString& driverName() const; // Special device name formatter. QString deviceName() const; // Set the proper device parameter value. bool setParam (const QString& sParam, const QString& sValue); // Device parameters accessor. const DeviceParamMap& params() const; // Device port/channel list accessor. DevicePortList& ports(); // Device parameter dependency list refreshner. int refreshParams(); // Device port/channel list refreshner. int refreshPorts(); // Refresh/set dependencies given that some parameter has changed. int refreshDepends(const QString& sParam); // Create/destroy device methods. bool createDevice(); bool deleteDevice(); // Message logging methods (brainlessly mapped to main form's). void appendMessages (const QString& s) const; void appendMessagesColor (const QString& s, const QString & c) const; void appendMessagesText (const QString& s) const; void appendMessagesError (const QString& s) const; void appendMessagesClient (const QString& s) const; // Device ids enumerator. static int *getDevices(lscp_client_t *pClient, DeviceType deviceType); static std::set getDeviceIDs(lscp_client_t *pClient, DeviceType deviceType); // Driver names enumerator. static QStringList getDrivers(lscp_client_t *pClient, DeviceType deviceType); private: // Refresh/set given parameter based on driver supplied dependencies. int refreshParam(const QString& sParam); // Instance variables. int m_iDeviceID; DeviceType m_deviceType; QString m_sDeviceType; QString m_sDriverName; QString m_sDeviceName; // Device parameter list. DeviceParamMap m_params; // Device port/channel list. DevicePortList m_ports; }; //------------------------------------------------------------------------- // QSampler::DevicePort - MIDI/Audio Device port/channel structure. // class DevicePort { public: // Constructor. DevicePort(Device& device, int iPortID); // Default destructor. ~DevicePort(); // Initializer. void setDevicePort(int iPortID); // Device port property accessors. int portID() const; const QString& portName() const; // Device port parameters accessor. const DeviceParamMap& params() const; // Set the proper device port/channel parameter value. bool setParam (const QString& sParam, const QString& sValue); private: // Device reference. Device& m_device; // Instance variables. int m_iPortID; QString m_sPortName; // Device port parameter list. DeviceParamMap m_params; }; //------------------------------------------------------------------------- // QSampler::DeviceItem - QTreeWidget device item. // class DeviceItem : public QTreeWidgetItem { public: // Constructors. DeviceItem(QTreeWidget *pTreeWidget, Device::DeviceType deviceType); DeviceItem(QTreeWidgetItem *pItem, Device::DeviceType deviceType, int iDeviceID); // Default destructor. ~DeviceItem(); // Instance accessors. Device& device(); private: // Instance variables. Device m_device; }; struct DeviceParameterRow { QString name; DeviceParam param; bool alive; // whether these params refer to an existing device // or for a device that is yet to be created }; //------------------------------------------------------------------------- // QSampler::AbstractDeviceParamModel - data model base class for device parameters // class AbstractDeviceParamModel : public QAbstractTableModel { Q_OBJECT public: AbstractDeviceParamModel(QObject *pParent = NULL); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex() ) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex& index) const; virtual void clear(); void refresh(const DeviceParamMap* params, bool bEditable); protected: const DeviceParamMap *m_pParams; bool m_bEditable; }; //------------------------------------------------------------------------- // QSampler::DeviceParamModel - data model for device parameters // (used for QTableView) class DeviceParamModel : public AbstractDeviceParamModel { Q_OBJECT public: DeviceParamModel(QObject *pParent = NULL); // Overridden methods from subclass(es) QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); void clear(); public slots: void refresh(Device* pDevice, bool bEditable); private: Device *m_pDevice; }; //------------------------------------------------------------------------- // QSampler::PortParamModel - data model for port parameters // (used for QTableView) class PortParamModel : public AbstractDeviceParamModel { Q_OBJECT public: PortParamModel(QObject *pParent = 0); // overridden methods from subclass(es) QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); void clear(); public slots: void refresh(DevicePort* pPort, bool bEditable); private: DevicePort* m_pPort; }; //------------------------------------------------------------------------- // QSampler::DeviceParamDelegate - table cell renderer for device/port parameters // class DeviceParamDelegate : public QItemDelegate { Q_OBJECT public: DeviceParamDelegate(QObject *pParent = NULL); QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *pEditor, const QModelIndex& index) const; void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index) const; void updateEditorGeometry(QWidget* pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; } // namespace QSampler // so we can use it i.e. through QVariant Q_DECLARE_METATYPE(QSampler::DeviceParameterRow) #endif // __qsamplerDevice_h // end of qsamplerDevice.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentListForm.cpp0000644000000000000000000000013212554456160021721 xustar0030 mtime=1437752432.762090073 30 atime=1437752432.762090073 30 ctime=1437752432.762090073 qsampler-0.3.1/src/qsamplerInstrumentListForm.cpp0000644000175000001440000002166612554456160022560 0ustar00rncbcusers00000000000000// qsamplerInstrumentListForm.cpp // /**************************************************************************** Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentListForm.h" #include "qsamplerInstrumentList.h" #include "qsamplerInstrumentForm.h" #include "qsamplerOptions.h" #include "qsamplerInstrument.h" #include "qsamplerMainForm.h" #include #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentListForm -- Instrument map list form implementation. // InstrumentListForm::InstrumentListForm ( QWidget* pParent, Qt::WindowFlags wflags ) : QMainWindow(pParent, wflags) { m_ui.setupUi(this); m_pInstrumentListView = new InstrumentListView(this); QMainWindow::setCentralWidget(m_pInstrumentListView); // Setup toolbar widgets. m_pMapComboBox = new QComboBox(m_ui.instrumentToolbar); m_pMapComboBox->setMinimumWidth(120); m_pMapComboBox->setEnabled(false); m_pMapComboBox->setToolTip(tr("Instrument Map")); m_ui.instrumentToolbar->addWidget(m_pMapComboBox); m_ui.instrumentToolbar->addSeparator(); m_ui.instrumentToolbar->addAction(m_ui.newInstrumentAction); m_ui.instrumentToolbar->addAction(m_ui.editInstrumentAction); m_ui.instrumentToolbar->addAction(m_ui.deleteInstrumentAction); m_ui.instrumentToolbar->addSeparator(); m_ui.instrumentToolbar->addAction(m_ui.refreshInstrumentsAction); QObject::connect(m_pMapComboBox, SIGNAL(activated(int)), SLOT(activateMap(int))); QObject::connect(m_pInstrumentListView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex&,const QModelIndex&)), SLOT(stabilizeForm())); QObject::connect( m_pInstrumentListView, SIGNAL(activated(const QModelIndex&)), SLOT(editInstrument(const QModelIndex&))); QObject::connect( m_ui.newInstrumentAction, SIGNAL(triggered()), SLOT(newInstrument())); QObject::connect( m_ui.deleteInstrumentAction, SIGNAL(triggered()), SLOT(deleteInstrument())); QObject::connect( m_ui.editInstrumentAction, SIGNAL(triggered()), SLOT(editInstrument())); QObject::connect( m_ui.refreshInstrumentsAction, SIGNAL(triggered()), SLOT(refreshInstruments())); // Things must be stable from the start. stabilizeForm(); } InstrumentListForm::~InstrumentListForm (void) { delete m_pMapComboBox; delete m_pInstrumentListView; } // Notify our parent that we're emerging. void InstrumentListForm::showEvent ( QShowEvent *pShowEvent ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); QWidget::showEvent(pShowEvent); } // Notify our parent that we're closing. void InstrumentListForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); } // Just about to notify main-window that we're closing. void InstrumentListForm::closeEvent ( QCloseEvent * /*pCloseEvent*/ ) { QWidget::hide(); MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); } // Refresh all instrument list and views. void InstrumentListForm::refreshInstruments (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Get/save current map selection... int iMap = m_pMapComboBox->currentIndex(); if (iMap < 0 || m_pMapComboBox->count() < 2) iMap = pOptions->iMidiMap + 1; // Populate maps list. m_pMapComboBox->clear(); m_pMapComboBox->addItem(tr("(All)")); m_pMapComboBox->insertItems(1, Instrument::getMapNames()); // Adjust to saved selection... if (iMap < 0 || iMap >= m_pMapComboBox->count()) iMap = 0; m_pMapComboBox->setCurrentIndex(iMap); m_pMapComboBox->setEnabled(m_pMapComboBox->count() > 1); activateMap(iMap); } // Refresh instrument maps selector. void InstrumentListForm::activateMap ( int iMap ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; int iMidiMap = iMap - 1; if (iMidiMap >= 0) pOptions->iMidiMap = iMidiMap; m_pInstrumentListView->setMidiMap(iMidiMap); m_pInstrumentListView->refresh(); stabilizeForm(); } void InstrumentListForm::newInstrument (void) { Instrument instrument; InstrumentForm form(this); form.setup(&instrument); if (!form.exec()) return; // Commit... instrument.mapInstrument(); // add new item to the table model m_pInstrumentListView->addInstrument( instrument.map(), instrument.bank(), instrument.prog()); stabilizeForm(); } void InstrumentListForm::editInstrument (void) { editInstrument(m_pInstrumentListView->currentIndex()); } void InstrumentListForm::editInstrument ( const QModelIndex& index ) { if (!index.isValid()) return; Instrument *pInstrument = static_cast (index.internalPointer()); if (pInstrument == NULL) return; // Save current key values... int iMap = pInstrument->map(); int iBank = pInstrument->bank(); int iProg = pInstrument->prog(); Instrument instrument(iMap, iBank, iProg); // Do the edit dance... InstrumentForm form(this); form.setup(pInstrument); if (!form.exec()) return; // Commit... pInstrument->mapInstrument(); // Check whether we changed instrument key... if (pInstrument->map() == iMap && pInstrument->bank() == iBank && pInstrument->prog() == iProg) { // Just update tree item... m_pInstrumentListView->updateInstrument(pInstrument); } else { // Unmap old instance... instrument.unmapInstrument(); // Correct the position of the instrument in the model m_pInstrumentListView->resortInstrument(pInstrument); } stabilizeForm(); } void InstrumentListForm::deleteInstrument (void) { const QModelIndex& index = m_pInstrumentListView->currentIndex(); if (!index.isValid()) return; Instrument *pInstrument = static_cast (index.internalPointer()); if (pInstrument == NULL) return; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; // Prompt user if this is for real... Options *pOptions = pMainForm->options(); if (pOptions && pOptions->bConfirmRemove) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Warning"); const QString& sText = tr( "About to delete instrument map entry:\n\n" "%1\n\n" "Are you sure?") .arg(pInstrument->name()); #if 0 if (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() == QMessageBox::Cancel) return; if (cbox.isChecked()) pOptions->bConfirmRemove = false; #endif } pInstrument->unmapInstrument(); // Let the instrument vanish from the table model... m_pInstrumentListView->removeInstrument(pInstrument); stabilizeForm(); } // Update form actions enablement... void InstrumentListForm::stabilizeForm (void) { MainForm *pMainForm = MainForm::getInstance(); bool bEnabled = (pMainForm && pMainForm->client()); m_ui.newInstrumentAction->setEnabled(bEnabled); const QModelIndex& index = m_pInstrumentListView->currentIndex(); bEnabled = (bEnabled && index.isValid()); m_ui.editInstrumentAction->setEnabled(bEnabled); m_ui.deleteInstrumentAction->setEnabled(bEnabled); } // Context menu request. void InstrumentListForm::contextMenuEvent ( QContextMenuEvent *pContextMenuEvent ) { QMenu menu(this); menu.addAction(m_ui.newInstrumentAction); menu.addSeparator(); menu.addAction(m_ui.editInstrumentAction); menu.addAction(m_ui.deleteInstrumentAction); menu.addSeparator(); menu.addAction(m_ui.refreshInstrumentsAction); menu.exec(pContextMenuEvent->globalPos()); } } // namespace QSampler // end of qsamplerInstrumentListForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentList.h0000644000000000000000000000013212554456160020542 xustar0030 mtime=1437752432.762090073 30 atime=1437752432.762090073 30 ctime=1437752432.762090073 qsampler-0.3.1/src/qsamplerInstrumentList.h0000644000175000001440000000650412554456160021373 0ustar00rncbcusers00000000000000// qsamplerInstrumentList.h // /**************************************************************************** Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentList_h #define __qsamplerInstrumentList_h #include namespace QSampler { class Instrument; //------------------------------------------------------------------------- // QSampler:InstrumentListModel - data model for MIDI prog mappings // class InstrumentListModel : public QAbstractItemModel { Q_OBJECT public: // Constructor. InstrumentListModel(QObject *pParent = NULL); // Destructor. ~InstrumentListModel(); // Overridden methods from subclass(es) int rowCount(const QModelIndex& parent) const; int columnCount(const QModelIndex& parent) const; QVariant data(const QModelIndex& index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; // Map selector. void setMidiMap(int iMidiMap); int midiMap() const; // Own methods const Instrument *addInstrument(int iMap, int iBank, int iProg); void removeInstrument(Instrument *pInstrument); void updateInstrument(Instrument *pInstrument); void resortInstrument(Instrument *pInstrument); // General reloader. void refresh(); // Make the following method public void beginReset(); void endReset(); // Map clear. void clear(); protected: QModelIndex index(int row, int col, const QModelIndex& parent) const; QModelIndex parent(const QModelIndex& child) const; private: typedef QList InstrumentList; typedef QMap InstrumentMap; InstrumentMap m_instruments; // Current map selection. int m_iMidiMap; }; //------------------------------------------------------------------------- // QSampler::InstrumentListView - list view for MIDI prog mappings // class InstrumentListView : public QTreeView { Q_OBJECT public: // Constructor. InstrumentListView(QWidget *pParent = NULL); // Destructor. ~InstrumentListView(); // Map selector. void setMidiMap(int iMidiMap); int midiMap() const; // Own methods const Instrument *addInstrument(int iMap, int iBank, int iProg); void removeInstrument(Instrument *pInstrument); void updateInstrument(Instrument *pInstrument); void resortInstrument(Instrument *pInstrument); // General reloader. void refresh(); private: // Instance variables. InstrumentListModel *m_pListModel; }; } // namespace QSampler #endif // __qsamplerInstrumentList_h // end of qsamplerInstrumentList.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelFxForm.ui0000644000000000000000000000013212554456160020416 xustar0030 mtime=1437752432.759090073 30 atime=1437752432.758090073 30 ctime=1437752432.759090073 qsampler-0.3.1/src/qsamplerChannelFxForm.ui0000644000175000001440000001552312554456160021250 0ustar00rncbcusers00000000000000 Christian Schoenebeck Copyright (C) 2010-2013, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck 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. qsamplerChannelFxForm 0 0 518 370 Channel Effects FX Send Selection 0 0 true Qt::Horizontal 40 20 Creates a new FX Send. You have to select 'Apply' afterwards to actually create it on sampler side. Create :/images/itemNew.png Schedules the selected FX send for deletion. You have to select 'Apply' afterwards to actually destroy it on sampler side. Destroy :/images/formRemove.png 0 0 FX Send's Parameters Send Depth MIDI Controller: Current Depth: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter % 300 0 0 Audio Routing Qt::Horizontal QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok|QDialogButtonBox::Reset buttonBox accepted() qsamplerChannelFxForm accept() 248 254 157 274 buttonBox rejected() qsamplerChannelFxForm reject() 316 260 286 274 qsampler-0.3.1/src/PaxHeaders.6862/qsamplerMainForm.ui0000644000000000000000000000013212554456160017434 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerMainForm.ui0000644000175000001440000004430512554456160020266 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007,2008,2015 Christian Schoenebeck 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. qsamplerMainForm 0 0 800 600 MainWindow :/images/qsampler.png Qt::Horizontal 4 Qt::Horizontal 4 Qt::Horizontal 4 0 0 800 31 &Edit &View MIDI Device Status &Channels &Help &File Open &Recent :/images/fileNew.png &New New New session New sampler session Ctrl+N :/images/fileOpen.png &Open... Open Open session Open sampler session Ctrl+O :/images/fileSave.png &Save Save Save session Save sampler session Ctrl+S Save &As... Save As Save current sampler session with another name :/images/fileReset.png Rese&t Reset Reset instance Reset sampler instance Ctrl+R :/images/fileRestart.png &Restart Restart Restart instance Restart sampler instance Ctrl+Shift+R E&xit Exit Exit this application program :/images/editAddChannel.png &Add Channel Add Add channel Add a new sampler channel Ctrl+A :/images/editRemoveChannel.png &Remove Channel Remove Remove channel Remove current sampler channel Ctrl+X :/images/editResetChannel.png Re&set Channel Reset Reset channel Reset current sampler channel :/images/editResetAllChannels.png R&eset All Channels Reset All Reset all channels Reset all sampler channels :/images/editSetupChannel.png &Setup Channel... Setup Setup channel Setup current sampler channel F2 :/images/editEditChannel.png Ed&it Channel... Edit Edit channel Edit current sampler channel F9 true &Menubar Menubar Show/hide menubar Show/hide the main program window menubar Ctrl+M true &Toolbar viewToolbars Show/hide toolbar Show/hide main program window toolbars Ctrl+T true &Statusbar Statusbar Show/hide statusbar Show/hide the main program window statusbar true M&essages Messages Show/hide messages Show/hide the messages window true :/images/qsamplerInstrument.png &Instruments Instruments MIDI instruments configuration Show/hide the MIDI instruments configuration window F10 true :/images/qsamplerDevice.png &Devices Devices Device configuration Show/hide the device configuration window F11 &Options... Options General options Change general application program options F12 false :/images/channelsArrange.png &Arrange Arrange Arrange channels Line up all channel strips F5 true A&uto Arrange Auto Arrange Auto-arrange channels Auto-arrange channel strips &About... About Show information about this application program About &Qt... About Qt Show information about the Qt toolkit qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelFxForm.h0000644000000000000000000000013212554456160020230 xustar0030 mtime=1437752432.758090073 30 atime=1437752432.758090073 30 ctime=1437752432.758090073 qsampler-0.3.1/src/qsamplerChannelFxForm.h0000644000175000001440000000377512554456160021070 0ustar00rncbcusers00000000000000// qsamplerChannelFxForm.h // /**************************************************************************** Copyright (C) 2010-2013, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck 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 __qsamplerChannelFxForm_h #define __qsamplerChannelFxForm_h #include "ui_qsamplerChannelFxForm.h" #include "qsamplerChannel.h" #include "qsamplerDevice.h" #include namespace QSampler { class ChannelFxForm : public QDialog { Q_OBJECT public: ChannelFxForm(Channel* pSamplerChannel, QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~ChannelFxForm(); protected slots: void onFxSendSelection(const QModelIndex& index); void onButtonClicked(QAbstractButton* button); void onCreateFxSend(); void onDestroyFxSend(); void onDepthCtrlChanged(int iMidiCtrl); void onCurrentSendDepthChanged(int depthPercent); void onRoutingTableChanged(); void updateTableCellRenderers(); void updateTableCellRenderers(const QModelIndex& topLeft, const QModelIndex& bottomRight); private: Ui::qsamplerChannelFxForm m_ui; Channel* m_pSamplerChannel; //int m_SamplerChannelID; Device* m_pAudioDevice; }; } // namespace QSampler #endif // __qsamplerChannelFxForm_h // end of qsamplerChannelFxForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsampler.cpp0000644000000000000000000000013212554456160016150 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsampler.cpp0000644000175000001440000002563712554456160017011 0ustar00rncbcusers00000000000000// qsampler.cpp // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include #include #if defined(__APPLE__) // Toshi Nagata 20080105 #include #endif #define CONFIG_QUOTE1(x) #x #define CONFIG_QUOTED(x) CONFIG_QUOTE1(x) #if defined(DATADIR) #define CONFIG_DATADIR CONFIG_QUOTED(DATADIR) #else #define CONFIG_DATADIR CONFIG_PREFIX "/share" #endif #if WIN32 #define RELATIVE_LOCALE_DIR "/share/locale" #elif defined(__APPLE__) #define RELATIVE_LOCALE_DIR "/../Resources" #endif //------------------------------------------------------------------------- // Singleton application instance stuff (Qt/X11 only atm.) // #if defined(Q_WS_X11) #include #include #include #define QSAMPLER_XUNIQUE "qsamplerMainForm_xunique" #endif class qsamplerApplication : public QApplication { public: // Constructor. qsamplerApplication(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 { #ifdef RELATIVE_LOCALE_DIR sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR; if (m_pQtTranslator->load(sLocName, sLocPath)) { QApplication::installTranslator(m_pQtTranslator); } else { #endif 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 #ifdef RELATIVE_LOCALE_DIR } #endif } // Try own application translation... m_pMyTranslator = new QTranslator(this); sLocName = "qsampler_" + loc.name(); if (m_pMyTranslator->load(sLocName, sLocPath)) { QApplication::installTranslator(m_pMyTranslator); } else { #ifdef RELATIVE_LOCALE_DIR sLocPath = QApplication::applicationDirPath() + RELATIVE_LOCALE_DIR; #else sLocPath = CONFIG_DATADIR "/qsampler/translations"; #endif 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(); m_aUnique = XInternAtom(m_pDisplay, QSAMPLER_XUNIQUE, false); XGrabServer(m_pDisplay); m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); XUngrabServer(m_pDisplay); #endif } // Destructor. ~qsamplerApplication() { 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 = QSAMPLER_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(); } // 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 #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='thread apply all 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 ) { Q_INIT_RESOURCE(qsampler); #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 qsamplerApplication app(argc, argv); #if defined(__APPLE__) // Toshi Nagata 20080105 { // Set the plugin path to @exetutable_path/../plugins QDir dir(QApplication::applicationDirPath()); dir.cdUp(); // "Contents" directory QApplication::setLibraryPaths(QStringList(dir.absolutePath() + "/plugins")); // Set the PATH environment variable to include @executable_path/../../.. dir.cdUp(); dir.cdUp(); QString path(getenv("PATH")); path = dir.absolutePath() + ":" + path; setenv("PATH", path.toUtf8().constData(), 1); } #endif // Construct default settings; override with command line arguments. QSampler::Options options; if (!options.parse_args(app.arguments())) { app.quit(); return 1; } // 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) { #if QT_VERSION >= 0x050000 const QColor& color = pal.window().color(); const int iGroups = int(QPalette::Active | QPalette::Inactive) + 1; for (int i = 0; i < iGroups; ++i) { const QPalette::ColorGroup group = QPalette::ColorGroup(i); pal.setBrush(group, QPalette::Light, color.lighter(150)); pal.setBrush(group, QPalette::Midlight, color.lighter(120)); pal.setBrush(group, QPalette::Dark, color.darker(150)); pal.setBrush(group, QPalette::Mid, color.darker(120)); pal.setBrush(group, QPalette::Shadow, color.darker(200)); } // pal.setColor(QPalette::Disabled, QPalette::ButtonText, pal.mid().color()); #endif 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... if (options.iBaseFontSize > 0) app.setFont(QFont(app.font().family(), options.iBaseFontSize)); // Construct, setup and show the main form. QSampler::MainForm w; w.setup(&options); w.show(); // Settle this one as application main widget... app.setMainWidget(&w); // Register the quit signal/slot. // app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); return app.exec(); } // end of qsampler.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerMessages.cpp0000644000000000000000000000013212554456160017640 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerMessages.cpp0000644000175000001440000002063012554456160020465 0ustar00rncbcusers00000000000000// qsamplerMessages.cpp // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerMessages.h" #include #include #include #include #include #include #include #include #include #if !defined(WIN32) #include #include #endif namespace QSampler { // The default maximum number of message lines. #define QSAMPLER_MESSAGES_MAXLINES 1000 // Notification pipe descriptors #define QSAMPLER_MESSAGES_FDNIL -1 #define QSAMPLER_MESSAGES_FDREAD 0 #define QSAMPLER_MESSAGES_FDWRITE 1 //------------------------------------------------------------------------- // QSampler::Messages - Messages log dockable window. // // Constructor. Messages::Messages ( QWidget *pParent ) : QDockWidget(pParent) { // Surely a name is crucial (e.g.for storing geometry settings) QDockWidget::setObjectName("qsamplerMessages"); // Intialize stdout capture stuff. m_pStdoutNotifier = NULL; m_fdStdout[QSAMPLER_MESSAGES_FDREAD] = QSAMPLER_MESSAGES_FDNIL; m_fdStdout[QSAMPLER_MESSAGES_FDWRITE] = QSAMPLER_MESSAGES_FDNIL; // Create local text view widget. m_pMessagesTextView = new QTextEdit(this); // QFont font(m_pMessagesTextView->font()); // font.setFamily("Fixed"); // m_pMessagesTextView->setFont(font); m_pMessagesTextView->setLineWrapMode(QTextEdit::NoWrap); m_pMessagesTextView->setReadOnly(true); m_pMessagesTextView->setUndoRedoEnabled(false); // m_pMessagesTextView->setTextFormat(Qt::LogText); // Initialize default message limit. m_iMessagesLines = 0; setMessagesLimit(QSAMPLER_MESSAGES_MAXLINES); m_pMessagesLog = NULL; // Prepare the dockable window stuff. QDockWidget::setWidget(m_pMessagesTextView); QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures); QDockWidget::setAllowedAreas( Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea); // Some specialties to this kind of dock window... QDockWidget::setMinimumHeight(120); // Finally set the default caption and tooltip. const QString& sCaption = tr("Messages"); QDockWidget::setWindowTitle(sCaption); // QDockWidget::setWindowIcon(QIcon(":/icons/qsamplerMessages.png")); QDockWidget::setToolTip(sCaption); } // Destructor. Messages::~Messages (void) { // Turn off and close logging. setLogging(false); // No more notifications. if (m_pStdoutNotifier) delete m_pStdoutNotifier; // No need to delete child widgets, Qt does it all for us. } // Own stdout/stderr socket notifier slot. void Messages::stdoutNotify ( int fd ) { #if !defined(WIN32) // Set non-blocking reads, if not already... const int iFlags = ::fcntl(fd, F_GETFL, 0); int iBlock = ((iFlags & O_NONBLOCK) == 0); if (iBlock) iBlock = ::fcntl(fd, F_SETFL, iFlags | O_NONBLOCK); // Read as much as is available... QString sTemp; char achBuffer[1024]; const int cchBuffer = sizeof(achBuffer) - 1; int cchRead = ::read(fd, achBuffer, cchBuffer); while (cchRead > 0) { achBuffer[cchRead] = (char) 0; sTemp.append(achBuffer); cchRead = (iBlock ? 0 : ::read(fd, achBuffer, cchBuffer)); } // Needs to be non-empty... if (!sTemp.isEmpty()) appendStdoutBuffer(sTemp); #endif } // Stdout buffer handler -- now splitted by complete new-lines... void Messages::appendStdoutBuffer ( const QString& s ) { m_sStdoutBuffer.append(s); const int iLength = m_sStdoutBuffer.lastIndexOf('\n'); if (iLength > 0) { const QString& sTemp = m_sStdoutBuffer.left(iLength); m_sStdoutBuffer.remove(0, iLength + 1); QStringList list = sTemp.split('\n'); QStringListIterator iter(list); while (iter.hasNext()) appendMessagesText(iter.next()); } } // Stdout flusher -- show up any unfinished line... void Messages::flushStdoutBuffer (void) { if (!m_sStdoutBuffer.isEmpty()) { appendMessagesText(m_sStdoutBuffer); m_sStdoutBuffer.clear(); } } // Stdout capture accessors. bool Messages::isCaptureEnabled (void) { return (m_pStdoutNotifier != NULL); } void Messages::setCaptureEnabled ( bool bCapture ) { // Flush current buffer. flushStdoutBuffer(); #if !defined(WIN32) // Destroy if already enabled. if (!bCapture && m_pStdoutNotifier) { delete m_pStdoutNotifier; m_pStdoutNotifier = NULL; // Close the notification pipes. if (m_fdStdout[QSAMPLER_MESSAGES_FDREAD] != QSAMPLER_MESSAGES_FDNIL) { ::close(m_fdStdout[QSAMPLER_MESSAGES_FDREAD]); m_fdStdout[QSAMPLER_MESSAGES_FDREAD] = QSAMPLER_MESSAGES_FDNIL; } } // Are we going to make up the capture? if (bCapture && m_pStdoutNotifier == NULL && ::pipe(m_fdStdout) == 0) { ::dup2(m_fdStdout[QSAMPLER_MESSAGES_FDWRITE], STDOUT_FILENO); ::dup2(m_fdStdout[QSAMPLER_MESSAGES_FDWRITE], STDERR_FILENO); m_pStdoutNotifier = new QSocketNotifier( m_fdStdout[QSAMPLER_MESSAGES_FDREAD], QSocketNotifier::Read, this); QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), SLOT(stdoutNotify(int))); } #endif } // Message font accessors. QFont Messages::messagesFont (void) { return m_pMessagesTextView->font(); } void Messages::setMessagesFont ( const QFont& font ) { m_pMessagesTextView->setFont(font); } // Maximum number of message lines accessors. int Messages::messagesLimit (void) { return m_iMessagesLimit; } void Messages::setMessagesLimit ( int iMessagesLimit ) { m_iMessagesLimit = iMessagesLimit; m_iMessagesHigh = iMessagesLimit + (iMessagesLimit / 3); } // Messages logging stuff. bool Messages::isLogging (void) const { return (m_pMessagesLog != NULL); } void Messages::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 Messages::appendMessagesLog ( const QString& s ) { if (m_pMessagesLog) { QTextStream(m_pMessagesLog) << s << endl; m_pMessagesLog->flush(); } } // Messages widget output method. void Messages::appendMessagesLine ( const QString& s ) { // Check for message line limit... if (m_iMessagesLines > m_iMessagesHigh) { m_pMessagesTextView->setUpdatesEnabled(false); QTextCursor textCursor(m_pMessagesTextView->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_pMessagesTextView->setUpdatesEnabled(true); } m_pMessagesTextView->append(s); m_iMessagesLines++; } // The main utility methods. void Messages::appendMessages ( const QString& s ) { appendMessagesColor(s, "#999999"); } void Messages::appendMessagesColor ( const QString& s, const QString &c ) { const QString& sText = QTime::currentTime().toString("hh:mm:ss.zzz") + ' ' + s; appendMessagesLine("" + sText + ""); appendMessagesLog(sText); } void Messages::appendMessagesText ( const QString& s ) { appendMessagesLine(s); appendMessagesLog(s); } // History reset. void Messages::clear (void) { m_iMessagesLines = 0; m_pMessagesTextView->clear(); } } // namespace QSampler // end of qsamplerMessages.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerOptionsForm.ui0000644000000000000000000000013212554456160020203 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/qsamplerOptionsForm.ui0000644000175000001440000013077012554456160021037 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2005-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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. qsamplerOptionsForm 0 0 520 420 Qsampler: Options :/images/qsampler.png:/images/qsampler.png true 4 4 false 0 0 0 527 352 &Server 4 8 75 true Settings true 4 4 50 false &Host: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerHostComboBox 60 32767 50 false LinuxSampler server listener port number true 8888 60 32767 50 false &Port: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerPortComboBox 0 0 50 false LinuxSampler server host name or address true localhost 50 false &Command line: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerCmdLineComboBox 50 false Whether to start the LinuxSampler server on local machine &Start server locally 0 0 50 false Command line to start LinuxSampler server locally true linuxsampler 50 false Start &delay: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false StartDelaySpinBox 0 0 40 0 50 false Delay time in seconds after server startup secs 1 100 3 Qt::Horizontal QSizePolicy::Expanding 320 16 Qt::Vertical QSizePolicy::Expanding 20 20 Qt::Horizontal QSizePolicy::Expanding 320 16 0 0 40 0 50 false Receive timeout in milliseconds msec 100 60000 100 1000 50 false &Timeout: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ServerTimeoutSpinBox Qt::Vertical QSizePolicy::Expanding 20 20 75 true Logging true 8 4 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: 0 0 527 352 &Tuning 75 true Limits true 50 false Maximum number of voices: 60 0 50 false Maximum number of voices 999999999 Qt::Horizontal 250 20 50 false Maximum number of disk streams: 60 0 50 false Maximum number of disk streams 999999999 Qt::Vertical 20 194 0 0 800 480 &Display 75 true Channels true 4 4 0 0 180 0 180 32767 50 false Sample channel display font display true QFrame::StyledPanel QFrame::Sunken 1 Qt::AlignCenter false 50 false Select font for the channel display &Font... false Qt::Horizontal QSizePolicy::Expanding 56 16 50 false Whether to refresh the channels view automatically &Auto refresh: 50 false Maximum &volume: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MaxVolumeSpinBox 0 0 50 false Time in milliseconds between each auto-refresh cycle msec 200 20000 100 1000 0 0 50 false Upper limit for the sampler channel volume setting % 1000 10 100 50 false Whether to enable a shiny glass light effect on the channel display Display shiny glass light &effect 75 true Messages true 4 4 0 0 180 0 180 32767 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... false Qt::Horizontal QSizePolicy::Expanding 49 16 50 false Whether to keep a maximum number of lines in the messages window &Messages limit: 50 false The maximum number of message lines to keep in view lines 100 10000 100 1000 75 true Other true 50 false Whether to ask for confirmation on removals &Confirm removals 50 false &Number of recent files: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MaxRecentFilesSpinBox 50 false The maximum number of recent files to keep in menu 0 20 5 50 false Whether to keep all child windows on top of the main window &Keep child windows always on top 50 false Whether to ask for session reset &Confirm session reset 50 false Whether to capture standard output (stdout/stderr) into messages window Capture standard &output 50 false Whether to ask for session restart &Confirm session restart 50 false Whether to show the complete directory path of loaded session files Show complete &path of session files 50 false Whether to show session errors &Confirm session errors 50 false Whether to show the actual instrument names as read from instrument file (using libgig) Show actual &instrument names 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::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok OptionsTabWidget ServerHostComboBox ServerPortComboBox ServerTimeoutSpinBox ServerStartCheckBox ServerCmdLineComboBox StartDelaySpinBox MessagesLogCheckBox MessagesLogPathComboBox MessagesLogPathToolButton DisplayFontPushButton DisplayEffectCheckBox AutoRefreshCheckBox AutoRefreshTimeSpinBox MaxVolumeSpinBox MessagesFontPushButton MessagesLimitCheckBox MessagesLimitLinesSpinBox ConfirmRemoveCheckBox KeepOnTopCheckBox StdoutCaptureCheckBox CompletePathCheckBox InstrumentNamesCheckBox MaxRecentFilesSpinBox ConfirmResetCheckBox ConfirmRestartCheckBox ConfirmErrorCheckBox BaseFontSizeComboBox DialogButtonBox qsampler-0.3.1/src/PaxHeaders.6862/qsamplerOptionsForm.h0000644000000000000000000000013212554456160020015 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/qsamplerOptionsForm.h0000644000175000001440000000374112554456160020646 0ustar00rncbcusers00000000000000// qsamplerOptionsForm.h // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerOptionsForm_h #define __qsamplerOptionsForm_h #include "ui_qsamplerOptionsForm.h" #include "qsamplerOptions.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::OptionsForm -- Options form interface. // class OptionsForm : public QDialog { Q_OBJECT public: OptionsForm(QWidget *pParent = NULL); ~OptionsForm(); void setup(Options* pOptions); protected slots: void accept(); void reject(); void optionsChanged(); void stabilizeForm(); void browseMessagesLogPath(); void chooseDisplayFont(); void chooseMessagesFont(); void toggleDisplayEffect(bool bOn); void maxVoicesChanged(int iMaxVoices); void maxStreamsChanged(int iMaxStreams); private: Ui::qsamplerOptionsForm m_ui; Options* m_pOptions; int m_iDirtySetup; int m_iDirtyCount; bool bMaxVoicesModified; bool bMaxStreamsModified; }; } // namespace QSampler #endif // __qsamplerOptionsForm_h // end of qsamplerOptionsForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerFxSend.h0000644000000000000000000000013212554456160016725 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerFxSend.h0000644000175000001440000000442112554456160017552 0ustar00rncbcusers00000000000000// qsamplerFxSend.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck 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 __qsamplerFxSend_h #define __qsamplerFxSend_h #include #include #include namespace QSampler { // Typedef'd QMap. typedef QMap FxSendRoutingMap; class FxSend { public: // retrieve existing FX send FxSend(int SamplerChannelID, int FxSendID); // create a new FX send FxSend(int SamplerChannelID); ~FxSend(); int id() const; // whether FX send exists on sampler side yet bool isNew() const; // whether scheduled for deletion bool deletion() const; void setDeletion(bool bDelete); bool isModified() const; void setName(const QString& sName); const QString& name() const; void setSendDepthMidiCtrl(int iMidiController); int sendDepthMidiCtrl() const; void setCurrentDepth(float depth); float currentDepth() const; // Audio routing accessors. int audioChannel(int iAudioSrc) const; bool setAudioChannel(int iAudioSrc, int iAudioDst); // The audio routing map itself. const FxSendRoutingMap& audioRouting() const; bool getFromSampler(); bool applyToSampler(); static QList allFxSendsOfSamplerChannel(int samplerChannelID); private: int m_iSamplerChannelID; int m_iFxSendID; bool m_bDelete; bool m_bModified; QString m_FxSendName; int m_MidiCtrl; float m_Depth; FxSendRoutingMap m_AudioRouting; }; } // namespace QSampler #endif // __qsamplerFxSend_h // end of __qsamplerFxSend.h qsampler-0.3.1/src/PaxHeaders.6862/translations0000644000000000000000000000013212554456160016264 xustar0030 mtime=1437752432.766090073 30 atime=1437752432.764090073 30 ctime=1437752432.766090073 qsampler-0.3.1/src/translations/0000755000175000001440000000000012554456160017165 5ustar00rncbcusers00000000000000qsampler-0.3.1/src/translations/PaxHeaders.6862/qsampler_ru.ts0000644000000000000000000000013212554456160021243 xustar0030 mtime=1437752432.766090073 30 atime=1437752432.766090073 30 ctime=1437752432.766090073 qsampler-0.3.1/src/translations/qsampler_ru.ts0000644000175000001440000036534112554456160022103 0ustar00rncbcusers00000000000000 MidiInstrumentsModel Name Название Map Карта Bank Банк Prog Программа Engine Движок File Файл Nr Vol Громкость Mode Режим Could not get current list of MIDI instrument mappings. Sorry. Не удалось получить актуальный список привязок инструментов MIDI. Извините. QObject Could not add channel. Sorry. Не удалось добавить канал. Извините. added. добавлен. Could not remove channel. Sorry. Не удалось удалить канал. Извините. removed. удален. New Channel Новый канал Channel %1 Канал %1 Engine: %1. Движок: %1. Instrument: "%1" (%2). Инструмент: "%1" (%2). MIDI driver: %1. Драйвер MIDI: %1. MIDI device: %1. Устройство MIDI: %1. MIDI port: %1. Порт MIDI: %1. MIDI channel: %1. Канал MIDI: %1. MIDI map: %1. Карта MIDI: %1. Audio device: %1. Звуковое устройство: %1. Audio driver: %1. Звуковой драйвер: %1. Volume: %1. Громкость: %1. Mute: %1. Приглушение: %1. Solo: %1. Солирование: %1. Audio Channel: %1 -> %2. Звуковой канал: %1 -> %2. Could not get channel information. Sorry. Не удалось получить информацию о канале. Извините. (none) (нет) reset. Could not launch an appropriate instrument editor for the given instrument! Make sure you have an appropriate instrument editor like 'gigedit' installed and that it placed its mandatory DLL file into the sampler's plugin directory. Не удалось запустить подходящий редактор для этого инструмента! Убедитесь, что в системе установлен необходимый редактор вроде gigedit, и что его файл DLL размещен в папке с расширениями сэмплера. edit instrument. Sorry, QSampler was compiled for a version of liblscp which lacks this feature. You may want to update liblscp and recompile QSampler afterwards. Извините, но QSampler был собран с версией liblscp, где эта функция не реализована. Вероятно вам стоит обновить версию liblscp и пересобрать QSampler. setup... (No engine) (нет движка) (No instrument) (нет инструмента) (Loading instrument...) (загружается инструмент...) Device Channel Канал устройства Audio Channel Звуковой канал channel fx sends... Audio Звук MIDI MIDI New %1 device Новое устройство %1 Device %1 Устройство %1 Could not set device parameter value. Sorry. Не удалось установить значение параметра. Извините. created. создано. Could not create device. Sorry. Не удалось создать устройство Извините. deleted. удалено Could not delete device. Sorry. Не удалось удалить устройство Извините. Could not set %1 parameter value. Sorry. Не удалось установить значение параметра %1. Извините. Audio Devices Звуковые устройства MIDI Devices Устройства MIDI Persistent Непрерывно On Demand Hold On Demand По требованию Usage: %1 [options] [session-file] Использование: %1 [ключи] [файл-сеанса] Option -h requires an argument (hostname). Ключу -h нужен аргумент (имя хоста). Option -h requires an argument (host). Option -p requires an argument (port). Ключу -p нужен аргумент (номер порта). Qt: %1 Qt: %1 Sent fine tuning settings. QSampler::AbstractDeviceParamModel Parameter Параметр Value Значение Description Описание QSampler::ChannelForm Some channel settings could not be set. Sorry. Не удалось задать некоторые параметры канала. Извините. Warning Предупреждение Some channel settings have been changed. Do you want to apply the changes? Некоторые параметры канала изменились. Вы хотите применить эти изменения? GIG Instrument files SFZ Instrument files SF2 Instrument files All files Apply Применить Discard Отказаться Cancel Отменить Instrument files Файлы инструментов (New MIDI %1 device) (Новое устройство MIDI %1) (New Audio %1 device) (Новое звуковое устройство %1) QSampler::ChannelStrip Unavailable Недоступно Sorry, QSampler was built without FX send support! (Make sure you have a recent liblscp when recompiling QSampler) Извините, но QSampler был собран без поддержки посыла эффектов! Убедитесь, что в системе установлена достаточно новая версия liblscp. Instruments Инструменты All Все ERR%1 ERR%1 QSampler::DeviceForm Warning Предупреждение About to delete device: %1 Are you sure? Будет удалено устройство: %1 Вы уверены? OK &OK Cancel О&тменить Don't ask this again Ch&annel: &Канал: P&ort: &Порт: &Create device &Создать устройство &Delete device &Удалить устройство &Refresh О&бновить QSampler::DeviceParamDelegate (none) (нет) QSampler::DeviceStatusForm %1 Status QSampler::InstrumentForm GIG Instrument files SFZ Instrument files SF2 Instrument files Instrument files Файлы инструментов Warning Предупреждение Some channel settings have been changed. Do you want to apply the changes? Некоторые параметры канала изменились. Вы хотите учесть эти изменения? Apply Применить Discard Отказаться Cancel Отменить QSampler::InstrumentListForm Instrument Map Карта инструментов (All) (Все) Warning Предупреждение About to delete instrument map entry: %1 Are you sure? Элемент карты инструментов будет удален: %1 Вы уверены? Don't ask this again OK OK Cancel Отменить QSampler::InstrumentListModel Persistent Непрерывно On Demand Hold On Demand По требованию Name Название Map Карта Bank Банк Prog Программа Engine Движок File Файл Nr Vol Громкость Mode Режим Could not get current list of MIDI instrument mappings. Sorry. Не удалось получить актуальный список привязок инструментов MIDI. Извините. QSampler::MainForm Master volume Общая громкость Connected Установлено соединение с MOD Ready Готов Untitled Без названия New session: "%1". Новый сеанс: "%1". Open Session Открыть сеанс LSCP Session files Файлы сеансов LSCP Save Session Сохранить сеанс Warning Предупреждение The file already exists: "%1" Do you want to replace it? Такой файл уже существует: "%1" Заменить его? Replace Заменить Cancel Отменить The current session has been changed: "%1" Do you want to save the changes? Текущий сеанс изменился: "%1" Вы хотите сохранить эти изменения? Save Сохранить Discard Отказаться Could not open "%1" session file. Sorry. Не удалось открыть файл сеанса "%1". Извините. Session loaded with errors from "%1". Sorry. Сеанс загружен с ошибками из "%1". Извините. Open session: "%1". Открыть сеанс: "%1". Version Версия Build Сборка File Файл Date Дата Device Устройство MIDI instrument map Карта инструментов MIDI Channel Канал Global volume level Общий уровень громкости Some settings could not be saved to "%1" session file. Sorry. Некоторые параметры не удалось сохранить в файл сеанса "%1". Извините. Save session: "%1". Сохранить сеанс: "%1". Resetting the sampler instance will close all device and channel configurations. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to reset the sampler engine now? Перезагрузка движка сэмплера приведет к закрытию всех устройств и каналов. Это может привести к временному разрыву в воспроизведении MIDI и звука. Вы хотите перезапустить движок сэмплера? Reset Сбросить Could not reset sampler instance. Sorry. Не удалось перезапустить движок сэмплера. Извините. Sampler reset. Перезагрузка сэмплера. New settings will be effective after restarting the client/server connection. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to restart the connection now? Новые параметры возымеют эффект после перезапуска соединения клиента с сервером. Это может привести к временному разрыву в воспроизведении MIDI и звука. Вы хотите заново установить соединение клиента и сервера? Restart Перезапустить About to remove channel: %1 Are you sure? Будет удален канал: %1 Вы уверены? OK OK LSCP Event: %1 data: %2 Don't ask this again Information Справка Some settings may be only effective next time you start this program. Некоторые новые параметры возымеют силу только при следующем запуске программы. Debugging option enabled. Функция отладки включена. GIG (libgig) file support disabled. Поддержка сэмплов GIG (libgig) отключена. LSCP (liblscp) instrument_name support disabled. Поддержка функции instrument_name в LSCP (liblscp) отключена. Sampler channel Mute/Solo support disabled. Поддержка приглушения/солирования канала отключена. LSCP (liblscp) audio_routing support disabled. Поддержка функции audio_routing в LSCP (liblscp) отключена. Sampler channel Effect Sends support disabled. Поддержка поканального посыла эффектов отключена. Global volume support disabled. Поддержка общего регулятора громкости отключена. MIDI instrument mapping support disabled. Поддержка свызывания инструментов MIDI отключена. Instrument editing support disabled. Функция редактирования инструментов отключена. Channel MIDI event support disabled. Device MIDI event support disabled. Runtime max. voices / disk streams support disabled. Поддержка ограничения числа голосов/дисковых потоков отключена. Using Использует 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 GPL версии 2 или новее. About О программе Chromatic Хроматическая Drum Kits Перкуссия Could not get current list of channels. Sorry. Не удалось получить актуальный список каналов. Извините. Error Ошибка Don't show this again Could not start the LinuxSampler server. Maybe it is already started. Не удалось запустить сервер LinuxSampler. Возможно, он уже запущен. Stop Остановить Kill Убить Server is starting... Запускается сервер... Could not start server. Sorry. Не удалось запустить сервер. Извините. Server was started with PID=%1. Сервер запущен с PID=%1. The backend's fate ... Что делать с движком You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop or to keep running in the background? Вы можете оставить движок сэмплера (LinuxSampler) работающим в фоновом режиме. Сэмплер продолжит работать с текущим сеансом, и при следующем запуске QSampler вы сможете изменить параметры сеанса. Хотите ли вы остановить LinuxSampler или же оставить его работающим в фоновом режиме? Server is stopping... Останавливается сервер... Server is being forced... Server was stopped with exit status %1. Сервер был остановлен со статусом выхода %1. Client connecting... Устанавливается соединения клиента... Could not connect to server as client. Sorry. Не удалось соединиться с сервером в качестве клиента. Извините. Client receive timeout is set to %1 msec. Client connected. Клиент соединился. Client disconnecting... Выполняется отсоединение клиента... Client disconnected. Клиент отсоединен. You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop? QSampler::Messages Messages Сообщения Logging stopped --- %1 --- Ведение журнала остановлено --- %1 --- Logging started --- %1 --- Ведение журнала начато --- %1 --- QSampler::MidiInstrumentsModel Persistent Непрерывно On Demand Hold On Demand По требованию Name Название Map Карта Bank Банк Prog Программа Engine Движок File Файл Nr Vol Громкость Mode Режим Could not get current list of MIDI instrument mappings. Sorry. Не удалось получить актуальный список привязок инструментов MIDI. Извините. QSampler::OptionsForm This parameter is not supported by the current sampler version in use. Этот параметр не поддерживается используемой версией сэмплера. The max. amount of voices the sampler shall process simultaniously. The max. amount of disk streams the sampler shall process simultaniously. QSampler was built without support for this parameter. QSampler был собран без поддержки этого параметра. Warning Предупреждение Some settings have been changed. Do you want to apply the changes? Некоторые параметры были изменены. Вы хотите применить изменения? Apply Применить Discard Отказаться Cancel Отменить Messages Log Журнал сообщений Log files Файлы журналов qsamplerChannelForm Qsampler: Channel Qsampler: Канал Browse for instrument filename Указать файл инструмента Instrument name Название инструмента &Engine: &Движок: Engine name Название движка &Filename: Имя &файла: &Instrument: &Инструмент: Instrument filename Имя файла инструмента MIDI / Input MIDI / вход MIDI input device Устройство MIDI для входа MIDI input device setup Настроить устройство MIDI для входа &Map: &Карта: &Device: &Устройство: Instrument map Карта инструментов &Type: &Тип: MIDI input driver type Тип драйвера MIDI для входа &Port: &Порт: MIDI input port number Номер порта MIDI для входа &Channel: &Канал: MIDI input channel Канал MIDI для входа 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 All Все Audio / Output Звук / выход Audio output device Устройство вывода звука Audio output device setup Настроить устройство вывода звука Audio output driver type Тип устройства вывода звука Audio routing table Таблица маршрутизации звука OK &OK Cancel О&тменить qsamplerChannelFxForm Channel Effects Эффекты канала FX Send Selection Выбор посыла эффектов Creates a new FX Send. You have to select 'Apply' afterwards to actually create it on sampler side. Создать новый посыл. Для действительного назначения посыла на стороне сэмплера надо будет нажать кнопку «Применить». Create Создать Schedules the selected FX send for deletion. You have to select 'Apply' afterwards to actually destroy it on sampler side. Добавить выбранный посыл эффектов в очередь на удаление Для действительного удаления посыла на стороне сэмплера надо будет нажать кнопку «Применить» Destroy Разрушить FX Send's Parameters Параметры посыла эффектов Send Depth MIDI Controller: Отправлять MIDI-контроллер Depth: Current Depth: Текущая глубина: % % Audio Routing Маршрутизация звука qsamplerChannelStrip Qsampler: Channel Qsampler: Канал Channel setup Настроить канал &Channel &Канал Alt+C Alt+к -- -- Instrument name Название инструмента MIDI port / channel Порт/канал MIDI -- / -- -- / -- Instrument load status Статус загрузки инструмента MIDI Activity Активность MIDI MIDI activity Channel mute Приглушить канал &Mute &Тихо Alt+M Alt+т Channel solo Солирование канала &Solo &Соло Alt+S Alt+с Channel volume Громкость канала % % Edit Channel's Effect Settings Изменить эффекты канала &FX &Эффекты Alt+F Alt+э Edit channel's instrument Изменить инструмент канала &Edit &Изменить Alt+E Alt+и Least buffer fill stream usage (%) Stream / Voice count Счетчик потоков/голосов --/-- --/-- qsamplerDeviceForm Qsampler: Devices Qsampler: Устройства Device list Список устройств Devices Устройства Device name Название устройства Dri&ver: &Драйвер: Driver type name Название типа драйвера Channel: Канал: Device port/channel Порт/канал устройства Refresh device list view Обновить список устройств &Refresh О&бновить Alt+R Alt+б Create device Создать устройство &Create &Создать Alt+C Alt+с Delete device Удалить устройство &Delete &Удалить Alt+D Alt+у Close this dialog Закрыть этот диалог Close &Закрыть qsamplerInstrumentForm Qsampler: MIDI Instrument Qsampler: Инструмент MIDI Engine name Название движка &Engine: &Движок: &Prog: &Программа: Program (0-127) Программа (0-127) Vol&ume: &Громкость: &Map: &Карта: &Bank: &Банк: Bank (0-16383) Банк (0-16383) Instrument filename Имя файла инструмента M&ode: &Режим: &Filename: Имя &файла: &Name: И&мя Instrument map Карта инструментов &Instrument: &Инструмент: Instrument name Название инструмента Volume (%) Громкость (%) % % Name Название Load mode Режим загрузки Default По умолчанию On Demand По требованию On Demand Hold Persistent Непрерывно Browse for instrument filename Указать файл инструмента O&K &OK Alt+K Alt+о C&ancel О&тменить Alt+A Alt+т qsamplerInstrumentListForm Qsampler: Instruments Qsampler: Инструменты &Context &Контекст New &Instrument... &Создать инструмент... New Создать Insert Вставить Ins &Edit... &Изменить... Edit Изменить Enter Enter &Delete &Удалить Delete Удалить Del &Refresh О&бновить Refresh Обновить F5 F5 qsamplerMainForm MainWindow Основное окно &Edit &Правка &View &Вид MIDI Device Status Статус устройства MIDI &Channels &Каналы &Help &Справка &File &Файл Open &Recent Открыть &недавние &New &Создать New Создать New session Создать сеанс New sampler session Создать новый сеанс работы с сэмплером Ctrl+N Ctrl+N &Open... &Открыть... Open Открыть Open session Открыть сеанс Open sampler session Открыть сеанс работы с сэмплером Ctrl+O Ctrl+O &Save Со&хранить Save Сохранить Save session Сохранить сеанс Save sampler session Сохранить сеанс работы с сэмплером Ctrl+S Ctrl+S Save &As... Сохранить &как... Save As Сохранить как Save current sampler session with another name Сохранить активный сеанс под другим именем Rese&t С&бросить Reset Сбросить Reset instance Reset sampler instance Ctrl+R Ctrl+R &Restart &Перезагрузить Restart Перезагрузить Restart instance Перезагрузить движок Restart sampler instance Перезагрузить движок сэмплера Ctrl+Shift+R Ctrl+Shift+R E&xit В&ыход Exit Выйти Exit this application program Завершить работу с программой &Add Channel &Добавить канал Add Добавить Add channel Добавить канал Add a new sampler channel Добавить новый канал сэмплера Ctrl+A Ctrl+A &Remove Channel &Удалить канал Remove Удалить Remove channel Удалить канал Remove current sampler channel Удалить активный канал сэмплера Ctrl+X Ctrl+X Re&set Channel С&бросить канал Reset channel Сбросить канал Reset current sampler channel Сбросить активный канал сэмплера R&eset All Channels Сбросить &все каналы Reset All Сбросить все Reset all channels Сбросить все каналы Reset all sampler channels Сбросить все каналы сэмплера &Setup Channel... &Настроить канал... Setup Настроить Setup channel Настроить канал Setup current sampler channel Настроить активный канал сэмплера F2 F2 Ed&it Channel... &Изменить канал... Edit Изменить Edit channel Изменить канал Edit current sampler channel Изменить активный канал сэмплера F9 F9 &Menubar Строка &меню Menubar Строка меню Show/hide menubar Показать или скрыть строку меню Show/hide the main program window menubar Показать или скрыть строку меню основного окна программы Ctrl+M Ctrl+M &Toolbar &Панель инструментов viewToolbars Панель инструментов Show/hide toolbar Показать или скрыть панель инструментов Show/hide main program window toolbars Показать или скрыть панель инструментов основного окна программы Ctrl+T Ctrl+T &Statusbar &Строка состояния Statusbar Строка состояния Show/hide statusbar Показать или скрыть строку состояния Show/hide the main program window statusbar Показать или скрыть строку состояния основного окна программы M&essages Соо&бщения Messages Сообщения Show/hide messages Показать или скрыть диалог сообщений Show/hide the messages window Показать или скрыть окно диалога сообщений &Instruments &Инструменты Instruments Инструменты MIDI instruments configuration Настройка инструментов MIDI Show/hide the MIDI instruments configuration window Показать или скрыть окно настройки инструментов MIDI F10 F10 &Devices &Устройства Devices Устройства Device configuration Настройка устройств Show/hide the device configuration window Показать или скрыть окно настройки устройств F11 F11 &Options... &Параметры... Options Параметры General options Общие параметры Change general application program options Общие параметры работы программы F12 F12 &Arrange &Расставить Arrange Расставить Arrange channels Расставить каналы Line up all channel strips Расставить блоки каналов по вертикали F5 F5 A&uto Arrange &Автоматически расставлять Auto Arrange Автоматически расставлять Auto-arrange channels Автоматически расставлять каналы Auto-arrange channel strips Автоматически расставлять блоки каналов &About... &О программе... About О программе Show information about this application program Показать информацию о программе About &Qt... О &Qt... About Qt О Qt Show information about the Qt toolkit Показать информацию об инструментарии Qt qsamplerOptionsForm Qsampler: Options Параметры Qsampler OK OK Cancel Отменить &Server &Сервер Settings Параметры &Host: &Хост: LinuxSampler server listener port number Номер порта для LinuxSampler 8888 8888 &Port: &Порт: LinuxSampler server host name or address Название или адрес узла LinuxSampler localhost localhost &Command line: &Командная строка: Whether to start the LinuxSampler server on local machine Запускать ли сервер LinuxSampler на локальной машине &Start server locally &Запускать сервер локально Alt+S Alt+з Command line to start LinuxSampler server locally Команда локального запуска LinuxSampler linuxsampler linuxsampler Start &delay: З&адержка старта: Delay time in seconds after server startup Задержка в секундах перед стартом сервера secs с Receive timeout in milliseconds Время ожидания в миллисекундах msec мс &Timeout: &Время ожидания: Logging Ведение журнала Messages log file Файл с журналом сообщений LinuxSampler Browse for the messages log file location Указать расположение файла журнала ... ... Whether to activate a messages logging to file. Включать ли функцию ведения журнала в файле &Messages log file: &Файл с журналом: Whether to ask for session reset &Confirm session reset Whether to ask for session restart &Confirm session restart Whether to show session errors &Confirm session errors Alt+M Alt+ф &Tuning &Настройка Limits Пределы Maximum number of voices: Максимальное число голосов: Maximum number of voices Максимальное число голосов Maximum number of disk streams: Максимальное число дисковых потоков: Maximum number of disk streams Максимальное число дисковых потоков &Display &Интерфейс Channels Каналы Sample channel display font display Пример отображения шрифта в канале Select font for the channel display Выберите шрифт для отображения канала &Font... &Шрифт... Alt+F Alt+ш Whether to refresh the channels view automatically Обновлять ли втоматически вид каналов &Auto refresh: &Автообновление: Alt+A Alt+а Maximum &volume: Макс. &громкость: Time in milliseconds between each auto-refresh cycle Время между циклами автообновления в миллисекундах Upper limit for the sampler channel volume setting Верхний предел громкости каждого канала % % Whether to enable a shiny glass light effect on the channel display Показывать ли отблеск на «стекле» с индикаторами канала Display shiny glass light &effect Показывать отблеск на &дисплее канала Alt+E Alt+д Messages Сообщения Sample messages text font display Пример использования выбранного шрифта для сообщений Select font for the messages text display Выберите шрифт для вывода сообщений Whether to keep a maximum number of lines in the messages window Устанавливать ли максимальный предел строк в панели сообщений &Messages limit: П&редел строк сообщений: The maximum number of message lines to keep in view Максимальное количество видимых в панели сообщений lines строк Other Прочее Whether to ask for confirmation on removals Спрашивать подтверждение при удалении каналов &Confirm removals &Подтверждать удаление Alt+C Alt+п &Number of recent files: &Запоминаемых сеансов: The maximum number of recent files to keep in menu Максимальное число сеансов, перечисляемых как недавно открывавшихся Whether to keep all child windows on top of the main window Показывать ли все окна прграммы всегда над основным ее окном &Keep child windows always on top Окна &всегда наверху Alt+K Alt+в Whether to capture standard output (stdout/stderr) into messages window Захватывать ли стандартные потоки (stdout/stderr) в панель сообщений Capture standard &output Захватывать &системные потоки сообщений Alt+O Alt+с Whether to show the complete directory path of loaded session files Показывать ли расположение загруженного файла сеанса в файловой системе Show complete &path of session files По&казывать полный путь к файлам сеансов Alt+P Alt+к Whether to show the actual instrument names as read from instrument file (using libgig) Показывать ли названия инструментов, считанные из метаданных файлов (при помощи libgig) Show actual &instrument names Показывать названия инс&трументов Alt+I Alt+т &Base font size: К&егль шрифта в GUI: Base application font size (pt.) Кегль шрифта в интерфейсе (в пунктах) (default) (по умолчанию) 6 6 7 7 8 8 9 9 10 10 11 11 12 12 qsampler-0.3.1/src/translations/PaxHeaders.6862/qsampler_cs.ts0000644000000000000000000000013212554456160021222 xustar0030 mtime=1437752432.766090073 30 atime=1437752432.764090073 30 ctime=1437752432.766090073 qsampler-0.3.1/src/translations/qsampler_cs.ts0000644000175000001440000034774612554456160022073 0ustar00rncbcusers00000000000000 MidiInstrumentsModel Name Název Map Přiřazení Bank Banka Prog Program Engine Stroj File Soubor Nr Číslo Vol Hlasitost Mode Režim Could not get current list of MIDI instrument mappings. Sorry. Nepodařilo se získat nynější seznam přiřazení MIDI nástrojů. Promiňte. QObject Could not add channel. Sorry. Nepodařilo se přidat kanál. Promiňte. added. přidán. Could not remove channel. Sorry. Nepodařilo se odstranit kanál. Promiňte. removed. odstraněn. New Channel Nový kanál Channel %1 Kanál %1 Engine: %1. Stroj: %1. Instrument: "%1" (%2). Nástroj: "%1" (%2). MIDI driver: %1. Ovladač MIDI: %1. MIDI device: %1. Zařízení MIDI: %1. MIDI port: %1. Přípojka MIDI: %1. MIDI channel: %1. Kanál MIDI: %1. MIDI map: %1. Přiřazení MIDI: %1. Audio device: %1. Zvukové zařízení: %1. Audio driver: %1. Zvukový ovladač: %1. Volume: %1. Hlasitost: %1. Mute: %1. Ztlumení: %1. Solo: %1. Sólo: %1. Audio Channel: %1 -> %2. Zvukový kanál: %1 -> %2. Could not get channel information. Sorry. Nepodařilo se získat informaci o kanále. Promiňte. (none) (žádná) reset. znovu nastaven. Could not launch an appropriate instrument editor for the given instrument! Make sure you have an appropriate instrument editor like 'gigedit' installed and that it placed its mandatory DLL file into the sampler's plugin directory. Pro zadaný nástroj se nepodařilo spustit příslušný nástrojový editor! Ujistěte se, že máte nainstalován vhodný editor nástrojů, jakým je 'gigedit', a že tento umístil svůj povinný soubor DLL do adresáře sampleru, ve kterém jsou přídavné moduly. edit instrument. upravit nástroj. Sorry, QSampler was compiled for a version of liblscp which lacks this feature. You may want to update liblscp and recompile QSampler afterwards. Promiňte, ale QSampler byl sestaven pro verzi liblscp, která postrádá tuto funkci. Můžete chtít povýšit liblscp a sestavit QSampler později znovu. setup... nastavit... (No engine) (Není stroj) (No instrument) (Není nástroj) (Loading instrument...) (Nahrává se nástroj...) Device Channel Kanál zařízení Audio Channel Zvukový kanál channel fx sends... kanál fx posílá... Audio Zvuk MIDI MIDI New %1 device Nové zařízení %1 Device %1 Zařízení %1 Could not set device parameter value. Sorry. Nepodařilo se nastavit hodnotu parametru pro zařízení. Promiňte. created. vytvořeno. Could not create device. Sorry. Nepodařilo se vytvořit zařízení Promiňte. deleted. smazáno. Could not delete device. Sorry. Nepodařilo se smazat zařízení. Promiňte. Could not set %1 parameter value. Sorry. Nepodařilo se nastavit %1 hodnotu parametru. Promiňte. Audio Devices Zvuková zařízení MIDI Devices Zařízení MIDI Persistent Trvalý On Demand Hold Držení na požádání On Demand Na požádání Usage: %1 [options] [session-file] Použití: %1 [volby] [soubor sezení] Option -h requires an argument (hostname). Volba -h vyžaduje argument (název hostitele). Option -h requires an argument (host). Option -p requires an argument (port). Volba -p vyžaduje argument (název přípojky - brány). Qt: %1 Qt: %1 Sent fine tuning settings. Poslána nastavení pěkného ladění. QSampler::AbstractDeviceParamModel Parameter Parametr Value Hodnota Description Popis QSampler::ChannelForm Some channel settings could not be set. Sorry. Některá nastavení kanálu se nepodařilo nastavit. Promiňte. Warning Varování Some channel settings have been changed. Do you want to apply the changes? Některá nastavení kanálu byla změněna. Chcete použít změny? GIG Instrument files SFZ Instrument files SF2 Instrument files All files Apply Применить Discard Отказаться Cancel Отменить Instrument files Soubory s nástroji (New MIDI %1 device) (Nové zařízení MIDI %1) (New Audio %1 device) (Nové zvukové zařízení %1) QSampler::ChannelStrip Unavailable Nedostupné Sorry, QSampler was built without FX send support! (Make sure you have a recent liblscp when recompiling QSampler) Promiňte, ale QSampler byl sestaven bez podpory pro poslání FX. (Ujistěte se, že když sestavujete QSampler, máte poslední liblscp) Instruments Nástroje All Vše ERR%1 ERR%1 QSampler::DeviceForm Warning Varování About to delete device: %1 Are you sure? Chystáte se smazat zařízení: %1 Jste si jistý? OK &OK Cancel О&тменить Don't ask this again Ch&annel: &Каnál: P&ort: &Přípojka: &Create device &Vytvořit zařízení &Delete device &Smazat zařízení &Refresh &Obnovit QSampler::DeviceParamDelegate (none) (žádný) QSampler::DeviceStatusForm %1 Status QSampler::InstrumentForm GIG Instrument files SFZ Instrument files SF2 Instrument files Instrument files Soubory s nástroji Warning Varování Some channel settings have been changed. Do you want to apply the changes? Některá nastavení kanálu byla změněna. Chcete použít změny? Apply Применить Discard Отказаться Cancel Отменить QSampler::InstrumentListForm Instrument Map Zobrazení nástrojů (All) (Vše) Warning Varování About to delete instrument map entry: %1 Are you sure? Chystáte se smazat položku v zobrazení nástrojů: %1 Jste si jistý? Don't ask this again OK OK Cancel Отменить QSampler::InstrumentListModel Persistent Trvalý On Demand Hold Držení na požádání On Demand Na požádání Name Název Map Přiřazení Bank Banka Prog Program Engine Stroj File Soubor Nr Číslo Vol Hlasitost Mode Režim Could not get current list of MIDI instrument mappings. Sorry. Nepodařilo se získat nynější seznam přiřazení MIDI nástrojů. Promiňte. QSampler::MainForm Master volume Hlavní hlasitost Connected Spojeno MOD MOD Ready Připraven Notify event: %1 data: %2 Oznámit událost: %1 data: %2 Untitled Bez názvu New session: "%1". Nové sezení: "%1". Open Session Otevřít sezení LSCP Session files Soubory se sezením LSCP Save Session Uložit sezení Warning Varování The file already exists: "%1" Do you want to replace it? Soubor již existuje: "%1" Chcete jej nahradit? Replace Заменить Cancel Отменить The current session has been changed: "%1" Do you want to save the changes? Nynější sezení bylo změněno: "%1" Chcete uložit změny? Save Сохранить Discard Отказаться Could not open "%1" session file. Sorry. Nepodařilo se otevřít soubor se sezením "%1". Promiňte. Session loaded with errors from "%1". Sorry. Sezení nahráno s chybami z "%1". Promiňte. Open session: "%1". Otevřít sezení: "%1". Version Verze Build Sestavení File Soubor Date Datum Device Zařízení MIDI instrument map Zobrazení nástrojů MIDI Channel Kanál Global volume level Úroveň celkové hlasitosti Some settings could not be saved to "%1" session file. Sorry. Některá nastavení se nepodařilo uložit. do souboru se sezením "%1". Promiňte. Save session: "%1". Uložit sezení: "%1". Resetting the sampler instance will close all device and channel configurations. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to reset the sampler engine now? Přenastavení řízení sampleru uzavře všechna nastavení zařízení a kanálů. Uvědomte si, prosím, že tato operace může způsobit dočasné rušení MIDI a zvuku. Chcete přenastavit stroj sampleru nyní? Reset Сбросить Could not reset sampler instance. Sorry. Nepodařilo se přenastavit řízení sampleru. Promiňte. Sampler reset. Přenastavení sampleru. New settings will be effective after restarting the client/server connection. Please note that this operation may cause temporary MIDI and Audio disruption. Do you want to restart the connection now? Nová nastavení se projeví po znovuspuštění spojení klient/server. Uvědomte si, prosím, že tato operace může způsobit dočasné rušení MIDI a zvuku. Chcete spojení spustit znovu nyní? Restart Перезапустить About to remove channel: %1 Are you sure? Chystáte se odstranit kanál: %1 Jste si jistý? OK OK LSCP Event: %1 data: %2 Don't ask this again Information Informace Some settings may be only effective next time you start this program. Některá nastavení se projeví až tehdy, když příště spustíte tento program. Debugging option enabled. Povolena volba ladění. GIG (libgig) file support disabled. Zakázána podpora pro soubor GIG (libgig). LSCP (liblscp) instrument_name support disabled. Zakázána podpora pro instrument_name v LSCP (liblscp). Sampler channel Mute/Solo support disabled. Zakázána podpora pro Ztlumení/Sólo kanálu sampleru. LSCP (liblscp) audio_routing support disabled. Zakázána podpora pro audio_routing v LSCP (liblscp). Sampler channel Effect Sends support disabled. Zakázána podpora pro poslání efektu kanálu sampleru. Global volume support disabled. Zakázána podpora pro celkovou hlasitost. MIDI instrument mapping support disabled. Zakázána podpora pro zobrazení nástrojů MIDI. Instrument editing support disabled. Zakázána podpora pro úpravy nástrojů. Channel MIDI event support disabled. Zakázána podpora pro události kanálů MIDI. Device MIDI event support disabled. Zakázána podpora pro události zařízení MIDI. Runtime max. voices / disk streams support disabled. Zakázána podpora pro největší množství hlasů/diskových proudy běžících současně. Using Pomocí 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ší. About O programu Chromatic Chromatický Drum Kits Bicí Could not get current list of channels. Sorry. Nepodařilo se získat nynější seznam kanálů. Promiňte. Error Chyba Don't show this again Could not start the LinuxSampler server. Maybe it is already started. Nepodařilo se spustit server LinuxSampler. Možná je už spuštěn. Stop Остановить Kill Убить Server is starting... Spouští se server... Could not start server. Sorry. Nepodařilo se spustit server. Promiňte. Server was started with PID=%1. Server byl spuštěn s PID=%1. The backend's fate ... Osud zadní části programu... You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop or to keep running in the background? Вы можете оставить движок сэмплера (LinuxSampler) работающим в фоновом режиме. Сэмплер продолжит работать с текущим сеансом, и при следующем запуске QSampler вы сможете изменить параметры сеанса. Хотите ли вы остановить LinuxSampler или же оставить его работающим в фоновом режиме? Server is stopping... Zastavuje se server... Server is being forced... Server je nucen... Server was stopped with exit status %1. Server byl zastaven se stavem ukončení %1. Client connecting... Připojuje se klient... Could not connect to server as client. Sorry. Nepodařilo se připojit k serveru jako klient. Promiňte. Client receive timeout is set to %1 msec. Přerušení přijetí klienta je nastavena na %1 msec. Client connected. Klient připojen. Client disconnecting... Odpojuje se klient... Client disconnected. Klient odpojen. You have the option to keep the sampler backend (LinuxSampler) running in the background. The sampler would continue to work according to your current sampler session and you could alter the sampler session at any time by relaunching QSampler. Do you want LinuxSampler to stop? Máte volbu, kterou zadní část programu (LinuxSampler) udržujete běžící na pozadí. Sampler bude pokračovat v práci podle vašeho nynějšího sezení sampleru a vy můžete změnit sezení sampleru kdykoli novým spuštěním QSampleru. Chcete zastavit LinuxSampler? QSampler::Messages Messages Hlášení Logging stopped --- %1 --- Vedení zápisu zastaveno --- %1 --- Logging started --- %1 --- Vedení zápisu spuštěno --- %1 --- QSampler::MidiInstrumentsModel Persistent Trvalý On Demand Hold Držení na požádání On Demand Na požádání Name Název Map Přiřazení Bank Banka Prog Program Engine Stroj File Soubor Nr Číslo Vol Hlasitost Mode Režim Could not get current list of MIDI instrument mappings. Sorry. Nepodařilo se získat nynější seznam přiřazení MIDI nástrojů. Promiňte. QSampler::OptionsForm This parameter is not supported by the current sampler version in use. Tento parametr není podporován současnou používanou verzí sampleru. The max. amount of voices the sampler shall process simultaniously. Největší množství hlasů, které sampler zpracovává zároveň. The max. amount of disk streams the sampler shall process simultaniously. Největší množství diskových proudů, které sampler zpracovává zároveň. QSampler was built without support for this parameter. QSampler byl sestaven bez podpory pro tento parametr. 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 Применить Discard Отказаться Cancel Отменить Messages Log Zápis hlášení Log files Soubory s hlášeními qsamplerChannelForm Qsampler: Channel Qsampler: Каnál Browse for instrument filename Procházet názvy souborů s nástroji Instrument name Název nástroje &Engine: &Stroj: Engine name Název stroje &Filename: &Název souboru: &Instrument: &Nástroj: Instrument filename Název souboru s nástrojem MIDI / Input MIDI/Vstup MIDI input device Vstupní zařízení pro MIDI MIDI input device setup Nastavení vstupního zařízení pro MIDI &Map: &Zobrazení: &Device: &Zařízení: Instrument map Zobrazení nástrojů &Type: &Typ: MIDI input driver type Typ ovladače pro vstup MIDI &Port: &Přípojka: MIDI input port number Číslo přípojky pro vstup MIDI &Channel: &Каnál: MIDI input channel Vstupní kanál MIDI 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 All Vše Audio / Output Zvuk/Výstup Audio output device Zvukové výstupní zařízení Audio output device setup Nastavení zvukového výstupního zařízení Audio output driver type Typ ovladače pro výstup zvuku Audio routing table Tabulka vedení zvuku OK &OK Cancel Zrušit qsamplerChannelFxForm Channel Effects Efekty pro kanál FX Send Selection Výběr poslání efektů (FX) Creates a new FX Send. You have to select 'Apply' afterwards to actually create it on sampler side. Vytvoří nové poslání efektů (FX). Poté musíte vybrat "Použít", abyste je skutečně vytvořil na straně sampleru. Create Vytvořit Schedules the selected FX send for deletion. You have to select 'Apply' afterwards to actually destroy it on sampler side. Rozvrhne vybrané poslání efektů (FX) pro smazání. Poté musíte vybrat "Použít", abyste je skutečně odstranil na straně sampleru. Destroy Odstranit FX Send's Parameters Parametry pro poslání efektů (FX) Send Depth MIDI Controller: Poslat ovladač hloubky MIDI: Current Depth: Nynější hloubka: % % Audio Routing Vedení zvuku qsamplerChannelStrip Qsampler: Channel Qsampler: Каnál Channel setup Nastavení kanálu &Channel &Каnál Alt+C Alt+C -- -- Instrument name Název nástroje MIDI port / channel Přípojka/kanál MIDI -- / -- -- / -- Instrument load status Stav nahrání nástroje MIDI Activity Činnost MIDI MIDI activity Channel mute Ztlumení kanálu &Mute &Ztlumení Alt+M Alt+M Channel solo Sólo kanálu &Solo &Sólo Alt+S Alt+S Channel volume Hlasitost kanálu % % Edit Channel's Effect Settings Upravit nastavení efektů kanálu &FX &Efekty (FX) Alt+F Alt+F Edit channel's instrument Upravit nástroj kanálu &Edit &Upravit Alt+E Alt+E Least buffer fill stream usage (%) Použití proudu posledního naplnění vyrovnávací paměti (%) Stream / Voice count Počet proudů/hlasů --/-- --/-- qsamplerDeviceForm Qsampler: Devices Qsampler: Zařízení Device list Seznam zařízení Devices Zařízení Device name Název zařízení Dri&ver: &Ovladač: Driver type name Název pro typ ovladače Channel: Kanál: Device port/channel Přípojka/kanál zařízení Refresh device list view Obnovit pohled na seznam zařízení &Refresh &Obnovit Alt+R Alt+R Create device Vytvořit zařízení &Create &Vytvořit Alt+C Alt+C Delete device Smazat zařízení &Delete &Smazat Alt+D Alt+D Close this dialog Zavřít tento dialog Close Zavřít qsamplerInstrumentForm Qsampler: MIDI Instrument Qsampler: Nástroj MIDI Engine name Název stroje &Engine: &Stroj: &Prog: &Program: Program (0-127) Program (0-127) Vol&ume: &Hlasitost: &Map: &Zobrazení: &Bank: &Banka: Bank (0-16383) Banka (0-16383) Instrument filename Název souboru s nástrojem M&ode: &Režim: &Filename: &Název souboru: &Name: &Název: Instrument map Zobrazení nástrojů &Instrument: &Nástroj: Instrument name Název nástroje Volume (%) Hlasitost (%) % % Name Název Load mode Nahrát režim Default Výchozí On Demand Na požádání On Demand Hold Držení na požádání Persistent Trvalý Browse for instrument filename Procházet názvy souborů s nástroji O&K &OK Alt+K Alt+K C&ancel &Zrušit Alt+A Alt+A qsamplerInstrumentListForm Qsampler: Instruments Qsampler: Nástroje &Context &Souvislosti New &Instrument... &Nový nástroj... New Nový Insert Vložit Ins &Edit... &Upravit... Edit Upravit Enter Enter &Delete &Smazat Delete Smazat Del &Refresh &Obnovit Refresh Obnovit F5 F5 qsamplerMainForm MainWindow Hlavní okno &Edit &Úpravy &View &Pohled MIDI Device Status Stav zařízení MIDI &Channels &Kanály &Help &Nápověda &File &Soubor Open &Recent Otevřít &nedávný &New &Nový New Nový New session Nové sezení New sampler session Nové sezení sampleru Ctrl+N Ctrl+N &Open... &Otevřít... Open Otevřít Open session Otevřít sezení Open sampler session Otevřít sezení sampleru Ctrl+O Ctrl+O &Save &Uložit Save Uložit Save session Uložit sezení Save sampler session Uložit sezení sampleru Ctrl+S Ctrl+S Save &As... Uložit &jako... Save As Uložit jako Save current sampler session with another name Uložit nynější sezení sampleru pod jiným názvem Rese&t Nastavit &znovu Reset Nastavit znovu Reset instance Nastavit znovu řízení Reset sampler instance Nastavit znovu řízení sampleru Ctrl+R Ctrl+R &Restart &Spustit znovu Restart Spustit znovu Restart instance Spustit znovu řízení Restart sampler instance Spustit znovu řízení sampleru Ctrl+Shift+R Ctrl+Shift+R E&xit &Ukončit Exit Ukončit Exit this application program Ukončit program této aplikace &Add Channel &Přidat kanál Add Přidat Add channel Přidat kanál Add a new sampler channel Přidat nový kanál do sampleru Ctrl+A Ctrl+A &Remove Channel &Odstranit kanál Remove Odstranit Remove channel Odstranit kanál Remove current sampler channel Odstranit nynější kanál ze sampleru Ctrl+X Ctrl+X Re&set Channel &Nastavit znovu kanál Reset channel Nastavit znovu kanál Reset current sampler channel Na&stavit znovu nynější kanál v sampleru R&eset All Channels Na&stavit znovu všechny kanály Reset All Nastavit znovu vše Reset all channels Nastavit znovu všechny kanály Reset all sampler channels Nastavit znovu všechny kanály v sampleru &Setup Channel... &Nastavit kanál... Setup Nastavit Setup channel Nastavit kanál Setup current sampler channel Nastavit nynější kanál v sampleru F2 F2 Ed&it Channel... &Upravit kanál... Edit Upravit Edit channel Upravit kanál Edit current sampler channel Upravit nynější kanál v sampleru F9 F9 &Menubar &Pruh s nabídkami Menubar Pruh s nabídkami Show/hide menubar Ukázat/skrýt pruh s nabídkami Show/hide the main program window menubar Ukázat/skrýt pruh s nabídkami v hlavním programovém okně Ctrl+M Ctrl+M &Toolbar &Pruh s nástroji viewToolbars Zobrazit pruh s nástroji Show/hide toolbar Ukázat/skrýt pruh s nástroji Show/hide main program window toolbars Ukázat/skrýt pruhy s nástroji v hlavním programovém okně Ctrl+T Ctrl+T &Statusbar &Stavový řádek Statusbar Stavový řádek Show/hide statusbar Ukázat/skrýt stavový řádek Show/hide the main program window statusbar Ukázat/skrýt stavový řádek v hlavním programovém okně M&essages &Hlášení Messages Hlášení Show/hide messages Ukázat/skrýt hlášení Show/hide the messages window Ukázat/skrýt okno s hlášeními &Instruments &Nástroje Instruments Nástroje MIDI instruments configuration Nastavení nástrojů MIDI Show/hide the MIDI instruments configuration window Ukázat/skrýt okno s nastavením pro nástroje F10 F10 &Devices &Zařízení Devices Zařízení Device configuration Nastavení zařízení Show/hide the device configuration window Ukázat/skrýt okno s nastavením pro zařízení F11 F11 &Options... &Volby... Options Volby General options Obecné volby Change general application program options Změnit obecné volby pro použití programu F12 F12 &Arrange &Uspořádat Arrange Uspořádat Arrange channels Uspořádat kanály Line up all channel strips Seřadit všechny proužky kanálů F5 F5 A&uto Arrange &Uspořádat automaticky Auto Arrange Uspořádat automaticky Auto-arrange channels Uspořádat automaticky kanály Auto-arrange channel strips Uspořádat automaticky proužky kanálů &About... &O programu... About O programu Show information about this application program Ukázat informace o tomto programu About &Qt... О &Qt... About Qt O Qt Show information about the Qt toolkit Ukázat informace o sadě nástrojů Qt qsamplerOptionsForm Qsampler: Options Qsampler: Volby OK OK Cancel Zrušit &Server &Server Settings Nastavení &Host: &Hostitel: LinuxSampler server listener port number Číslo naslouchací přípojky pro server LinuxSampler 8888 8888 &Port: &Přípojka: LinuxSampler server host name or address Název hostitele nebo adresa pro server LinuxSampler localhost localhost &Command line: &Příkazový řádek: Whether to start the LinuxSampler server on local machine Spustit server LinuxSampler na místním stroji &Start server locally &Spustit server místně Alt+S Alt+S Command line to start LinuxSampler server locally Příkazový řádek pro místní spuštění serveru LinuxSampler linuxsampler linuxsampler Start &delay: &Zpoždění spuštění: Delay time in seconds after server startup Čas zpoždění v sekundách po rozběhnutí serveru secs s Receive timeout in milliseconds Přijmout přerušení v ms msec ms &Timeout: &Přerušení: Logging Vedení zápisů Messages log file Soubor se zápisy hlášení LinuxSampleru Browse for the messages log file location Procházet umístění souboru se zápisem hlášení ... ... Whether to activate a messages logging to file. Spustit zápis hlášení do souboru. &Messages log file: Soubor se &zápisem hlášení: Whether to ask for session reset &Confirm session reset Whether to ask for session restart &Confirm session restart Whether to show session errors &Confirm session errors Alt+M Alt+M &Tuning &Ladění Limits Mezní hodnoty Maximum number of voices: Nejvyšší počet hlasů: Maximum number of voices Nejvyšší počet hlasů Maximum number of disk streams: Nejvyšší počet diskových proudů: Maximum number of disk streams Nejvyšší počet diskových proudů &Display &Zobrazení Channels Kanály Sample channel display font display Zobrazení písma při zobrazení kanálu s ukázkou Select font for the channel display Vybrat písmo pro zobrazení kanálu &Font... &Písmo... Alt+F Alt+F Whether to refresh the channels view automatically Obnovit pohled na kanály automaticky &Auto refresh: &Automatické obnovení: Alt+A Alt+A Maximum &volume: Nejvyšší &hlasitost: Time in milliseconds between each auto-refresh cycle Čas v milisekundách mezi každým kolem automatického obnovení Upper limit for the sampler channel volume setting Horní mez pro nastavení hlasitosti kanálů v zařízení pro míchání hudby % % Whether to enable a shiny glass light effect on the channel display Povolit lesklý skelný světelný efekt při zobrazení kanálu Display shiny glass light &effect Zobrazit lesklý skelný světelný &efekt Alt+E Alt+E Messages Hlášení Sample messages text font display Zobrazení písma textu hlášení o ukázkách 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 Zachovat nejvyšší počet řádků v okně s hlášeními &Messages limit: Mezní hodnota pro hlášení: The maximum number of message lines to keep in view Nejvyšší počet řádků s hlášením, který se bude uchovávat v okně lines řádky Other Jiné Whether to ask for confirmation on removals Žádat o potvrzení při odstranění &Confirm removals &Potvrdit odstranění Alt+C Alt+C &Number of recent files: &Počet nedávných souborů: The maximum number of recent files to keep in menu Nejvyšší počet nedávných souborů, který se bude uchovávat v nabídce Whether to keep all child windows on top of the main window Uchovávat všechna další okna nahoře nad hlavním oknem &Keep child windows always on top &Uchovávat další okna vždy nahoře Alt+K Alt+K Whether to capture standard output (stdout/stderr) into messages window Zachytit obvyklý výstup (stdout/stderr) do okna s hlášeními Capture standard &output Zachytit obvyklý &výstup Alt+O Alt+O Whether to show the complete directory path of loaded session files Ukázat úplnou cestu k adresáři s nahranými soubory se sezeními Show complete &path of session files Ukázat úplnou &cestu k souborům se sezeními Alt+P Alt+P Whether to show the actual instrument names as read from instrument file (using libgig) Ukázat skutečné názvy nástrojů, jak jsou přečteny ze souborů s nástroji (pomocí libgig) Show actual &instrument names Ukázat skutečné názvy &nástrojů Alt+I Alt+I &Base font size: &Velikost písma uživatelského rozhraní: Base application font size (pt.) Základní velikost písma v programu (v bodech) (default) (výchozí) 6 6 7 7 8 8 9 9 10 10 11 11 12 12 qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDeviceForm.h0000644000000000000000000000013212554456160017561 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.760090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDeviceForm.h0000644000175000001440000000543712554456160020416 0ustar00rncbcusers00000000000000// qsamplerDeviceForm.h // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerDeviceForm_h #define __qsamplerDeviceForm_h #include "ui_qsamplerDeviceForm.h" #include "qsamplerDevice.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceForm -- Device form interface. // class DeviceForm : public QDialog { Q_OBJECT public: DeviceForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); ~DeviceForm(); void setDeviceTypeMode(Device::DeviceType deviceType); void setDriverName(const QString& sDriverName); void setDevice(Device *pDevice); public slots: void createDevice(); void deleteDevice(); void refreshDevices(); void selectDriver(const QString& sDriverName); void selectDevice(); void selectDevicePort(int iPort); void changeDeviceParam(int iRow, int iCol); void changeDevicePortParam(int iRow, int iCol); void deviceListViewContextMenu(const QPoint& pos); void stabilizeForm(); void updateCellRenderers(); void updateCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); void updatePortCellRenderers(); void updatePortCellRenderers( const QModelIndex& topLeft, const QModelIndex& bottomRight); signals: void devicesChanged(); protected: void showEvent(QShowEvent* pShowEvent); void hideEvent(QHideEvent* pHideEvent); private: Ui::qsamplerDeviceForm m_ui; DeviceParamModel m_deviceParamModel; DeviceParamDelegate m_deviceParamDelegate; PortParamModel m_devicePortParamModel; DeviceParamDelegate m_devicePortParamDelegate; lscp_client_t *m_pClient; int m_iDirtySetup; int m_iDirtyCount; bool m_bNewDevice; Device::DeviceType m_deviceType; Device::DeviceType m_deviceTypeMode; DeviceItem *m_pAudioItems; DeviceItem *m_pMidiItems; }; } // namespace QSampler #endif // __qsamplerDeviceForm_h // end of qsamplerDeviceForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDeviceForm.cpp0000644000000000000000000000013212554456160020114 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.760090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDeviceForm.cpp0000644000175000001440000004766212554456160020757 0ustar00rncbcusers00000000000000// qsamplerDeviceForm.cpp // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerDeviceForm.h" #include "qsamplerAbout.h" #include "qsamplerMainForm.h" #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::DeviceForm -- Device form implementation. // DeviceForm::DeviceForm ( QWidget *pParent, Qt::WindowFlags wflags ) : QDialog(pParent, wflags) { m_ui.setupUi(this); // Initialize locals. m_iDirtySetup = 0; m_iDirtyCount = 0; m_bNewDevice = false; m_deviceType = Device::None; m_pAudioItems = NULL; m_pMidiItems = NULL; // No exclusive mode as default. m_deviceTypeMode = Device::None; m_ui.DeviceListView->header()->hide(); int iRowHeight = m_ui.DeviceParamTable->fontMetrics().height() + 4; m_ui.DeviceParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.DevicePortParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.DeviceParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.DevicePortParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.DeviceParamTable->setModel(&m_deviceParamModel); m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate); #if QT_VERSION >= 0x050000 m_ui.DeviceParamTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch); #else m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); #endif m_ui.DeviceParamTable->verticalHeader()->hide(); m_ui.DevicePortParamTable->setModel(&m_devicePortParamModel); m_ui.DevicePortParamTable->setItemDelegate(&m_devicePortParamDelegate); #if QT_VERSION >= 0x050000 m_ui.DevicePortParamTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch); #else m_ui.DevicePortParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); #endif m_ui.DevicePortParamTable->verticalHeader()->hide(); // Initial contents. refreshDevices(); // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.DeviceListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(selectDevice())); QObject::connect(m_ui.DeviceListView, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(deviceListViewContextMenu(const QPoint&))); QObject::connect(m_ui.RefreshDevicesPushButton, SIGNAL(clicked()), SLOT(refreshDevices())); QObject::connect(m_ui.DriverNameComboBox, SIGNAL(activated(const QString&)), SLOT(selectDriver(const QString&))); QObject::connect(m_ui.DevicePortComboBox, SIGNAL(activated(int)), SLOT(selectDevicePort(int))); QObject::connect(m_ui.CreateDevicePushButton, SIGNAL(clicked()), SLOT(createDevice())); QObject::connect(m_ui.DeleteDevicePushButton, SIGNAL(clicked()), SLOT(deleteDevice())); QObject::connect(m_ui.ClosePushButton, SIGNAL(clicked()), SLOT(close())); QObject::connect(&m_deviceParamModel, SIGNAL(modelReset()), SLOT(updateCellRenderers())); QObject::connect(&m_deviceParamModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updateCellRenderers(const QModelIndex&, const QModelIndex&))); QObject::connect(&m_devicePortParamModel, SIGNAL(modelReset()), SLOT(updatePortCellRenderers())); QObject::connect(&m_devicePortParamModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updatePortCellRenderers(const QModelIndex&, const QModelIndex&))); } DeviceForm::~DeviceForm (void) { } // Notify our parent that we're emerging. void DeviceForm::showEvent ( QShowEvent *pShowEvent ) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); QWidget::showEvent(pShowEvent); refreshDevices(); } // Notify our parent that we're closing. void DeviceForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->stabilizeForm(); // Signal special whether we changed the device set. if (m_iDirtyCount > 0) { m_iDirtyCount = 0; emit devicesChanged(); } } // Set device type spacial exclusive mode. void DeviceForm::setDeviceTypeMode ( Device::DeviceType deviceTypeMode ) { // If it has not changed, do nothing. if (m_deviceTypeMode == deviceTypeMode) return; m_deviceTypeMode = deviceTypeMode; // OK. Do a whole refresh around. refreshDevices(); } // Device driver name setup formal initializer. void DeviceForm::setDriverName ( const QString& sDriverName ) { if (m_ui.DriverNameComboBox->findText(sDriverName) < 0) m_ui.DriverNameComboBox->insertItem(0, sDriverName); m_ui.DriverNameComboBox->setItemText( m_ui.DriverNameComboBox->currentIndex(), sDriverName); } // Set current selected device by type and id. void DeviceForm::setDevice ( Device *pDevice ) { // In case no device is given... Device::DeviceType deviceType = m_deviceTypeMode; if (pDevice) deviceType = pDevice->deviceType(); // Get the device view root item... DeviceItem *pRootItem = NULL; switch (deviceType) { case Device::Audio: pRootItem = m_pAudioItems; break; case Device::Midi: pRootItem = m_pMidiItems; break; case Device::None: break; } // Is the root present? if (pRootItem == NULL) return; // So there's no device huh? if (pDevice == NULL) { m_ui.DeviceListView->setCurrentItem(pRootItem); return; } // For each child, test for identity... for (int i = 0; i < pRootItem->childCount(); i++) { DeviceItem* pDeviceItem = (DeviceItem*) pRootItem->child(i); // If identities match, select as current device item. if (pDeviceItem->device().deviceID() == pDevice->deviceID()) { pDeviceItem->setSelected(true); break; } } } // Create a new device from current table view. void DeviceForm::createDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem *pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; // About a brand new device instance... Device device(((DeviceItem *) pItem)->device()); if (device.createDevice()) { // Now it depends on the device type... DeviceItem *pRootItem = NULL; switch (device.deviceType()) { case Device::Audio: pRootItem = m_pAudioItems; break; case Device::Midi: pRootItem = m_pMidiItems; break; case Device::None: break; } // Append the new device item. DeviceItem *pDeviceItem = new DeviceItem(pRootItem, device.deviceType(), device.deviceID()); // Just make it the new selection... pDeviceItem->setSelected(true); // Main session should be marked dirty. pMainForm->sessionDirty(); m_iDirtyCount++; } } // Delete current device in table view. void DeviceForm::deleteDevice (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Prompt user if this is for real... Options *pOptions = pMainForm->options(); if (pOptions && pOptions->bConfirmRemove) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Warning"); const QString& sText = tr( "About to delete device:\n\n" "%1\n\n" "Are you sure?") .arg(device.deviceName()); #if 0 if (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() == QMessageBox::Cancel) return; if (cbox.isChecked()) pOptions->bConfirmRemove = false; #endif } // Go and destroy... if (device.deleteDevice()) { // Remove it from the device view... delete pItem; // Main session should be marked dirty. pMainForm->sessionDirty(); m_iDirtyCount++; } } // Refresh all device list and views. void DeviceForm::refreshDevices (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; // Avoid nested changes. m_iDirtySetup++; // // (Re)Load complete device configuration data ... // m_pAudioItems = NULL; m_pMidiItems = NULL; m_ui.DeviceListView->clear(); if (pMainForm->client()) { int *piDeviceIDs; // Grab and pop Audio devices... if (m_deviceTypeMode == Device::None || m_deviceTypeMode == Device::Audio) { m_pAudioItems = new DeviceItem(m_ui.DeviceListView, Device::Audio); } if (m_pAudioItems) { piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Audio); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { new DeviceItem(m_pAudioItems, Device::Audio, piDeviceIDs[i]); } m_pAudioItems->setExpanded(true); } // Grab and pop MIDI devices... if (m_deviceTypeMode == Device::None || m_deviceTypeMode == Device::Midi) { m_pMidiItems = new DeviceItem(m_ui.DeviceListView, Device::Midi); } if (m_pMidiItems) { piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Midi); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { new DeviceItem(m_pMidiItems, Device::Midi, piDeviceIDs[i]); } m_pMidiItems->setExpanded(true); } } // Done. m_iDirtySetup--; // Show something. selectDevice(); } // Driver selection slot. void DeviceForm::selectDriver ( const QString& sDriverName ) { if (m_iDirtySetup > 0) return; // // Driver name has changed for a new device... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Driver change is only valid for scratch devices... if (m_bNewDevice) { m_iDirtySetup++; device.setDriver(sDriverName); m_deviceParamModel.refresh(&device, m_bNewDevice); m_iDirtySetup--; // Done. stabilizeForm(); } } // Device selection slot. void DeviceForm::selectDevice () { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (m_iDirtySetup > 0) return; // // Device selection has changed... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) { m_deviceType = Device::None; m_ui.DeviceNameTextLabel->setText(QString::null); m_deviceParamModel.clear(); m_ui.DevicePortComboBox->clear(); m_devicePortParamModel.clear(); m_ui.DevicePortTextLabel->setEnabled(false); m_ui.DevicePortComboBox->setEnabled(false); m_ui.DevicePortParamTable->setEnabled(false); stabilizeForm(); return; } Device& device = ((DeviceItem *) pItem)->device(); m_iDirtySetup++; // Flag whether this is a new device. m_bNewDevice = (device.deviceID() < 0); // Fill the device/driver heading... m_ui.DeviceNameTextLabel->setText(device.deviceName()); // The driver combobox is only rebuilt if device type has changed... if (device.deviceType() != m_deviceType) { m_ui.DriverNameComboBox->clear(); m_ui.DriverNameComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), device.deviceType())); m_deviceType = device.deviceType(); } // Do we need a driver name? if (m_bNewDevice || device.driverName().isEmpty()) device.setDriver(m_ui.DriverNameComboBox->currentText()); setDriverName(device.driverName()); m_ui.DriverNameTextLabel->setEnabled(m_bNewDevice); m_ui.DriverNameComboBox->setEnabled(m_bNewDevice); // Fill the device parameter table... m_deviceParamModel.refresh(&device, m_bNewDevice); // And now the device port/channel parameter table... switch (device.deviceType()) { case Device::Audio: m_ui.DevicePortTextLabel->setText(tr("Ch&annel:")); break; case Device::Midi: m_ui.DevicePortTextLabel->setText(tr("P&ort:")); break; case Device::None: break; } m_ui.DevicePortComboBox->clear(); m_devicePortParamModel.clear(); if (m_bNewDevice) { m_ui.DevicePortTextLabel->setEnabled(false); m_ui.DevicePortComboBox->setEnabled(false); m_ui.DevicePortParamTable->setEnabled(false); } else { QPixmap pixmap; switch (device.deviceType()) { case Device::Audio: pixmap = QPixmap(":/images/audio2.png"); break; case Device::Midi: pixmap = QPixmap(":/images/midi2.png"); break; case Device::None: break; } DevicePortList& ports = device.ports(); QListIterator iter(ports); while (iter.hasNext()) { DevicePort *pPort = iter.next(); m_ui.DevicePortComboBox->addItem(pixmap, device.deviceTypeName() + ' ' + device.driverName() + ' ' + pPort->portName()); } bool bEnabled = (ports.count() > 0); m_ui.DevicePortTextLabel->setEnabled(bEnabled); m_ui.DevicePortComboBox->setEnabled(bEnabled); m_ui.DevicePortParamTable->setEnabled(bEnabled); } // Done. m_iDirtySetup--; // Make the device port/channel selection effective. selectDevicePort(m_ui.DevicePortComboBox->currentIndex()); } // Device port/channel selection slot. void DeviceForm::selectDevicePort ( int iPort ) { if (m_iDirtySetup > 0) return; // // Device port/channel selection has changed... // QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); DevicePort *pPort = NULL; if (iPort >= 0 && iPort < device.ports().count()) pPort = device.ports().at(iPort); if (pPort) { m_iDirtySetup++; m_devicePortParamModel.refresh(pPort, false); m_iDirtySetup--; } // Done. stabilizeForm(); } // Device parameter value change slot. void DeviceForm::changeDeviceParam ( int iRow, int iCol ) { if (m_iDirtySetup > 0) return; if (iRow < 0 || iCol < 0) return; // // Device parameter change... // /* we do that in the model class now ... QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); // Table 1st column has the parameter name; //const QString sParam = m_ui.DeviceParamTable->text(iRow, 0); //const QString sValue = m_ui.DeviceParamTable->text(iRow, iCol); const QString sParam = m_deviceParamModel.data(m_deviceParamModel.index(iRow, 0), Qt::DisplayRole).value().name; const QString sValue = m_deviceParamModel.data(m_deviceParamModel.index(iRow, iCol), Qt::DisplayRole).value().param.value; // Set the local device parameter value. if (device.setParam(sParam, sValue)) { selectDevice(); } else { stabilizeForm(); } */ // Main session should be dirtier... MainForm *pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->sessionDirty(); } // Device port/channel parameter value change slot. void DeviceForm::changeDevicePortParam ( int iRow, int iCol ) { if (m_iDirtySetup > 0) return; if (iRow < 0 || iCol < 0) return; // // Device port/channel parameter change... // /* we do that in the model class now ... QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); if (pItem == NULL || pItem->type() != QSAMPLER_DEVICE_ITEM) return; Device& device = ((DeviceItem *) pItem)->device(); int iPort = m_ui.DevicePortComboBox->currentIndex(); DevicePort *pPort = NULL; if (iPort >= 0 && iPort < device.ports().count()) pPort = device.ports().at(iPort); if (pPort == NULL) return; // Table 1st column has the parameter name; //const QString sParam = m_ui.DevicePortParamTable->text(iRow, 0); //const QString sValue = m_ui.DevicePortParamTable->text(iRow, iCol); const QString sParam = m_devicePortParamModel.data(m_devicePortParamModel.index(iRow, 0), Qt::DisplayRole).value().name; const QString sValue = m_devicePortParamModel.data(m_devicePortParamModel.index(iRow, iCol), Qt::DisplayRole).value().param.value; // Set the local device port/channel parameter value. pPort->setParam(sParam, sValue); */ // Done. stabilizeForm(); // Main session should be dirtier... MainForm* pMainForm = MainForm::getInstance(); if (pMainForm) pMainForm->sessionDirty(); } // Device list view context menu handler. void DeviceForm::deviceListViewContextMenu ( const QPoint& pos ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; QTreeWidgetItem* pItem = m_ui.DeviceListView->itemAt(pos); if (pItem == NULL) return; // Build the device context menu... QMenu menu(this); QAction *pAction; bool bClient = (pMainForm->client() != NULL); bool bEnabled = (pItem != NULL); pAction = menu.addAction( QIcon(":/images/deviceCreate.png"), tr("&Create device"), this, SLOT(createDevice())); pAction->setEnabled(bEnabled || (bClient && m_bNewDevice)); pAction = menu.addAction( QIcon(":/images/deviceDelete.png"), tr("&Delete device"), this, SLOT(deleteDevice())); pAction->setEnabled(bEnabled && !m_bNewDevice); menu.addSeparator(); pAction = menu.addAction( QIcon(":/images/formRefresh.png"), tr("&Refresh"), this, SLOT(refreshDevices())); pAction->setEnabled(bClient); menu.exec(pos); } // Stabilize current form state. void DeviceForm::stabilizeForm (void) { MainForm* pMainForm = MainForm::getInstance(); QTreeWidgetItem* pItem = m_ui.DeviceListView->currentItem(); bool bClient = (pMainForm && pMainForm->client() != NULL); bool bEnabled = (pItem != NULL); m_ui.DeviceNameTextLabel->setEnabled(bEnabled && !m_bNewDevice); m_ui.DriverNameTextLabel->setEnabled(bEnabled && m_bNewDevice); m_ui.DriverNameComboBox->setEnabled(bEnabled && m_bNewDevice); m_ui.DeviceParamTable->setEnabled(bEnabled); m_ui.RefreshDevicesPushButton->setEnabled(bClient); m_ui.CreateDevicePushButton->setEnabled(bEnabled || (bClient && m_bNewDevice)); m_ui.DeleteDevicePushButton->setEnabled(bEnabled && !m_bNewDevice); } void DeviceForm::updateCellRenderers (void) { const int rows = m_deviceParamModel.rowCount(); const int cols = m_deviceParamModel.columnCount(); updateCellRenderers( m_deviceParamModel.index(0, 0), m_deviceParamModel.index(rows - 1, cols - 1)); } void DeviceForm::updateCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_deviceParamModel.index(r, c); m_ui.DeviceParamTable->openPersistentEditor(index); } } } void DeviceForm::updatePortCellRenderers (void) { const int rows = m_devicePortParamModel.rowCount(); const int cols = m_devicePortParamModel.columnCount(); updatePortCellRenderers( m_devicePortParamModel.index(0, 0), m_devicePortParamModel.index(rows - 1, cols - 1)); } void DeviceForm::updatePortCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_devicePortParamModel.index(r, c); m_ui.DevicePortParamTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerDeviceForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelStrip.cpp0000644000000000000000000000013212554456160020463 xustar0030 mtime=1437752432.759090073 30 atime=1437752432.759090073 30 ctime=1437752432.759090073 qsampler-0.3.1/src/qsamplerChannelStrip.cpp0000644000175000001440000004221312554456160021311 0ustar00rncbcusers00000000000000// qsamplerChannelStrip.cpp // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008, 2014 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerChannelStrip.h" #include "qsamplerMainForm.h" #include "qsamplerChannelFxForm.h" #include #include #include #include #include #include #if QT_VERSION >= 0x050000 #include #endif // Channel status/usage usage limit control. #define QSAMPLER_ERROR_LIMIT 3 // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::ChannelStrip -- Channel strip form implementation. // // MIDI activity pixmap common resources. int ChannelStrip::g_iMidiActivityRefCount = 0; QPixmap *ChannelStrip::g_pMidiActivityLedOn = NULL; QPixmap *ChannelStrip::g_pMidiActivityLedOff = NULL; // Channel strip activation/selection. ChannelStrip *ChannelStrip::g_pSelectedStrip = NULL; ChannelStrip::ChannelStrip ( QWidget* pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { m_ui.setupUi(this); // Initialize locals. m_pChannel = NULL; m_iDirtyChange = 0; m_iErrorCount = 0; m_instrumentListPopupMenu = NULL; if (++g_iMidiActivityRefCount == 1) { g_pMidiActivityLedOn = new QPixmap(":/images/ledon1.png"); g_pMidiActivityLedOff = new QPixmap(":/images/ledoff1.png"); } m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff); #ifndef CONFIG_EVENT_CHANNEL_MIDI m_ui.MidiActivityLabel->setToolTip("MIDI activity (disabled)"); #endif m_pMidiActivityTimer = new QTimer(this); m_pMidiActivityTimer->setSingleShot(true); QObject::connect(m_pMidiActivityTimer, SIGNAL(timeout()), SLOT(midiActivityLedOff()) ); // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.ChannelSetupPushButton, SIGNAL(clicked()), SLOT(channelSetup())); QObject::connect(m_ui.ChannelMutePushButton, SIGNAL(toggled(bool)), SLOT(channelMute(bool))); QObject::connect(m_ui.ChannelSoloPushButton, SIGNAL(toggled(bool)), SLOT(channelSolo(bool))); QObject::connect(m_ui.VolumeSlider, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); QObject::connect(m_ui.VolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); QObject::connect(m_ui.ChannelEditPushButton, SIGNAL(clicked()), SLOT(channelEdit())); QObject::connect(m_ui.FxPushButton, SIGNAL(clicked()), SLOT(channelFxEdit())); setSelected(false); } ChannelStrip::~ChannelStrip (void) { setSelected(false); // Destroy existing channel descriptor. if (m_pChannel) delete m_pChannel; m_pChannel = NULL; if (--g_iMidiActivityRefCount == 0) { if (g_pMidiActivityLedOn) delete g_pMidiActivityLedOn; g_pMidiActivityLedOn = NULL; if (g_pMidiActivityLedOff) delete g_pMidiActivityLedOff; g_pMidiActivityLedOff = NULL; } } // Window drag-n-drop event handlers. void ChannelStrip::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) { if (m_pChannel == NULL) return; bool bAccept = false; if (pDragEnterEvent->source() == NULL) { const QMimeData *pMimeData = pDragEnterEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { // bAccept = Channel::isDlsInstrumentFile(sFilename); bAccept = QFileInfo(sFilename).exists(); break; } } } } if (bAccept) pDragEnterEvent->accept(); else pDragEnterEvent->ignore(); } void ChannelStrip::dropEvent ( QDropEvent* pDropEvent ) { if (m_pChannel == NULL) return; if (pDropEvent->source()) return; const QMimeData *pMimeData = pDropEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QStringList files; QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { // Go and set the dropped instrument filename... m_pChannel->setInstrument(sFilename, 0); // Open up the channel dialog. channelSetup(); break; } } } } // Channel strip setup formal initializer. void ChannelStrip::setup ( Channel *pChannel ) { // Destroy any previous channel descriptor; // (remember that once setup we own it!) if (m_pChannel) delete m_pChannel; // Set the new one... m_pChannel = pChannel; // Stabilize this around. updateChannelInfo(); // We'll accept drops from now on... if (m_pChannel) setAcceptDrops(true); } // Channel secriptor accessor. Channel *ChannelStrip::channel (void) const { return m_pChannel; } // Messages view font accessors. QFont ChannelStrip::displayFont (void) const { return m_ui.EngineNameTextLabel->font(); } void ChannelStrip::setDisplayFont ( const QFont & font ) { m_ui.EngineNameTextLabel->setFont(font); m_ui.MidiPortChannelTextLabel->setFont(font); m_ui.InstrumentNamePushButton->setFont(font); m_ui.InstrumentStatusTextLabel->setFont(font); } // Channel display background effect. void ChannelStrip::setDisplayEffect ( bool bDisplayEffect ) { QPalette pal; pal.setColor(QPalette::Foreground, Qt::yellow); pal.setColor(QPalette::ButtonText, Qt::yellow); m_ui.EngineNameTextLabel->setPalette(pal); m_ui.MidiPortChannelTextLabel->setPalette(pal); pal.setColor(QPalette::Foreground, Qt::green); pal.setColor(QPalette::ButtonText, Qt::green); if (bDisplayEffect) { QPixmap pm(":/images/displaybg1.png"); pal.setBrush(QPalette::Background, QBrush(pm)); } else { pal.setColor(QPalette::Background, Qt::black); } m_ui.ChannelInfoFrame->setPalette(pal); m_ui.InstrumentNamePushButton->setPalette(pal); m_ui.StreamVoiceCountTextLabel->setPalette(pal); } // Maximum volume slider accessors. void ChannelStrip::setMaxVolume ( int iMaxVolume ) { m_iDirtyChange++; m_ui.VolumeSlider->setRange(0, iMaxVolume); m_ui.VolumeSpinBox->setRange(0, iMaxVolume); m_iDirtyChange--; } // Channel setup dialog slot. bool ChannelStrip::channelSetup (void) { if (m_pChannel == NULL) return false; // Invoke the channel setup dialog. bool bResult = m_pChannel->channelSetup(this); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel mute slot. bool ChannelStrip::channelMute ( bool bMute ) { if (m_pChannel == NULL) return false; // Invoke the channel mute method. bool bResult = m_pChannel->setChannelMute(bMute); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel solo slot. bool ChannelStrip::channelSolo ( bool bSolo ) { if (m_pChannel == NULL) return false; // Invoke the channel solo method. bool bResult = m_pChannel->setChannelSolo(bSolo); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Channel edit slot. void ChannelStrip::channelEdit (void) { if (m_pChannel == NULL) return; m_pChannel->editChannel(); } bool ChannelStrip::channelFxEdit (void) { MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !channel()) return false; pMainForm->appendMessages(QObject::tr("channel fx sends...")); bool bResult = false; #if CONFIG_FXSEND ChannelFxForm *pChannelFxForm = new ChannelFxForm(channel(), parentWidget()); if (pChannelFxForm) { //pChannelForm->setup(this); bResult = pChannelFxForm->exec(); delete pChannelFxForm; } #else // CONFIG_FXSEND QMessageBox::critical(this, QSAMPLER_TITLE ": " + tr("Unavailable"), tr("Sorry, QSampler was built without FX send support!\n\n" "(Make sure you have a recent liblscp when recompiling QSampler)")); #endif // CONFIG_FXSEND return bResult; } // Channel reset slot. bool ChannelStrip::channelReset (void) { if (m_pChannel == NULL) return false; // Invoke the channel reset method. bool bResult = m_pChannel->channelReset(); // Notify that this channel has changed. if (bResult) emit channelChanged(this); return bResult; } // Update the channel instrument name. bool ChannelStrip::updateInstrumentName ( bool bForce ) { if (m_pChannel == NULL) return false; // Do we refresh the actual name? if (bForce) m_pChannel->updateInstrumentName(); // Instrument name... if (m_pChannel->instrumentName().isEmpty()) { if (m_pChannel->instrumentStatus() >= 0) { m_ui.InstrumentNamePushButton->setText( ' ' + Channel::loadingInstrument()); } else { m_ui.InstrumentNamePushButton->setText( ' ' + Channel::noInstrumentName()); } } else { m_ui.InstrumentNamePushButton->setText( ' ' + m_pChannel->instrumentName()); } bool bShowInstrumentPopup = false; // Instrument list popup (for fast switching among sounds of the same file) if (!m_pChannel->instrumentFile().isEmpty()) { const QStringList instruments = Channel::getInstrumentList(m_pChannel->instrumentFile(), true); if (!instruments.isEmpty()) { bShowInstrumentPopup = true; if (!m_instrumentListPopupMenu) { m_instrumentListPopupMenu = new QMenu(m_ui.InstrumentNamePushButton); m_instrumentListPopupMenu->setTitle(tr("Instruments")); // for cosmetical reasons, should have at least // the width of the instrument name label... m_instrumentListPopupMenu->setMinimumWidth(120); m_ui.InstrumentNamePushButton->setMenu(m_instrumentListPopupMenu); QObject::connect(m_instrumentListPopupMenu, SIGNAL(triggered(QAction*)), SLOT(instrumentListPopupItemClicked(QAction *))); } else { m_instrumentListPopupMenu->clear(); } QAction *action; for (int i = 0; i < instruments.size(); ++i) { action = m_instrumentListPopupMenu->addAction(instruments.at(i)); action->setData(i); action->setCheckable(true); action->setChecked(i == m_pChannel->instrumentNr()); } } } if (!bShowInstrumentPopup && m_instrumentListPopupMenu) { delete m_instrumentListPopupMenu; m_instrumentListPopupMenu = NULL; } return true; } void ChannelStrip::instrumentListPopupItemClicked ( QAction *action ) { if (!action) return; QVariant data = action->data(); if (data.isValid() && !m_pChannel->instrumentFile().isEmpty()) { m_pChannel->loadInstrument(m_pChannel->instrumentFile(), data.toInt()); emit channelChanged(this); } } // Do the dirty volume change. bool ChannelStrip::updateChannelVolume (void) { if (m_pChannel == NULL) return false; // Convert... int iVolume = ::lroundf(100.0f * m_pChannel->volume()); // And clip... if (iVolume < 0) iVolume = 0; // Flag it here, to avoid infinite recursion. m_iDirtyChange++; m_ui.VolumeSlider->setValue(iVolume); m_ui.VolumeSpinBox->setValue(iVolume); m_iDirtyChange--; return true; } // Update whole channel info state. bool ChannelStrip::updateChannelInfo (void) { if (m_pChannel == NULL) return false; // Check for error limit/recycle... if (m_iErrorCount > QSAMPLER_ERROR_LIMIT) return true; // Update strip caption. QString sText = m_pChannel->channelName(); setWindowTitle(sText); m_ui.ChannelSetupPushButton->setText('&' + sText); // Check if we're up and connected. MainForm* pMainForm = MainForm::getInstance(); if (pMainForm->client() == NULL) return false; // Read actual channel information. m_pChannel->updateChannelInfo(); // Engine name... if (m_pChannel->engineName().isEmpty()) { m_ui.EngineNameTextLabel->setText( ' ' + Channel::noEngineName()); } else { m_ui.EngineNameTextLabel->setText( ' ' + m_pChannel->engineName()); } // Instrument name... updateInstrumentName(false); // MIDI Port/Channel... QString sMidiPortChannel = QString::number(m_pChannel->midiPort()) + " / "; if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) sMidiPortChannel += tr("All"); else sMidiPortChannel += QString::number(m_pChannel->midiChannel() + 1); m_ui.MidiPortChannelTextLabel->setText(sMidiPortChannel); // Common palette... QPalette pal; const QColor& rgbFore = pal.color(QPalette::Foreground); // Instrument status... const int iInstrumentStatus = m_pChannel->instrumentStatus(); if (iInstrumentStatus < 0) { pal.setColor(QPalette::Foreground, Qt::red); m_ui.InstrumentStatusTextLabel->setPalette(pal); m_ui.InstrumentStatusTextLabel->setText( tr("ERR%1").arg(iInstrumentStatus)); m_iErrorCount++; return false; } // All seems normal... pal.setColor(QPalette::Foreground, iInstrumentStatus < 100 ? Qt::yellow : Qt::green); m_ui.InstrumentStatusTextLabel->setPalette(pal); m_ui.InstrumentStatusTextLabel->setText( QString::number(iInstrumentStatus) + '%'); m_iErrorCount = 0; #ifdef CONFIG_MUTE_SOLO // Mute/Solo button state coloring... bool bMute = m_pChannel->channelMute(); const QColor& rgbButton = pal.color(QPalette::Button); const QColor& rgbButtonText = pal.color(QPalette::ButtonText); pal.setColor(QPalette::Foreground, rgbFore); pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText); m_ui.ChannelMutePushButton->setPalette(pal); m_ui.ChannelMutePushButton->setDown(bMute); bool bSolo = m_pChannel->channelSolo(); pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton); pal.setColor(QPalette::ButtonText, bSolo ? Qt::darkCyan : rgbButtonText); m_ui.ChannelSoloPushButton->setPalette(pal); m_ui.ChannelSoloPushButton->setDown(bSolo); #else m_ui.ChannelMutePushButton->setEnabled(false); m_ui.ChannelSoloPushButton->setEnabled(false); #endif // And update the both GUI volume elements; // return success if, and only if, intrument is fully loaded... return updateChannelVolume() && (iInstrumentStatus == 100); } // Update whole channel usage state. bool ChannelStrip::updateChannelUsage (void) { if (m_pChannel == NULL) return false; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm->client() == NULL) return false; // This only makes sense on fully loaded channels... if (m_pChannel->instrumentStatus() < 100) return false; // Get current channel voice count. int iVoiceCount = ::lscp_get_channel_voice_count( pMainForm->client(), m_pChannel->channelID()); // Get current stream count. int iStreamCount = ::lscp_get_channel_stream_count( pMainForm->client(), m_pChannel->channelID()); // Get current channel buffer fill usage. // As benno has suggested this is the percentage usage // of the least filled buffer stream... int iStreamUsage = ::lscp_get_channel_stream_usage( pMainForm->client(), m_pChannel->channelID());; // Update the GUI elements... m_ui.StreamUsageProgressBar->setValue(iStreamUsage); m_ui.StreamVoiceCountTextLabel->setText( QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount)); // We're clean. return true; } // Volume change slot. void ChannelStrip::volumeChanged ( int iVolume ) { if (m_pChannel == NULL) return; // Avoid recursion. if (m_iDirtyChange > 0) return; // Convert and clip. float fVolume = (float) iVolume / 100.0f; if (fVolume < 0.001f) fVolume = 0.0f; // Update the GUI elements. if (m_pChannel->setVolume(fVolume)) { updateChannelVolume(); emit channelChanged(this); } } // Context menu event handler. void ChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent ) { if (m_pChannel == NULL) return; // We'll just show up the main form's edit menu (thru qsamplerChannel). m_pChannel->contextMenuEvent(pEvent); } void ChannelStrip::midiActivityLedOn (void) { m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOn); m_pMidiActivityTimer->start(100); } void ChannelStrip::midiActivityLedOff (void) { m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff); } // Error count hackish accessors. void ChannelStrip::resetErrorCount (void) { m_iErrorCount = 0; } // Channel strip activation/selection. void ChannelStrip::setSelected ( bool bSelected ) { if (bSelected) { if (g_pSelectedStrip == this) return; if (g_pSelectedStrip) g_pSelectedStrip->setSelected(false); g_pSelectedStrip = this; } else { if (g_pSelectedStrip == this) g_pSelectedStrip = NULL; } QPalette pal; if (bSelected) { const QColor& color = pal.midlight().color(); pal.setColor(QPalette::Background, color.dark(150)); pal.setColor(QPalette::Foreground, color.light(150)); } QWidget::setPalette(pal); } bool ChannelStrip::isSelected (void) const { return (this == g_pSelectedStrip); } } // namespace QSampler // end of qsamplerChannelStrip.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrument.h0000644000000000000000000000013212554456160017706 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerInstrument.h0000644000175000001440000000506612554456160020541 0ustar00rncbcusers00000000000000// qsamplerInstrument.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerInstrument_h #define __qsamplerInstrument_h #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::Instrument - MIDI instrument map structure. // class Instrument { public: // Constructor. Instrument(int iMap = 0, int iBank = -1, int iProg = -1); // Default destructor. ~Instrument(); // Instrument accessors. void setMap(int iMap); int map() const; void setBank(int iBank); int bank() const; void setProg(int iProg); int prog() const; void setName(const QString& sName); const QString& name() const; void setEngineName(const QString& sEngineName); const QString& engineName() const; void setInstrumentFile(const QString& sInstrumentFile); const QString& instrumentFile() const; const QString& instrumentName() const; void setInstrumentNr(int InstrumentNr); int instrumentNr() const; void setVolume(float fVolume); float volume() const; void setLoadMode(int iLoadMode); int loadMode() const; // Sync methods. bool getInstrument(); bool mapInstrument(); bool unmapInstrument(); // Instrument map names initialization... static QStringList getMapNames(); static QString getMapName(int iMidiMap); private: // Instance variables. int m_iMap; int m_iBank; int m_iProg; QString m_sName; QString m_sEngineName; QString m_sInstrumentFile; QString m_sInstrumentName; int m_iInstrumentNr; float m_fVolume; int m_iLoadMode; }; } // namespace QSampler #endif // __qsamplerInstrument_h // end of qsamplerInstrument.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerMainForm.h0000644000000000000000000000013212554456160017246 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerMainForm.h0000644000175000001440000001206212554456160020073 0ustar00rncbcusers00000000000000// qsamplerMainForm.h // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007,2008,2015 Christian Schoenebeck 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 __qsamplerMainForm_h #define __qsamplerMainForm_h #include "ui_qsamplerMainForm.h" #include class QProcess; class QMdiArea; class QMdiSubWindow; class QSocketNotifier; class QSpinBox; class QSlider; class QLabel; namespace QSampler { class Options; class Messages; class Channel; class ChannelStrip; class DeviceForm; class InstrumentListForm; //------------------------------------------------------------------------- // QSampler::MainForm -- Main window form implementation. // class MainForm : public QMainWindow { Q_OBJECT public: MainForm(QWidget *pParent = NULL); ~MainForm(); void setup(Options* pOptions); Options* options() const; lscp_client_t* client() const; QString sessionName(const QString& sFilename); void appendMessages(const QString& sText); void appendMessagesColor(const QString& sText, const QString& sColor); void appendMessagesText(const QString& sText); void appendMessagesError(const QString& sText); void appendMessagesClient(const QString& sText); ChannelStrip *createChannelStrip(Channel *pChannel); void destroyChannelStrip(ChannelStrip *pChannelStrip); ChannelStrip *activeChannelStrip(); ChannelStrip *channelStripAt(int iChannel); ChannelStrip *channelStrip(int iChannelID); void contextMenuEvent(QContextMenuEvent *pEvent); static MainForm* getInstance(); public slots: void fileNew(); void fileOpen(); void fileOpenRecent(); void fileSave(); void fileSaveAs(); void fileReset(); void fileRestart(); void fileExit(); void editAddChannel(); void editRemoveChannel(); void editSetupChannel(); void editEditChannel(); void editResetChannel(); void editResetAllChannels(); void viewMenubar(bool bOn); void viewToolbar(bool bOn); void viewStatusbar(bool bOn); void viewMessages(bool bOn); void viewInstruments(); void viewDevices(); void viewOptions(); void channelsArrange(); void channelsAutoArrange(bool bOn); void helpAboutQt(); void helpAbout(); void volumeChanged(int iVolume); void channelStripChanged(ChannelStrip *pChannelStrip); void channelsMenuAboutToShow(); void channelsMenuActivated(); void timerSlot(); void readServerStdout(); void processServerExit(); void sessionDirty(); void stabilizeForm(); void handle_sigusr1(); protected slots: void updateRecentFilesMenu(); // Channel strip activation/selection. void activateStrip(QMdiSubWindow *pMdiSubWindow); // Channel toolbar orientation change. void channelsToolbarOrientation(Qt::Orientation orientation); protected: bool queryClose(); void closeEvent(QCloseEvent* pCloseEvent); void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); void dropEvent(QDropEvent *pDropEvent); void customEvent(QEvent* pCustomEvent); bool newSession(); bool openSession(); bool saveSession(bool bPrompt); bool closeSession(bool bForce); bool loadSessionFile(const QString& sFilename); bool saveSessionFile(const QString& sFilename); void updateSession(); void updateRecentFiles(const QString& sFilename); void updateInstrumentNames(); void updateDisplayFont(); void updateDisplayEffect(); void updateMaxVolume(); void updateMessagesFont(); void updateMessagesLimit(); void updateMessagesCapture(); void updateViewMidiDeviceStatusMenu(); void updateAllChannelStrips(bool bRemoveDeadStrips); void startSchedule(int iStartDelay); void stopSchedule(); void startServer(); void stopServer(bool bInteractive = false); bool startClient(); void stopClient(); private: Ui::qsamplerMainForm m_ui; Options *m_pOptions; Messages *m_pMessages; QMdiArea *m_pWorkspace; QSocketNotifier *m_pUsr1Notifier; QString m_sFilename; int m_iUntitled; int m_iDirtyCount; lscp_client_t *m_pClient; QProcess *m_pServer; bool bForceServerStop; int m_iStartDelay; int m_iTimerDelay; int m_iTimerSlot; QLabel *m_statusItem[5]; QList m_changedStrips; InstrumentListForm *m_pInstrumentListForm; DeviceForm *m_pDeviceForm; static MainForm *g_pMainForm; QSlider *m_pVolumeSlider; QSpinBox *m_pVolumeSpinBox; int m_iVolumeChanging; }; } // namespace QSampler #endif // __qsamplerMainForm_h // end of qsamplerMainForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentForm.cpp0000644000000000000000000000013212554456160021065 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerInstrumentForm.cpp0000644000175000001440000002656712554456160021731 0ustar00rncbcusers00000000000000// qsamplerInstrumentForm.cpp // /**************************************************************************** Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerInstrumentForm.h" #include "qsamplerOptions.h" #include "qsamplerChannel.h" #include "qsamplerMainForm.h" #include #include #include // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentForm -- Instrument map item form implementation. // InstrumentForm::InstrumentForm ( QWidget *pParent ) : QDialog(pParent) { m_ui.setupUi(this); // Initialize locals. m_pInstrument = NULL; m_iDirtySetup = 0; m_iDirtyCount = 0; m_iDirtyName = 0; // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.MapComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.BankSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.ProgSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.NameLineEdit, SIGNAL(textChanged(const QString&)), SLOT(nameChanged(const QString&))); QObject::connect(m_ui.EngineNameComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.InstrumentFileComboBox, SIGNAL(activated(const QString&)), SLOT(updateInstrumentName())); QObject::connect(m_ui.InstrumentFileToolButton, SIGNAL(clicked()), SLOT(openInstrumentFile())); QObject::connect(m_ui.InstrumentNrComboBox, SIGNAL(activated(int)), SLOT(instrumentNrChanged())); QObject::connect(m_ui.VolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(changed())); QObject::connect(m_ui.LoadModeComboBox, SIGNAL(activated(int)), SLOT(changed())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); } InstrumentForm::~InstrumentForm (void) { } // Channel dialog setup formal initializer. void InstrumentForm::setup ( Instrument *pInstrument ) { m_pInstrument = pInstrument; m_iDirtySetup = 0; m_iDirtyCount = 0; m_iDirtyName = 0; if (m_pInstrument == NULL) return; // Check if we're up and connected. MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // It can be a brand new channel, remember? bool bNew = (m_pInstrument->bank() < 0 || m_pInstrument->prog() < 0); if (!bNew) { m_pInstrument->getInstrument(); m_iDirtyName++; } // Avoid nested changes. m_iDirtySetup++; // Load combo box history... pOptions->loadComboBoxHistory(m_ui.InstrumentFileComboBox); // Populate maps list. m_ui.MapComboBox->clear(); m_ui.MapComboBox->insertItems(0, Instrument::getMapNames()); // Populate Engines list. const char **ppszEngines = ::lscp_list_available_engines(pMainForm->client()); if (ppszEngines) { m_ui.EngineNameComboBox->clear(); for (int iEngine = 0; ppszEngines[iEngine]; iEngine++) m_ui.EngineNameComboBox->addItem(ppszEngines[iEngine]); } else pMainForm->appendMessagesClient("lscp_list_available_engines"); // Read proper instrument information, // and populate the instrument form fields. // Instrument map name... int iMap = (bNew ? pOptions->iMidiMap : m_pInstrument->map()); if (iMap < 0) iMap = 0; const QString& sMapName = Instrument::getMapName(iMap); if (!sMapName.isEmpty()) { m_ui.MapComboBox->setCurrentIndex( m_ui.MapComboBox->findText(sMapName, Qt::MatchExactly | Qt::MatchCaseSensitive)); } // It might be no maps around... bool bMapEnabled = (m_ui.MapComboBox->count() > 0); m_ui.MapTextLabel->setEnabled(bMapEnabled); m_ui.MapComboBox->setEnabled(bMapEnabled); // Instrument bank/program... int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank()); int iProg = (bNew ? pOptions->iMidiProg : m_pInstrument->prog()) + 1; if (bNew && iProg > 128) { iProg = 1; iBank++; } m_ui.BankSpinBox->setValue(iBank); m_ui.ProgSpinBox->setValue(iProg); // Instrument name... m_ui.NameLineEdit->setText(m_pInstrument->name()); // Engine name... QString sEngineName = m_pInstrument->engineName(); if (sEngineName.isEmpty() || bNew) sEngineName = pOptions->sEngineName; if (sEngineName.isEmpty()) sEngineName = Channel::noEngineName(); if (m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.EngineNameComboBox->addItem(sEngineName); } m_ui.EngineNameComboBox->setCurrentIndex( m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive)); // Instrument filename and index... QString sInstrumentFile = m_pInstrument->instrumentFile(); if (sInstrumentFile.isEmpty()) sInstrumentFile = Channel::noInstrumentName(); m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList(sInstrumentFile, pOptions->bInstrumentNames)); m_ui.InstrumentNrComboBox->setCurrentIndex(m_pInstrument->instrumentNr()); // Instrument volume.... int iVolume = (bNew ? pOptions->iVolume : ::lroundf(100.0f * m_pInstrument->volume())); m_ui.VolumeSpinBox->setValue(iVolume); // Instrument load mode... int iLoadMode = (bNew ? pOptions->iLoadMode : m_pInstrument->loadMode()); m_ui.LoadModeComboBox->setCurrentIndex(iLoadMode); // Done. m_iDirtySetup--; stabilizeForm(); } // Special case for name change, void InstrumentForm::nameChanged ( const QString& /* sName */ ) { if (m_iDirtySetup > 0) return; m_iDirtyName++; changed(); } // Browse and open an instrument file. void InstrumentForm::openInstrumentFile (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // FIXME: the instrument file filters should be restricted, // depending on the current engine. const QString& sEngineName = m_ui.EngineNameComboBox->currentText().toUpper(); QStringList filters; if (sEngineName.contains("GIG")) filters << tr("GIG Instrument files") + " (*.gig *.dls)"; if (sEngineName.contains("SFZ")) filters << tr("SFZ Instrument files") + " (*.sfz)"; if (sEngineName.contains("SF2")) filters << tr("SF2 Instrument files") + " (*.sf2)"; const QString& filter = filters.join(";;"); QString sInstrumentFile = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. pOptions->sInstrumentDir, // Start here. filter // File filter. ); if (sInstrumentFile.isEmpty()) return; m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); updateInstrumentName(); } // Refresh the actual instrument name. void InstrumentForm::updateInstrumentName (void) { MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // TODO: this better idea would be to use libgig // to retrieve the REAL instrument names. m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList( m_ui.InstrumentFileComboBox->currentText(), pOptions->bInstrumentNames) ); instrumentNrChanged(); } // Special case for instrumnet index change, void InstrumentForm::instrumentNrChanged (void) { if (m_iDirtySetup > 0) return; if (m_ui.NameLineEdit->text().isEmpty() || m_iDirtyName == 0) { m_ui.NameLineEdit->setText(m_ui.InstrumentNrComboBox->currentText()); m_iDirtyName = 0; } changed(); } // Accept settings (OK button slot). void InstrumentForm::accept (void) { if (m_pInstrument == NULL) return; MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; if (m_iDirtyCount > 0) { m_pInstrument->setMap(m_ui.MapComboBox->currentIndex()); m_pInstrument->setBank(m_ui.BankSpinBox->value()); m_pInstrument->setProg(m_ui.ProgSpinBox->value() - 1); m_pInstrument->setName(m_ui.NameLineEdit->text()); m_pInstrument->setEngineName(m_ui.EngineNameComboBox->currentText()); m_pInstrument->setInstrumentFile(m_ui.InstrumentFileComboBox->currentText()); m_pInstrument->setInstrumentNr(m_ui.InstrumentNrComboBox->currentIndex()); m_pInstrument->setVolume(0.01f * float(m_ui.VolumeSpinBox->value())); m_pInstrument->setLoadMode(m_ui.LoadModeComboBox->currentIndex()); } // Save default engine name, instrument directory and history... pOptions->sInstrumentDir = QFileInfo( m_ui.InstrumentFileComboBox->currentText()).dir().absolutePath(); pOptions->sEngineName = m_ui.EngineNameComboBox->currentText(); pOptions->iMidiMap = m_ui.MapComboBox->currentIndex(); pOptions->iMidiBank = m_ui.BankSpinBox->value(); pOptions->iMidiProg = m_ui.ProgSpinBox->value(); pOptions->iVolume = m_ui.VolumeSpinBox->value(); pOptions->iLoadMode = m_ui.LoadModeComboBox->currentIndex(); pOptions->saveComboBoxHistory(m_ui.InstrumentFileComboBox); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void InstrumentForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Some channel 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; break; } } if (bReject) QDialog::reject(); } // Dirty up settings. void InstrumentForm::changed (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void InstrumentForm::stabilizeForm (void) { bool bValid = !m_ui.NameLineEdit->text().isEmpty() && m_ui.EngineNameComboBox->currentIndex() >= 0 && m_ui.EngineNameComboBox->currentText() != Channel::noEngineName(); const QString& sPath = m_ui.InstrumentFileComboBox->currentText(); bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); m_ui.DialogButtonBox->button( QDialogButtonBox::Ok)->setEnabled(m_iDirtyCount > 0 && bValid); } } // namespace QSampler // end of qsamplerInstrumentForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentListForm.h0000644000000000000000000000013212554456160021366 xustar0030 mtime=1437752432.762090073 30 atime=1437752432.762090073 30 ctime=1437752432.762090073 qsampler-0.3.1/src/qsamplerInstrumentListForm.h0000644000175000001440000000415112554456160022213 0ustar00rncbcusers00000000000000// qsamplerInstrumentListForm.h // /**************************************************************************** Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentListForm_h #define __qsamplerInstrumentListForm_h #include "ui_qsamplerInstrumentListForm.h" class QModelIndex; class QComboBox; namespace QSampler { class InstrumentListView; //------------------------------------------------------------------------- // QSampler::InstrumentListForm -- Instrument map list form interface. // class InstrumentListForm : public QMainWindow { Q_OBJECT public: InstrumentListForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); ~InstrumentListForm(); public slots: void newInstrument(); void editInstrument(); void editInstrument(const QModelIndex& index); void deleteInstrument(); void refreshInstruments(); void activateMap(int); void stabilizeForm(); protected: void showEvent(QShowEvent *); void hideEvent(QHideEvent *); void closeEvent(QCloseEvent *); void contextMenuEvent(QContextMenuEvent *); private: Ui::qsamplerInstrumentListForm m_ui; QComboBox *m_pMapComboBox; InstrumentListView *m_pInstrumentListView; }; } // namespace QSampler #endif // __qsamplerInstrumentListForm_h // end of qsamplerInstrumentListForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerAbout.h0000644000000000000000000000013212554456160016610 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsamplerAbout.h0000644000175000001440000000301612554456160017434 0ustar00rncbcusers00000000000000// qsamplerAbout.h // /**************************************************************************** Copyright (C) 2004-2015, 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 __qsamplerAbout_h #define __qsamplerAbout_h #include "config.h" #define QSAMPLER_TITLE PACKAGE_NAME #define QSAMPLER_VERSION PACKAGE_VERSION #define QSAMPLER_SUBTITLE "A LinuxSampler Qt GUI Interface" #define QSAMPLER_WEBSITE "http://qsampler.sourceforge.net" #define QSAMPLER_COPYRIGHT "Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved." #define QSAMPLER_COPYRIGHT2 "Copyright (C) 2007, Christian Schoenebeck" #define QSAMPLER_DOMAIN "linuxsampler.org" #endif // __qsamplerAbout_h // end of qsamplerAbout.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerMainForm.cpp0000644000000000000000000000013212554456160017601 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.762090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerMainForm.cpp0000644000175000001440000025443512554456160020442 0ustar00rncbcusers00000000000000// qsamplerMainForm.cpp // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007,2008,2015 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerMainForm.h" #include "qsamplerOptions.h" #include "qsamplerChannel.h" #include "qsamplerMessages.h" #include "qsamplerChannelStrip.h" #include "qsamplerInstrumentList.h" #include "qsamplerInstrumentListForm.h" #include "qsamplerDeviceForm.h" #include "qsamplerOptionsForm.h" #include "qsamplerDeviceStatusForm.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION >= 0x050000 #include #endif #if QT_VERSION < 0x040500 namespace Qt { const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); } #endif #ifdef HAVE_SIGNAL_H #include #endif #ifdef CONFIG_LIBGIG #include #endif // Needed for lroundf() #include #ifndef CONFIG_ROUND static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif // All winsock apps needs this. #if defined(WIN32) static WSADATA _wsaData; #endif //------------------------------------------------------------------------- // LADISH Level 1 support stuff. #if defined(HAVE_SIGNAL_H) && defined(HAVE_SYS_SOCKET_H) #include #include #include #include // File descriptor for SIGUSR1 notifier. static int g_fdUsr1[2]; // Unix SIGUSR1 signal handler. static void qsampler_sigusr1_handler ( int /* signo */ ) { char c = 1; (::write(g_fdUsr1[0], &c, sizeof(c)) > 0); } #endif // HAVE_SIGNAL_H //------------------------------------------------------------------------- // qsampler -- namespace namespace QSampler { // Timer constant stuff. #define QSAMPLER_TIMER_MSECS 200 // Status bar item indexes #define QSAMPLER_STATUS_CLIENT 0 // Client connection state. #define QSAMPLER_STATUS_SERVER 1 // Currenr server address (host:port) #define QSAMPLER_STATUS_CHANNEL 2 // Active channel caption. #define QSAMPLER_STATUS_SESSION 3 // Current session modification state. // Specialties for thread-callback comunication. #define QSAMPLER_LSCP_EVENT QEvent::Type(QEvent::User + 1) //------------------------------------------------------------------------- // LscpEvent -- specialty for LSCP callback comunication. class LscpEvent : public QEvent { public: // Constructor. LscpEvent(lscp_event_t event, const char *pchData, int cchData) : QEvent(QSAMPLER_LSCP_EVENT) { m_event = event; m_data = QString::fromUtf8(pchData, cchData); } // Accessors. lscp_event_t event() { return m_event; } QString& data() { return m_data; } private: // The proper event type. lscp_event_t m_event; // The event data as a string. QString m_data; }; //------------------------------------------------------------------------- // qsamplerMainForm -- Main window form implementation. // Kind of singleton reference. MainForm* MainForm::g_pMainForm = NULL; MainForm::MainForm ( QWidget *pParent ) : QMainWindow(pParent) { m_ui.setupUi(this); // Pseudo-singleton reference setup. g_pMainForm = this; // Initialize some pointer references. m_pOptions = NULL; // All child forms are to be created later, not earlier than setup. m_pMessages = NULL; m_pInstrumentListForm = NULL; m_pDeviceForm = NULL; // We'll start clean. m_iUntitled = 0; m_iDirtyCount = 0; m_pServer = NULL; m_pClient = NULL; m_iStartDelay = 0; m_iTimerDelay = 0; m_iTimerSlot = 0; #if defined(HAVE_SIGNAL_H) && defined(HAVE_SYS_SOCKET_H) // Set to ignore any fatal "Broken pipe" signals. ::signal(SIGPIPE, SIG_IGN); // LADISH Level 1 suport. // Initialize file descriptors for SIGUSR1 socket notifier. ::socketpair(AF_UNIX, SOCK_STREAM, 0, g_fdUsr1); m_pUsr1Notifier = new QSocketNotifier(g_fdUsr1[1], QSocketNotifier::Read, this); QObject::connect(m_pUsr1Notifier, SIGNAL(activated(int)), SLOT(handle_sigusr1())); // Install SIGUSR1 signal handler. struct sigaction usr1; usr1.sa_handler = qsampler_sigusr1_handler; sigemptyset(&usr1.sa_mask); usr1.sa_flags = 0; usr1.sa_flags |= SA_RESTART; ::sigaction(SIGUSR1, &usr1, NULL); #else // HAVE_SIGNAL_H m_pUsr1Notifier = NULL; #endif // !HAVE_SIGNAL_H #ifdef CONFIG_VOLUME // Make some extras into the toolbar... const QString& sVolumeText = tr("Master volume"); m_iVolumeChanging = 0; // Volume slider... m_ui.channelsToolbar->addSeparator(); m_pVolumeSlider = new QSlider(Qt::Horizontal, m_ui.channelsToolbar); m_pVolumeSlider->setTickPosition(QSlider::TicksBothSides); m_pVolumeSlider->setTickInterval(10); m_pVolumeSlider->setPageStep(10); m_pVolumeSlider->setSingleStep(10); m_pVolumeSlider->setMinimum(0); m_pVolumeSlider->setMaximum(100); m_pVolumeSlider->setMaximumHeight(26); m_pVolumeSlider->setMinimumWidth(160); m_pVolumeSlider->setToolTip(sVolumeText); QObject::connect(m_pVolumeSlider, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); m_ui.channelsToolbar->addWidget(m_pVolumeSlider); // Volume spin-box m_ui.channelsToolbar->addSeparator(); m_pVolumeSpinBox = new QSpinBox(m_ui.channelsToolbar); m_pVolumeSpinBox->setSuffix(" %"); m_pVolumeSpinBox->setMinimum(0); m_pVolumeSpinBox->setMaximum(100); m_pVolumeSpinBox->setToolTip(sVolumeText); QObject::connect(m_pVolumeSpinBox, SIGNAL(valueChanged(int)), SLOT(volumeChanged(int))); m_ui.channelsToolbar->addWidget(m_pVolumeSpinBox); #endif // Make it an MDI workspace. m_pWorkspace = new QMdiArea(this); m_pWorkspace->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_pWorkspace->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); // Set the activation connection. QObject::connect(m_pWorkspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), SLOT(activateStrip(QMdiSubWindow *))); // Make it shine :-) setCentralWidget(m_pWorkspace); // Create some statusbar labels... QLabel *pLabel; // Client status. pLabel = new QLabel(tr("Connected"), this); pLabel->setAlignment(Qt::AlignLeft); pLabel->setMinimumSize(pLabel->sizeHint()); m_statusItem[QSAMPLER_STATUS_CLIENT] = pLabel; statusBar()->addWidget(pLabel); // Server address. pLabel = new QLabel(this); pLabel->setAlignment(Qt::AlignLeft); m_statusItem[QSAMPLER_STATUS_SERVER] = pLabel; statusBar()->addWidget(pLabel, 1); // Channel title. pLabel = new QLabel(this); pLabel->setAlignment(Qt::AlignLeft); m_statusItem[QSAMPLER_STATUS_CHANNEL] = pLabel; statusBar()->addWidget(pLabel, 2); // Session modification status. pLabel = new QLabel(tr("MOD"), this); pLabel->setAlignment(Qt::AlignHCenter); pLabel->setMinimumSize(pLabel->sizeHint()); m_statusItem[QSAMPLER_STATUS_SESSION] = pLabel; statusBar()->addWidget(pLabel); #if defined(WIN32) WSAStartup(MAKEWORD(1, 1), &_wsaData); #endif // Some actions surely need those // shortcuts firmly attached... addAction(m_ui.viewMenubarAction); addAction(m_ui.viewToolbarAction); QObject::connect(m_ui.fileNewAction, SIGNAL(triggered()), SLOT(fileNew())); QObject::connect(m_ui.fileOpenAction, SIGNAL(triggered()), SLOT(fileOpen())); QObject::connect(m_ui.fileSaveAction, SIGNAL(triggered()), SLOT(fileSave())); QObject::connect(m_ui.fileSaveAsAction, SIGNAL(triggered()), SLOT(fileSaveAs())); QObject::connect(m_ui.fileResetAction, SIGNAL(triggered()), SLOT(fileReset())); QObject::connect(m_ui.fileRestartAction, SIGNAL(triggered()), SLOT(fileRestart())); QObject::connect(m_ui.fileExitAction, SIGNAL(triggered()), SLOT(fileExit())); QObject::connect(m_ui.editAddChannelAction, SIGNAL(triggered()), SLOT(editAddChannel())); QObject::connect(m_ui.editRemoveChannelAction, SIGNAL(triggered()), SLOT(editRemoveChannel())); QObject::connect(m_ui.editSetupChannelAction, SIGNAL(triggered()), SLOT(editSetupChannel())); QObject::connect(m_ui.editEditChannelAction, SIGNAL(triggered()), SLOT(editEditChannel())); QObject::connect(m_ui.editResetChannelAction, SIGNAL(triggered()), SLOT(editResetChannel())); QObject::connect(m_ui.editResetAllChannelsAction, SIGNAL(triggered()), SLOT(editResetAllChannels())); QObject::connect(m_ui.viewMenubarAction, SIGNAL(toggled(bool)), SLOT(viewMenubar(bool))); QObject::connect(m_ui.viewToolbarAction, SIGNAL(toggled(bool)), SLOT(viewToolbar(bool))); QObject::connect(m_ui.viewStatusbarAction, SIGNAL(toggled(bool)), SLOT(viewStatusbar(bool))); QObject::connect(m_ui.viewMessagesAction, SIGNAL(toggled(bool)), SLOT(viewMessages(bool))); QObject::connect(m_ui.viewInstrumentsAction, SIGNAL(triggered()), SLOT(viewInstruments())); QObject::connect(m_ui.viewDevicesAction, SIGNAL(triggered()), SLOT(viewDevices())); QObject::connect(m_ui.viewOptionsAction, SIGNAL(triggered()), SLOT(viewOptions())); QObject::connect(m_ui.channelsArrangeAction, SIGNAL(triggered()), SLOT(channelsArrange())); QObject::connect(m_ui.channelsAutoArrangeAction, SIGNAL(toggled(bool)), SLOT(channelsAutoArrange(bool))); QObject::connect(m_ui.helpAboutAction, SIGNAL(triggered()), SLOT(helpAbout())); QObject::connect(m_ui.helpAboutQtAction, SIGNAL(triggered()), SLOT(helpAboutQt())); QObject::connect(m_ui.fileMenu, SIGNAL(aboutToShow()), SLOT(updateRecentFilesMenu())); QObject::connect(m_ui.channelsMenu, SIGNAL(aboutToShow()), SLOT(channelsMenuAboutToShow())); #ifdef CONFIG_VOLUME QObject::connect(m_ui.channelsToolbar, SIGNAL(orientationChanged(Qt::Orientation)), SLOT(channelsToolbarOrientation(Qt::Orientation))); #endif } // Destructor. MainForm::~MainForm() { // Do final processing anyway. processServerExit(); #if defined(WIN32) WSACleanup(); #endif #if defined(HAVE_SIGNAL_H) && defined(HAVE_SYS_SOCKET_H) if (m_pUsr1Notifier) delete m_pUsr1Notifier; #endif // Finally drop any widgets around... if (m_pDeviceForm) delete m_pDeviceForm; if (m_pInstrumentListForm) delete m_pInstrumentListForm; if (m_pMessages) delete m_pMessages; if (m_pWorkspace) delete m_pWorkspace; // Delete status item labels one by one. if (m_statusItem[QSAMPLER_STATUS_CLIENT]) delete m_statusItem[QSAMPLER_STATUS_CLIENT]; if (m_statusItem[QSAMPLER_STATUS_SERVER]) delete m_statusItem[QSAMPLER_STATUS_SERVER]; if (m_statusItem[QSAMPLER_STATUS_CHANNEL]) delete m_statusItem[QSAMPLER_STATUS_CHANNEL]; if (m_statusItem[QSAMPLER_STATUS_SESSION]) delete m_statusItem[QSAMPLER_STATUS_SESSION]; #ifdef CONFIG_VOLUME delete m_pVolumeSpinBox; delete m_pVolumeSlider; #endif // Pseudo-singleton reference shut-down. g_pMainForm = NULL; } // Make and set a proper setup options step. void MainForm::setup ( Options *pOptions ) { // We got options? m_pOptions = pOptions; // What style do we create these forms? Qt::WindowFlags wflags = Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint; if (m_pOptions->bKeepOnTop) wflags |= Qt::Tool; // Some child forms are to be created right now. m_pMessages = new Messages(this); m_pDeviceForm = new DeviceForm(this, wflags); #ifdef CONFIG_MIDI_INSTRUMENT m_pInstrumentListForm = new InstrumentListForm(this, wflags); #else m_ui.viewInstrumentsAction->setEnabled(false); #endif // Setup messages logging appropriately... m_pMessages->setLogging( m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); // Set message defaults... updateMessagesFont(); updateMessagesLimit(); updateMessagesCapture(); // Set the visibility signal. QObject::connect(m_pMessages, SIGNAL(visibilityChanged(bool)), SLOT(stabilizeForm())); // Initial decorations toggle state. m_ui.viewMenubarAction->setChecked(m_pOptions->bMenubar); m_ui.viewToolbarAction->setChecked(m_pOptions->bToolbar); m_ui.viewStatusbarAction->setChecked(m_pOptions->bStatusbar); m_ui.channelsAutoArrangeAction->setChecked(m_pOptions->bAutoArrange); // Initial decorations visibility state. viewMenubar(m_pOptions->bMenubar); viewToolbar(m_pOptions->bToolbar); viewStatusbar(m_pOptions->bStatusbar); addDockWidget(Qt::BottomDockWidgetArea, m_pMessages); // Restore whole dock windows state. QByteArray aDockables = m_pOptions->settings().value( "/Layout/DockWindows").toByteArray(); if (!aDockables.isEmpty()) { restoreState(aDockables); } // Try to restore old window positioning and initial visibility. m_pOptions->loadWidgetGeometry(this, true); m_pOptions->loadWidgetGeometry(m_pInstrumentListForm); m_pOptions->loadWidgetGeometry(m_pDeviceForm); // Final startup stabilization... updateMaxVolume(); updateRecentFilesMenu(); stabilizeForm(); // Make it ready :-) statusBar()->showMessage(tr("Ready"), 3000); // We'll try to start immediately... startSchedule(0); // Register the first timer slot. QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot())); } // Window close event handlers. bool MainForm::queryClose (void) { bool bQueryClose = closeSession(false); // Try to save current general state... if (m_pOptions) { // Some windows default fonts is here on demand too. if (bQueryClose && m_pMessages) m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); // Try to save current positioning. if (bQueryClose) { // Save decorations state. m_pOptions->bMenubar = m_ui.MenuBar->isVisible(); m_pOptions->bToolbar = (m_ui.fileToolbar->isVisible() || m_ui.editToolbar->isVisible() || m_ui.channelsToolbar->isVisible()); m_pOptions->bStatusbar = statusBar()->isVisible(); // Save the dock windows state. const QString sDockables = saveState().toBase64().data(); m_pOptions->settings().setValue("/Layout/DockWindows", saveState()); // And the children, and the main windows state,. m_pOptions->saveWidgetGeometry(m_pDeviceForm); m_pOptions->saveWidgetGeometry(m_pInstrumentListForm); m_pOptions->saveWidgetGeometry(this, true); // Close popup widgets. if (m_pInstrumentListForm) m_pInstrumentListForm->close(); if (m_pDeviceForm) m_pDeviceForm->close(); // Stop client and/or server, gracefully. stopServer(true /*interactive*/); } } return bQueryClose; } void MainForm::closeEvent ( QCloseEvent *pCloseEvent ) { if (queryClose()) { DeviceStatusForm::deleteAllInstances(); pCloseEvent->accept(); } else pCloseEvent->ignore(); } // Window drag-n-drop event handlers. void MainForm::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) { // Accept external drags only... if (pDragEnterEvent->source() == NULL && pDragEnterEvent->mimeData()->hasUrls()) { pDragEnterEvent->accept(); } else { pDragEnterEvent->ignore(); } } void MainForm::dropEvent ( QDropEvent* pDropEvent ) { // Accept externally originated drops only... if (pDropEvent->source()) return; const QMimeData *pMimeData = pDropEvent->mimeData(); if (pMimeData->hasUrls()) { QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sPath = iter.next().toLocalFile(); // if (Channel::isDlsInstrumentFile(sPath)) { if (QFileInfo(sPath).exists()) { // Try to create a new channel from instrument file... Channel *pChannel = new Channel(); if (pChannel == NULL) return; // Start setting the instrument filename... pChannel->setInstrument(sPath, 0); // Before we show it up, may be we'll // better ask for some initial values? if (!pChannel->channelSetup(this)) { delete pChannel; return; } // Finally, give it to a new channel strip... if (!createChannelStrip(pChannel)) { delete pChannel; return; } // Make that an overall update. m_iDirtyCount++; stabilizeForm(); } // Otherwise, load an usual session file (LSCP script)... else if (closeSession(true)) { loadSessionFile(sPath); break; } } // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } } // Custome event handler. void MainForm::customEvent ( QEvent* pEvent ) { // For the time being, just pump it to messages. if (pEvent->type() == QSAMPLER_LSCP_EVENT) { LscpEvent *pLscpEvent = static_cast (pEvent); switch (pLscpEvent->event()) { case LSCP_EVENT_CHANNEL_COUNT: updateAllChannelStrips(true); break; case LSCP_EVENT_CHANNEL_INFO: { int iChannelID = pLscpEvent->data().toInt(); ChannelStrip *pChannelStrip = channelStrip(iChannelID); if (pChannelStrip) channelStripChanged(pChannelStrip); break; } case LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); DeviceStatusForm::onDevicesChanged(); updateViewMidiDeviceStatusMenu(); break; case LSCP_EVENT_MIDI_INPUT_DEVICE_INFO: { if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); const int iDeviceID = pLscpEvent->data().section(' ', 0, 0).toInt(); DeviceStatusForm::onDeviceChanged(iDeviceID); break; } case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); break; case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); break; #if CONFIG_EVENT_CHANNEL_MIDI case LSCP_EVENT_CHANNEL_MIDI: { const int iChannelID = pLscpEvent->data().section(' ', 0, 0).toInt(); ChannelStrip *pChannelStrip = channelStrip(iChannelID); if (pChannelStrip) pChannelStrip->midiActivityLedOn(); break; } #endif #if CONFIG_EVENT_DEVICE_MIDI case LSCP_EVENT_DEVICE_MIDI: { const int iDeviceID = pLscpEvent->data().section(' ', 0, 0).toInt(); const int iPortID = pLscpEvent->data().section(' ', 1, 1).toInt(); DeviceStatusForm *pDeviceStatusForm = DeviceStatusForm::getInstance(iDeviceID); if (pDeviceStatusForm) pDeviceStatusForm->midiArrived(iPortID); break; } #endif default: appendMessagesColor(tr("LSCP Event: %1 data: %2") .arg(::lscp_event_to_text(pLscpEvent->event())) .arg(pLscpEvent->data()), "#996699"); } } } // LADISH Level 1 -- SIGUSR1 signal handler. void MainForm::handle_sigusr1 (void) { #if defined(HAVE_SIGNAL_H) && defined(HAVE_SYS_SOCKET_H) char c; if (::read(g_fdUsr1[1], &c, sizeof(c)) > 0) saveSession(false); #endif } void MainForm::updateViewMidiDeviceStatusMenu (void) { m_ui.viewMidiDeviceStatusMenu->clear(); const std::map statusForms = DeviceStatusForm::getInstances(); std::map::const_iterator iter = statusForms.begin(); for ( ; iter != statusForms.end(); ++iter) { DeviceStatusForm *pStatusForm = iter->second; m_ui.viewMidiDeviceStatusMenu->addAction( pStatusForm->visibleAction()); } } // Context menu event handler. void MainForm::contextMenuEvent( QContextMenuEvent *pEvent ) { stabilizeForm(); m_ui.editMenu->exec(pEvent->globalPos()); } //------------------------------------------------------------------------- // qsamplerMainForm -- Brainless public property accessors. // The global options settings property. Options *MainForm::options (void) const { return m_pOptions; } // The LSCP client descriptor property. lscp_client_t *MainForm::client (void) const { return m_pClient; } // The pseudo-singleton instance accessor. MainForm *MainForm::getInstance (void) { return g_pMainForm; } //------------------------------------------------------------------------- // qsamplerMainForm -- Session file stuff. // Format the displayable session filename. QString MainForm::sessionName ( const QString& sFilename ) { bool bCompletePath = (m_pOptions && m_pOptions->bCompletePath); QString sSessionName = sFilename; if (sSessionName.isEmpty()) sSessionName = tr("Untitled") + QString::number(m_iUntitled); else if (!bCompletePath) sSessionName = QFileInfo(sSessionName).fileName(); return sSessionName; } // Create a new session file from scratch. bool MainForm::newSession (void) { // Check if we can do it. if (!closeSession(true)) return false; // Give us what the server has, right now... updateSession(); // Ok increment untitled count. m_iUntitled++; // Stabilize form. m_sFilename = QString::null; m_iDirtyCount = 0; appendMessages(tr("New session: \"%1\".").arg(sessionName(m_sFilename))); stabilizeForm(); return true; } // Open an existing sampler session. bool MainForm::openSession (void) { if (m_pOptions == NULL) return false; // Ask for the filename to open... QString sFilename = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Open Session"), // Caption. m_pOptions->sSessionDir, // Start here. tr("LSCP Session files") + " (*.lscp)" // Filter (LSCP files) ); // Have we cancelled? if (sFilename.isEmpty()) return false; // Check if we're going to discard safely the current one... if (!closeSession(true)) return false; // Load it right away. return loadSessionFile(sFilename); } // Save current sampler session with another name. bool MainForm::saveSession ( bool bPrompt ) { if (m_pOptions == NULL) return false; QString sFilename = m_sFilename; // Ask for the file to save, if there's none... if (bPrompt || sFilename.isEmpty()) { // If none is given, assume default directory. if (sFilename.isEmpty()) sFilename = m_pOptions->sSessionDir; // Prompt the guy... sFilename = QFileDialog::getSaveFileName(this, QSAMPLER_TITLE ": " + tr("Save Session"), // Caption. sFilename, // Start here. tr("LSCP Session files") + " (*.lscp)" // Filter (LSCP files) ); // Have we cancelled it? if (sFilename.isEmpty()) return false; // Enforce .lscp extension... if (QFileInfo(sFilename).suffix().isEmpty()) sFilename += ".lscp"; // Check if already exists... if (sFilename != m_sFilename && QFileInfo(sFilename).exists()) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("The file already exists:\n\n" "\"%1\"\n\n" "Do you want to replace it?") .arg(sFilename), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return false; } } // Save it right away. return saveSessionFile(sFilename); } // Close current session. bool MainForm::closeSession ( bool bForce ) { bool bClose = true; // Are we dirty enough to prompt it? if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("The current session has been changed:\n\n" "\"%1\"\n\n" "Do you want to save the changes?") .arg(sessionName(m_sFilename)), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Save: bClose = saveSession(false); // Fall thru.... case QMessageBox::Discard: break; default: // Cancel. bClose = false; break; } } // If we may close it, dot it. if (bClose) { // Remove all channel strips from sight... m_pWorkspace->setUpdatesEnabled(false); QList wlist = m_pWorkspace->subWindowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (bForce && pChannel) pChannel->removeChannel(); delete pChannelStrip; } if (pMdiSubWindow) delete pMdiSubWindow; } m_pWorkspace->setUpdatesEnabled(true); // We're now clean, for sure. m_iDirtyCount = 0; } return bClose; } // Load a session from specific file path. bool MainForm::loadSessionFile ( const QString& sFilename ) { if (m_pClient == NULL) return false; // Open and read from real file. QFile file(sFilename); if (!file.open(QIODevice::ReadOnly)) { appendMessagesError( tr("Could not open \"%1\" session file.\n\nSorry.") .arg(sFilename)); return false; } // Tell the world we'll take some time... QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // Read the file. int iLine = 0; int iErrors = 0; QTextStream ts(&file); while (!ts.atEnd()) { // Read the line. QString sCommand = ts.readLine().trimmed(); iLine++; // If not empty, nor a comment, call the server... if (!sCommand.isEmpty() && sCommand[0] != '#') { // Remember that, no matter what, // all LSCP commands are CR/LF terminated. sCommand += "\r\n"; if (::lscp_client_query(m_pClient, sCommand.toUtf8().constData()) != LSCP_OK) { appendMessagesColor(QString("%1(%2): %3") .arg(QFileInfo(sFilename).fileName()).arg(iLine) .arg(sCommand.simplified()), "#996633"); appendMessagesClient("lscp_client_query"); iErrors++; } } // Try to make it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Ok. we've read it. file.close(); // Now we'll try to create (update) the whole GUI session. updateSession(); // We're fornerly done. QApplication::restoreOverrideCursor(); // Have we any errors? if (iErrors > 0) { appendMessagesError( tr("Session loaded with errors\nfrom \"%1\".\n\nSorry.") .arg(sFilename)); } // Save as default session directory. if (m_pOptions) m_pOptions->sSessionDir = QFileInfo(sFilename).dir().absolutePath(); // We're not dirty anymore, if loaded without errors, m_iDirtyCount = iErrors; // Stabilize form... m_sFilename = sFilename; updateRecentFiles(sFilename); appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename))); // Make that an overall update. stabilizeForm(); return true; } // Save current session to specific file path. bool MainForm::saveSessionFile ( const QString& sFilename ) { if (m_pClient == NULL) return false; // Check whether server is apparently OK... if (::lscp_get_channels(m_pClient) < 0) { appendMessagesClient("lscp_get_channels"); return false; } // Open and write into real file. QFile file(sFilename); if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) { appendMessagesError( tr("Could not open \"%1\" session file.\n\nSorry.") .arg(sFilename)); return false; } // Tell the world we'll take some time... QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); // Write the file. int iErrors = 0; QTextStream ts(&file); ts << "# " << QSAMPLER_TITLE " - " << tr(QSAMPLER_SUBTITLE) << endl; ts << "# " << tr("Version") << ": " QSAMPLER_VERSION << endl; ts << "# " << tr("Build") << ": " __DATE__ " " __TIME__ << endl; ts << "#" << endl; ts << "# " << tr("File") << ": " << QFileInfo(sFilename).fileName() << endl; ts << "# " << tr("Date") << ": " << QDate::currentDate().toString("MMM dd yyyy") << " " << QTime::currentTime().toString("hh:mm:ss") << endl; ts << "#" << endl; ts << endl; // It is assumed that this new kind of device+session file // will be loaded from a complete initialized server... int *piDeviceIDs; int iDevice; ts << "RESET" << endl; // Audio device mapping. QMap audioDeviceMap; piDeviceIDs = Device::getDevices(m_pClient, Device::Audio); for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { ts << endl; Device device(Device::Audio, piDeviceIDs[iDevice]); // Audio device specification... ts << "# " << device.deviceTypeName() << " " << device.driverName() << " " << tr("Device") << " " << iDevice << endl; ts << "CREATE AUDIO_OUTPUT_DEVICE " << device.driverName(); DeviceParamMap::ConstIterator deviceParam; for (deviceParam = device.params().begin(); deviceParam != device.params().end(); ++deviceParam) { const DeviceParam& param = deviceParam.value(); if (param.value.isEmpty()) ts << "# "; ts << " " << deviceParam.key() << "='" << param.value << "'"; } ts << endl; // Audio channel parameters... int iPort = 0; QListIterator iter(device.ports()); while (iter.hasNext()) { DevicePort *pPort = iter.next(); DeviceParamMap::ConstIterator portParam; for (portParam = pPort->params().begin(); portParam != pPort->params().end(); ++portParam) { const DeviceParam& param = portParam.value(); if (param.fix || param.value.isEmpty()) ts << "# "; ts << "SET AUDIO_OUTPUT_CHANNEL_PARAMETER " << iDevice << " " << iPort << " " << portParam.key() << "='" << param.value << "'" << endl; } iPort++; } // Audio device index/id mapping. audioDeviceMap[device.deviceID()] = iDevice; // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // MIDI device mapping. QMap midiDeviceMap; piDeviceIDs = Device::getDevices(m_pClient, Device::Midi); for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { ts << endl; Device device(Device::Midi, piDeviceIDs[iDevice]); // MIDI device specification... ts << "# " << device.deviceTypeName() << " " << device.driverName() << " " << tr("Device") << " " << iDevice << endl; ts << "CREATE MIDI_INPUT_DEVICE " << device.driverName(); DeviceParamMap::ConstIterator deviceParam; for (deviceParam = device.params().begin(); deviceParam != device.params().end(); ++deviceParam) { const DeviceParam& param = deviceParam.value(); if (param.value.isEmpty()) ts << "# "; ts << " " << deviceParam.key() << "='" << param.value << "'"; } ts << endl; // MIDI port parameters... int iPort = 0; QListIterator iter(device.ports()); while (iter.hasNext()) { DevicePort *pPort = iter.next(); DeviceParamMap::ConstIterator portParam; for (portParam = pPort->params().begin(); portParam != pPort->params().end(); ++portParam) { const DeviceParam& param = portParam.value(); if (param.fix || param.value.isEmpty()) ts << "# "; ts << "SET MIDI_INPUT_PORT_PARAMETER " << iDevice << " " << iPort << " " << portParam.key() << "='" << param.value << "'" << endl; } iPort++; } // MIDI device index/id mapping. midiDeviceMap[device.deviceID()] = iDevice; // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } ts << endl; #ifdef CONFIG_MIDI_INSTRUMENT // MIDI instrument mapping... QMap midiInstrumentMap; int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient); for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) { int iMidiMap = piMaps[iMap]; const char *pszMapName = ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap); ts << "# " << tr("MIDI instrument map") << " " << iMap; if (pszMapName) ts << " - " << pszMapName; ts << endl; ts << "ADD MIDI_INSTRUMENT_MAP"; if (pszMapName) ts << " '" << pszMapName << "'"; ts << endl; // MIDI instrument mapping... lscp_midi_instrument_t *pInstrs = ::lscp_list_midi_instruments(m_pClient, iMidiMap); for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; iInstr++) { lscp_midi_instrument_info_t *pInstrInfo = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]); if (pInstrInfo) { ts << "MAP MIDI_INSTRUMENT " << iMap << " " << pInstrs[iInstr].bank << " " << pInstrs[iInstr].prog << " " << pInstrInfo->engine_name << " '" << pInstrInfo->instrument_file << "' " << pInstrInfo->instrument_nr << " " << pInstrInfo->volume << " "; switch (pInstrInfo->load_mode) { case LSCP_LOAD_PERSISTENT: ts << "PERSISTENT"; break; case LSCP_LOAD_ON_DEMAND_HOLD: ts << "ON_DEMAND_HOLD"; break; case LSCP_LOAD_ON_DEMAND: case LSCP_LOAD_DEFAULT: default: ts << "ON_DEMAND"; break; } if (pInstrInfo->name) ts << " '" << pInstrInfo->name << "'"; ts << endl; } // Check for errors... else if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_get_midi_instrument_info"); iErrors++; } // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } ts << endl; // Check for errors... if (pInstrs == NULL && ::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_midi_instruments"); iErrors++; } // MIDI strument index/id mapping. midiInstrumentMap[iMidiMap] = iMap; } // Check for errors... if (piMaps == NULL && ::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_midi_instrument_maps"); iErrors++; } #endif // CONFIG_MIDI_INSTRUMENT // Sampler channel mapping. QList wlist = m_pWorkspace->subWindowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (pChannel) { ts << "# " << tr("Channel") << " " << iChannel << endl; ts << "ADD CHANNEL" << endl; if (audioDeviceMap.isEmpty()) { ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannel << " " << pChannel->audioDriver() << endl; } else { ts << "SET CHANNEL AUDIO_OUTPUT_DEVICE " << iChannel << " " << audioDeviceMap[pChannel->audioDevice()] << endl; } if (midiDeviceMap.isEmpty()) { ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannel << " " << pChannel->midiDriver() << endl; } else { ts << "SET CHANNEL MIDI_INPUT_DEVICE " << iChannel << " " << midiDeviceMap[pChannel->midiDevice()] << endl; } ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannel << " " << pChannel->midiPort() << endl; ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannel << " "; if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) ts << "ALL"; else ts << pChannel->midiChannel(); ts << endl; ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; if (pChannel->instrumentStatus() < 100) ts << "# "; ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; ChannelRoutingMap::ConstIterator audioRoute; for (audioRoute = pChannel->audioRouting().begin(); audioRoute != pChannel->audioRouting().end(); ++audioRoute) { ts << "SET CHANNEL AUDIO_OUTPUT_CHANNEL " << iChannel << " " << audioRoute.key() << " " << audioRoute.value() << endl; } ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; if (pChannel->channelMute()) ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl; if (pChannel->channelSolo()) ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl; #ifdef CONFIG_MIDI_INSTRUMENT if (pChannel->midiMap() >= 0) { ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel << " " << midiInstrumentMap[pChannel->midiMap()] << endl; } #endif #ifdef CONFIG_FXSEND int iChannelID = pChannel->channelID(); int *piFxSends = ::lscp_list_fxsends(m_pClient, iChannelID); for (int iFxSend = 0; piFxSends && piFxSends[iFxSend] >= 0; iFxSend++) { lscp_fxsend_info_t *pFxSendInfo = ::lscp_get_fxsend_info( m_pClient, iChannelID, piFxSends[iFxSend]); if (pFxSendInfo) { ts << "CREATE FX_SEND " << iChannel << " " << pFxSendInfo->midi_controller; if (pFxSendInfo->name) ts << " '" << pFxSendInfo->name << "'"; ts << endl; int *piRouting = pFxSendInfo->audio_routing; for (int iAudioSrc = 0; piRouting && piRouting[iAudioSrc] >= 0; iAudioSrc++) { ts << "SET FX_SEND AUDIO_OUTPUT_CHANNEL " << iChannel << " " << iFxSend << " " << iAudioSrc << " " << piRouting[iAudioSrc] << endl; } #ifdef CONFIG_FXSEND_LEVEL ts << "SET FX_SEND LEVEL " << iChannel << " " << iFxSend << " " << pFxSendInfo->level << endl; #endif } // Check for errors... else if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_get_fxsend_info"); iErrors++; } } #endif ts << endl; } } // Try to keep it snappy :) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } #ifdef CONFIG_VOLUME ts << "# " << tr("Global volume level") << endl; ts << "SET VOLUME " << ::lscp_get_volume(m_pClient) << endl; ts << endl; #endif // Ok. we've wrote it. file.close(); // We're fornerly done. QApplication::restoreOverrideCursor(); // Have we any errors? if (iErrors > 0) { appendMessagesError( tr("Some settings could not be saved\n" "to \"%1\" session file.\n\nSorry.") .arg(sFilename)); } // Save as default session directory. if (m_pOptions) m_pOptions->sSessionDir = QFileInfo(sFilename).dir().absolutePath(); // We're not dirty anymore. m_iDirtyCount = 0; // Stabilize form... m_sFilename = sFilename; updateRecentFiles(sFilename); appendMessages(tr("Save session: \"%1\".").arg(sessionName(m_sFilename))); stabilizeForm(); return true; } // Session change receiver slot. void MainForm::sessionDirty (void) { // Just mark the dirty form. m_iDirtyCount++; // and update the form status... stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- File Action slots. // Create a new sampler session. void MainForm::fileNew (void) { // Of course we'll start clean new. newSession(); } // Open an existing sampler session. void MainForm::fileOpen (void) { // Open it right away. openSession(); } // Open a recent file session. void MainForm::fileOpenRecent (void) { // Retrive filename index from action data... QAction *pAction = qobject_cast (sender()); if (pAction && m_pOptions) { int iIndex = pAction->data().toInt(); if (iIndex >= 0 && iIndex < m_pOptions->recentFiles.count()) { QString sFilename = m_pOptions->recentFiles[iIndex]; // Check if we can safely close the current session... if (!sFilename.isEmpty() && closeSession(true)) loadSessionFile(sFilename); } } } // Save current sampler session. void MainForm::fileSave (void) { // Save it right away. saveSession(false); } // Save current sampler session with another name. void MainForm::fileSaveAs (void) { // Save it right away, maybe with another name. saveSession(true); } // Reset the sampler instance. void MainForm::fileReset (void) { if (m_pClient == NULL) return; // Ask user whether he/she want's an internal sampler reset... if (m_pOptions && m_pOptions->bConfirmReset) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Warning"); const QString& sText = tr( "Resetting the sampler instance will close\n" "all device and channel configurations.\n\n" "Please note that this operation may cause\n" "temporary MIDI and Audio disruption.\n\n" "Do you want to reset the sampler engine now?"); #if 0 if (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() == QMessageBox::Cancel) return; if (cbox.isChecked()) m_pOptions->bConfirmReset = false; #endif } // Trye closing the current session, first... if (!closeSession(true)) return; // Just do the reset, after closing down current session... // Do the actual sampler reset... if (::lscp_reset_sampler(m_pClient) != LSCP_OK) { appendMessagesClient("lscp_reset_sampler"); appendMessagesError(tr("Could not reset sampler instance.\n\nSorry.")); return; } // Log this. appendMessages(tr("Sampler reset.")); // Make it a new session... newSession(); } // Restart the client/server instance. void MainForm::fileRestart (void) { if (m_pOptions == NULL) return; bool bRestart = true; // Ask user whether he/she want's a complete restart... // (if we're currently up and running) if (m_pOptions && m_pOptions->bConfirmRestart) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Warning"); const QString& sText = tr( "New settings will be effective after\n" "restarting the client/server connection.\n\n" "Please note that this operation may cause\n" "temporary MIDI and Audio disruption.\n\n" "Do you want to restart the connection now?"); #if 0 if (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) bRestart = false; #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() == QMessageBox::Cancel) bRestart = false; else if (cbox.isChecked()) m_pOptions->bConfirmRestart = false; #endif } // Are we still for it? if (bRestart && closeSession(true)) { // Stop server, it will force the client too. stopServer(); // Reschedule a restart... startSchedule(m_pOptions->iStartDelay); } } // Exit application program. void MainForm::fileExit (void) { // Go for close the whole thing. close(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Edit Action slots. // Add a new sampler channel. void MainForm::editAddChannel (void) { if (m_pClient == NULL) return; // Just create the channel instance... Channel *pChannel = new Channel(); if (pChannel == NULL) return; // Before we show it up, may be we'll // better ask for some initial values? if (!pChannel->channelSetup(this)) { delete pChannel; return; } // And give it to the strip... // (will own the channel instance, if successful). if (!createChannelStrip(pChannel)) { delete pChannel; return; } // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // Make that an overall update. m_iDirtyCount++; stabilizeForm(); } // Remove current sampler channel. void MainForm::editRemoveChannel (void) { if (m_pClient == NULL) return; ChannelStrip *pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; Channel *pChannel = pChannelStrip->channel(); if (pChannel == NULL) return; // Prompt user if he/she's sure about this... if (m_pOptions && m_pOptions->bConfirmRemove) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Warning"); const QString& sText = tr( "About to remove channel:\n\n" "%1\n\n" "Are you sure?") .arg(pChannelStrip->windowTitle()); #if 0 if (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() == QMessageBox::Cancel) return; if (cbox.isChecked()) m_pOptions->bConfirmRemove = false; #endif } // Remove the existing sampler channel. if (!pChannel->removeChannel()) return; // We'll be dirty, for sure... m_iDirtyCount++; // Just delete the channel strip. destroyChannelStrip(pChannelStrip); } // Setup current sampler channel. void MainForm::editSetupChannel (void) { if (m_pClient == NULL) return; ChannelStrip *pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelSetup(); } // Edit current sampler channel. void MainForm::editEditChannel (void) { if (m_pClient == NULL) return; ChannelStrip *pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelEdit(); } // Reset current sampler channel. void MainForm::editResetChannel (void) { if (m_pClient == NULL) return; ChannelStrip *pChannelStrip = activeChannelStrip(); if (pChannelStrip == NULL) return; // Just invoque the channel strip procedure. pChannelStrip->channelReset(); } // Reset all sampler channels. void MainForm::editResetAllChannels (void) { if (m_pClient == NULL) return; // Invoque the channel strip procedure, // for all channels out there... m_pWorkspace->setUpdatesEnabled(false); QList wlist = m_pWorkspace->subWindowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) pChannelStrip->channelReset(); } m_pWorkspace->setUpdatesEnabled(true); } //------------------------------------------------------------------------- // qsamplerMainForm -- View Action slots. // Show/hide the main program window menubar. void MainForm::viewMenubar ( bool bOn ) { if (bOn) m_ui.MenuBar->show(); else m_ui.MenuBar->hide(); } // Show/hide the main program window toolbar. void MainForm::viewToolbar ( bool bOn ) { if (bOn) { m_ui.fileToolbar->show(); m_ui.editToolbar->show(); m_ui.channelsToolbar->show(); } else { m_ui.fileToolbar->hide(); m_ui.editToolbar->hide(); m_ui.channelsToolbar->hide(); } } // Show/hide the main program window statusbar. void MainForm::viewStatusbar ( bool bOn ) { if (bOn) statusBar()->show(); else statusBar()->hide(); } // Show/hide the messages window logger. void MainForm::viewMessages ( bool bOn ) { if (bOn) m_pMessages->show(); else m_pMessages->hide(); } // Show/hide the MIDI instrument list-view form. void MainForm::viewInstruments (void) { if (m_pOptions == NULL) return; if (m_pInstrumentListForm) { m_pOptions->saveWidgetGeometry(m_pInstrumentListForm); if (m_pInstrumentListForm->isVisible()) { m_pInstrumentListForm->hide(); } else { m_pInstrumentListForm->show(); m_pInstrumentListForm->raise(); m_pInstrumentListForm->activateWindow(); } } } // Show/hide the device configurator form. void MainForm::viewDevices (void) { if (m_pOptions == NULL) return; if (m_pDeviceForm) { m_pOptions->saveWidgetGeometry(m_pDeviceForm); if (m_pDeviceForm->isVisible()) { m_pDeviceForm->hide(); } else { m_pDeviceForm->show(); m_pDeviceForm->raise(); m_pDeviceForm->activateWindow(); } } } // Show options dialog. void MainForm::viewOptions (void) { if (m_pOptions == NULL) return; OptionsForm* pOptionsForm = new OptionsForm(this); if (pOptionsForm) { // Check out some initial nullities(tm)... ChannelStrip *pChannelStrip = activeChannelStrip(); if (m_pOptions->sDisplayFont.isEmpty() && pChannelStrip) m_pOptions->sDisplayFont = pChannelStrip->displayFont().toString(); if (m_pOptions->sMessagesFont.isEmpty() && m_pMessages) m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); // To track down deferred or immediate changes. QString sOldServerHost = m_pOptions->sServerHost; int iOldServerPort = m_pOptions->iServerPort; int iOldServerTimeout = m_pOptions->iServerTimeout; bool bOldServerStart = m_pOptions->bServerStart; QString sOldServerCmdLine = m_pOptions->sServerCmdLine; bool bOldMessagesLog = m_pOptions->bMessagesLog; QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; QString sOldDisplayFont = m_pOptions->sDisplayFont; bool bOldDisplayEffect = m_pOptions->bDisplayEffect; int iOldMaxVolume = m_pOptions->iMaxVolume; QString sOldMessagesFont = m_pOptions->sMessagesFont; bool bOldKeepOnTop = m_pOptions->bKeepOnTop; bool bOldStdoutCapture = m_pOptions->bStdoutCapture; int bOldMessagesLimit = m_pOptions->bMessagesLimit; int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; bool bOldCompletePath = m_pOptions->bCompletePath; bool bOldInstrumentNames = m_pOptions->bInstrumentNames; int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; int iOldBaseFontSize = m_pOptions->iBaseFontSize; // Load the current setup settings. pOptionsForm->setup(m_pOptions); // Show the setup dialog... if (pOptionsForm->exec()) { // Warn if something will be only effective on next run. if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || (!bOldStdoutCapture && m_pOptions->bStdoutCapture) || ( bOldKeepOnTop && !m_pOptions->bKeepOnTop) || (!bOldKeepOnTop && m_pOptions->bKeepOnTop) || (iOldBaseFontSize != m_pOptions->iBaseFontSize)) { QMessageBox::information(this, QSAMPLER_TITLE ": " + tr("Information"), tr("Some settings may be only effective\n" "next time you start this program.")); updateMessagesCapture(); } // Check wheather something immediate has changed. if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || (!bOldMessagesLog && m_pOptions->bMessagesLog) || (sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) m_pMessages->setLogging( m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); if (( bOldCompletePath && !m_pOptions->bCompletePath) || (!bOldCompletePath && m_pOptions->bCompletePath) || (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) updateRecentFilesMenu(); if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) || (!bOldInstrumentNames && m_pOptions->bInstrumentNames)) updateInstrumentNames(); if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) || (!bOldDisplayEffect && m_pOptions->bDisplayEffect)) updateDisplayEffect(); if (sOldDisplayFont != m_pOptions->sDisplayFont) updateDisplayFont(); if (iOldMaxVolume != m_pOptions->iMaxVolume) updateMaxVolume(); if (sOldMessagesFont != m_pOptions->sMessagesFont) updateMessagesFont(); if (( bOldMessagesLimit && !m_pOptions->bMessagesLimit) || (!bOldMessagesLimit && m_pOptions->bMessagesLimit) || (iOldMessagesLimitLines != m_pOptions->iMessagesLimitLines)) updateMessagesLimit(); // And now the main thing, whether we'll do client/server recycling? if ((sOldServerHost != m_pOptions->sServerHost) || (iOldServerPort != m_pOptions->iServerPort) || (iOldServerTimeout != m_pOptions->iServerTimeout) || ( bOldServerStart && !m_pOptions->bServerStart) || (!bOldServerStart && m_pOptions->bServerStart) || (sOldServerCmdLine != m_pOptions->sServerCmdLine && m_pOptions->bServerStart)) fileRestart(); } // Done. delete pOptionsForm; } // This makes it. stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Channels action slots. // Arrange channel strips. void MainForm::channelsArrange (void) { // Full width vertical tiling QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); int y = 0; for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { /* if (pChannelStrip->testWState(WState_Maximized | WState_Minimized)) { // Prevent flicker... pChannelStrip->hide(); pChannelStrip->showNormal(); } */ pChannelStrip->adjustSize(); int iWidth = m_pWorkspace->width(); if (iWidth < pChannelStrip->width()) iWidth = pChannelStrip->width(); // int iHeight = pChannelStrip->height() // + pChannelStrip->parentWidget()->baseSize().height(); int iHeight = pChannelStrip->parentWidget()->frameGeometry().height(); pChannelStrip->parentWidget()->setGeometry(0, y, iWidth, iHeight); y += iHeight; } } m_pWorkspace->setUpdatesEnabled(true); stabilizeForm(); } // Auto-arrange channel strips. void MainForm::channelsAutoArrange ( bool bOn ) { if (m_pOptions == NULL) return; // Toggle the auto-arrange flag. m_pOptions->bAutoArrange = bOn; // If on, update whole workspace... if (m_pOptions->bAutoArrange) channelsArrange(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Help Action slots. // Show information about the Qt toolkit. void MainForm::helpAboutQt (void) { QMessageBox::aboutQt(this); } // Show information about application program. void MainForm::helpAbout (void) { // Stuff the about box text... QString sText = "

\n"; sText += "" QSAMPLER_TITLE " - " + tr(QSAMPLER_SUBTITLE) + "
\n"; sText += "
\n"; sText += tr("Version") + ": " QSAMPLER_VERSION "
\n"; sText += "" + tr("Build") + ": " __DATE__ " " __TIME__ "
\n"; #ifdef CONFIG_DEBUG sText += ""; sText += tr("Debugging option enabled."); sText += "
"; #endif #ifndef CONFIG_LIBGIG sText += ""; sText += tr("GIG (libgig) file support disabled."); sText += "
"; #endif #ifndef CONFIG_INSTRUMENT_NAME sText += ""; sText += tr("LSCP (liblscp) instrument_name support disabled."); sText += "
"; #endif #ifndef CONFIG_MUTE_SOLO sText += ""; sText += tr("Sampler channel Mute/Solo support disabled."); sText += "
"; #endif #ifndef CONFIG_AUDIO_ROUTING sText += ""; sText += tr("LSCP (liblscp) audio_routing support disabled."); sText += "
"; #endif #ifndef CONFIG_FXSEND sText += ""; sText += tr("Sampler channel Effect Sends support disabled."); sText += "
"; #endif #ifndef CONFIG_VOLUME sText += ""; sText += tr("Global volume support disabled."); sText += "
"; #endif #ifndef CONFIG_MIDI_INSTRUMENT sText += ""; sText += tr("MIDI instrument mapping support disabled."); sText += "
"; #endif #ifndef CONFIG_EDIT_INSTRUMENT sText += ""; sText += tr("Instrument editing support disabled."); sText += "
"; #endif #ifndef CONFIG_EVENT_CHANNEL_MIDI sText += ""; sText += tr("Channel MIDI event support disabled."); sText += "
"; #endif #ifndef CONFIG_EVENT_DEVICE_MIDI sText += ""; sText += tr("Device MIDI event support disabled."); sText += "
"; #endif #ifndef CONFIG_MAX_VOICES sText += ""; sText += tr("Runtime max. voices / disk streams support disabled."); sText += "
"; #endif sText += "
\n"; sText += tr("Using") + ": "; sText += ::lscp_client_package(); sText += " "; sText += ::lscp_client_version(); #ifdef CONFIG_LIBGIG sText += ", "; sText += gig::libraryName().c_str(); sText += " "; sText += gig::libraryVersion().c_str(); #endif sText += "
\n"; sText += "
\n"; sText += tr("Website") + ": " QSAMPLER_WEBSITE "
\n"; sText += "
\n"; sText += ""; sText += QSAMPLER_COPYRIGHT "
\n"; sText += QSAMPLER_COPYRIGHT2 "
\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"; QMessageBox::about(this, tr("About") + " " QSAMPLER_TITLE, sText); } //------------------------------------------------------------------------- // qsamplerMainForm -- Main window stabilization. void MainForm::stabilizeForm (void) { // Update the main application caption... QString sSessionName = sessionName(m_sFilename); if (m_iDirtyCount > 0) sSessionName += " *"; setWindowTitle(tr(QSAMPLER_TITLE " - [%1]").arg(sSessionName)); // Update the main menu state... ChannelStrip *pChannelStrip = activeChannelStrip(); bool bHasClient = (m_pOptions != NULL && m_pClient != NULL); bool bHasChannel = (bHasClient && pChannelStrip != NULL); bool bHasChannels = (bHasClient && m_pWorkspace->subWindowList().count() > 0); m_ui.fileNewAction->setEnabled(bHasClient); m_ui.fileOpenAction->setEnabled(bHasClient); m_ui.fileSaveAction->setEnabled(bHasClient && m_iDirtyCount > 0); m_ui.fileSaveAsAction->setEnabled(bHasClient); m_ui.fileResetAction->setEnabled(bHasClient); m_ui.fileRestartAction->setEnabled(bHasClient || m_pServer == NULL); m_ui.editAddChannelAction->setEnabled(bHasClient); m_ui.editRemoveChannelAction->setEnabled(bHasChannel); m_ui.editSetupChannelAction->setEnabled(bHasChannel); #ifdef CONFIG_EDIT_INSTRUMENT m_ui.editEditChannelAction->setEnabled(bHasChannel); #else m_ui.editEditChannelAction->setEnabled(false); #endif m_ui.editResetChannelAction->setEnabled(bHasChannel); m_ui.editResetAllChannelsAction->setEnabled(bHasChannels); m_ui.viewMessagesAction->setChecked(m_pMessages && m_pMessages->isVisible()); #ifdef CONFIG_MIDI_INSTRUMENT m_ui.viewInstrumentsAction->setChecked(m_pInstrumentListForm && m_pInstrumentListForm->isVisible()); m_ui.viewInstrumentsAction->setEnabled(bHasClient); #else m_ui.viewInstrumentsAction->setEnabled(false); #endif m_ui.viewDevicesAction->setChecked(m_pDeviceForm && m_pDeviceForm->isVisible()); m_ui.viewDevicesAction->setEnabled(bHasClient); m_ui.viewMidiDeviceStatusMenu->setEnabled( DeviceStatusForm::getInstances().size() > 0); m_ui.channelsArrangeAction->setEnabled(bHasChannels); #ifdef CONFIG_VOLUME // Toolbar widgets are also affected... m_pVolumeSlider->setEnabled(bHasClient); m_pVolumeSpinBox->setEnabled(bHasClient); #endif // Client/Server status... if (bHasClient) { m_statusItem[QSAMPLER_STATUS_CLIENT]->setText(tr("Connected")); m_statusItem[QSAMPLER_STATUS_SERVER]->setText(m_pOptions->sServerHost + ':' + QString::number(m_pOptions->iServerPort)); } else { m_statusItem[QSAMPLER_STATUS_CLIENT]->clear(); m_statusItem[QSAMPLER_STATUS_SERVER]->clear(); } // Channel status... if (bHasChannel) m_statusItem[QSAMPLER_STATUS_CHANNEL]->setText(pChannelStrip->windowTitle()); else m_statusItem[QSAMPLER_STATUS_CHANNEL]->clear(); // Session status... if (m_iDirtyCount > 0) m_statusItem[QSAMPLER_STATUS_SESSION]->setText(tr("MOD")); else m_statusItem[QSAMPLER_STATUS_SESSION]->clear(); // Recent files menu. m_ui.fileOpenRecentMenu->setEnabled(m_pOptions->recentFiles.count() > 0); } // Global volume change receiver slot. void MainForm::volumeChanged ( int iVolume ) { #ifdef CONFIG_VOLUME if (m_iVolumeChanging > 0) return; m_iVolumeChanging++; // Update the toolbar widgets... if (m_pVolumeSlider->value() != iVolume) m_pVolumeSlider->setValue(iVolume); if (m_pVolumeSpinBox->value() != iVolume) m_pVolumeSpinBox->setValue(iVolume); // Do it as commanded... float fVolume = 0.01f * float(iVolume); if (::lscp_set_volume(m_pClient, fVolume) == LSCP_OK) appendMessages(QObject::tr("Volume: %1.").arg(fVolume)); else appendMessagesClient("lscp_set_volume"); m_iVolumeChanging--; m_iDirtyCount++; stabilizeForm(); #endif } // Channel change receiver slot. void MainForm::channelStripChanged ( ChannelStrip *pChannelStrip ) { // Add this strip to the changed list... if (!m_changedStrips.contains(pChannelStrip)) { m_changedStrips.append(pChannelStrip); pChannelStrip->resetErrorCount(); } // Just mark the dirty form. m_iDirtyCount++; // and update the form status... stabilizeForm(); } // Grab and restore current sampler channels session. void MainForm::updateSession (void) { #ifdef CONFIG_VOLUME int iVolume = ::lroundf(100.0f * ::lscp_get_volume(m_pClient)); m_iVolumeChanging++; m_pVolumeSlider->setValue(iVolume); m_pVolumeSpinBox->setValue(iVolume); m_iVolumeChanging--; #endif #ifdef CONFIG_MIDI_INSTRUMENT // FIXME: Make some room for default instrument maps... int iMaps = ::lscp_get_midi_instrument_maps(m_pClient); if (iMaps < 0) appendMessagesClient("lscp_get_midi_instrument_maps"); else if (iMaps < 1) { ::lscp_add_midi_instrument_map(m_pClient, tr("Chromatic").toUtf8().constData()); ::lscp_add_midi_instrument_map(m_pClient, tr("Drum Kits").toUtf8().constData()); } #endif updateAllChannelStrips(false); // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // Remember to refresh devices and instruments... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); } void MainForm::updateAllChannelStrips ( bool bRemoveDeadStrips ) { // Retrieve the current channel list. int *piChannelIDs = ::lscp_list_channels(m_pClient); if (piChannelIDs == NULL) { if (::lscp_client_get_errno(m_pClient)) { appendMessagesClient("lscp_list_channels"); appendMessagesError( tr("Could not get current list of channels.\n\nSorry.")); } } else { // Try to (re)create each channel. m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; piChannelIDs[iChannel] >= 0; ++iChannel) { // Check if theres already a channel strip for this one... if (!channelStrip(piChannelIDs[iChannel])) createChannelStrip(new Channel(piChannelIDs[iChannel])); } // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); // remove dead channel strips if (bRemoveDeadStrips) { QList wlist = m_pWorkspace->subWindowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { bool bExists = false; for (int j = 0; piChannelIDs[j] >= 0; ++j) { if (!pChannelStrip->channel()) break; if (piChannelIDs[j] == pChannelStrip->channel()->channelID()) { // strip exists, don't touch it bExists = true; break; } } if (!bExists) destroyChannelStrip(pChannelStrip); } } } m_pWorkspace->setUpdatesEnabled(true); } stabilizeForm(); } // Update the recent files list and menu. void MainForm::updateRecentFiles ( const QString& sFilename ) { if (m_pOptions == NULL) return; // Remove from list if already there (avoid duplicates) int iIndex = m_pOptions->recentFiles.indexOf(sFilename); if (iIndex >= 0) m_pOptions->recentFiles.removeAt(iIndex); // Put it to front... m_pOptions->recentFiles.push_front(sFilename); } // Update the recent files list and menu. void MainForm::updateRecentFilesMenu (void) { if (m_pOptions == NULL) return; // Time to keep the list under limits. int iRecentFiles = m_pOptions->recentFiles.count(); while (iRecentFiles > m_pOptions->iMaxRecentFiles) { m_pOptions->recentFiles.pop_back(); iRecentFiles--; } // Rebuild the recent files menu... m_ui.fileOpenRecentMenu->clear(); for (int i = 0; i < iRecentFiles; i++) { const QString& sFilename = m_pOptions->recentFiles[i]; if (QFileInfo(sFilename).exists()) { QAction *pAction = m_ui.fileOpenRecentMenu->addAction( QString("&%1 %2").arg(i + 1).arg(sessionName(sFilename)), this, SLOT(fileOpenRecent())); pAction->setData(i); } } } // Force update of the channels instrument names mode. void MainForm::updateInstrumentNames (void) { // Full channel list update... QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = (ChannelStrip *) wlist.at(iChannel); if (pChannelStrip) pChannelStrip->updateInstrumentName(true); } m_pWorkspace->setUpdatesEnabled(true); } // Force update of the channels display font. void MainForm::updateDisplayFont (void) { if (m_pOptions == NULL) return; // Check if display font is legal. if (m_pOptions->sDisplayFont.isEmpty()) return; // Realize it. QFont font; if (!font.fromString(m_pOptions->sDisplayFont)) return; // Full channel list update... QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) pChannelStrip->setDisplayFont(font); } m_pWorkspace->setUpdatesEnabled(true); } // Update channel strips background effect. void MainForm::updateDisplayEffect (void) { // Full channel list update... QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) pChannelStrip->setDisplayEffect(m_pOptions->bDisplayEffect); } m_pWorkspace->setUpdatesEnabled(true); } // Force update of the channels maximum volume setting. void MainForm::updateMaxVolume (void) { if (m_pOptions == NULL) return; #ifdef CONFIG_VOLUME m_iVolumeChanging++; m_pVolumeSlider->setMaximum(m_pOptions->iMaxVolume); m_pVolumeSpinBox->setMaximum(m_pOptions->iMaxVolume); m_iVolumeChanging--; #endif // Full channel list update... QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return; m_pWorkspace->setUpdatesEnabled(false); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); } m_pWorkspace->setUpdatesEnabled(true); } //------------------------------------------------------------------------- // qsamplerMainForm -- Messages window form handlers. // Messages output methods. void MainForm::appendMessages( const QString& s ) { if (m_pMessages) m_pMessages->appendMessages(s); statusBar()->showMessage(s, 3000); } void MainForm::appendMessagesColor( const QString& s, const QString& c ) { if (m_pMessages) m_pMessages->appendMessagesColor(s, c); statusBar()->showMessage(s, 3000); } void MainForm::appendMessagesText( const QString& s ) { if (m_pMessages) m_pMessages->appendMessagesText(s); } void MainForm::appendMessagesError( const QString& sText ) { if (m_pMessages) m_pMessages->show(); appendMessagesColor(sText.simplified(), "#ff0000"); // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); if (m_pOptions && m_pOptions->bConfirmError) { const QString& sTitle = QSAMPLER_TITLE ": " + tr("Error"); #if 0 QMessageBox::critical(this, sTitle, sText, QMessageBox::Cancel); #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Critical); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Cancel); QCheckBox cbox(tr("Don't show this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); if (mbox.exec() && cbox.isChecked()) m_pOptions->bConfirmError = false; #endif } } // This is a special message format, just for client results. void MainForm::appendMessagesClient( const QString& s ) { if (m_pClient == NULL) return; appendMessagesColor(s + QString(": %1 (errno=%2)") .arg(::lscp_client_get_result(m_pClient)) .arg(::lscp_client_get_errno(m_pClient)), "#996666"); // Make it look responsive...:) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Force update of the messages font. void MainForm::updateMessagesFont (void) { if (m_pOptions == NULL) return; if (m_pMessages && !m_pOptions->sMessagesFont.isEmpty()) { QFont font; if (font.fromString(m_pOptions->sMessagesFont)) m_pMessages->setMessagesFont(font); } } // Update messages window line limit. void MainForm::updateMessagesLimit (void) { if (m_pOptions == NULL) return; if (m_pMessages) { if (m_pOptions->bMessagesLimit) m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines); else m_pMessages->setMessagesLimit(-1); } } // Enablement of the messages capture feature. void MainForm::updateMessagesCapture (void) { if (m_pOptions == NULL) return; if (m_pMessages) m_pMessages->setCaptureEnabled(m_pOptions->bStdoutCapture); } //------------------------------------------------------------------------- // qsamplerMainForm -- MDI channel strip management. // The channel strip creation executive. ChannelStrip *MainForm::createChannelStrip ( Channel *pChannel ) { if (m_pClient == NULL || pChannel == NULL) return NULL; // Add a new channel itema... ChannelStrip *pChannelStrip = new ChannelStrip(); if (pChannelStrip == NULL) return NULL; // Set some initial channel strip options... if (m_pOptions) { // Background display effect... pChannelStrip->setDisplayEffect(m_pOptions->bDisplayEffect); // We'll need a display font. QFont font; if (font.fromString(m_pOptions->sDisplayFont)) pChannelStrip->setDisplayFont(font); // Maximum allowed volume setting. pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); } // Add it to workspace... m_pWorkspace->addSubWindow(pChannelStrip, Qt::SubWindow | Qt::FramelessWindowHint); // Actual channel strip setup... pChannelStrip->setup(pChannel); QObject::connect(pChannelStrip, SIGNAL(channelChanged(ChannelStrip *)), SLOT(channelStripChanged(ChannelStrip *))); // Now we show up us to the world. pChannelStrip->show(); // This is pretty new, so we'll watch for it closely. channelStripChanged(pChannelStrip); // Return our successful reference... return pChannelStrip; } void MainForm::destroyChannelStrip ( ChannelStrip *pChannelStrip ) { QMdiSubWindow *pMdiSubWindow = static_cast (pChannelStrip->parentWidget()); if (pMdiSubWindow == NULL) return; // Just delete the channel strip. delete pChannelStrip; delete pMdiSubWindow; // Do we auto-arrange? if (m_pOptions && m_pOptions->bAutoArrange) channelsArrange(); stabilizeForm(); } // Retrieve the active channel strip. ChannelStrip *MainForm::activeChannelStrip (void) { QMdiSubWindow *pMdiSubWindow = m_pWorkspace->activeSubWindow(); if (pMdiSubWindow) return static_cast (pMdiSubWindow->widget()); else return NULL; } // Retrieve a channel strip by index. ChannelStrip *MainForm::channelStripAt ( int iChannel ) { if (!m_pWorkspace) return NULL; QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return NULL; if (iChannel < 0 || iChannel >= wlist.size()) return NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) return static_cast (pMdiSubWindow->widget()); else return NULL; } // Retrieve a channel strip by sampler channel id. ChannelStrip *MainForm::channelStrip ( int iChannelID ) { QList wlist = m_pWorkspace->subWindowList(); if (wlist.isEmpty()) return NULL; for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { Channel *pChannel = pChannelStrip->channel(); if (pChannel && pChannel->channelID() == iChannelID) return pChannelStrip; } } // Not found. return NULL; } // Construct the windows menu. void MainForm::channelsMenuAboutToShow (void) { m_ui.channelsMenu->clear(); m_ui.channelsMenu->addAction(m_ui.channelsArrangeAction); m_ui.channelsMenu->addAction(m_ui.channelsAutoArrangeAction); QList wlist = m_pWorkspace->subWindowList(); if (!wlist.isEmpty()) { m_ui.channelsMenu->addSeparator(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) { QAction *pAction = m_ui.channelsMenu->addAction( pChannelStrip->windowTitle(), this, SLOT(channelsMenuActivated())); pAction->setCheckable(true); pAction->setChecked(activeChannelStrip() == pChannelStrip); pAction->setData(iChannel); } } } } // Windows menu activation slot void MainForm::channelsMenuActivated (void) { // Retrive channel index from action data... QAction *pAction = qobject_cast (sender()); if (pAction == NULL) return; ChannelStrip *pChannelStrip = channelStripAt(pAction->data().toInt()); if (pChannelStrip) { pChannelStrip->showNormal(); pChannelStrip->setFocus(); } } //------------------------------------------------------------------------- // qsamplerMainForm -- Timer stuff. // Set the pseudo-timer delay schedule. void MainForm::startSchedule ( int iStartDelay ) { m_iStartDelay = 1 + (iStartDelay * 1000); m_iTimerDelay = 0; } // Suspend the pseudo-timer delay schedule. void MainForm::stopSchedule (void) { m_iStartDelay = 0; m_iTimerDelay = 0; } // Timer slot funtion. void MainForm::timerSlot (void) { if (m_pOptions == NULL) return; // Is it the first shot on server start after a few delay? if (m_iTimerDelay < m_iStartDelay) { m_iTimerDelay += QSAMPLER_TIMER_MSECS; if (m_iTimerDelay >= m_iStartDelay) { // If we cannot start it now, maybe a lil'mo'later ;) if (!startClient()) { m_iStartDelay += m_iTimerDelay; m_iTimerDelay = 0; } } } if (m_pClient) { // Update the channel information for each pending strip... QListIterator iter(m_changedStrips); while (iter.hasNext()) { ChannelStrip *pChannelStrip = iter.next(); // If successfull, remove from pending list... if (pChannelStrip->updateChannelInfo()) { int iChannelStrip = m_changedStrips.indexOf(pChannelStrip); if (iChannelStrip >= 0) m_changedStrips.removeAt(iChannelStrip); } } // Refresh each channel usage, on each period... if (m_pOptions->bAutoRefresh) { m_iTimerSlot += QSAMPLER_TIMER_MSECS; if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime) { m_iTimerSlot = 0; // Update the channel stream usage for each strip... QList wlist = m_pWorkspace->subWindowList(); for (int iChannel = 0; iChannel < (int) wlist.count(); ++iChannel) { ChannelStrip *pChannelStrip = NULL; QMdiSubWindow *pMdiSubWindow = wlist.at(iChannel); if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip && pChannelStrip->isVisible()) pChannelStrip->updateChannelUsage(); } } } } // Register the next timer slot. QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot())); } //------------------------------------------------------------------------- // qsamplerMainForm -- Server stuff. // Start linuxsampler server... void MainForm::startServer (void) { if (m_pOptions == NULL) return; // Aren't already a client, are we? if (!m_pOptions->bServerStart || m_pClient) return; // Is the server process instance still here? if (m_pServer) { if (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Could not start the LinuxSampler server.\n\n" "Maybe it is already started."), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) { m_pServer->terminate(); m_pServer->kill(); } return; } // Reset our timer counters... stopSchedule(); // Verify we have something to start with... if (m_pOptions->sServerCmdLine.isEmpty()) return; // OK. Let's build the startup process... m_pServer = new QProcess(); bForceServerStop = true; // Setup stdout/stderr capture... // if (m_pOptions->bStdoutCapture) { m_pServer->setProcessChannelMode(QProcess::ForwardedChannels); QObject::connect(m_pServer, SIGNAL(readyReadStandardOutput()), SLOT(readServerStdout())); QObject::connect(m_pServer, SIGNAL(readyReadStandardError()), SLOT(readServerStdout())); // } // The unforgiveable signal communication... QObject::connect(m_pServer, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processServerExit())); // Build process arguments... QStringList args = m_pOptions->sServerCmdLine.split(' '); QString sCommand = args[0]; args.removeAt(0); appendMessages(tr("Server is starting...")); appendMessagesColor(m_pOptions->sServerCmdLine, "#990099"); // Go linuxsampler, go... m_pServer->start(sCommand, args); if (!m_pServer->waitForStarted()) { appendMessagesError(tr("Could not start server.\n\nSorry.")); processServerExit(); return; } // Show startup results... appendMessages( tr("Server was started with PID=%1.").arg((long) m_pServer->pid())); // Reset (yet again) the timer counters, // but this time is deferred as the user opted. startSchedule(m_pOptions->iStartDelay); stabilizeForm(); } // Stop linuxsampler server... void MainForm::stopServer (bool bInteractive) { // Stop client code. stopClient(); if (m_pServer && bInteractive) { if (QMessageBox::question(this, QSAMPLER_TITLE ": " + tr("The backend's fate ..."), tr("You have the option to keep the sampler backend (LinuxSampler)\n" "running in the background. The sampler would continue to work\n" "according to your current sampler session and you could alter the\n" "sampler session at any time by relaunching QSampler.\n\n" "Do you want LinuxSampler to stop?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No) { bForceServerStop = false; } } // And try to stop server. if (m_pServer && bForceServerStop) { appendMessages(tr("Server is stopping...")); if (m_pServer->state() == QProcess::Running) { #if defined(WIN32) // Try harder... m_pServer->kill(); #else // Try softly... m_pServer->terminate(); #endif } } // Do final processing anyway. else processServerExit(); // Give it some time to terminate gracefully and stabilize... QTime t; t.start(); while (t.elapsed() < QSAMPLER_TIMER_MSECS) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Stdout handler... void MainForm::readServerStdout (void) { if (m_pMessages) m_pMessages->appendStdoutBuffer(m_pServer->readAllStandardOutput()); } // Linuxsampler server cleanup. void MainForm::processServerExit (void) { // Force client code cleanup. stopClient(); // Flush anything that maybe pending... if (m_pMessages) m_pMessages->flushStdoutBuffer(); if (m_pServer && bForceServerStop) { if (m_pServer->state() != QProcess::NotRunning) { appendMessages(tr("Server is being forced...")); // Force final server shutdown... m_pServer->kill(); // Give it some time to terminate gracefully and stabilize... QTime t; t.start(); while (t.elapsed() < QSAMPLER_TIMER_MSECS) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Force final server shutdown... appendMessages( tr("Server was stopped with exit status %1.") .arg(m_pServer->exitStatus())); delete m_pServer; m_pServer = NULL; } // Again, make status visible stable. stabilizeForm(); } //------------------------------------------------------------------------- // qsamplerMainForm -- Client stuff. // The LSCP client callback procedure. lscp_status_t qsampler_client_callback ( lscp_client_t */*pClient*/, lscp_event_t event, const char *pchData, int cchData, void *pvData ) { MainForm* pMainForm = (MainForm *) pvData; if (pMainForm == NULL) return LSCP_FAILED; // ATTN: DO NOT EVER call any GUI code here, // as this is run under some other thread context. // A custom event must be posted here... QApplication::postEvent(pMainForm, new LscpEvent(event, pchData, cchData)); return LSCP_OK; } // Start our almighty client... bool MainForm::startClient (void) { // Have it a setup? if (m_pOptions == NULL) return false; // Aren't we already started, are we? if (m_pClient) return true; // Log prepare here. appendMessages(tr("Client connecting...")); // Create the client handle... m_pClient = ::lscp_client_create( m_pOptions->sServerHost.toUtf8().constData(), m_pOptions->iServerPort, qsampler_client_callback, this); if (m_pClient == NULL) { // Is this the first try? // maybe we need to start a local server... if ((m_pServer && m_pServer->state() == QProcess::Running) || !m_pOptions->bServerStart) { appendMessagesError( tr("Could not connect to server as client.\n\nSorry.")); } else { startServer(); } // This is always a failure. stabilizeForm(); return false; } // Just set receive timeout value, blindly. ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout); appendMessages( tr("Client receive timeout is set to %1 msec.") .arg(::lscp_client_get_timeout(m_pClient))); // Subscribe to channel info change notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_INFO)"); DeviceStatusForm::onDevicesChanged(); // initialize updateViewMidiDeviceStatusMenu(); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_INFO)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_COUNT)"); if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); #if CONFIG_EVENT_CHANNEL_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); #endif #if CONFIG_EVENT_DEVICE_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); #endif // We may stop scheduling around. stopSchedule(); // We'll accept drops from now on... setAcceptDrops(true); // Log success here. appendMessages(tr("Client connected.")); // Hard-notify instrumnet and device configuration forms, // if visible, that we're ready... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); // Is any session pending to be loaded? if (!m_pOptions->sSessionFile.isEmpty()) { // Just load the prabably startup session... if (loadSessionFile(m_pOptions->sSessionFile)) { m_pOptions->sSessionFile = QString::null; return true; } } // send the current / loaded fine tuning settings to the sampler m_pOptions->sendFineTuningSettings(); // Make a new session return newSession(); } // Stop client... void MainForm::stopClient (void) { if (m_pClient == NULL) return; // Log prepare here. appendMessages(tr("Client disconnecting...")); // Clear timer counters... stopSchedule(); // We'll reject drops from now on... setAcceptDrops(false); // Force any channel strips around, but // but avoid removing the corresponding // channels from the back-end server. m_iDirtyCount = 0; closeSession(false); // Close us as a client... #if CONFIG_EVENT_DEVICE_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); #endif #if CONFIG_EVENT_CHANNEL_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); #endif ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO); ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_COUNT); ::lscp_client_destroy(m_pClient); m_pClient = NULL; // Hard-notify instrumnet and device configuration forms, // if visible, that we're running out... if (m_pInstrumentListForm) m_pInstrumentListForm->refreshInstruments(); if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); // Log final here. appendMessages(tr("Client disconnected.")); // Make visible status. stabilizeForm(); } // Channel strip activation/selection. void MainForm::activateStrip ( QMdiSubWindow *pMdiSubWindow ) { ChannelStrip *pChannelStrip = NULL; if (pMdiSubWindow) pChannelStrip = static_cast (pMdiSubWindow->widget()); if (pChannelStrip) pChannelStrip->setSelected(true); stabilizeForm(); } // Channel toolbar orientation change. void MainForm::channelsToolbarOrientation ( Qt::Orientation orientation ) { #ifdef CONFIG_VOLUME m_pVolumeSlider->setOrientation(orientation); if (orientation == Qt::Horizontal) { m_pVolumeSlider->setMinimumHeight(24); m_pVolumeSlider->setMaximumHeight(32); m_pVolumeSlider->setMinimumWidth(120); m_pVolumeSlider->setMaximumWidth(640); m_pVolumeSpinBox->setMaximumWidth(64); m_pVolumeSpinBox->setButtonSymbols(QSpinBox::UpDownArrows); } else { m_pVolumeSlider->setMinimumHeight(120); m_pVolumeSlider->setMaximumHeight(480); m_pVolumeSlider->setMinimumWidth(24); m_pVolumeSlider->setMaximumWidth(32); m_pVolumeSpinBox->setMaximumWidth(32); m_pVolumeSpinBox->setButtonSymbols(QSpinBox::NoButtons); } #endif } } // namespace QSampler // end of qsamplerMainForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerUtilities.cpp0000644000000000000000000000013212554456160020044 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/qsamplerUtilities.cpp0000644000175000001440000001654112554456160020677 0ustar00rncbcusers00000000000000// qsamplerUtilities.cpp // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerUtilities.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include using namespace QSampler; namespace qsamplerUtilities { static int _hexToNumber(char hex_digit) { switch (hex_digit) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': return 10; case 'b': return 11; case 'c': return 12; case 'd': return 13; case 'e': return 14; case 'f': return 15; case 'A': return 10; case 'B': return 11; case 'C': return 12; case 'D': return 13; case 'E': return 14; case 'F': return 15; default: return 0; } } static int _hexsToNumber(char hex_digit0, char hex_digit1) { return _hexToNumber(hex_digit1)*16 + _hexToNumber(hex_digit0); } // returns true if the connected LSCP server supports escape sequences static bool _remoteSupportsEscapeSequences() { const lscpVersion_t version = getRemoteLscpVersion(); // LSCP v1.2 or younger required return (version.major > 1 || (version.major == 1 && version.minor >= 2)); } // converts the given file path into a path as expected by LSCP 1.2 QString lscpEscapePath ( const QString& sPath ) { if (!_remoteSupportsEscapeSequences()) return sPath; QString path(sPath); // replace POSIX path escape sequences (%HH) by LSCP escape sequences (\xHH) // TODO: missing code for other systems like Windows { QRegExp regexp("%[0-9a-fA-F][0-9a-fA-F]"); for (int i = path.indexOf(regexp); i >= 0; i = path.indexOf(regexp, i + 4)) path.replace(i, 1, "\\x"); } // replace POSIX path escape sequence (%%) by its raw character for (int i = path.indexOf("%%"); i >= 0; i = path.indexOf("%%", ++i)) path.remove(i, 1); // replace all non-basic characters by LSCP escape sequences { const char pathSeparator = '/'; QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = 0; i < int(path.length()); i++) { // first skip all previously added LSCP escape sequences if (path.indexOf(regexp, i) == i) { i += 3; continue; } // now match all non-alphanumerics // (we could exclude much more characters here, but that way // we're sure it just works^TM) const char c = path.at(i).toLatin1(); if ( !(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && #if defined(WIN32) !(c == ':') && #endif !(c == pathSeparator) ) { // convert the non-basic character into a LSCP escape sequence char buf[5]; ::snprintf(buf, sizeof(buf), "\\x%02x", static_cast(c)); path.replace(i, 1, buf); i += 3; } } } return path; } // converts a path returned by a LSCP command (and may contain escape // sequences) into the appropriate POSIX path QString lscpEscapedPathToPosix(QString path) { if (!_remoteSupportsEscapeSequences()) return path; // first escape all percent ('%') characters for POSIX for (int i = path.indexOf('%'); i >= 0; i = path.indexOf('%', i+2)) path.replace(i, 1, "%%"); // resolve LSCP hex escape sequences (\xHH) QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = path.indexOf(regexp); i >= 0; i = path.indexOf(regexp, i + 4)) { const QString sHex = path.mid(i+2, 2).toLower(); // the slash has to be escaped for POSIX as well if (sHex == "2f") { path.replace(i, 4, "%2f"); continue; } // all other characters we simply decode char cAscii = _hexsToNumber(sHex.at(1).toLatin1(), sHex.at(0).toLatin1()); path.replace(i, 4, cAscii); } return path; } // converts the given text as expected by LSCP 1.2 // (that is by encoding special characters with LSCP escape sequences) QString lscpEscapeText(const QString& txt) { if (!_remoteSupportsEscapeSequences()) return txt; QString text(txt); // replace all non-basic characters by LSCP escape sequences for (int i = 0; i < int(text.length()); ++i) { // match all non-alphanumerics // (we could exclude much more characters here, but that way // we're sure it just works^TM) const char c = text.at(i).toLatin1(); if ( !(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') ) { // convert the non-basic character into a LSCP escape sequence char buf[5]; ::snprintf(buf, sizeof(buf), "\\x%02x", static_cast(c)); text.replace(i, 1, buf); i += 3; } } return text; } // converts a text returned by a LSCP command and may contain escape // sequences) into raw text, that is with all escape sequences decoded QString lscpEscapedTextToRaw(QString txt) { if (!_remoteSupportsEscapeSequences()) return txt; // resolve LSCP hex escape sequences (\xHH) QRegExp regexp(QRegExp::escape("\\x") + "[0-9a-fA-F][0-9a-fA-F]"); for (int i = txt.indexOf(regexp); i >= 0; i = txt.indexOf(regexp, i + 4)) { const QString sHex = txt.mid(i+2, 2).toLower(); // decode into raw ASCII character char cAscii = _hexsToNumber(sHex.at(1).toLatin1(), sHex.at(0).toLatin1()); txt.replace(i, 4, cAscii); } return txt; } lscpVersion_t getRemoteLscpVersion (void) { lscpVersion_t result = { 0, 0 }; MainForm* pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return result; if (pMainForm->client() == NULL) return result; lscp_server_info_t* pServerInfo = ::lscp_get_server_info(pMainForm->client()); if (pServerInfo && pServerInfo->protocol_version) ::sscanf(pServerInfo->protocol_version, "%d.%d", &result.major, &result.minor); return result; } } // namespace qsamplerUtilities // end of qsamplerUtilities.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerFxSendsModel.cpp0000644000000000000000000000013212554456160020424 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerFxSendsModel.cpp0000644000175000001440000001222012554456160021245 0ustar00rncbcusers00000000000000// qsamplerFxSendList.cpp // /**************************************************************************** Copyright (C) 2010-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2008, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #include "qsamplerAbout.h" #include "qsamplerFxSendsModel.h" #include "qsamplerFxSend.h" #include #include #include namespace QSampler { FxSendsModel::FxSendsModel(int SamplerChannelID, QObject* pParent) : QAbstractListModel(pParent) { m_SamplerChannelID = SamplerChannelID; cleanRefresh(); } int FxSendsModel::rowCount(const QModelIndex& /*parent*/) const { return m_FxSends.size(); } QVariant FxSendsModel::data(const QModelIndex& index, int role) const { if (!index.isValid()) return QVariant(); switch (role) { case Qt::DisplayRole: return m_FxSends[index.row()].name(); break; case Qt::ToolTipRole: if (m_FxSends[index.row()].deletion()) return QString( "Scheduled for deletion. Click on 'Apply' to actually " "destroy FX Send." ); return (m_FxSends[index.row()].isNew()) ? QString( "New FX send. Click on 'Apply' to actually " "perform creation." ) : QString("FX Send ID ") + QString::number(m_FxSends[index.row()].id()); break; case Qt::ForegroundRole: if (m_FxSends[index.row()].deletion()) return QBrush(Qt::red); if (m_FxSends[index.row()].isNew()) return QBrush(Qt::green); break; case Qt::DecorationRole: if (m_FxSends[index.row()].deletion()) return QIcon(":/images/formRemove.png"); if (m_FxSends[index.row()].isNew()) return QIcon(":/images/itemNew.png"); if (m_FxSends[index.row()].isModified()) return QIcon(":/images/formEdit.png"); return QIcon(":/images/itemFile.png"); case Qt::FontRole: { if (m_FxSends[index.row()].isModified()) { QFont font; font.setBold(true); return font; } break; } default: return QVariant(); } return QVariant(); } bool FxSendsModel::setData( const QModelIndex& index, const QVariant& value, int /*role*/) { if (!index.isValid()) return false; m_FxSends[index.row()].setName(value.toString()); emit dataChanged(index, index); emit fxSendsDirtyChanged(true); return true; } QVariant FxSendsModel::headerData(int section, Qt::Orientation /*orientation*/, int role) const { if (role == Qt::DisplayRole && section == 0) return QString("FX Send Name"); else return QVariant(); } Qt::ItemFlags FxSendsModel::flags(const QModelIndex& /*index*/) const { return Qt::ItemIsEditable | Qt::ItemIsEnabled; } FxSend* FxSendsModel::addFxSend() { #if CONFIG_FXSEND FxSend fxSend(m_SamplerChannelID); fxSend.setName("New FX Send"); m_FxSends.push_back(fxSend); QModelIndex index = createIndex(m_FxSends.size() - 1, 0); #if QT_VERSION < 0x050000 QAbstractListModel::reset(); #else QAbstractListModel::beginResetModel(); QAbstractListModel::endResetModel(); #endif emit fxSendsDirtyChanged(true); return &m_FxSends.last(); #else // CONFIG_FXSEND return NULL; #endif // CONFIG_FXSEND } FxSend* FxSendsModel::fxSend(const QModelIndex& index) { if (!index.isValid()) return NULL; return &m_FxSends[index.row()]; } void FxSendsModel::removeFxSend(const QModelIndex& index) { FxSend* pFxSend = fxSend(index); if (!pFxSend) return; pFxSend->setDeletion(true); #if QT_VERSION < 0x050000 QAbstractListModel::reset(); #else QAbstractListModel::beginResetModel(); QAbstractListModel::endResetModel(); #endif emit fxSendsDirtyChanged(true); } void FxSendsModel::cleanRefresh() { m_FxSends.clear(); QList sends = FxSend::allFxSendsOfSamplerChannel(m_SamplerChannelID); for (int i = 0; i < sends.size(); ++i) { const int iFxSendId = sends[i]; FxSend fxSend(m_SamplerChannelID, iFxSendId); fxSend.getFromSampler(); m_FxSends.push_back(fxSend); } #if QT_VERSION < 0x050000 QAbstractListModel::reset(); #else QAbstractListModel::beginResetModel(); QAbstractListModel::endResetModel(); #endif emit fxSendsDirtyChanged(false); } void FxSendsModel::onExternalModifiication(const QModelIndex& index) { if (!index.isValid()) return; emit dataChanged(index, index); emit fxSendsDirtyChanged(true); } void FxSendsModel::applyToSampler() { for (int i = 0; i < m_FxSends.size(); ++i) m_FxSends[i].applyToSampler(); // make a clean refresh // (throws out all FxSend objects marked for deletion) cleanRefresh(); } } // namespace QSampler // end of qsamplerFxSendList.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannelForm.cpp0000644000000000000000000000013212554456160020265 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsamplerChannelForm.cpp0000644000175000001440000006027512554456160021123 0ustar00rncbcusers00000000000000// qsamplerChannelForm.cpp // /**************************************************************************** Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 "qsamplerChannelForm.h" #include "qsamplerAbout.h" #include "qsamplerDeviceForm.h" #include "qsamplerMainForm.h" #include "qsamplerInstrument.h" #include #include #include #include #include namespace QSampler { //------------------------------------------------------------------------- // QSampler::Channelform -- Channel form implementation. // ChannelForm::ChannelForm ( QWidget* pParent ) : QDialog(pParent) { m_ui.setupUi(this); // Initialize locals. m_pChannel = NULL; m_iDirtySetup = 0; m_iDirtyCount = 0; // m_midiDevices.setAutoDelete(true); // m_audioDevices.setAutoDelete(true); m_pDeviceForm = NULL; int iRowHeight = m_ui.AudioRoutingTable->fontMetrics().height() + 4; m_ui.AudioRoutingTable->verticalHeader()->setDefaultSectionSize(iRowHeight); m_ui.AudioRoutingTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); m_ui.AudioRoutingTable->setModel(&m_routingModel); m_ui.AudioRoutingTable->setItemDelegate(&m_routingDelegate); #if QT_VERSION >= 0x050000 m_ui.AudioRoutingTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); #else m_ui.AudioRoutingTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); #endif // m_ui.AudioRoutingTable->verticalHeader()->hide(); // This goes initially hidden, and will be shown // on setup() for currently existing channels... m_ui.AudioRoutingTable->hide(); // Try to restore normal window positioning. adjustSize(); QObject::connect(m_ui.EngineNameComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.InstrumentFileComboBox, SIGNAL(activated(const QString&)), SLOT(updateInstrumentName())); QObject::connect(m_ui.InstrumentFileToolButton, SIGNAL(clicked()), SLOT(openInstrumentFile())); QObject::connect(m_ui.InstrumentNrComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiDriverComboBox, SIGNAL(activated(const QString&)), SLOT(selectMidiDriver(const QString&))); QObject::connect(m_ui.MidiDeviceComboBox, SIGNAL(activated(int)), SLOT(selectMidiDevice(int))); QObject::connect(m_ui.MidiPortSpinBox, SIGNAL(valueChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiChannelComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MidiMapComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.AudioDriverComboBox, SIGNAL(activated(const QString&)), SLOT(selectAudioDriver(const QString&))); QObject::connect(m_ui.AudioDeviceComboBox, SIGNAL(activated(int)), SLOT(selectAudioDevice(int))); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); QObject::connect(m_ui.MidiDeviceToolButton, SIGNAL(clicked()), SLOT(setupMidiDevice())); QObject::connect(m_ui.AudioDeviceToolButton, SIGNAL(clicked()), SLOT(setupAudioDevice())); QObject::connect(&m_routingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(optionsChanged())); QObject::connect(&m_routingModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), SLOT(updateTableCellRenderers(const QModelIndex&, const QModelIndex&))); QObject::connect(&m_routingModel, SIGNAL(modelReset()), SLOT(updateTableCellRenderers())); } ChannelForm::~ChannelForm() { if (m_pDeviceForm) delete m_pDeviceForm; m_pDeviceForm = NULL; qDeleteAll(m_midiDevices); m_midiDevices.clear(); qDeleteAll(m_audioDevices); m_audioDevices.clear(); } // Channel dialog setup formal initializer. void ChannelForm::setup ( Channel *pChannel ) { m_pChannel = pChannel; m_iDirtySetup = 0; m_iDirtyCount = 0; if (m_pChannel == NULL) return; // It can be a brand new channel, remember? const bool bNew = (m_pChannel->channelID() < 0); setWindowTitle(QSAMPLER_TITLE ": " + m_pChannel->channelName()); // Check if we're up and connected. MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Avoid nested changes. m_iDirtySetup++; // Load combo box history... pOptions->loadComboBoxHistory(m_ui.InstrumentFileComboBox); // Populate Engines list. const char **ppszEngines = ::lscp_list_available_engines(pMainForm->client()); if (ppszEngines) { m_ui.EngineNameComboBox->clear(); for (int iEngine = 0; ppszEngines[iEngine]; iEngine++) m_ui.EngineNameComboBox->addItem(QString(ppszEngines[iEngine])); } else m_pChannel->appendMessagesClient("lscp_list_available_engines"); // Populate Audio output type list. m_ui.AudioDriverComboBox->clear(); m_ui.AudioDriverComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), Device::Audio)); // Populate MIDI input type list. m_ui.MidiDriverComboBox->clear(); m_ui.MidiDriverComboBox->insertItems(0, Device::getDrivers(pMainForm->client(), Device::Midi)); // Populate Maps list. m_ui.MidiMapComboBox->clear(); m_ui.MidiMapComboBox->insertItems(0, Instrument::getMapNames()); // Read proper channel information, // and populate the channel form fields. // Engine name... QString sEngineName = pChannel->engineName(); if (sEngineName.isEmpty() || bNew) sEngineName = pOptions->sEngineName; if (sEngineName.isEmpty()) sEngineName = Channel::noEngineName(); if (m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.EngineNameComboBox->addItem(sEngineName); } m_ui.EngineNameComboBox->setCurrentIndex( m_ui.EngineNameComboBox->findText(sEngineName, Qt::MatchExactly | Qt::MatchCaseSensitive)); // Instrument filename and index... QString sInstrumentFile = pChannel->instrumentFile(); if (sInstrumentFile.isEmpty()) sInstrumentFile = Channel::noInstrumentName(); m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList(sInstrumentFile, pOptions->bInstrumentNames)); int iInstrumentNr = pChannel->instrumentNr(); if (iInstrumentNr < 0) iInstrumentNr = 0; m_ui.InstrumentNrComboBox->setCurrentIndex(iInstrumentNr); // MIDI input device... Device midiDevice(Device::Midi, m_pChannel->midiDevice()); // MIDI input driver... QString sMidiDriver = midiDevice.driverName(); if (sMidiDriver.isEmpty() || bNew) sMidiDriver = pOptions->sMidiDriver.toUpper(); if (!sMidiDriver.isEmpty()) { if (m_ui.MidiDriverComboBox->findText(sMidiDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.MidiDriverComboBox->insertItem(0, sMidiDriver); } m_ui.MidiDriverComboBox->setCurrentIndex( m_ui.MidiDriverComboBox->findText(sMidiDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) ); } selectMidiDriverItem(sMidiDriver); if (!bNew) { m_ui.MidiDeviceComboBox->setItemText( m_ui.MidiDeviceComboBox->currentIndex(), midiDevice.deviceName()); } selectMidiDeviceItem(m_ui.MidiDeviceComboBox->currentIndex()); // MIDI input port... m_ui.MidiPortSpinBox->setValue(pChannel->midiPort()); // MIDI input channel... int iMidiChannel = pChannel->midiChannel(); // When new, try to suggest a sensible MIDI channel... if (iMidiChannel < 0) iMidiChannel = (::lscp_get_channels(pMainForm->client()) % 16); m_ui.MidiChannelComboBox->setCurrentIndex(iMidiChannel); // MIDI instrument map... int iMidiMap = (bNew ? pOptions->iMidiMap : pChannel->midiMap()); // When new, try to suggest a sensible MIDI map... if (iMidiMap < 0) iMidiMap = 0; const QString& sMapName = Instrument::getMapName(iMidiMap); if (!sMapName.isEmpty()) { m_ui.MidiMapComboBox->setItemText( m_ui.MidiMapComboBox->currentIndex(), sMapName); } // It might be no maps around... bool bMidiMapEnabled = (m_ui.MidiMapComboBox->count() > 0); m_ui.MidiMapTextLabel->setEnabled(bMidiMapEnabled); m_ui.MidiMapComboBox->setEnabled(bMidiMapEnabled); // Audio output device... Device audioDevice(Device::Audio, m_pChannel->audioDevice()); // Audio output driver... QString sAudioDriver = audioDevice.driverName(); if (sAudioDriver.isEmpty() || bNew) sAudioDriver = pOptions->sAudioDriver.toUpper(); if (!sAudioDriver.isEmpty()) { if (m_ui.AudioDriverComboBox->findText(sAudioDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { m_ui.AudioDriverComboBox->insertItem(0, sAudioDriver); } m_ui.AudioDriverComboBox->setCurrentIndex( m_ui.AudioDriverComboBox->findText(sAudioDriver, Qt::MatchExactly | Qt::MatchCaseSensitive) ); } selectAudioDriverItem(sAudioDriver); if (!bNew) { m_ui.AudioDeviceComboBox->setItemText( m_ui.AudioDeviceComboBox->currentIndex(), audioDevice.deviceName()); } selectAudioDeviceItem(m_ui.AudioDeviceComboBox->currentIndex()); // Let the audio routing table see the light, // if we're editing an existing sampler channel... m_ui.AudioRoutingTable->setVisible(!bNew); const QString sInstrumentNrToolTip = (pOptions->bInstrumentNames) ? "Select an instrument of the file" : "You might want to enable instrument name retrieval in the " "settings dialog"; m_ui.InstrumentNrComboBox->setToolTip( QObject::tr(sInstrumentNrToolTip.toUtf8().data()) ); // As convenient, make it ready on stabilizeForm() for // prompt acceptance, if we got the minimum required... /* if (sEngineName != Channel::noEngineName() && sInstrumentFile != Channel::noInstrumentName()) m_iDirtyCount++; */ // Done. m_iDirtySetup--; stabilizeForm(); } // Accept settings (OK button slot). void ChannelForm::accept (void) { if (m_pChannel == NULL) return; MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Flush any pending editing... //m_ui.AudioRoutingTable->flush(); // We'll go for it! if (m_iDirtyCount > 0) { int iErrors = 0; // Are we a new channel? if (!m_pChannel->addChannel()) iErrors++; // Accept Audio driver or device selection... if (m_audioDevices.isEmpty()) { if (!m_pChannel->setAudioDriver(m_ui.AudioDriverComboBox->currentText())) iErrors++; } else { Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); ChannelRoutingMap routingMap = m_routingModel.routingMap(); if (pDevice == NULL) iErrors++; else if (!m_pChannel->setAudioDevice(pDevice->deviceID())) iErrors++; else if (!routingMap.isEmpty()) { // Set the audio route changes... ChannelRoutingMap::ConstIterator iter; for (iter = routingMap.begin(); iter != routingMap.end(); ++iter) { if (!m_pChannel->setAudioChannel(iter.key(), iter.value())) iErrors++; } } } // Accept MIDI driver or device selection... if (m_midiDevices.isEmpty()) { if (!m_pChannel->setMidiDriver(m_ui.MidiDriverComboBox->currentText())) iErrors++; } else { Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice == NULL) iErrors++; else if (!m_pChannel->setMidiDevice(pDevice->deviceID())) iErrors++; } // MIDI input port number... if (!m_pChannel->setMidiPort(m_ui.MidiPortSpinBox->value())) iErrors++; // MIDI input channel... if (!m_pChannel->setMidiChannel(m_ui.MidiChannelComboBox->currentIndex())) iErrors++; // Engine name... if (!m_pChannel->loadEngine(m_ui.EngineNameComboBox->currentText())) iErrors++; // Instrument file and index... const QString& sPath = m_ui.InstrumentFileComboBox->currentText(); if (!sPath.isEmpty() && QFileInfo(sPath).exists()) { if (!m_pChannel->loadInstrument(sPath, m_ui.InstrumentNrComboBox->currentIndex())) iErrors++; } // MIDI intrument map... if (!m_pChannel->setMidiMap(m_ui.MidiMapComboBox->currentIndex())) iErrors++; // Show error messages? if (iErrors > 0) { m_pChannel->appendMessagesError( tr("Some channel settings could not be set.\n\nSorry.")); } } // Save default engine name, instrument directory and history... pOptions->sInstrumentDir = QFileInfo( m_ui.InstrumentFileComboBox->currentText()).dir().absolutePath(); pOptions->sEngineName = m_ui.EngineNameComboBox->currentText(); pOptions->sAudioDriver = m_ui.AudioDriverComboBox->currentText(); pOptions->sMidiDriver = m_ui.MidiDriverComboBox->currentText(); pOptions->iMidiMap = m_ui.MidiMapComboBox->currentIndex(); pOptions->saveComboBoxHistory(m_ui.InstrumentFileComboBox); // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void ChannelForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, QSAMPLER_TITLE ": " + tr("Warning"), tr("Some channel 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; break; } } if (bReject) QDialog::reject(); } // Browse and open an instrument file. void ChannelForm::openInstrumentFile (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // FIXME: the instrument file filters should be restricted, // depending on the current engine. QStringList filters; const QString& sEngineName = m_ui.EngineNameComboBox->currentText().toUpper(); if (sEngineName.contains("GIG")) filters << tr("GIG Instrument files") + " (*.gig *.dls)"; if (sEngineName.contains("SFZ")) filters << tr("SFZ Instrument files") + " (*.sfz)"; if (sEngineName.contains("SF2")) filters << tr("SF2 Instrument files") + " (*.sf2)"; filters << tr("All files") + " (*.*)"; const QString& filter = filters.join(";;"); QString sInstrumentFile = QFileDialog::getOpenFileName(this, QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. pOptions->sInstrumentDir, // Start here. filter // File filter. ); if (sInstrumentFile.isEmpty()) return; m_ui.InstrumentFileComboBox->setEditText(sInstrumentFile); updateInstrumentName(); } // Refresh the actual instrument name. void ChannelForm::updateInstrumentName (void) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; Options *pOptions = pMainForm->options(); if (pOptions == NULL) return; // Finally this better idea would be to use libgig // to retrieve the REAL instrument names. m_ui.InstrumentNrComboBox->clear(); m_ui.InstrumentNrComboBox->insertItems(0, Channel::getInstrumentList( m_ui.InstrumentFileComboBox->currentText(), pOptions->bInstrumentNames) ); optionsChanged(); } // Show device options dialog. void ChannelForm::setupDevice ( Device *pDevice, Device::DeviceType deviceTypeMode, const QString& sDriverName ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; // Create the device form if not already... if (m_pDeviceForm == NULL) { m_pDeviceForm = new DeviceForm(this, Qt::Dialog); m_pDeviceForm->setAttribute(Qt::WA_ShowModal); QObject::connect(m_pDeviceForm, SIGNAL(devicesChanged()), this, SLOT(updateDevices())); } // Refresh the device form with selected data. if (m_pDeviceForm) { m_pDeviceForm->setDeviceTypeMode(deviceTypeMode); m_pDeviceForm->refreshDevices(); m_pDeviceForm->setDevice(pDevice); m_pDeviceForm->setDriverName(sDriverName); m_pDeviceForm->show(); } } // Refresh MIDI driver item devices. void ChannelForm::selectMidiDriverItem ( const QString& sMidiDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; const QString sDriverName = sMidiDriver.toUpper(); // Save current device id. // Save current device id. int iDeviceID = 0; Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice) iDeviceID = pDevice->deviceID(); // Clean maplist. m_ui.MidiDeviceComboBox->clear(); qDeleteAll(m_midiDevices); m_midiDevices.clear(); // Populate with the current ones... const QPixmap midiPixmap(":/images/midi2.png"); int *piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Midi); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { pDevice = new Device(Device::Midi, piDeviceIDs[i]); if (pDevice->driverName().toUpper() == sDriverName) { m_ui.MidiDeviceComboBox->insertItem(0, midiPixmap, pDevice->deviceName()); m_midiDevices.append(pDevice); } else { delete pDevice; } } // Do proper enabling... bool bEnabled = !m_midiDevices.isEmpty(); if (bEnabled) { // Select the previous current device... iMidiItem = 0; QListIterator iter(m_midiDevices); while (iter.hasNext()) { pDevice = iter.next(); if (pDevice->deviceID() == iDeviceID) { m_ui.MidiDeviceComboBox->setCurrentIndex(iMidiItem); selectMidiDeviceItem(iMidiItem); break; } iMidiItem++; } } else { m_ui.MidiDeviceComboBox->insertItem(0, tr("(New MIDI %1 device)").arg(sMidiDriver)); } m_ui.MidiDeviceTextLabel->setEnabled(bEnabled); m_ui.MidiDeviceComboBox->setEnabled(bEnabled); } // Refresh MIDI device options slot. void ChannelForm::selectMidiDriver ( const QString& sMidiDriver ) { if (m_iDirtySetup > 0) return; selectMidiDriverItem(sMidiDriver); optionsChanged(); } // Select MIDI device item. void ChannelForm::selectMidiDeviceItem ( int iMidiItem ) { Device *pDevice = NULL; if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); if (pDevice) { const DeviceParamMap& params = pDevice->params(); int iPorts = params["PORTS"].value.toInt(); m_ui.MidiPortTextLabel->setEnabled(iPorts > 0); m_ui.MidiPortSpinBox->setEnabled(iPorts > 0); if (iPorts > 0) m_ui.MidiPortSpinBox->setMaximum(iPorts - 1); } } // Select MIDI device options slot. void ChannelForm::selectMidiDevice ( int iMidiItem ) { if (m_iDirtySetup > 0) return; selectMidiDeviceItem(iMidiItem); optionsChanged(); } // MIDI device options. void ChannelForm::setupMidiDevice (void) { Device *pDevice = NULL; int iMidiItem = m_ui.MidiDeviceComboBox->currentIndex(); if (iMidiItem >= 0 && iMidiItem < m_midiDevices.count()) pDevice = m_midiDevices.at(iMidiItem); setupDevice(pDevice, Device::Midi, m_ui.MidiDriverComboBox->currentText()); } // Refresh Audio driver item devices. void ChannelForm::selectAudioDriverItem ( const QString& sAudioDriver ) { MainForm *pMainForm = MainForm::getInstance(); if (pMainForm == NULL) return; if (pMainForm->client() == NULL) return; const QString sDriverName = sAudioDriver.toUpper(); // Save current device id. int iDeviceID = 0; Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); if (pDevice) iDeviceID = pDevice->deviceID(); // Clean maplist. m_ui.AudioDeviceComboBox->clear(); qDeleteAll(m_audioDevices); m_audioDevices.clear(); // Populate with the current ones... const QPixmap audioPixmap(":/images/audio2.png"); int *piDeviceIDs = Device::getDevices(pMainForm->client(), Device::Audio); for (int i = 0; piDeviceIDs && piDeviceIDs[i] >= 0; i++) { pDevice = new Device(Device::Audio, piDeviceIDs[i]); if (pDevice->driverName().toUpper() == sDriverName) { m_ui.AudioDeviceComboBox->insertItem(0, audioPixmap, pDevice->deviceName()); m_audioDevices.append(pDevice); } else { delete pDevice; } } // Do proper enabling... bool bEnabled = !m_audioDevices.isEmpty(); if (bEnabled) { // Select the previous current device... iAudioItem = 0; QListIterator iter(m_audioDevices); while (iter.hasNext()) { pDevice = iter.next(); if (pDevice->deviceID() == iDeviceID) { m_ui.AudioDeviceComboBox->setCurrentIndex(iAudioItem); selectAudioDeviceItem(iAudioItem); break; } iAudioItem++; } } else { m_ui.AudioDeviceComboBox->insertItem(0, tr("(New Audio %1 device)").arg(sAudioDriver)); //m_ui.AudioRoutingTable->setNumRows(0); } m_ui.AudioDeviceTextLabel->setEnabled(bEnabled); m_ui.AudioDeviceComboBox->setEnabled(bEnabled); m_ui.AudioRoutingTable->setEnabled(bEnabled); } // Refresh Audio device options slot. void ChannelForm::selectAudioDriver ( const QString& sAudioDriver ) { if (m_iDirtySetup > 0) return; selectAudioDriverItem(sAudioDriver); optionsChanged(); } // Select Audio device item. void ChannelForm::selectAudioDeviceItem ( int iAudioItem ) { Device *pDevice = NULL; if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); if (pDevice) { // Refresh the audio routing table. m_routingModel.refresh(pDevice, m_pChannel->audioRouting()); // Reset routing change map. m_routingModel.clear(); } } // Select Audio device options slot. void ChannelForm::selectAudioDevice ( int iAudioItem ) { if (m_iDirtySetup > 0) return; selectAudioDeviceItem(iAudioItem); optionsChanged(); } // Audio device options. void ChannelForm::setupAudioDevice (void) { Device *pDevice = NULL; int iAudioItem = m_ui.AudioDeviceComboBox->currentIndex(); if (iAudioItem >= 0 && iAudioItem < m_audioDevices.count()) pDevice = m_audioDevices.at(iAudioItem); setupDevice(pDevice, Device::Audio, m_ui.AudioDriverComboBox->currentText()); } // UPdate all device lists slot. void ChannelForm::updateDevices (void) { if (m_iDirtySetup > 0) return; selectMidiDriverItem(m_ui.MidiDriverComboBox->currentText()); selectAudioDriverItem(m_ui.AudioDriverComboBox->currentText()); optionsChanged(); } // Dirty up settings. void ChannelForm::optionsChanged (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void ChannelForm::stabilizeForm (void) { const bool bValid = m_ui.EngineNameComboBox->currentIndex() >= 0 && m_ui.EngineNameComboBox->currentText() != Channel::noEngineName(); #if 0 const QString& sPath = InstrumentFileComboBox->currentText(); bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); #endif m_ui.DialogButtonBox->button( QDialogButtonBox::Ok)->setEnabled(m_iDirtyCount > 0 && bValid); } void ChannelForm::updateTableCellRenderers (void) { const int rows = m_routingModel.rowCount(); const int cols = m_routingModel.columnCount(); updateTableCellRenderers( m_routingModel.index(0, 0), m_routingModel.index(rows - 1, cols - 1)); } void ChannelForm::updateTableCellRenderers ( const QModelIndex& topLeft, const QModelIndex& bottomRight ) { for (int r = topLeft.row(); r <= bottomRight.row(); r++) { for (int c = topLeft.column(); c <= bottomRight.column(); c++) { const QModelIndex index = m_routingModel.index(r, c); m_ui.AudioRoutingTable->openPersistentEditor(index); } } } } // namespace QSampler // end of qsamplerChannelForm.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDeviceStatusForm.h0000644000000000000000000000013212554456160020765 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.760090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerDeviceStatusForm.h0000644000175000001440000000475112554456160021620 0ustar00rncbcusers00000000000000// qsamplerDeviceStatusForm.h // /**************************************************************************** Copyright (C) 2008, Christian Schoenebeck Copyright (C) 2010-2013, 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 __qsamplerDeviceStatusForm_h #define __qsamplerDeviceStatusForm_h #include "qsamplerDevice.h" #include #include #include #include #include #include namespace QSampler { class MidiActivityLED : public QLabel { Q_OBJECT public: MidiActivityLED(QString sText = QString(), QWidget *pParent = 0); ~MidiActivityLED(); void midiActivityLedOn(); protected slots: void midiActivityLedOff(); private: QTimer m_timer; // MIDI activity pixmap common resources. static int g_iMidiActivityRefCount; static QPixmap *g_pMidiActivityLedOn; static QPixmap *g_pMidiActivityLedOff; }; class DeviceStatusForm : public QWidget { Q_OBJECT public: DeviceStatusForm(int DeviceID, QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); ~DeviceStatusForm(); QAction *visibleAction(); void midiArrived(int iPort); static DeviceStatusForm *getInstance(int iDeviceID); static const std::map& getInstances(); static void onDevicesChanged(); static void onDeviceChanged(int iDeviceID); static void deleteAllInstances(); protected: void closeEvent(QCloseEvent *pCloseEvent); void updateGUIPorts(); private: int m_DeviceID; Device *m_pDevice; QAction *m_pVisibleAction; std::vector m_midiActivityLEDs; static std::map g_instances; }; } // namespace QSampler #endif // __qsamplerDeviceStatusForm_h // end of qsamplerDeviceStatusForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentForm.ui0000644000000000000000000000013212554456160020720 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerInstrumentForm.ui0000644000175000001440000002676212554456160021561 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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. qsamplerInstrumentForm 0 0 452 226 Qt::StrongFocus Qsampler: MIDI Instrument :/images/qsamplerInstrument.png 4 4 0 4 Engine name &Engine: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false EngineNameComboBox &Prog: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ProgSpinBox Program (0-127) 128 1 Vol&ume: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false VolumeSpinBox &Map: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MapComboBox &Bank: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false BankSpinBox Bank (0-16383) 16383 320 0 Instrument filename true M&ode: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false LoadModeComboBox Qt::Horizontal QSizePolicy::Expanding 119 8 &Filename: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentFileComboBox &Name: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false NameLineEdit Instrument map &Instrument: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false InstrumentNrComboBox 320 0 Instrument name Volume (%) % 100 Name Load mode Default On Demand On Demand Hold Persistent 24 24 26 26 Qt::TabFocus Browse for instrument filename :/images/fileOpen.png Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok MapComboBox BankSpinBox ProgSpinBox NameLineEdit EngineNameComboBox InstrumentFileComboBox InstrumentFileToolButton InstrumentNrComboBox VolumeSpinBox LoadModeComboBox DialogButtonBox qsampler-0.3.1/src/PaxHeaders.6862/qsamplerMessages.h0000644000000000000000000000013212554456160017305 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerMessages.h0000644000175000001440000000543612554456160020141 0ustar00rncbcusers00000000000000// qsamplerMessages.h // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerMessages_h #define __qsamplerMessages_h #include class QSocketNotifier; class QTextEdit; class QFile; namespace QSampler { //------------------------------------------------------------------------- // QSampler::Messages - Messages log dockable window. // class Messages : public QDockWidget { Q_OBJECT public: // Constructor. Messages(QWidget *pParent); // Destructor. ~Messages(); // Stdout/stderr capture accessors. bool isCaptureEnabled(); void setCaptureEnabled(bool bCapture); // Message font accessors. QFont messagesFont(); void setMessagesFont(const QFont & font); // Maximum number of message lines accessors. int messagesLimit(); void setMessagesLimit(int iMessagesLimit); // Logging settings. bool isLogging() const; void setLogging(bool bEnabled, const QString& sFilename = QString()); // The main utility methods. void appendMessages(const QString& s); void appendMessagesColor(const QString& s, const QString &c); void appendMessagesText(const QString& s); // Stdout capture functions. void appendStdoutBuffer(const QString& s); void flushStdoutBuffer(); // History reset. void clear(); protected: // Message executives. void appendMessagesLine(const QString& s); void appendMessagesLog(const QString& s); protected slots: // Stdout capture slot. void stdoutNotify(int fd); private: // The maximum number of message lines. int m_iMessagesLines; int m_iMessagesLimit; int m_iMessagesHigh; // The textview main widget. QTextEdit *m_pMessagesTextView; // Stdout capture variables. QSocketNotifier *m_pStdoutNotifier; QString m_sStdoutBuffer; int m_fdStdout[2]; // Logging stuff. QFile *m_pMessagesLog; }; } // namespace QSampler #endif // __qsamplerMessages_h // end of qsamplerMessages.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentForm.h0000644000000000000000000000013212554456160020532 xustar0030 mtime=1437752432.761090073 30 atime=1437752432.761090073 30 ctime=1437752432.761090073 qsampler-0.3.1/src/qsamplerInstrumentForm.h0000644000175000001440000000363612554456160021366 0ustar00rncbcusers00000000000000// qsamplerInstrumentForm.h // /**************************************************************************** Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *****************************************************************************/ #ifndef __qsamplerInstrumentForm_h #define __qsamplerInstrumentForm_h #include "ui_qsamplerInstrumentForm.h" #include "qsamplerInstrument.h" namespace QSampler { //------------------------------------------------------------------------- // QSampler::InstrumentForm -- Instrument map item form interface. // class InstrumentForm : public QDialog { Q_OBJECT public: InstrumentForm(QWidget *pParent = NULL); ~InstrumentForm(); void setup(Instrument* pInstrument); public slots: void nameChanged(const QString& sName); void openInstrumentFile(); void updateInstrumentName(); void instrumentNrChanged(); void accept(); void reject(); void changed(); void stabilizeForm(); private: Ui::qsamplerInstrumentForm m_ui; Instrument *m_pInstrument; int m_iDirtySetup; int m_iDirtyCount; int m_iDirtyName; }; } // namespace QSampler #endif // __qsamplerInstrumentForm_h // end of qsamplerInstrumentForm.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerOptions.cpp0000644000000000000000000000013212554456160017524 xustar0030 mtime=1437752432.763090073 30 atime=1437752432.763090073 30 ctime=1437752432.763090073 qsampler-0.3.1/src/qsamplerOptions.cpp0000644000175000001440000004311312554456160020352 0ustar00rncbcusers00000000000000// qsamplerOptions.cpp // /**************************************************************************** Copyright (C) 2004-2015, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007,2015 Christian Schoenebeck 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 "qsamplerAbout.h" #include "qsamplerOptions.h" #include "qsamplerMainForm.h" #include #include #include #ifdef CONFIG_LIBGIG #include #endif namespace QSampler { //------------------------------------------------------------------------- // QSampler::Options - Prototype settings structure. // // Constructor. Options::Options (void) : m_settings(QSAMPLER_DOMAIN, QSAMPLER_TITLE) { loadOptions(); } // Default Destructor. Options::~Options (void) { saveOptions(); } // Explicit load method. void Options::loadOptions (void) { // Begin into general options group. m_settings.beginGroup("/Options"); // Load server options... m_settings.beginGroup("/Server"); sServerHost = m_settings.value("/ServerHost", "localhost").toString(); iServerPort = m_settings.value("/ServerPort", 8888).toInt(); #if defined(__APPLE__) // Toshi Nagata 20080105 // TODO: Should this be a configure option? iServerTimeout = m_settings.value("/ServerTimeout", 10000).toInt(); #else iServerTimeout = m_settings.value("/ServerTimeout", 1000).toInt(); #endif bServerStart = m_settings.value("/ServerStart", true).toBool(); #if defined(__APPLE__) sServerCmdLine = m_settings.value("/ServerCmdLine", "/usr/local/bin/linuxsampler").toString(); #else sServerCmdLine = m_settings.value("/ServerCmdLine", "linuxsampler").toString(); #endif iStartDelay = m_settings.value("/StartDelay", 3).toInt(); m_settings.endGroup(); // Load logging options... m_settings.beginGroup("/Logging"); bMessagesLog = m_settings.value("/MessagesLog", false).toBool(); sMessagesLogPath = m_settings.value("/MessagesLogPath", "qsampler.log").toString(); m_settings.endGroup(); // Load display options... m_settings.beginGroup("/Display"); sDisplayFont = m_settings.value("/DisplayFont").toString(); bDisplayEffect = m_settings.value("/DisplayEffect", true).toBool(); bAutoRefresh = m_settings.value("/AutoRefresh", true).toBool(); iAutoRefreshTime = m_settings.value("/AutoRefreshTime", 1000).toInt(); iMaxVolume = m_settings.value("/MaxVolume", 100).toInt(); sMessagesFont = m_settings.value("/MessagesFont").toString(); bMessagesLimit = m_settings.value("/MessagesLimit", true).toBool(); iMessagesLimitLines = m_settings.value("/MessagesLimitLines", 1000).toInt(); bConfirmRemove = m_settings.value("/ConfirmRemove", true).toBool(); bConfirmReset = m_settings.value("/ConfirmReset", true).toBool(); bConfirmRestart = m_settings.value("/ConfirmRestart", true).toBool(); bConfirmError = m_settings.value("/ConfirmError", true).toBool(); bKeepOnTop = m_settings.value("/KeepOnTop", true).toBool(); bStdoutCapture = m_settings.value("/StdoutCapture", true).toBool(); bCompletePath = m_settings.value("/CompletePath", true).toBool(); iMaxRecentFiles = m_settings.value("/MaxRecentFiles", 5).toInt(); iBaseFontSize = m_settings.value("/BaseFontSize", 0).toInt(); // if libgig provides a fast way to retrieve instrument names even for large // .gig files, then we enable this feature by default #ifdef CONFIG_LIBGIG_SETAUTOLOAD bInstrumentNames = m_settings.value("/InstrumentNames", true).toBool(); #else bInstrumentNames = m_settings.value("/InstrumentNames", false).toBool(); #endif m_settings.endGroup(); // And go into view options group. m_settings.beginGroup("/View"); bMenubar = m_settings.value("/Menubar", true).toBool(); bToolbar = m_settings.value("/Toolbar", true).toBool(); bStatusbar = m_settings.value("/Statusbar", true).toBool(); bAutoArrange = m_settings.value("/AutoArrange", true).toBool(); m_settings.endGroup(); m_settings.endGroup(); // Options group. // Recent file list. recentFiles.clear(); m_settings.beginGroup("/RecentFiles"); for (int iFile = 0; iFile < iMaxRecentFiles; iFile++) { QString sFilename = m_settings.value( "/File" + QString::number(iFile + 1)).toString(); if (!sFilename.isEmpty()) recentFiles.append(sFilename); } m_settings.endGroup(); // Sampler fine tuning settings. m_settings.beginGroup("/Tuning"); iMaxVoices = m_settings.value("/MaxVoices", -1).toInt(); iMaxStreams = m_settings.value("/MaxStreams", -1).toInt(); m_settings.endGroup(); // Last but not least, get the default directories. m_settings.beginGroup("/Default"); sSessionDir = m_settings.value("/SessionDir").toString(); sInstrumentDir = m_settings.value("/InstrumentDir").toString(); sEngineName = m_settings.value("/EngineName").toString(); sAudioDriver = m_settings.value("/AudioDriver").toString(); sMidiDriver = m_settings.value("/MidiDriver").toString(); iMidiMap = m_settings.value("/MidiMap", 0).toInt(); iMidiBank = m_settings.value("/MidiBank", 0).toInt(); iMidiProg = m_settings.value("/MidiProg", 0).toInt(); iVolume = m_settings.value("/Volume", 100).toInt(); iLoadMode = m_settings.value("/Loadmode", 0).toInt(); m_settings.endGroup(); } // Explicit save method. void Options::saveOptions (void) { // Make program version available in the future. m_settings.beginGroup("/Program"); m_settings.setValue("/Version", QSAMPLER_VERSION); m_settings.endGroup(); // And go into general options group. m_settings.beginGroup("/Options"); // Save server options. m_settings.beginGroup("/Server"); m_settings.setValue("/ServerHost", sServerHost); m_settings.setValue("/ServerPort", iServerPort); m_settings.setValue("/ServerTimeout", iServerTimeout); m_settings.setValue("/ServerStart", bServerStart); m_settings.setValue("/ServerCmdLine", sServerCmdLine); m_settings.setValue("/StartDelay", iStartDelay); m_settings.endGroup(); // Save logging options... m_settings.beginGroup("/Logging"); m_settings.setValue("/MessagesLog", bMessagesLog); m_settings.setValue("/MessagesLogPath", sMessagesLogPath); m_settings.endGroup(); // Save display options. m_settings.beginGroup("/Display"); m_settings.setValue("/DisplayFont", sDisplayFont); m_settings.setValue("/DisplayEffect", bDisplayEffect); m_settings.setValue("/AutoRefresh", bAutoRefresh); m_settings.setValue("/AutoRefreshTime", iAutoRefreshTime); m_settings.setValue("/MaxVolume", iMaxVolume); m_settings.setValue("/MessagesFont", sMessagesFont); m_settings.setValue("/MessagesLimit", bMessagesLimit); m_settings.setValue("/MessagesLimitLines", iMessagesLimitLines); m_settings.setValue("/ConfirmRemove", bConfirmRemove); m_settings.setValue("/ConfirmReset", bConfirmReset); m_settings.setValue("/ConfirmRestart", bConfirmRestart); m_settings.setValue("/ConfirmError", bConfirmError); m_settings.setValue("/KeepOnTop", bKeepOnTop); m_settings.setValue("/StdoutCapture", bStdoutCapture); m_settings.setValue("/CompletePath", bCompletePath); m_settings.setValue("/MaxRecentFiles", iMaxRecentFiles); m_settings.setValue("/BaseFontSize", iBaseFontSize); m_settings.setValue("/InstrumentNames", bInstrumentNames); m_settings.endGroup(); // View options group. m_settings.beginGroup("/View"); m_settings.setValue("/Menubar", bMenubar); m_settings.setValue("/Toolbar", bToolbar); m_settings.setValue("/Statusbar", bStatusbar); m_settings.setValue("/AutoArrange", bAutoArrange); m_settings.endGroup(); m_settings.endGroup(); // Options group. // Recent file list. int iFile = 0; m_settings.beginGroup("/RecentFiles"); QStringListIterator iter(recentFiles); while (iter.hasNext()) m_settings.setValue("/File" + QString::number(++iFile), iter.next()); m_settings.endGroup(); // Sampler fine tuning settings. m_settings.beginGroup("/Tuning"); if (iMaxVoices > 0) m_settings.setValue("/MaxVoices", iMaxVoices); if (iMaxStreams >= 0) m_settings.setValue("/MaxStreams", iMaxStreams); m_settings.endGroup(); // Default directories. m_settings.beginGroup("/Default"); m_settings.setValue("/SessionDir", sSessionDir); m_settings.setValue("/InstrumentDir", sInstrumentDir); m_settings.setValue("/EngineName", sEngineName); m_settings.setValue("/AudioDriver", sAudioDriver); m_settings.setValue("/MidiDriver", sMidiDriver); m_settings.setValue("/MidiMap", iMidiMap); m_settings.setValue("/MidiBank", iMidiBank); m_settings.setValue("/MidiProg", iMidiProg); m_settings.setValue("/Volume", iVolume); m_settings.setValue("/Loadmode", iLoadMode); m_settings.endGroup(); // Save/commit to disk. m_settings.sync(); } //------------------------------------------------------------------------- // Settings accessor. // QSettings& Options::settings (void) { return m_settings; } //------------------------------------------------------------------------- // Command-line argument stuff. // // Help about command line options. void Options::print_usage ( const QString& arg0 ) { QTextStream out(stderr); out << QObject::tr("Usage: %1 [options] [session-file]\n\n" QSAMPLER_TITLE " - " QSAMPLER_SUBTITLE "\n\n" "Options:\n\n" " -s, --start\n\tStart linuxsampler server locally\n\n" " -h, --hostname\n\tSpecify linuxsampler server hostname (default = localhost)\n\n" " -p, --port\n\tSpecify linuxsampler server port number (default = 8888)\n\n" " -?, --help\n\tShow help about command line options\n\n" " -v, --version\n\tShow version information\n\n") .arg(arg0); } // Parse command line arguments into m_settings. bool Options::parse_args ( const QStringList& args ) { QTextStream out(stderr); const QString sEol = "\n\n"; int iCmdArgs = 0; const int argc = args.count(); for (int i = 1; i < argc; i++) { if (iCmdArgs > 0) { sSessionFile += " "; sSessionFile += args.at(i); iCmdArgs++; continue; } QString sArg = args.at(i); QString sVal = QString::null; const 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 (sVal[0] == '-') sVal.clear(); } if (sArg == "-s" || sArg == "--start") { bServerStart = true; } else if (sArg == "-h" || sArg == "--hostname") { if (sVal.isNull()) { out << QObject::tr("Option -h requires an argument (host).") + sEol; return false; } sServerHost = sVal; if (iEqual < 0) i++; } else if (sArg == "-p" || sArg == "--port") { if (sVal.isNull()) { out << QObject::tr("Option -p requires an argument (port).") + sEol; return false; } iServerPort = sVal.toInt(); if (iEqual < 0) i++; } else if (sArg == "-?" || sArg == "--help") { print_usage(args.at(0)); return false; } else if (sArg == "-v" || sArg == "--version") { out << QObject::tr("Qt: %1\n").arg(qVersion()); #ifdef CONFIG_LIBGIG out << QString("%1: %2\n") .arg(gig::libraryName().c_str()) .arg(gig::libraryVersion().c_str()); #endif out << QString("%1: %2\n") .arg(::lscp_client_package()) .arg(::lscp_client_version()); out << QObject::tr(QSAMPLER_TITLE ": %1\n").arg(QSAMPLER_VERSION); return false; } else { // If we don't have one by now, // this will be the startup sesion file... sSessionFile += sArg; iCmdArgs++; } } // Alright with argument parsing. return true; } //--------------------------------------------------------------------------- // Widget geometry persistence helper methods. void Options::loadWidgetGeometry ( QWidget *pWidget, bool bVisible ) { // Try to restore old form window positioning. if (pWidget) { m_settings.beginGroup("/Geometry/" + pWidget->objectName()); const QByteArray& geometry = m_settings.value("/geometry").toByteArray(); if (!geometry.isEmpty()) { pWidget->restoreGeometry(geometry); } else { #if 1//--LOAD_OLD_GEOMETRY QPoint wpos; QSize wsize; wpos.setX(m_settings.value("/x", -1).toInt()); wpos.setY(m_settings.value("/y", -1).toInt()); wsize.setWidth(m_settings.value("/width", -1).toInt()); wsize.setHeight(m_settings.value("/height", -1).toInt()); if (wpos.x() > 0 && wpos.y() > 0) pWidget->move(wpos); if (wsize.width() > 0 && wsize.height() > 0) pWidget->resize(wsize); else #endif pWidget->adjustSize(); } if (!bVisible) bVisible = m_settings.value("/visible", false).toBool(); if (bVisible) pWidget->show(); else pWidget->hide(); m_settings.endGroup(); } } void Options::saveWidgetGeometry ( QWidget *pWidget, bool bVisible ) { // 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()); #if 0//--SAVE_OLD_GEOMETRY const QPoint& wpos = pWidget->pos(); const QSize& wsize = pWidget->size(); m_settings.setValue("/x", wpos.x()); m_settings.setValue("/y", wpos.y()); m_settings.setValue("/width", wsize.width()); m_settings.setValue("/height", wsize.height()); #endif m_settings.setValue("/geometry", pWidget->saveGeometry()); if (!bVisible) bVisible = pWidget->isVisible(); m_settings.setValue("/visible", bVisible); m_settings.endGroup(); } } //--------------------------------------------------------------------------- // Combo box history persistence helper implementation. void Options::loadComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { const bool bBlockSignals = pComboBox->blockSignals(true); // 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(); pComboBox->blockSignals(bBlockSignals); } void Options::saveComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { const bool bBlockSignals = pComboBox->blockSignals(true); // 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); pComboBox->setCurrentIndex(0); ++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(); pComboBox->blockSignals(bBlockSignals); } int Options::getMaxVoices() { #ifndef CONFIG_MAX_VOICES return -1; #else if (iMaxVoices > 0) return iMaxVoices; return getEffectiveMaxVoices(); #endif // CONFIG_MAX_VOICES } int Options::getEffectiveMaxVoices() { #ifndef CONFIG_MAX_VOICES return -1; #else MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return -1; return ::lscp_get_voices(pMainForm->client()); #endif // CONFIG_MAX_VOICES } void Options::setMaxVoices(int iMaxVoices) { #ifdef CONFIG_MAX_VOICES if (iMaxVoices < 1) return; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; lscp_status_t result = ::lscp_set_voices(pMainForm->client(), iMaxVoices); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_voices"); return; } this->iMaxVoices = iMaxVoices; #endif // CONFIG_MAX_VOICES } int Options::getMaxStreams() { #ifndef CONFIG_MAX_VOICES return -1; #else if (iMaxStreams > 0) return iMaxStreams; return getEffectiveMaxStreams(); #endif // CONFIG_MAX_VOICES } int Options::getEffectiveMaxStreams() { #ifndef CONFIG_MAX_VOICES return -1; #else MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return -1; return ::lscp_get_streams(pMainForm->client()); #endif // CONFIG_MAX_VOICES } void Options::setMaxStreams(int iMaxStreams) { #ifdef CONFIG_MAX_VOICES if (iMaxStreams < 0) return; MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; lscp_status_t result = ::lscp_set_streams(pMainForm->client(), iMaxStreams); if (result != LSCP_OK) { pMainForm->appendMessagesClient("lscp_set_streams"); return; } this->iMaxStreams = iMaxStreams; #endif // CONFIG_MAX_VOICES } void Options::sendFineTuningSettings() { setMaxVoices(iMaxVoices); setMaxStreams(iMaxStreams); MainForm *pMainForm = MainForm::getInstance(); if (!pMainForm || !pMainForm->client()) return; pMainForm->appendMessages(QObject::tr("Sent fine tuning settings.")); } } // namespace QSampler // end of qsamplerOptions.cpp qsampler-0.3.1/src/PaxHeaders.6862/qsamplerInstrumentListForm.ui0000644000000000000000000000013212554456160021554 xustar0030 mtime=1437752432.762090073 30 atime=1437752432.762090073 30 ctime=1437752432.762090073 qsampler-0.3.1/src/qsamplerInstrumentListForm.ui0000644000175000001440000000661412554456160022407 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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. qsamplerInstrumentListForm 0 0 720 340 Qsampler: Instruments :/images/qsamplerInstrument.png Qt::Horizontal TopToolBarArea false :/images/itemNew.png New &Instrument... New Ins :/images/formEdit.png &Edit... Edit Enter :/images/formRemove.png &Delete Delete Del :/images/formRefresh.png &Refresh Refresh F5 qsampler-0.3.1/src/PaxHeaders.6862/qsamplerChannel.h0000644000000000000000000000013212554456160017106 xustar0030 mtime=1437752432.757090073 30 atime=1437752432.757090073 30 ctime=1437752432.757090073 qsampler-0.3.1/src/qsamplerChannel.h0000644000175000001440000001652612554456160017744 0ustar00rncbcusers00000000000000// qsamplerChannel.h // /**************************************************************************** Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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 __qsamplerChannel_h #define __qsamplerChannel_h #include #include #include #include #include "qsamplerOptions.h" namespace QSampler { class Device; // Typedef'd QMap. typedef QMap ChannelRoutingMap; //------------------------------------------------------------------------- // QSampler::Channel - Sampler channel structure. // class Channel { public: // Constructor. Channel(int iChannelID = -1); // Default destructor. ~Channel(); // Add/remove sampler channel methods. bool addChannel(); bool removeChannel(); // Sampler channel ID accessors. int channelID() const; void setChannelID(int iChannelID); // Readable channel name. QString channelName() const; // Engine name property. const QString& engineName() const; bool loadEngine(const QString& sEngineName); // Instrument file and index. const QString& instrumentFile() const; int instrumentNr() const; const QString& instrumentName() const; int instrumentStatus() const; // Instrument file loader. bool loadInstrument(const QString& sInstrumentFile, int iInstrumentNr); // Special instrument file/name/number settler. bool setInstrument(const QString& sInstrumentFile, int iInstrumentNr); // MIDI input driver (DEPRECATED). const QString& midiDriver() const; bool setMidiDriver(const QString& sMidiDriver); // MIDI input device. int midiDevice() const; bool setMidiDevice(int iMidiDevice); // MIDI input port. int midiPort() const; bool setMidiPort(int iMidiPort); // MIDI input channel. int midiChannel() const; bool setMidiChannel(int iMidiChannel); // MIDI instrument map. int midiMap() const; bool setMidiMap(int iMidiMap); // Audio output driver (DEPRECATED). const QString& audioDriver() const; bool setAudioDriver(const QString& sAudioDriver); // Audio output device. int audioDevice() const; bool setAudioDevice(int iAudioDevice); // Sampler channel volume. float volume() const; bool setVolume(float fVolume); // Sampler channel mute state. bool channelMute() const; bool setChannelMute(bool bMute); // Sampler channel solo state. bool channelSolo() const; bool setChannelSolo(bool bSolo); // Audio routing accessors. int audioChannel(int iAudioOut) const; bool setAudioChannel(int iAudioOut, int iAudioIn); // The audio routing map itself. const ChannelRoutingMap& audioRouting() const; // Istrument name remapper. void updateInstrumentName(); // Channel info structure map executive. bool updateChannelInfo(); // Channel setup dialog form. bool channelSetup(QWidget *pParent); // Reset channel method. bool channelReset(); // Spawn instrument editor method. bool editChannel(); // Message logging methods (brainlessly mapped to main form's). void appendMessages (const QString & s) const; void appendMessagesColor (const QString & s, const QString & c) const; void appendMessagesText (const QString & s) const; void appendMessagesError (const QString & s) const; void appendMessagesClient (const QString & s) const; // Context menu event handler. void contextMenuEvent(QContextMenuEvent *pEvent); // Common (invalid) name-helpers. static QString noEngineName(); static QString noInstrumentName(); static QString loadingInstrument(); // Check whether a given file is an instrument file. static bool isDlsInstrumentFile (const QString& sInstrumentFile); static bool isSf2InstrumentFile (const QString& sInstrumentFile); // Retrieve the available instrument name(s) of an instrument file (.gig). static QString getInstrumentName (const QString& sInstrumentFile, int iInstrumentNr, bool bInstrumentNames); static QStringList getInstrumentList (const QString& sInstrumentFile, bool bInstrumentNames); private: // Unique channel identifier. int m_iChannelID; // Sampler channel info map. QString m_sEngineName; QString m_sInstrumentName; QString m_sInstrumentFile; int m_iInstrumentNr; int m_iInstrumentStatus; QString m_sMidiDriver; int m_iMidiDevice; int m_iMidiPort; int m_iMidiChannel; int m_iMidiMap; QString m_sAudioDriver; int m_iAudioDevice; float m_fVolume; bool m_bMute; bool m_bSolo; // The audio routing mapping. ChannelRoutingMap m_audioRouting; }; //------------------------------------------------------------------------- // QSampler::ChannelRoutingModel - data model for audio routing // (used for QTableView) // struct ChannelRoutingItem { QStringList options; int selection; }; class ChannelRoutingModel : public QAbstractTableModel { Q_OBJECT public: ChannelRoutingModel(QObject* pParent = NULL); // overridden methods from subclass(es) int rowCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex()) const; Qt::ItemFlags flags(const QModelIndex& index) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; // own methods ChannelRoutingMap routingMap() const { return m_routing; } void clear() { m_routing.clear(); } public slots: void refresh(Device *pDevice, const ChannelRoutingMap& routing); private: Device *m_pDevice; ChannelRoutingMap m_routing; }; //------------------------------------------------------------------------- // QSampler::ChannelRoutingDelegate - table cell renderer for audio routing // class ChannelRoutingDelegate : public QItemDelegate { Q_OBJECT public: ChannelRoutingDelegate(QObject* pParent = NULL); QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *pEditor, const QModelIndex& index) const; void setModelData(QWidget *pEditor, QAbstractItemModel* model, const QModelIndex& index) const; void updateEditorGeometry(QWidget *pEditor, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; } // namespace QSampler // So we can use it i.e. through QVariant Q_DECLARE_METATYPE(QSampler::ChannelRoutingItem) #endif // __qsamplerChannel_h // end of qsamplerChannel.h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerUtilities.h0000644000000000000000000000013212554456160017511 xustar0030 mtime=1437752432.764090073 30 atime=1437752432.764090073 30 ctime=1437752432.764090073 qsampler-0.3.1/src/qsamplerUtilities.h0000644000175000001440000000270412554456160020340 0ustar00rncbcusers00000000000000// qsamplerUtilities.h // /**************************************************************************** Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck 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 __qsamplerUtilities_h #define __qsamplerUtilities_h #include namespace qsamplerUtilities { struct lscpVersion_t { int major; int minor; }; QString lscpEscapePath(const QString& sPath); QString lscpEscapedPathToPosix(QString path); QString lscpEscapeText(const QString& txt); QString lscpEscapedTextToRaw(QString txt); lscpVersion_t getRemoteLscpVersion(); } // namespace qsamplerUtilities #endif // __qsamplerUtilities_h qsampler-0.3.1/src/PaxHeaders.6862/qsamplerDeviceForm.ui0000644000000000000000000000013212554456160017747 xustar0030 mtime=1437752432.760090073 30 atime=1437752432.760090073 30 ctime=1437752432.760090073 qsampler-0.3.1/src/qsamplerDeviceForm.ui0000644000175000001440000002437012554456160020601 0ustar00rncbcusers00000000000000 rncbc aka Rui Nuno Capela qsampler - A LinuxSampler Qt GUI Interface. Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck 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. qsamplerDeviceForm 0 0 601 378 Qt::StrongFocus Qsampler: Devices :/images/qsamplerDevice.png 9 6 7 7 0 0 Qt::Horizontal 4 120 0 Device list false true Devices 7 7 0 0 Qt::Vertical 4 0 6 0 6 75 true Device name false 4 Dri&ver: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false DriverNameComboBox Driver type name true QAbstractItemView::NoSelection false 0 6 0 6 Channel: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false DevicePortComboBox 7 0 0 0 120 0 Device port/channel true QAbstractItemView::NoSelection false 0 4 Refresh device list view &Refresh :/images/formRefresh.png Qt::Horizontal QSizePolicy::Expanding 180 20 Create device &Create :/images/deviceCreate.png Delete device &Delete :/images/deviceDelete.png Close this dialog Close :/images/formReject.png DeviceListView RefreshDevicesPushButton DriverNameComboBox DevicePortComboBox CreateDevicePushButton DeleteDevicePushButton ClosePushButton qsampler-0.3.1/PaxHeaders.6862/TODO0000644000000000000000000000013212554456160013521 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/TODO0000644000175000001440000000136612554456160014353 0ustar00rncbcusers00000000000000Qsampler - A LinuxSampler Qt GUI Interface ------------------------------------------ TODOs - Complete coverage of the LinuxSampler Control Protocol: - Support for FX Sends - Allowing to create more than the two standard MIDI instrument maps ("Chromatic" / "Drumkits"). - Instruments DB support. - Support for handling sampler events (see chapter 5.2 "Subscribe/notify communication method" of the LSCP specs). - Support for handling "multiplicity" type parameters in the device management dialog (i.e. for parameter "ALSA_SEQ_BINDINGS" of LS's ALSA MIDI driver, allowing to make arbitrary amount of MIDI connections). At the moment one can only set a scalar value for these parameter types. - Any feature one can think of ;) qsampler-0.3.1/PaxHeaders.6862/TRANSLATORS0000644000000000000000000000013212554456160014570 xustar0030 mtime=1437752432.753090072 30 atime=1437752432.753090072 30 ctime=1437752432.753090072 qsampler-0.3.1/TRANSLATORS0000644000175000001440000000016212554456160015413 0ustar00rncbcusers00000000000000Czech (cs) Pavel Fric Russian (ru) Alexandre Prokoudine