Projects
Multimedia
jack_mixer
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
jack_mixer.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sat Apr 3 21:21:21 UTC 2021 - olaf@aepfle.de + +- Update to version 15.1 + +------------------------------------------------------------------- Fri Jan 06 07:44:47 CET 2012 - pascal.bleser@opensuse.org - initial version (9)
View file
jack_mixer.spec
Changed
@@ -1,31 +1,25 @@ # vim: set sw=4 ts=4 et nu: +%define skip_python2 1 Name: jack_mixer -Version: 9 +Version: 15.1 Release: 0 Summary: JACK Audo Mixer Application -Source: http://download.gna.org/jackmixer/jack_mixer-%{version}.tar.gz -URL: http://home.gna.org/jackmixer/ +Source: %{name}-%{version}.tar.xz +URL: https://github.com/jack-mixer/jack_mixer Group: Productivity/Multimedia/Sound/Mixers License: GPL-2.0 -BuildRequires: gconf2 -BuildRequires: hicolor-icon-theme -BuildRequires: libtool -BuildRequires: pkgconfig -BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: meson >= 0.53 BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(jack) -BuildRequires: pkgconfig(python2) -BuildRequires: python-fpconst -BuildRequires: python-gtk BuildRequires: python-rpm-macros +BuildRequires: %{python_module Cython} +BuildRequires: %{python_module docutils} BuildRequires: update-desktop-files -Requires: python-gtk -Requires: python-fpconst -Recommends: python-gconf -Recommends: python-lash -Requires(pre): gconf2 -%gconf_schemas_prereq +Requires: %{python3_dist pygobject} +Requires: %{python3_dist pyxdg} +Requires: python3-gobject-Gdk +Requires: python3-gobject-cairo %description jack_mixer is a GTK+ JACK audio mixer app with a look similar to its hardware @@ -44,32 +38,43 @@ %autosetup -p1 %build -CFLAGS='%{optflags} -Wno-deprecated-declarations' -%configure --disable-schemas-install -%make_build +: %python_sitelib +: %python_sitearch +PYTHON=$(type -P "python3" | xargs --no-run-if-empty readlink -f) +for i in $(find * -type f -exec grep -l '%{_bindir}/python$' '{}' +) +do + sed -i~ " + s@%{_bindir}/python[.0-9]*@$PYTHON@ + " "$i" + diff -u "$i"~ "$i" && exit 1 + touch --reference="$i"~ "$i" + rm -fv "$i"~ +done +for i in $(find * -type f -exec grep -l '%{_bindir}/env python' '{}' +) +do + sed -i~ " + s@%{_bindir}/env python[.0-9]*@$PYTHON@ + " "$i" + diff -u "$i"~ "$i" && exit 1 + touch --reference="$i"~ "$i" + rm -fv "$i"~ +done +%meson \ + -Dcheck-py-modules=false \ + %{nil} +%meson_build %install -export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" -%make_install - -rm -fv "%{buildroot}%{python2_sitelib}"/*.la +%meson_install %suse_update_desktop_file -r "%{name}" AudioVideo Mixer -%find_gconf_schemas - -%pre -f %{name}.schemas_pre - -%preun -f %{name}.schemas_preun - -%posttrans -f %{name}.schemas_posttrans - -%files -f %{name}.schemas_list -%{_bindir}/jack_mixer -%{_bindir}/jack_mixer.py -%{python2_sitelib}/jack_mixer_c.so -%{_datadir}/icons/*/*/apps/jack_mixer.* -%{_datadir}/jack_mixer -%{_datadir}/applications/jack_mixer.desktop +%files +%{_bindir}/* +%{_datadir}/icons/* +%{_datadir}/applications/%{name}.desktop +%{_mandir}/*/* +%{python_sitelib}/%{name} +%{python_sitearch}/%{name} %changelog
View file
_service
Added
@@ -0,0 +1,14 @@ +<services> + <service name="tar_scm" mode="disabled"> + <param name="filename">jack_mixer</param> + <param name="revision">cbedd2bd52201f34befb55035da2478b9f892424</param> + <param name="scm">git</param> + <param name="url">https://github.com/jack-mixer/jack_mixer.git</param> + <param name="versionformat">15.1</param> + </service> + <service name="recompress" mode="disabled"> + <param name="file">*.tar</param> + <param name="compression">xz</param> + </service> + <service name="set_version" mode="disabled"/> +</services>
View file
jack_mixer-15.1.tar.xz/.flake8
Added
@@ -0,0 +1,12 @@ +[flake8] +ignore = E116, E265, E266, E731, W503, W504 +max-line-length = 99 +extend-exclude = + build, + builddir, + data, + dist, + nsmclient.py +per-file-ignores = + # import not at top of file due to gi.require_version + app.py: E402
View file
jack_mixer-9.tar.gz/AUTHORS -> jack_mixer-15.1.tar.xz/AUTHORS
Changed
@@ -1,9 +1,22 @@ Current Maintainer ================== -Frederic Peters <fpeters@0d.be> +Frédéric Péters <fpeters@0d.be> -Original Author -=============== +Authors +======= -Nedko Arnaudov <nedko@arnaudov.name> +* Nedko Arnaudov <nedko@arnaudov.name> (original author) +* Christopher Arndt <chris@chrisarndt.de> +* Arnout Engelen <arnouten@bzzt.net> +* John Hedges <john@drystone.co.uk> +* Olivier Humbert <trebmuh@tuxfamily.org> +* Sarah Mischke <sarah@spooky-online.de> +* Frédéric Péters <fpeters@0d.be> +* Daniel Sheeler <dsheeler@pobox.com> +* Athanasios Silis <athanasios.silis@gmail.com> + +Artwork +======= + +The jack_mixer application icon has been created by Lapo Calamandrei.
View file
jack_mixer-15.1.tar.xz/CHANGELOG.md
Added
@@ -0,0 +1,292 @@ +Change Log +========== + + +## Version 15.1 (2021-03-15) + +**Bugfix release** + +Fixed: + +* In fixing issue #81 a regression was introduced in version 15, which caused + channel volume levels to not be restored when loading a project XML file. + +* The `Channel.autoset_*_midi_cc` methods in the Cython extension module didn't + return the int result from the C functions they call, causing mis-leading + debug log messages. + + +Project infrastructure and internals: + +* A [wiki] was added to the `jack_mixer` GitHub project and a page with + instructions on how to install from source on debian / Ubuntu. + +* The dependencies for building a Python wheel via `pip` were updated. + +* When building from a Git checkout, the `cython` program is also found when it + is installed as `cython3`. + +* Debug logging can be enabled by setting the `JACK_MIXER_DEBUG` environment + variable (for when the `-d` command line switch can't be used, e.g. when run + via NSM). + +This release was created by Christopher Arndt. + + +[wiki]: https://github.com/jack-mixer/jack_mixer/wiki + + +## Version 15 (2021-02-25) + +**Important change:** `jack_mixer` now uses [meson] for building and +installation. See [INSTALL.md] for new build instructions. + + +New: + +* A global setting for default project file path was added and can be changed + in the preference dialog. + + The default value is `$XDG_DATA_HOME/jack_mixer` (which is normally + `~/.local/share/jack_mixer`). + +* A "Recent projects" menu was added, to allow loading recently used / saved + projects more quickly. + +* Direct channel output ports are now optional and can be enabled/disabled in + the channel preferences dialog. + +* Ctrl+left-click on the mute ("M") or solo ("S") channel buttons now activates + exclusive mute resp. solo. + +* A man page for `jack_mixer` was added. + +* `jack_mix_box` now supports the `-p|--pickup` command line option to enable + MIDI pickup mode, to prevent sudden volume or balance value jumps. + + +Fixed: + +* Activating the solo function on an input channel could cause its + output signal be sent to the monitor outputs instead of the signal + from the channel, which had monitoring activated. + +* Volume and balance level and mute and solo state changes originating from + the UI now send the correct assigned MIDI CCs, allowing for MIDI feedback + to controllers. Same for changes originating from reception of assigned MIDI + CCs. + +* The handler for right-clicking the input channel mute/solo buttons, was + accidentally removed and is now re-instated. + +* Creating a new output channel assigns it a randomly chosen color, + which can be changed in the new channel dialog (used to work + some releases ago, but was broken at some point). + +* The `jack_mix_box` command line options `--help` and `--stereo` + erroneously required an argument. + +* Saving the current project on reception of the `SIGUSR1` signal, which is a + requirement for LADISH level L1 support, was broken in version 14. + +* When re-ordering channels via drag-and-drop, the order of the edit / remove + channel menu items were not updated. + +* When creating an output channel, it could happen that the initial channel + volume would randomly be set to -inf or 0 dB, regardless of what was + selected in new channel dialog. + + +Changed: + +* The minimum supported Python version is now 3.6. + +* The `jack_mix_box` command line usage help message was improved. + +* The channel strip buttons (solo, mute, etc.) now have more distinctive colors + when activated or the mouse hovers over them. + +* The balance slider step size was increased slightly so right-clicking the + slider changes the value more rapidly. + +* When using the "Save as..." function, `jack_mixer` now sets the default + filename and directory for file chooser to the last ones used. + +* A window title was added to the preferences dialog. + +* MIDI control for mute and solo now interprets control value 0-63 as off + and 64-127 as on, instead of toggling the state on reception of any + controller value. + + +Project infrastructure and internals: + +* The `jack_mixer_c` Python extension module, which was originally implemented + in hand-written C code using the PYTHON C API, was replaced with the + `_jack_mixer` extension module implemented in [Cython], which generates the C + code in `_jack_mixer.c`. + +* The autotools build toolchain was replaced with a build setup using [meson], + which improves build times and maintainability markedly. See the file + [INSTALL.md] for updated build and installation instructions. + +* A build option to allow building only `jack_mix_box` was added (`-Dgui=disabled`). + +* All Python code was re-formatted with [black]. + +* All errors and warnings reported by [flake8] were fixed or are explicitly and + selectively ignored. + +* The file `version.py` is now generated from the version set in the project + definition in the top-level `meson.build` file, leaving this as the only + place where the version number needs to be updated before a release. + +* The `NEWS` file was renamed to `CHANGELOG.md` and converted to Markdown + format. + +This release was created by Christopher Arndt. With a contribution from +Athanasios Silis. + + +[INSTALL.md]: ./INSTALL.md +[black]: https://pypi.org/project/black/ +[Cython]: https://cython.org/ +[meson]: https://mesonbuild.com/ +[flake8]: https://pypi.org/project/flake8/ + + +## Version 14 (2020-10-15) + +* Changes to channel fader/meter layout and features: + * Added K20 and K14 scales. + * Added tick marks for left/center/right on balance slider and add tooltip + displaying left/right value. + * Added maximum width for control group labels. Labels are ellipsized if + too long and a tooltip with the full name is added. +* Channel add/property dialogs usability improvements: + * Remember last used settings for new input/outut channel dialogs (MIDI CCs + are always initialized with -1 by default, so they can be auto-assigned). + * Channel name is pre-filled in with "Input" or "output" and an + auto-incremented number suffix. + * Add mnemonics for all input/output channel dialog fields. +* When running under NSM, closing the main window only hides UI and the "Quit" + menu entry is replaced with a "Hide" entry. +* Added a global option to always ask for confirmation when quitting + jack_mixer. +* Allow drag'n'drop to change channel positions. +* Added ability to shrink/expand width of input and output channels. +* The font color of control group labels automatically adapts to their + background color for better contrast and readability. +* Fixed: Ctrl-click on volume fader sets it to 0.0 dbFS, not 1.0. +* Fixed: some issues with channel monitoring. +* Fixed: don't create empty project file on new NSM session. +* Fixed: on project load, give input focus to fader of last added channel and + deselect volume entry widget so keyboard input doesn't accidentally change + the value. + +With contributions from Christopher Arndt, Daniel Sheeler and Frédéric Péters. + + +## Version 13 (2020-07-16) + +* Added NSM support. +* Store preferences to per session config file to override global + preferences. +* Added accelerator shortcuts to menu items. +* New ctrl-click, double-click, scroll, and click-drag-anywhere + fader behaviors. +* Added MIDI 'Pick Up' behavior to avoid discontinuities. +* Can choose output channel colors.
View file
jack_mixer-15.1.tar.xz/INSTALL.md
Added
@@ -0,0 +1,133 @@ +Installation +============ + +**jack_mixer** uses [meson] and optionally a Python [PEP-517]-compliant build +system for building, installation and packaging. + + +## Requirements + +Build requirements: + + * GCC (version 9.x or 10.x recommended) + * meson >= 0.54.0[<sup>1</sup>](#1) + * [ninja] + * Python headers + * [JACK] headers + * glib2 headers + * [Cython] (optional, required if building from a Git checkout) + * [docutils] (optional, `rst2man` required if building from a Git checkout) + +Runtime requirements: + + * Python >= 3.6 + * [Pygobject] + * [pycairo] + * JACK library and server + +Optional run-time dependencies: + +* [pyxdg] (for saving your preferences, strongly recommended) +* [NSM] (for NSM session management support) + +The run-time Python dependencies are checked by meson when setting up the +build directory. To disable this, use the `-Dcheck-py-modules=false` option to +`meson setup.` + +<a class="anchor" id="1"></a> + +<sup>1</sup> *meson 0.53.0 also works if you use `ninja compile` and +`ninja install` instead of `meson compile` and `meson install`.* + + +## Building + +Building with meson always happens in a special build directory. Set up the +build in the `builddir` sub-directory and configure the build with: + +```console +meson setup builddir --prefix=/usr --buildtype=release +``` + +Then build the software with: + +```console +meson compile -C builddir +``` + +**Note:** *For building **jack_mixer** from source on **debian / Ubuntu** +derrived Linux distributions, please refer to this [wiki page]. If possible, +use your distribution's package manager to install **jack_mixer**.* + + +## Installation + +```console +[sudo] meson install -C builddir +``` + +**Note for packagers**: to install all files under a destination directory +other than the filesystem root, set the `DESTDIR` environment variable for +`meson install`. + +For example: + +```console +DESTDIR="/tmp/jack_mixer-install-root" meson install -C builddir +``` + + +## Build options + +There are several project-specific [options] to configure the build and the +resulting installation. To see all supported options (including [standard +meson options]) and their possible values run: + +```console +meson configure +``` + +If you have already set up the build directory, you can append its name +to see the current values of all options for this build configuration. + +To change an option, pass the build directory and `-Doption=value` to +`meson setup` or `meson configure`. For example: + +```console +meson configure builddir -Dgui=disabled +``` + + +## Building a Python wheel (for maintainers) + +1. Make sure you have Python 3, `git` and [pip] installed and your internet + connection is online. +2. Run the following command to build a binary wheel: + +```console +pip wheel . +``` + +This will automatically download the required build tools, e.g. Cython, meson, +ninja, the Python `wheel` package etc. (see the [pyproject.toml] file for +details), build the software with meson and then package it into a wheel, which +will be placed in the project's root directory. + +The wheel can be installed with `pip install jack_mixer-*.whl`. + + +[docutils]: https://pypi.org/project/docutils/ +[Cython]: https://cython.org/ +[JACK]: https://jackaudio.org/ +[meson]: https://mesonbuild.com/ +[ninja]: https://ninja-build.org/ +[NSM]: https://github.com/linuxaudio/new-session-manager +[options]: https://mesonbuild.com/Build-options.html +[pip]: https://pypi.org/project/pip/ +[pycairo]: https://pypi.org/project/pycairo/ +[PyGObject]: https://pypi.org/project/PyGObject/ +[pyxdg]: https://freedesktop.org/wiki/Software/pyxdg/ +[PEP-517]: https://www.python.org/dev/peps/pep-0517/ +[pyproject.toml]: ./pyproject.toml +[standard meson options]: https://mesonbuild.com/Builtin-options.html +[wiki page]: https://github.com/jack-mixer/jack_mixer/wiki/Installing-on-debian---Ubuntu
View file
jack_mixer-15.1.tar.xz/README.md
Added
@@ -0,0 +1,71 @@ +jack_mixer -- Jack Audio Mixer +============================== + +**jack_mixer** is a GTK+ JACK audio mixer app with a look & handling similar to +hardware mixing desks. It has lot of useful features, apart from being able to +mix multiple JACK audio streams. + +It is licensed under GPL version 2 (or later), check the file [COPYING] for +more information. + +Please visit the project's homepage at https://rdio.space/jackmixer/ for more +information. + + +## Installation + +To build and install jack_mixer run: + +```console +meson builddir --prefix=/usr --buildtype=release +meson compile -C builddir +[sudo] meson install -C builddir +``` + +Please read the file [INSTALL.md] for more information and requirements. + + +## Using MIDI CCs to control jack_mixer + +MIDI Control Change messages (CCs) can be used to control volume, +balance/panorama, mute, and solo of input and output channels. + +The default controllers for added channels are chosen using a predefined +algorithm: the first free controller starting from #11, first for volume, next +for balance/panorama, then mute and finally solo. + +So, if you don't delete channels, CC#11 will control the first channel's +volume, CC#12 the balance/panorama, CC#13 the mute and CC#14 the solo switch. +CC#15 will control the second channel' volume, CC#16 it's balance/panorama, and +so on. + +It is also possible to set other CCs when creating a channel, or afterwards +from the channel properties dialog (accessible from the menu or by double +clicking on the channel name). + +MIDI CC values (0-127) are mapped to dBFS using the current slider scale for +the corresponding channel. + + +## Feedback + +If you have trouble getting jack_mixer working, find a bug or you miss some +feature, please [create an issue] on GitHub or contact the maintainer by email. + +jack_mixer was initially written and supported by Nedko Arnaudov, it is now +maintained by Frédéric Péters. You can reach Frédéric at fpeters (a.t) 0d (dot) +be, and Nedko at nedko (a.t) arnaudov (dot) name. Most recently, the primary +developers are Daniel Sheeler at dsheeler (a.t) pobox (dot) com and Christopher +Arndt at chris (a.t) chrisarndt (dot) de, and you can also usually find these +folks in #jack_mixer or #lad on FreeNode (as fpeters, nedko, dsheeler and +strogon14). + + +## Acknowledgements + +K-meter implemenatation taken from jkmeter, licensed under +the GPL 2, by Fons Adriaensen. + +[COPYING]: ./COPYING +[INSTALL.md]: ./INSTALL.md +[create an issue]: https://github.com/jack-mixer/jack_mixer/issues
View file
jack_mixer-9.tar.gz/data/jack_mixer.desktop -> jack_mixer-15.1.tar.xz/data/jack_mixer.desktop
Changed
@@ -1,5 +1,7 @@ [Desktop Entry] Name=Jack Mixer +Comment=Jack Mixer +Comment[fr]=Mixeur pour JACK Exec=jack_mixer Terminal=false Type=Application
View file
jack_mixer-15.1.tar.xz/data/meson.build
Added
@@ -0,0 +1,27 @@ +# Menu .desktop file +desktop_file = 'jack_mixer.desktop' +install_data( + desktop_file, + install_dir: desktopdir +) + +# Application icons +sizes = [ + '16x16', + '22x22', + '24x24', + '32x32', + '48x48', +] + +foreach size : sizes + install_data( + join_paths('art', size, 'jack_mixer.png'), + install_dir: join_paths(icondir, size, 'apps') + ) +endforeach + +install_data( + join_paths('art', 'scalable', 'jack_mixer.svg'), + install_dir: join_paths(icondir, 'scalable', 'apps') +)
View file
jack_mixer-15.1.tar.xz/docs
Added
+(directory)
View file
jack_mixer-15.1.tar.xz/docs/jack_mixer.1.rst.in
Added
@@ -0,0 +1,275 @@ +============= + jack_mixer +============= + +---------------------------------------------- +A graphical multi-channel audio mixer for JACK +---------------------------------------------- + +:Author: Nedko Arnaudov <nedko@arnaudov.name> (original author), + Frédéric Peters <fpeters@0d.be> (current maintainer). +:Date: 2021-03-15 +:Copyright: GNU General Public License Version 2 +:Version: @VERSION@ +:Manual section: 1 +:Manual group: audio + + +SYNOPSIS +======== + +jack_mixer.py [-h] [-c FILE] [-d] [NAME] + + +DESCRIPTION +=========== + +This manual page documents the **jack_mixer** command. + +**jack_mixer** is a multi-channel audio mixer application for the JACK Audio +Connection Kit with a graphical user interface and has a look & handling similar +to hardware mixing desks. + + +OPTIONS +======= + +positional arguments: + NAME set JACK client name + +optional arguments: + -h, --help show this help message and exit + -c FILE, --config FILE + load mixer project configuration from FILE + -d, --debug enable debug logging messages + + +GUI USAGE +========= + +After starting **jack_mixer**, you need to create at least one input and one +output channel via the respective entries in the "Mixer" menu (see section +**MAIN MENU**). + +Then connect your audio sources to the **jack_mixer's** JACK audio input ports +(see section **JACK AUDIO AND MIDI PORTS**) using ``jack_connect`` or GUI tools +like the QJackCtl's connections window, Catia, Carla, etc. Connect the monitor +channel output port(s) or the output ports of the output channels to the input +ports of your audio interface or any other JACK audio input ports. + +Then adjust input and output channel volume levels and balance as required using +the fader controls in each channel strip (see section **MOUSE BINDINGS** for +ways to to control the faders and routing). + + +JACK AUDIO AND MIDI PORTS +------------------------- + +* For each input channel, **jack_mixer** will create one (if it is a mono + channel) or two (stereo) JACK audio input ports. The input port(s) will be + named like the input channel strip, if it is a mono channel, or with an " L" + resp. " R" suffix, it it is a stero channel. + +* Optionally, for each input channel, it creates a direct, post-fader audio + output port (mono) or pair of output ports (stereo). These are named the same + as their input port(s) with " Out" resp. " Out L" / "Out R" appended. + +* For each ouput channel it will create one (mono) or two (stereo) audio output + ports. + +* Additionally it will create one pair of audio monitor ports named "Monitor L" + and "Monitor R". + +* If **jack_mixer** was compiled with JACK MIDI support, it will also create + one MIDI input ("midi in") and one MIDI output ("midi out") port. + + +MAIN MENU +--------- + +Main Menu: + +Use the **Mixer** menu to: + +* Add an input or output channel. +* Add an output channel. +* Open a file with a preset mixer layout. +* Save the current mixer layout to an XML file. +* Exit **jack_mixer**. + +Use the **Edit** menu to: + +* Change the properties of an input or output channel. +* Remove an input or output channel. +* Toggle all channel strips between wide and narrow view. +* Clear the current mixer layout, i.e. remove all input and output channels. +* Open the setting preferences dialog. + +Use the **Help** menu to show **jack_mixer's** about dialog. + + +MOUSE BINDINGS +-------------- + +Main window: + +* Left-click and drag the vertical divider line horizontally to set the size + distribution of the left and right panels for the input and output channel + strips. If a panel contains more channel strips than can be fit into its + horizontal size, horizontal scrollbars will be available at the bottom of + the panel. + +Channel strip header: + +* Double click the channel strip header to open the channel properties dialog. +* Ctrl+left-click the channel strip header to toggle the channel strip between + wide and narrow view. +* Left-click and drag the channel strip header horizontally to re-order + channel strips. This doesn't effect the order of the JACK output ports + and input channels are always arranged on the left side of the main + **jack_mixer** window and output chanels on the right side. + +Control groups (input channels): + +Each input channel header has a control group for each output channel, which +has the same background color and label as the corresponding output channel +header. + +Each output channel control group shows a pre/post-fader ("P") and a mute ("M") +button and, optionally, a solo ("S") button. + +* Left-click the pre/post-fader ("P") button to toggle the signal sent to the + corresponding output channel between the post-fader (off) and pre-fader (on) + signal of the input channel. +* Left-click the mono ("M") button to mute the signal from the input channel + going to the corresponding output channel. +* Left-click the solo ("S") button to solo the input channel for the + corresponding output channel. i.e. only the signal from this input channel + (plus any other soloed channels) is going to this output channel. + +Volume read-out and peak-indicator: + +* Left-click the volume level read-out to enter a value manually and press + Enter to set it. +* Left/right-click the peak volume level read-out to reset the over-zero + indication. +* Middle-click the peak volume level read-out to set the volume level to + peak at 0 dB at the current signal input level. + +Volume meter: + +* Left-click the pre-fader ("PRE") button below the volume meter to switch the + signal, which is metered, from post-fader (off) to pre-fader (on). + + *(not yet implemented)* + +Volume slider: + +* Left-click and drag vertically anywhere in the slider area to set the channel + output volume level. +* Scroll the mouse wheel up or down over the slider area to increase or + decrease the volume level. +* Right-click anywhere in the slider area to move the volume level slowly + towards the click position. +* Double click to set the volume level to -inf. +* Ctrl+left-click to set the volume level to 0 dBFS. + +Balance slider: + +* Left-click and drag horizontally anywhere in the slider area to set the + balance between the left and right channel of the output signal. +* Scroll the mouse wheel up or down over the slider area to move the + balance to right or left. +* Right-click anywhere in the slider area to move the balance slowly towards + the click position. +* Double click to set the left/right balance to center. + +Channel buttons: + +* Left-click the mono ("M") button to mute signal from channel going to all + output channels (including direct channel outs). +* Ctrl+left-click the mono ("M") button for "exclusive" mute, i.e. the mute + function will be activated on this input or output channel only and + deactivated on all other input resp. output channels. +* Left-click the solo ("S") button to solo an input channel, i.e. only the + signal from this channel is going to all output channels (including the + direct outputs of the channel). + + The solo function is cumulative, i.e. you can activate solo on more than one + input channel and the signals from all soloed channels will be going to each
View file
jack_mixer-15.1.tar.xz/docs/meson.build
Added
@@ -0,0 +1,35 @@ +if get_option('gui').enabled() + fs = import('fs') + + jack_mixer_man = 'jack_mixer.1' + + rst2man = find_program('rst2man', 'rst2man.py', required: false) + + if fs.exists(jack_mixer_man) + install_man(jack_mixer_man) + elif rst2man.found() + jack_mixer_man_rst_in = 'jack_mixer.1.rst.in' + + jack_mixer_man_rst = configure_file( + input: jack_mixer_man_rst_in, + output: 'jack_mixer.1.rst', + configuration: { + 'VERSION': meson.project_version() + } + ) + + jack_mixer_troff = custom_target( + 'jack_mixer_rst2man', + output: jack_mixer_man, + input: jack_mixer_man_rst, + command: [rst2man, '@INPUT@', '@OUTPUT@'], + install: true, + install_dir: join_paths(get_option('mandir'), 'man1') + ) + else + error('Pre-generated file \'jack_mixer.1\' and \'rst2man\' not found.\n' + + 'Please install \'docutils\' from https://pypi.org/project/docutils.') + endif + + meson.add_dist_script('meson_dist_rst2man.py', jack_mixer_man) +endif
View file
jack_mixer-15.1.tar.xz/docs/meson_dist_rst2man.py
Added
@@ -0,0 +1,46 @@ +#!/usr/bin/env python +"""Create/Update man page(s) from ReST source file(s) to be included in source distribution.""" + +import argparse +import shutil +import sys +from os import chdir, environ, getcwd +from os.path import join + +from subprocess import run + +build_root = environ.get("MESON_BUILD_ROOT") +dist_root = environ.get("MESON_DIST_ROOT") +source_root = environ.get("MESON_SOURCE_ROOT") + +ap = argparse.ArgumentParser() +ap.add_argument("-v", "--verbose", action="store_true", help="Be more verbose.") +ap.add_argument("man_page", nargs="*", help="Man page(s) to create.") +args = ap.parse_args() + +if args.verbose: + print("cwd:", getcwd()) + print("build root:", build_root) + print("dist root:", dist_root) + print("source root:", source_root) + print("sys.argv:", sys.argv) + +for man in args.man_page: + target = join("docs", man) + dst = join(dist_root, "docs", man) + + print("Creating man page '%s'" % target) + cmd = ["ninja"] + + if args.verbose: + cmd += ["-v"] + + cmd += [target] + + chdir(build_root) + proc = run(cmd) + + if proc.returncode != 0: + sys.exit("'ninja' returned non-zero (%i) for target '%s'." % (proc.returncode, target)) + + shutil.copy(target, dst)
View file
jack_mixer-15.1.tar.xz/jack_mixer
Added
+(directory)
View file
jack_mixer-15.1.tar.xz/jack_mixer/__main__.py
Added
@@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +import sys + +from jack_mixer.app import main + +if __name__ == "__main__": + sys.exit(main() or 0)
View file
jack_mixer-15.1.tar.xz/jack_mixer/abspeak.py
Added
@@ -0,0 +1,78 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import math + +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GObject + + +class AbspeakWidget(Gtk.EventBox): + def __init__(self): + super().__init__() + self.label = Gtk.Label() + self.add(self.label) + self.connect("button-press-event", self.on_mouse) + self.peak = -math.inf + + def get_style_context(self): + return self.label.get_style_context() + + def on_mouse(self, widget, event): + if event.type == Gdk.EventType.BUTTON_PRESS: + if event.button == 1 or event.button == 2 or event.button == 3: + context = self.get_style_context() + context.remove_class("over_zero") + context.remove_class("is_nan") + + if event.button == 1 or event.button == 3: + self.emit("reset") + elif event.button == 2: + adjust = -self.peak + + if abs(adjust) < 30: # we better don't adjust more than +- 30 dB + self.emit("volume-adjust", adjust) + + def set_peak(self, peak): + self.peak = peak + context = self.get_style_context() + + if math.isnan(peak): + context.remove_class("over_zero") + context.add_class("is_nan") + self.label.set_text("NaN") + else: + text = "%+.1f" % peak + context.remove_class("is_nan") + + if peak > 0: + context.add_class("over_zero") + + self.label.set_text(text) + + +GObject.signal_new( + "reset", AbspeakWidget, GObject.SignalFlags.RUN_FIRST | GObject.SignalFlags.ACTION, None, [] +) +GObject.signal_new( + "volume-adjust", + AbspeakWidget, + GObject.SignalFlags.RUN_FIRST | GObject.SignalFlags.ACTION, + None, + [GObject.TYPE_FLOAT], +)
View file
jack_mixer-15.1.tar.xz/jack_mixer/app.py
Added
@@ -0,0 +1,1128 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# This file is part of jack_mixer +# +# Copyright (C) 2006-2009 Nedko Arnaudov <nedko@arnaudov.name> +# Copyright (C) 2009-2021 Frederic Peters <fpeters@0d.be> et al. +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import getpass +import logging +import datetime +import os +import re +import signal +import sys +from argparse import ArgumentParser +from urllib.parse import urlparse + +import gi + +gi.require_version("Gtk", "3.0") +from gi.repository import Gtk +from gi.repository import GLib + +from . import gui +from . import scale +from ._jack_mixer import Mixer +from .channel import InputChannel, NewInputChannelDialog, NewOutputChannelDialog, OutputChannel +from .nsmclient import NSMClient +from .preferences import PreferencesDialog +from .serialization_xml import XmlSerialization +from .serialization import SerializedObject, Serializator +from .styling import load_css_styles +from .version import __version__ + + +log = logging.getLogger("jack_mixer") + + +def add_number_suffix(s): + def inc(match): + return str(int(match.group(0)) + 1) + + new_s = re.sub(r"(\d+)\s*$", inc, s) + if new_s == s: + new_s = s + " 1" + + return new_s + + +class JackMixer(SerializedObject): + + # scales suitable as meter scales + meter_scales = [ + scale.K20(), + scale.K14(), + scale.IEC268(), + scale.Linear70dB(), + scale.IEC268Minimalistic(), + ] + + # scales suitable as volume slider scales + slider_scales = [scale.Linear30dB(), scale.Linear70dB()] + + def __init__(self, client_name="jack_mixer"): + self.visible = False + self.nsm_client = None + # name of project file that is currently open + self.current_filename = None + self.last_project_path = None + self._monitored_channel = None + self._init_solo_channels = None + + if os.environ.get("NSM_URL"): + self.nsm_client = NSMClient( + prettyName="jack_mixer", + saveCallback=self.nsm_save_cb, + openOrNewCallback=self.nsm_open_cb, + supportsSaveStatus=False, + hideGUICallback=self.nsm_hide_cb, + showGUICallback=self.nsm_show_cb, + exitProgramCallback=self.nsm_exit_cb, + loggingLevel="error", + ) + self.nsm_client.announceGuiVisibility(self.visible) + else: + self.visible = True + self.create_mixer(client_name, with_nsm=False) + + def create_mixer(self, client_name, with_nsm=True): + self.mixer = Mixer(client_name) + if not self.mixer: + raise RuntimeError("Failed to create Mixer instance.") + + self.create_ui(with_nsm) + self.window.set_title(client_name) + + self.monitor_channel = self.mixer.add_output_channel("Monitor", True, True) + + GLib.timeout_add(33, self.read_meters) + GLib.timeout_add(50, self.midi_events_check) + + if with_nsm: + GLib.timeout_add(200, self.nsm_react) + + def cleanup(self): + log.debug("Cleaning jack_mixer.") + if not self.mixer: + return + + for channel in self.channels: + channel.unrealize() + + self.mixer.destroy() + + # --------------------------------------------------------------------------------------------- + # UI creation and (de-)initialization + + def new_menu_item(self, title, callback=None, accel=None, enabled=True): + menuitem = Gtk.MenuItem.new_with_mnemonic(title) + menuitem.set_sensitive(enabled) + if callback: + menuitem.connect("activate", callback) + if accel: + key, mod = Gtk.accelerator_parse(accel) + menuitem.add_accelerator( + "activate", self.menu_accelgroup, key, mod, Gtk.AccelFlags.VISIBLE + ) + return menuitem + + def create_recent_file_menu(self): + def filter_func(item): + return item.mime_type in ("text/xml", "application/xml") and ( + "jack_mixer.py" in item.applications or "jack_mixer" in item.applications + ) + + filter_flags = Gtk.RecentFilterFlags.MIME_TYPE | Gtk.RecentFilterFlags.APPLICATION + recentfilter = Gtk.RecentFilter() + recentfilter.set_name("jack_mixer XML files") + recentfilter.add_custom(filter_flags, filter_func) + + recentchooser = Gtk.RecentChooserMenu.new_for_manager(self.recentmanager) + recentchooser.set_sort_type(Gtk.RecentSortType.MRU) + recentchooser.set_local_only(True) + recentchooser.set_limit(10) + recentchooser.set_show_icons(True) + recentchooser.set_show_numbers(True) + recentchooser.set_show_tips(True) + recentchooser.add_filter(recentfilter) + recentchooser.connect("item-activated", self.on_recent_file_chosen) + + recentmenu = Gtk.MenuItem.new_with_mnemonic("_Recent Projects") + recentmenu.set_submenu(recentchooser) + return recentmenu + + def create_ui(self, with_nsm): + self.channels = [] + self.output_channels = [] + load_css_styles() + + # Main window + self.width = 420 + self.height = 420 + self.paned_position = 210 + self.window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL) + self.window.set_icon_name("jack_mixer") + self.window.set_default_size(self.width, self.height) + + self.gui_factory = gui.Factory(self.window, self.meter_scales, self.slider_scales) + self.gui_factory.connect("midi-behavior-mode-changed", self.on_midi_behavior_mode_changed) + self.gui_factory.emit_midi_behavior_mode() + + # Recent files manager + self.recentmanager = Gtk.RecentManager.get_default() + + self.vbox_top = Gtk.VBox() + self.window.add(self.vbox_top) + + self.menu_accelgroup = Gtk.AccelGroup() + self.window.add_accel_group(self.menu_accelgroup) + + # Main Menu + self.menubar = Gtk.MenuBar() + self.vbox_top.pack_start(self.menubar, False, True, 0) + + mixer_menu_item = Gtk.MenuItem.new_with_mnemonic("_Mixer")
View file
jack_mixer-15.1.tar.xz/jack_mixer/channel.py
Added
@@ -0,0 +1,1417 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import logging + +import gi # noqa: F401 +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GObject +from gi.repository import Pango + +from . import abspeak +from . import meter +from . import slider +from .serialization import SerializedObject +from .styling import set_background_color, random_color + + +log = logging.getLogger(__name__) +BUTTON_PADDING = 1 + + +class Channel(Gtk.Box, SerializedObject): + """Widget with slider and meter used as base class for more specific + channel widgets""" + + num_instances = 0 + + def __init__(self, app, name, stereo=True, direct_output=True, initial_vol=None): + super().__init__(orientation=Gtk.Orientation.VERTICAL) + self.app = app + self.mixer = app.mixer + self.channel = None + self.gui_factory = app.gui_factory + self._channel_name = name + self.stereo = stereo + self.initial_vol = initial_vol + self.meter_scale = self.gui_factory.get_default_meter_scale() + self.slider_scale = self.gui_factory.get_default_slider_scale() + self.slider_adjustment = slider.AdjustmentdBFS(self.slider_scale, 0.0, 0.02) + self.balance_adjustment = slider.BalanceAdjustment() + self.wants_direct_output = direct_output + self.post_fader_output_channel = None + self.future_out_mute = None + self.future_volume_midi_cc = None + self.future_balance_midi_cc = None + self.future_mute_midi_cc = None + self.future_solo_midi_cc = None + self.css_name = "css_name_%d" % Channel.num_instances + self.label_name = None + self.wide = True + self.label_chars_wide = 12 + self.label_chars_narrow = 7 + self.channel_properties_dialog = None + self.monitor_button = None + Channel.num_instances += 1 + + # --------------------------------------------------------------------------------------------- + # Properties + + @property + def channel_name(self): + return self._channel_name + + @channel_name.setter + def channel_name(self, name): + self.app.on_channel_rename(self._channel_name, name) + self._channel_name = name + if self.label_name: + self.label_name.set_text(name) + if len(name) > (self.label_chars_wide if self.wide else self.label_chars_narrow): + self.label_name.set_tooltip_text(name) + if self.channel: + self.channel.name = name + if self.post_fader_output_channel: + self.post_fader_output_channel.name = "%s Out" % name + + # --------------------------------------------------------------------------------------------- + # UI creation and (de-)initialization + + def create_balance_widget(self): + parent = None + if self.balance: + parent = self.balance.get_parent() + self.balance.destroy() + + self.balance = slider.BalanceSlider(self.balance_adjustment, (20, 20), (0, 100)) + + if parent: + parent.pack_end(self.balance, False, True, 0) + + self.balance.show() + + def create_buttons(self): + # Mute, Solo and Monitor buttons + self.hbox_mutesolo = Gtk.Box(False, 0, orientation=Gtk.Orientation.HORIZONTAL) + + self.mute = Gtk.ToggleButton() + self.mute.set_label("M") + self.mute.get_style_context().add_class("mute") + self.mute.set_active(self.channel.out_mute) + self.mute.connect("toggled", self.on_mute_toggled) + self.mute.connect("button-press-event", self.on_mute_button_pressed) + self.hbox_mutesolo.pack_start(self.mute, True, True, 0) + + self.pack_start(self.hbox_mutesolo, False, False, 0) + + self.monitor_button = Gtk.ToggleButton("MON") + self.monitor_button.get_style_context().add_class("monitor") + self.monitor_button.connect("toggled", self.on_monitor_button_toggled) + self.pack_start(self.monitor_button, False, False, 0) + + def create_fader(self): + # HBox for fader and meter + self.vbox_fader = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + self.vbox_fader.get_style_context().add_class("vbox_fader") + + self.hbox_readouts = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + self.hbox_readouts.set_homogeneous(True) + self.hbox_readouts.pack_start(self.volume_digits, False, True, 0) + self.hbox_readouts.pack_start(self.abspeak, False, True, 0) + self.vbox_fader.pack_start(self.hbox_readouts, False, False, 0) + + self.hbox_fader = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + self.hbox_fader.pack_start(self.slider, True, True, 0) + self.hbox_fader.pack_start(self.meter, True, True, 0) + self.vbox_fader.pack_start(self.hbox_fader, True, True, 0) + self.vbox_fader.pack_end(self.balance, False, True, 0) + + self.pack_start(self.vbox_fader, True, True, 0) + + def create_slider_widget(self): + parent = None + if self.slider: + parent = self.slider.get_parent() + self.slider.destroy() + + if self.gui_factory.use_custom_widgets: + self.slider = slider.CustomSliderWidget(self.slider_adjustment) + else: + self.slider = slider.VolumeSlider(self.slider_adjustment) + + if parent: + parent.pack_start(self.slider, True, True, 0) + parent.reorder_child(self.slider, 0) + + self.slider.show() + + def realize(self): + log.debug('Realizing channel "%s".', self.channel_name) + if self.future_out_mute is not None: + self.channel.out_mute = self.future_out_mute + + # Widgets + # Channel strip label + self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + self.pack_start(self.vbox, False, True, 0) + self.label_name = Gtk.Label() + self.label_name.get_style_context().add_class("top_label") + self.label_name.set_text(self.channel_name) + self.label_name.set_max_width_chars( + self.label_chars_wide if self.wide else self.label_chars_narrow + ) + self.label_name.set_ellipsize(Pango.EllipsizeMode.MIDDLE) + self.label_name_event_box = Gtk.EventBox() + self.label_name_event_box.connect("button-press-event", self.on_label_mouse) + self.label_name_event_box.add(self.label_name) + + # Volume slider + self.slider = None + self.create_slider_widget() + # Balance slider + self.balance = None + self.create_balance_widget() + + # Volume entry + self.volume_digits = Gtk.Entry() + self.volume_digits.set_has_frame(False) + self.volume_digits.set_width_chars(5) + self.volume_digits.set_property("xalign", 0.5) + self.volume_digits.connect("key-press-event", self.on_volume_digits_key_pressed) + self.volume_digits.connect("focus-out-event", self.on_volume_digits_focus_out) + self.volume_digits.get_style_context().add_class("readout") + + # Peak level label
View file
jack_mixer-15.1.tar.xz/jack_mixer/gui.py
Added
@@ -0,0 +1,313 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import configparser +import logging +import os + +import gi # noqa: F401 +from gi.repository import GObject + +try: + import xdg + from xdg import BaseDirectory +except ImportError: + xdg = None + +from .serialization import SerializedObject + + +log = logging.getLogger(__name__) + + +def lookup_scale(scales, scale_id): + for scale in scales: + if scale_id == scale.scale_id: + return scale + return None + + +class Factory(GObject.GObject, SerializedObject): + def __init__(self, topwindow, meter_scales, slider_scales): + self.midi_behavior_modes = ["Jump To Value", "Pick Up"] + GObject.GObject.__init__(self) + self.topwindow = topwindow + self.meter_scales = meter_scales + self.slider_scales = slider_scales + self.set_default_preferences() + if xdg: + self.config = configparser.ConfigParser() + self.path = os.path.join( + BaseDirectory.save_config_path("jack_mixer"), "preferences.ini" + ) + if os.path.isfile(self.path): + self.read_preferences() + else: + self.write_preferences() + else: + log.warning( + "Cannot load PyXDG. Your preferences will not be preserved across " + "jack_mixer invocations" + ) + + def set_default_preferences(self): + self.confirm_quit = False + self.default_meter_scale = self.meter_scales[0] + self.default_project_path = None + self.default_slider_scale = self.slider_scales[0] + self.midi_behavior_mode = 0 + self.use_custom_widgets = False + self.vumeter_color = "#ccb300" + self.vumeter_color_scheme = "default" + + def read_preferences(self): + self.config.read(self.path) + self.confirm_quit = self.config.getboolean( + "Preferences", "confirm_quit", fallback=self.confirm_quit + ) + + scale_id = self.config["Preferences"]["default_meter_scale"] + self.default_meter_scale = lookup_scale(self.meter_scales, scale_id) + if not self.default_meter_scale: + self.default_meter_scale = self.meter_scales[0] + + scale_id = self.config["Preferences"]["default_slider_scale"] + self.default_slider_scale = lookup_scale(self.slider_scales, scale_id) + if not self.default_slider_scale: + self.default_slider_scale = self.slider_scales[0] + + self.default_project_path = self.config["Preferences"].get("default_project_path") + + try: + self.midi_behavior_mode = self.config.getint( + "Preferences", "midi_behavior_mode", fallback=self.midi_behavior_mode + ) + except (TypeError, ValueError): + # use default value + pass + + self.use_custom_widgets = self.config.getboolean( + "Preferences", "use_custom_widgets", fallback=self.use_custom_widgets + ) + self.vumeter_color = self.config.get( + "Preferences", "vumeter_color", fallback=self.vumeter_color + ) + self.vumeter_color_scheme = self.config.get( + "Preferences", "vumeter_color_scheme", fallback=self.vumeter_color_scheme + ) + + def write_preferences(self): + self.config["Preferences"] = {} + self.config["Preferences"]["confirm_quit"] = str(self.confirm_quit) + self.config["Preferences"]["default_meter_scale"] = self.default_meter_scale.scale_id + self.config["Preferences"]["default_project_path"] = self.default_project_path or "" + self.config["Preferences"]["default_slider_scale"] = self.default_slider_scale.scale_id + self.config["Preferences"]["midi_behavior_mode"] = str(self.midi_behavior_mode) + self.config["Preferences"]["use_custom_widgets"] = str(self.use_custom_widgets) + self.config["Preferences"]["vumeter_color"] = self.vumeter_color + self.config["Preferences"]["vumeter_color_scheme"] = self.vumeter_color_scheme + with open(self.path, "w") as configfile: + self.config.write(configfile) + configfile.close() + + def set_confirm_quit(self, confirm_quit): + self.confirm_quit = confirm_quit + if xdg: + self.write_preferences() + self.emit("confirm-quit-changed", self.confirm_quit) + + def set_default_meter_scale(self, scale): + if scale: + self.default_meter_scale = scale + if xdg: + self.write_preferences() + self.emit("default-meter-scale-changed", self.default_meter_scale) + else: + log.warning( + 'Ignoring default_meter_scale setting, because "%s" scale is not known.', scale + ) + + def set_default_project_path(self, path): + self.default_project_path = path + if xdg: + self.write_preferences() + self.emit("default-project-path-changed", self.default_project_path) + + def set_default_slider_scale(self, scale): + if scale: + self.default_slider_scale = scale + if xdg: + self.write_preferences() + self.emit("default-slider-scale-changed", self.default_slider_scale) + else: + log.warning( + 'Ignoring default_slider_scale setting, because "%s" scale is not known.', scale + ) + + def set_midi_behavior_mode(self, mode): + self.midi_behavior_mode = int(mode) + self.emit_midi_behavior_mode() + + def set_use_custom_widgets(self, use_custom): + self.use_custom_widgets = use_custom + if xdg: + self.write_preferences() + self.emit("use-custom-widgets-changed", self.use_custom_widgets) + + def set_vumeter_color(self, color): + self.vumeter_color = color + if xdg: + self.write_preferences() + self.emit("vumeter-color-changed", self.vumeter_color) + + def set_vumeter_color_scheme(self, color_scheme): + self.vumeter_color_scheme = color_scheme + if xdg: + self.write_preferences() + self.emit("vumeter-color-scheme-changed", self.vumeter_color_scheme) + + def get_confirm_quit(self): + return self.confirm_quit + + def get_default_meter_scale(self): + return self.default_meter_scale + + def get_default_project_path(self): + if self.default_project_path: + return os.path.expanduser(self.default_project_path) + elif xdg: + return BaseDirectory.save_data_path("jack_mixer") + + def get_default_slider_scale(self): + return self.default_slider_scale + + def get_midi_behavior_mode(self): + return self.midi_behavior_mode
View file
jack_mixer-15.1.tar.xz/jack_mixer/meson.build
Added
@@ -0,0 +1,76 @@ +# https://mesonbuild.com/Python-module.html + +c_args = [] + +if get_option('jack-midi').enabled() + c_args += ['-DHAVE_JACK_MIDI'] +endif + +if get_option('verbose') + c_args += ['-DLOG_LEVEL=0'] +else + c_args += ['-DLOG_LEVEL=2'] +endif + + +# Build and install the extension module +module = python.extension_module( + '_jack_mixer', + [jack_mixer_cython, jack_mixer_sources], + dependencies: [ + python.dependency(), + glib_dep, + jack_dep, + math_dep, + ], + include_directories: jack_mixer_inc, + c_args: c_args, + install: true, + subdir: 'jack_mixer', +) + +version_py = configure_file( + input: 'version.py.in', + output: 'version.py', + configuration: { + 'VERSION': meson.project_version() + } +) + + +# Pure Python sources +python_sources = files([ + 'abspeak.py', + 'app.py', + 'channel.py', + 'gui.py', + '__main__.py', + 'meter.py', + 'nsmclient.py', + 'preferences.py', + 'scale.py', + 'serialization.py', + 'serialization_xml.py', + 'slider.py', + 'styling.py', +]) + + +# Install pure Python modules +python.install_sources( + python_sources, + version_py, + pure: true, + subdir: 'jack_mixer', +) + + +# Install application starter script +if not get_option('wheel') + install_data( + '__main__.py', + rename: 'jack_mixer', + install_dir: bindir, + install_mode: 'rwxr-xr-x' + ) +endif
View file
jack_mixer-15.1.tar.xz/jack_mixer/meter.py
Added
@@ -0,0 +1,230 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import logging + +import cairo +from gi.repository import Gtk +from gi.repository import Gdk + + +log = logging.getLogger(__name__) + + +class MeterWidget(Gtk.DrawingArea): + def __init__(self, scale): + log.debug("Creating MeterWidget for scale %s", scale) + super().__init__() + self.scale = scale + self.color_bg = Gdk.Color(0, 0, 0) + self.color_value = None + self.color_mark = Gdk.Color(int(65535 * 0.2), int(65535 * 0.2), int(65535 * 0.2)) + self.width = 0 + self.height = 0 + self.cache_surface = None + self.min_width = 15 + self.preferred_width = 25 + self.preferred_height = 200 + + self.widen() + + self.connect("draw", self.draw) + self.connect("size-allocate", self.on_size_allocate) + + def narrow(self): + return self.widen(False) + + def widen(self, flag=True): + self.set_size_request( + self.preferred_width if flag else self.min_width, self.preferred_height + ) + + def set_color(self, color): + self.color_value = color + self.cache_surface = None + self.invalidate_all() + + def on_expose(self, widget, event): + cairo_ctx = widget.window.cairo_create() + # set a clip region for the expose event + cairo_ctx.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) + cairo_ctx.clip() + + self.draw(cairo_ctx) + + return False + + def on_size_allocate(self, widget, allocation): + self.width = float(allocation.width) + self.height = float(allocation.height) + self.font_size = 10 + self.cache_surface = None + + def invalidate_all(self): + self.queue_draw_area(0, 0, int(self.width), int(self.height)) + + def draw_background(self, cairo_ctx): + if not self.cache_surface: + self.cache_surface = cairo.Surface.create_similar( + cairo_ctx.get_target(), cairo.CONTENT_COLOR, int(self.width), int(self.height) + ) + cache_cairo_ctx = cairo.Context(self.cache_surface) + + cache_cairo_ctx.set_source_rgba(0, 0, 0, 0) + cache_cairo_ctx.rectangle(0, 0, self.width, self.height) + cache_cairo_ctx.fill() + + cache_cairo_ctx.set_source_rgba(0.2, 0.2, 0.2, 1) + cache_cairo_ctx.select_font_face("Fixed") + cache_cairo_ctx.set_font_size(self.font_size) + glyph_width = self.font_size * 3 / 5 # avarage glyph ratio + + for mark in self.scale.get_marks(): + mark_position = int(self.height * (1 - mark.scale)) + cache_cairo_ctx.move_to(0, mark_position) + cache_cairo_ctx.line_to(self.width, mark_position) + cache_cairo_ctx.stroke() + x_correction = self.width / 2 - glyph_width * len(mark.text) / 2 + cache_cairo_ctx.move_to(x_correction, mark_position - 2) + cache_cairo_ctx.show_text(mark.text) + + cairo_ctx.set_source_surface(self.cache_surface, 0, 0) + cairo_ctx.paint() + + def draw_value(self, cairo_ctx, value, x, width): + if self.color_value is not None: + cairo_ctx.set_source_rgb( + self.color_value.red / 65535.0, + self.color_value.green / 65535.0, + self.color_value.blue / 65535.0, + ) + else: + height = self.height + gradient = cairo.LinearGradient(1, 1, width - 1, height - 1) + + if self.scale.scale_id == "K20": + gradient.add_color_stop_rgb(0, 1, 0, 0) + gradient.add_color_stop_rgb(0.38, 1, 1, 0) + gradient.add_color_stop_rgb(0.5, 0, 1, 0) + gradient.add_color_stop_rgb(1, 0, 0, 1) + elif self.scale.scale_id == "K14": + gradient.add_color_stop_rgb(0, 1, 0, 0) + gradient.add_color_stop_rgb(1 - self.scale.db_to_scale(-14), 1, 1, 0) + gradient.add_color_stop_rgb(1 - self.scale.db_to_scale(-24), 0, 1, 0) + gradient.add_color_stop_rgb(1, 0, 0, 1) + else: + gradient.add_color_stop_rgb(0, 1, 0, 0) + gradient.add_color_stop_rgb(0.2, 1, 1, 0) + gradient.add_color_stop_rgb(1, 0, 1, 0) + + cairo_ctx.set_source(gradient) + + cairo_ctx.rectangle(x, self.height * (1 - value), width, self.height * value) + cairo_ctx.fill() + + def draw_peak(self, cairo_ctx, value, x, width): + cairo_ctx.set_source_rgb(1, 1, 1) + cairo_ctx.rectangle(x, self.height * (1 - value), width, 2.5) + cairo_ctx.fill() + + def set_scale(self, scale): + self.scale = scale + self.cache_surface = None + self.invalidate_all() + + +class MonoMeterWidget(MeterWidget): + def __init__(self, scale): + super().__init__(scale) + self.value = 0.0 + self.pk = 0.0 + self.raw_value = 0.0 + self.raw_pk = 0.0 + + def draw(self, widget, cairo_ctx): + self.draw_background(cairo_ctx) + self.draw_value(cairo_ctx, self.value, self.width / 4.0, self.width / 2.0) + self.draw_peak(cairo_ctx, self.pk, self.width / 4.0, self.width / 2.0) + + def set_values(self, pk, value): + if value == self.raw_value and pk == self.raw_pk: + return + + self.raw_value = value + self.raw_pk = pk + old_value = self.value + old_pk = self.pk + self.value = self.scale.db_to_scale(value) + self.pk = self.scale.db_to_scale(pk) + + if (abs(old_value - self.value) * self.height) > 0.01 or ( + abs(old_pk - self.pk) * self.height + ) > 0.01: + self.invalidate_all() + + +class StereoMeterWidget(MeterWidget): + def __init__(self, scale): + super().__init__(scale) + self.pk_left = 0.0 + self.pk_right = 0.0 + + self.left = 0.0 + self.right = 0.0 + + self.raw_left_pk = 0.0 + self.raw_right_pk = 0.0 + + self.raw_left = 0.0 + self.raw_right = 0.0 + + def draw(self, widget, cairo_ctx): + self.draw_background(cairo_ctx) + self.draw_value(cairo_ctx, self.left, self.width / 5.0, self.width / 5.0) + self.draw_value(cairo_ctx, self.right, self.width / 5.0 * 3.0, self.width / 5.0) + self.draw_peak(cairo_ctx, self.pk_left, self.width / 5.0, self.width / 5.0)
View file
jack_mixer-15.1.tar.xz/jack_mixer/nsmclient.py
Added
@@ -0,0 +1,713 @@ +#! /usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +PyNSMClient - A New Session Manager Client-Library in one file. + +The Non-Session-Manager by Jonathan Moore Liles <male@tuxfamily.org>: http://non.tuxfamily.org/nsm/ +New Session Manager, by LinuxAudio.org: https://github.com/linuxaudio/new-session-manager +With help from code fragments from https://github.com/attwad/python-osc ( DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE v2 ) + +MIT License + +Copyright 2014-2020 Nils Hilbricht https://www.laborejo.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +import logging; +logger = None #filled by init with prettyName + +import struct +import socket +from os import getenv, getpid, kill +import os +import os.path +import shutil +from uuid import uuid4 +from sys import argv +from signal import signal, SIGTERM, SIGINT, SIGKILL #react to exit signals to close the client gracefully. Or kill if the client fails to do so. +from urllib.parse import urlparse + +class _IncomingMessage(object): + """Representation of a parsed datagram representing an OSC message. + + An OSC message consists of an OSC Address Pattern followed by an OSC + Type Tag String followed by zero or more OSC Arguments. + """ + + def __init__(self, dgram): + #NSM Broadcasts are bundles, but very simple ones. We only need to care about the single message it contains. + #Therefore we can strip the bundle prefix and handle it as normal message. + if b"#bundle" in dgram: + bundlePrefix, singleMessage = dgram.split(b"/", maxsplit=1) + dgram = b"/" + singleMessage # / eaten by split + self.isBroadcast = True + else: + self.isBroadcast = False + self.LENGTH = 4 #32 bit + self._dgram = dgram + self._parameters = [] + self.parse_datagram() + + + def get_int(self, dgram, start_index): + """Get a 32-bit big-endian two's complement integer from the datagram. + + Args: + dgram: A datagram packet. + start_index: An index where the integer starts in the datagram. + + Returns: + A tuple containing the integer and the new end index. + + Raises: + ValueError if the datagram could not be parsed. + """ + try: + if len(dgram[start_index:]) < self.LENGTH: + raise ValueError('Datagram is too short') + return ( + struct.unpack('>i', dgram[start_index:start_index + self.LENGTH])[0], start_index + self.LENGTH) + except (struct.error, TypeError) as e: + raise ValueError('Could not parse datagram %s' % e) + + def get_string(self, dgram, start_index): + """Get a python string from the datagram, starting at pos start_index. + + We receive always the full string, but handle only the part from the start_index internally. + In the end return the offset so it can be added to the index for the next parameter. + Each subsequent call handles less of the same string, starting further to the right. + + According to the specifications, a string is: + "A sequence of non-null ASCII characters followed by a null, + followed by 0-3 additional null characters to make the total number + of bits a multiple of 32". + + Args: + dgram: A datagram packet. + start_index: An index where the string starts in the datagram. + + Returns: + A tuple containing the string and the new end index. + + Raises: + ValueError if the datagram could not be parsed. + """ + #First test for empty string, which is nothing, followed by a terminating \x00 padded by three additional \x00. + if dgram[start_index:].startswith(b"\x00\x00\x00\x00"): + return "", start_index + 4 + + #Otherwise we have a non-empty string that must follow the rules of the docstring. + + offset = 0 + try: + while dgram[start_index + offset] != 0: + offset += 1 + if offset == 0: + raise ValueError('OSC string cannot begin with a null byte: %s' % dgram[start_index:]) + # Align to a byte word. + if (offset) % self.LENGTH == 0: + offset += self.LENGTH + else: + offset += (-offset % self.LENGTH) + # Python slices do not raise an IndexError past the last index, + # do it ourselves. + if offset > len(dgram[start_index:]): + raise ValueError('Datagram is too short') + data_str = dgram[start_index:start_index + offset] + return data_str.replace(b'\x00', b'').decode('utf-8'), start_index + offset + except IndexError as ie: + raise ValueError('Could not parse datagram %s' % ie) + except TypeError as te: + raise ValueError('Could not parse datagram %s' % te) + + def get_float(self, dgram, start_index): + """Get a 32-bit big-endian IEEE 754 floating point number from the datagram. + + Args: + dgram: A datagram packet. + start_index: An index where the float starts in the datagram. + + Returns: + A tuple containing the float and the new end index. + + Raises: + ValueError if the datagram could not be parsed. + """ + try: + return (struct.unpack('>f', dgram[start_index:start_index + self.LENGTH])[0], start_index + self.LENGTH) + except (struct.error, TypeError) as e: + raise ValueError('Could not parse datagram %s' % e) + + def parse_datagram(self): + try: + self._address_regexp, index = self.get_string(self._dgram, 0) + if not self._dgram[index:]: + # No params is legit, just return now. + return + + # Get the parameters types. + type_tag, index = self.get_string(self._dgram, index) + if type_tag.startswith(','): + type_tag = type_tag[1:] + + # Parse each parameter given its type. + for param in type_tag: + if param == "i": # Integer. + val, index = self.get_int(self._dgram, index) + elif param == "f": # Float. + val, index = self.get_float(self._dgram, index) + elif param == "s": # String. + val, index = self.get_string(self._dgram, index) + else: + logger.warning("Unhandled parameter type: {0}".format(param)) + continue + self._parameters.append(val) + except ValueError as pe: + #raise ValueError('Found incorrect datagram, ignoring it', pe) + # Raising an error is not ignoring it! + logger.warning("Found incorrect datagram, ignoring it. {}".format(pe)) + + @property + def oscpath(self): + """Returns the OSC address regular expression.""" + return self._address_regexp + + @staticmethod + def dgram_is_message(dgram): + """Returns whether this datagram starts as an OSC message.""" + return dgram.startswith(b'/') + + @property + def size(self): + """Returns the length of the datagram for this message.""" + return len(self._dgram) + + @property
View file
jack_mixer-15.1.tar.xz/jack_mixer/preferences.py
Added
@@ -0,0 +1,224 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# Copyright (C) 2009 Frederic Peters <fpeters@0d.be> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +from os.path import expanduser, isdir + +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GObject + + +class PreferencesDialog(Gtk.Dialog): + def __init__(self, parent): + self.app = parent + GObject.GObject.__init__(self) + self.set_title("Preferences") + self.create_ui() + self.connect("response", self.on_response_cb) + self.connect("delete-event", self.on_response_cb) + + def create_frame(self, label, child): + frame = Gtk.Frame() + frame.set_label("") + frame.set_border_width(3) + frame.set_shadow_type(Gtk.ShadowType.NONE) + frame.get_label_widget().set_markup("<b>%s</b>" % label) + + child.set_margin_top(10) + child.set_margin_bottom(10) + frame.add(child) + + return frame + + def create_ui(self): + vbox = self.get_content_area() + + path_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + self.path_entry = Gtk.Entry() + self.path_entry.connect("changed", self.on_path_entry_changed) + path_vbox.pack_start(self.path_entry, False, False, 3) + self.project_path_chooser = Gtk.FileChooserButton( + title="Default Project Path", action=Gtk.FileChooserAction.SELECT_FOLDER + ) + project_path = self.app.gui_factory.default_project_path + path_vbox.pack_start(self.project_path_chooser, False, False, 3) + + if project_path: + self.path_entry.set_text(project_path) + + if isdir(expanduser(project_path)): + self.project_path_chooser.set_current_folder(expanduser(project_path)) + + self.project_path_chooser.connect("file-set", self.on_project_path_selected) + vbox.pack_start(self.create_frame("Default Project Path", path_vbox), True, True, 0) + + interface_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + self.confirm_quit_checkbutton = Gtk.CheckButton("Confirm quit") + self.confirm_quit_checkbutton.set_tooltip_text( + "Always ask for confirmation before " "quitting the application" + ) + self.confirm_quit_checkbutton.set_active(self.app.gui_factory.get_confirm_quit()) + self.confirm_quit_checkbutton.connect("toggled", self.on_confirm_quit_toggled) + interface_vbox.pack_start(self.confirm_quit_checkbutton, True, True, 3) + + self.custom_widgets_checkbutton = Gtk.CheckButton("Use custom widgets") + self.custom_widgets_checkbutton.set_active(self.app.gui_factory.get_use_custom_widgets()) + self.custom_widgets_checkbutton.connect("toggled", self.on_custom_widget_toggled) + interface_vbox.pack_start(self.custom_widgets_checkbutton, True, True, 3) + + self.vumeter_color_checkbutton = Gtk.CheckButton("Use custom vumeter color") + self.vumeter_color_checkbutton.set_active( + self.app.gui_factory.get_vumeter_color_scheme() == "solid" + ) + self.vumeter_color_checkbutton.connect("toggled", self.on_vumeter_color_change) + interface_vbox.pack_start(self.vumeter_color_checkbutton, True, True, 3) + + self.custom_color_box = hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + interface_vbox.pack_start(hbox, True, True, 3) + + hbox.set_sensitive(self.vumeter_color_checkbutton.get_active()) + hbox.pack_start(Gtk.Label("Custom color:"), False, True, 5) + self.vumeter_color_picker = Gtk.ColorButton() + self.vumeter_color_picker.set_color( + Gdk.color_parse(self.app.gui_factory.get_vumeter_color()) + ) + self.vumeter_color_picker.connect("color-set", self.on_vumeter_color_change) + hbox.pack_start(self.vumeter_color_picker, True, True, 0) + + vbox.pack_start(self.create_frame("Interface", interface_vbox), True, True, 0) + + table = Gtk.Table(2, 2, False) + table.set_row_spacings(5) + table.set_col_spacings(5) + + table.attach(Gtk.Label(label="Meter scale"), 0, 1, 0, 1) + self.meter_scale_combo = self.create_meter_store_and_combo() + table.attach(self.meter_scale_combo, 1, 2, 0, 1) + + table.attach(Gtk.Label(label="Slider scale"), 0, 1, 1, 2) + self.slider_scale_combo = self.create_slider_store_and_combo() + table.attach(self.slider_scale_combo, 1, 2, 1, 2) + + vbox.pack_start(self.create_frame("Scales", table), True, True, 0) + + table = Gtk.Table(1, 2, False) + table.set_row_spacings(5) + table.set_col_spacings(5) + + table.attach(Gtk.Label(label="Control Behavior"), 0, 1, 0, 1) + self.midi_behavior_combo = self.create_midi_behavior_combo() + table.attach(self.midi_behavior_combo, 1, 2, 0, 1) + + vbox.pack_start(self.create_frame("MIDI", table), True, True, 0) + self.vbox.show_all() + + self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE) + + def create_meter_store_and_combo(self): + store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_PYOBJECT) + for scale in self.app.meter_scales: + row = scale.scale_id, scale + current_iter = store.append(row) + if scale is self.app.gui_factory.get_default_meter_scale(): + active_iter = current_iter + self.meter_store = store + + meter_scale_combo = Gtk.ComboBox.new_with_model(store) + cell = Gtk.CellRendererText() + meter_scale_combo.pack_start(cell, True) + meter_scale_combo.add_attribute(cell, "text", 0) + meter_scale_combo.set_active_iter(active_iter) + meter_scale_combo.connect("changed", self.on_meter_scale_combo_changed) + + return meter_scale_combo + + def create_slider_store_and_combo(self): + store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_PYOBJECT) + for scale in self.app.slider_scales: + row = scale.scale_id, scale + current_iter = store.append(row) + if scale is self.app.gui_factory.get_default_slider_scale(): + active_iter = current_iter + self.slider_store = store + + slider_scale_combo = Gtk.ComboBox.new_with_model(store) + cell = Gtk.CellRendererText() + slider_scale_combo.pack_start(cell, True) + slider_scale_combo.add_attribute(cell, "text", 0) + slider_scale_combo.set_active_iter(active_iter) + slider_scale_combo.connect("changed", self.on_slider_scale_combo_changed) + + return slider_scale_combo + + def create_midi_behavior_combo(self): + combo = Gtk.ComboBoxText() + for i, mode in enumerate(self.app.gui_factory.midi_behavior_modes): + combo.append(str(i), mode) + combo.set_active(self.app.gui_factory.get_midi_behavior_mode()) + combo.connect("changed", self.on_midi_behavior_combo_changed) + return combo + + def on_response_cb(self, dlg, response_id, *args): + self.app.preferences_dialog = None + self.destroy() + + def on_path_entry_changed(self, *args): + path = self.path_entry.get_text().strip() + + if path: + fullpath = expanduser(path) + + if isdir(fullpath): + self.project_path_chooser.set_current_folder(fullpath) + self.app.gui_factory.set_default_project_path(path) + + def on_project_path_selected(self, *args): + path = self.project_path_chooser.get_current_folder() + self.path_entry.set_text(path) + self.app.gui_factory.set_default_project_path(path) + + def on_meter_scale_combo_changed(self, *args): + active_iter = self.meter_scale_combo.get_active_iter() + scale = self.meter_store.get(active_iter, 1)[0] + self.app.gui_factory.set_default_meter_scale(scale) +
View file
jack_mixer-15.1.tar.xz/jack_mixer/scale.py
Added
@@ -0,0 +1,270 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import logging +import math + +from ._jack_mixer import Scale + + +log = logging.getLogger(__name__) + + +class Mark: + """Encapsulates scale linear function edge and coefficients for scale = a * dB + b formula""" + + def __init__(self, db, scale, text=None): + self.db = db + self.scale = scale + if text is None: + self.text = "%.0f" % math.fabs(db) + else: + self.text = text + + +class Base: + """Scale abstraction, various scale implementation derive from this class""" + + def __init__(self, scale_id, description): + self.marks = [] + self.scale_id = scale_id + self.description = description + self.scale = Scale() + + def add_threshold(self, db, scale, is_mark, text=None): + self.scale.add_threshold(db, scale) + if is_mark: + self.marks.append(Mark(db, scale, text)) + + def calculate_coefficients(self): + self.scale.calculate_coefficients() + + def db_to_scale(self, db): + """Convert dBFS value to number in range 0.0-1.0 used in GUI""" + # log.debug("db_to_scale(%f)", db) + return self.scale.db_to_scale(db) + + def scale_to_db(self, scale): + """Convert number in range 0.0-1.0 used in GUI to dBFS value""" + return self.scale.scale_to_db(scale) + + def add_mark(self, db): + self.marks.append(Mark(db, -1.0)) + + def get_marks(self): + return self.marks + + def scale_marks(self): + for i in self.marks: + if i.scale == -1.0: + i.scale = self.db_to_scale(i.db) + + +# IEC 60268-18 Peak programme level meters - Digital audio peak level meter +# Adapted from meterbridge, may be wrong, I'm not buying standards, event if they cost $45 +# If someone has the standard, please either share it with me or fix the code. +class IEC268(Base): + """IEC 60268-18 Peak programme level meters - Digital audio peak level meter""" + + def __init__(self): + Base.__init__( + self, + "iec_268", + "IEC 60268-18 Peak programme level meters - Digital audio peak level meter", + ) + self.add_threshold(-70.0, 0.0, False) + self.add_threshold(-60.0, 0.05, True) + self.add_threshold(-50.0, 0.075, True) + self.add_threshold(-40.0, 0.15, True) + self.add_mark(-35.0) + self.add_threshold(-30.0, 0.3, True) + self.add_mark(-25.0) + self.add_threshold(-20.0, 0.5, True) + self.add_mark(-15.0) + self.add_mark(-10.0) + self.add_mark(-5.0) + self.add_threshold(0.0, 1.0, True) + self.calculate_coefficients() + self.scale_marks() + + +class IEC268Minimalistic(Base): + """IEC 60268-18 Peak programme level meters - Digital audio peak level meter, + fewer marks""" + + def __init__(self): + Base.__init__( + self, + "iec_268_minimalistic", + "IEC 60268-18 Peak programme level meters - " + "Digital audio peak level meter, fewer marks", + ) + self.add_threshold(-70.0, 0.0, False) + self.add_threshold(-60.0, 0.05, True) + self.add_threshold(-50.0, 0.075, False) + self.add_threshold(-40.0, 0.15, True) + self.add_threshold(-30.0, 0.3, True) + self.add_threshold(-20.0, 0.5, True) + self.add_mark(-10.0) + self.add_threshold(0.0, 1.0, True) + self.calculate_coefficients() + self.scale_marks() + + +class Linear70dB(Base): + """Linear scale with range from -70 to 0 dBFS""" + + def __init__(self): + Base.__init__(self, "linear_70dB", "Linear scale with range from -70 to 0 dBFS") + self.add_threshold(-70.0, 0.0, False) + self.add_mark(-60.0) + self.add_mark(-50.0) + self.add_mark(-40.0) + self.add_mark(-35.0) + self.add_mark(-30.0) + self.add_mark(-25.0) + self.add_mark(-20.0) + self.add_mark(-15.0) + self.add_mark(-10.0) + self.add_mark(-5.0) + self.add_threshold(0.0, 1.0, True) + self.calculate_coefficients() + self.scale_marks() + + +class Linear30dB(Base): + """Linear scale with range from -30 to +30 dBFS""" + + def __init__(self): + Base.__init__(self, "linear_30dB", "Linear scale with range from -30 to +30 dBFS") + self.add_threshold(-30.0, 0.0, False) + self.add_threshold(+30.0, 1.0, True) + self.calculate_coefficients() + self.scale_marks() + + +class K20(Base): + """K20 scale""" + + def __init__(self): + Base.__init__(self, "K20", "K20 scale") + self.add_mark(-200, "") + self.add_mark(-60, "-40") + self.add_mark(-55, "") + self.add_mark(-50, "-30") + self.add_mark(-45, "") + self.add_mark(-40, "-20") + self.add_mark(-35, "") + self.add_mark(-30, "-10") + self.add_mark(-26, "-6") + self.add_mark(-23, "-3") + self.add_mark(-20, "0") + self.add_mark(-17, "3") + self.add_mark(-14, "6") + self.add_mark(-10, "10") + self.add_mark(-5, "15") + self.add_mark(0, "20") + + def db_to_scale(self, db): + v = math.pow(10.0, db / 20.0) + return self.mapk20(v) / 450.0 + + def add_mark(self, db, text): + self.marks.append(Mark(db, self.db_to_scale(db), text)) + + def mapk20(self, v): + if v < 0.001: + return 24000 * v + v = math.log10(v) + 3 + if v < 2.0: + return 24.3 + v * (100 + v * 16) + if v > 3.0: + v = 3.0 + return v * 161.7 - 35.1 + +
View file
jack_mixer-15.1.tar.xz/jack_mixer/serialization.py
Added
@@ -0,0 +1,121 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import logging + + +log = logging.getLogger(__name__) + + +class SerializationBackend: + """Base class for serialization backends""" + + def get_root_serialization_object(self, name): + """Returns serialization object where properties of root object + will be serialized to""" + # this method should never be called for the base class + raise NotImplementedError + + def get_child_serialization_object(self, name, backend_object): + # this method should never be called for the base class + raise NotImplementedError + + +class SerializationObjectBackend: + """Base class for serialization backend objects where real object + properties will be serialized to or unserialized from.""" + + def add_property(self, name, value): + """Serialize particular property""" + pass + + def get_childs(self): + pass + + def get_properties(self): + pass + + def serialization_name(self): + return None + + +class SerializedObject: + """Base class for object supporting serialization""" + + def serialization_name(self): + return None + + def serialize(self, object_backend): + """Serialize properties of called object into supplied serialization_object_backend""" + pass + + def serialization_get_childs(self): + """Get child objects tha required and support serialization""" + return [] + + def unserialize_property(self, name, value): + pass + + def unserialize_child(self, name): + return None + + +class Serializator: + def __init__(self): + pass + + def serialize(self, root, backend): + self.serialize_one( + backend, root, backend.get_root_serialization_object(root.serialization_name()) + ) + + def unserialize(self, root, backend): + backend_object = backend.get_root_unserialization_object(root.serialization_name()) + if backend_object is None: + return False + + return self.unserialize_one(backend, root, backend_object) + + def unserialize_one(self, backend, object, backend_object): + log.debug("Unserializing %r.", object) + properties = backend_object.get_properties() + for name, value in properties.items(): + log.debug("%s = %s", name, value) + if not object.unserialize_property(name, value): + return False + + backend_childs = backend_object.get_childs() + for backend_child in backend_childs: + name = backend_child.serialization_name() + child = object.unserialize_child(name) + if not child: + return False + if not self.unserialize_one(backend, child, backend_child): + return False + + return True + + def serialize_one(self, backend, object, backend_object): + object.serialize(backend_object) + childs = object.serialization_get_childs() + for child in childs: + log.debug("Serializing child %r.", child) + self.serialize_one( + backend, + child, + backend.get_child_serialization_object(child.serialization_name(), backend_object), + )
View file
jack_mixer-15.1.tar.xz/jack_mixer/serialization_xml.py
Added
@@ -0,0 +1,93 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import xml.dom +import xml.dom.minidom + +from .serialization import SerializationBackend + + +class XmlSerializationError(Exception): + pass + + +class InvalidDocumentTypeError(XmlSerializationError): + pass + + +class XmlSerialization(SerializationBackend): + def get_root_serialization_object(self, name): + self.doc = xml.dom.getDOMImplementation().createDocument( + xml.dom.EMPTY_NAMESPACE, name, None + ) + return XmlSerializationObject(self.doc, self.doc.documentElement) + + def get_root_unserialization_object(self, name): + if name != self.doc.documentElement.nodeName: + return None + return XmlSerializationObject(self.doc, self.doc.documentElement) + + def get_child_serialization_object(self, name, backend_object): + child = self.doc.createElement(name) + backend_object.element.appendChild(child) + return XmlSerializationObject(self.doc, child) + + def save(self, file): + file.write(self.doc.toprettyxml()) + + def load(self, file, name): + self.doc = xml.dom.minidom.parse(file) + + document_type = self.doc.documentElement.nodeName + if document_type != name: + raise InvalidDocumentTypeError("Document type '%s' not supported." % document_type) + + +class XmlSerializationObject: + def __init__(self, doc, element): + self.doc = doc + self.element = element + + def add_property(self, name, value): + self.add_property_as_attribute(name, value) + + def add_property_as_attribute(self, name, value): + self.element.setAttribute(name, value) + + # def add_property_as_child_element(self, name, value): + # child = self.doc.createElement(name) + # value = self.doc.createTextNode(value) + # child.appendChild(value) + # self.element.appendChild(child) + + def get_childs(self): + child_elements = self.element.childNodes + childs = [] + for child in child_elements: + if child.nodeType == child.ELEMENT_NODE: + childs.append(XmlSerializationObject(self.doc, child)) + return childs + + def get_properties(self): + properties = self.element.attributes + dictionary = {} + for i in range(properties.length): + dictionary[properties.item(i).name] = properties.item(i).nodeValue + return dictionary + + def serialization_name(self): + return self.element.nodeName
View file
jack_mixer-15.1.tar.xz/jack_mixer/slider.py
Added
@@ -0,0 +1,421 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import logging + +import cairo +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import GObject + + +log = logging.getLogger(__name__) + + +class AdjustmentdBFS(Gtk.Adjustment): + def __init__(self, scale, default_db, step_inc): + self.default_value = scale.db_to_scale(default_db) + self.db = default_db + self.scale = scale + self.step_increment = step_inc + super().__init__(self.default_value, 0.0, 1.0, step_inc) + self.connect("value-changed", self.on_value_changed) + self.disable_value_notify = False + + def step_up(self): + self.set_value(self.get_value() + self.step_increment) + + def step_down(self): + self.set_value(self.get_value() - self.step_increment) + + def reset(self): + self.set_value(self.default_value) + + def get_value_db(self): + return self.db + + def set_value_db(self, db, from_midi=False): + self.db = db + self.disable_value_notify = True + self.set_value(self.scale.db_to_scale(db)) + self.disable_value_notify = False + if from_midi: + self.emit("volume-changed-from-midi") + else: + self.emit("volume-changed") + + def on_value_changed(self, adjustment): + if not self.disable_value_notify: + self.db = self.scale.scale_to_db(self.get_value()) + self.emit("volume-changed") + + def set_scale(self, scale): + self.scale = scale + self.disable_value_notify = True + self.set_value(self.scale.db_to_scale(self.db)) + self.disable_value_notify = False + + +GObject.signal_new( + "volume-changed", + AdjustmentdBFS, + GObject.SignalFlags.RUN_FIRST | GObject.SignalFlags.ACTION, + None, + [], +) + +GObject.signal_new( + "volume-changed-from-midi", + AdjustmentdBFS, + GObject.SignalFlags.RUN_FIRST | GObject.SignalFlags.ACTION, + None, + [], +) + + +class BalanceAdjustment(Gtk.Adjustment): + def __init__(self): + super().__init__(0.0, -1.0, 1.0, 0.1) + self.connect("value-changed", self.on_value_changed) + self.disable_value_notify = False + + def set_balance(self, value, from_midi=False): + self.disable_value_notify = True + self.set_value(value) + self.disable_value_notify = False + if not from_midi: + self.emit("balance-changed") + + def on_value_changed(self, adjustment): + if not self.disable_value_notify: + self.emit("balance-changed") + + +GObject.signal_new( + "balance-changed", + BalanceAdjustment, + GObject.SignalFlags.RUN_FIRST | GObject.SignalFlags.ACTION, + None, + [], +) + + +class VolumeSlider(Gtk.Scale): + def __init__(self, adjustment): + super().__init__(orientation=Gtk.Orientation.VERTICAL) + self.adjustment = adjustment + self.set_adjustment(adjustment) + self.set_draw_value(False) + self.set_inverted(True) + self._button_down = False + self._button_down_y = 0 + self._button_down_value = 0 + + self.connect("button-press-event", self.button_press_event) + self.connect("button-release-event", self.button_release_event) + self.connect("motion-notify-event", self.motion_notify_event) + self.connect("scroll-event", self.scroll_event) + + def button_press_event(self, widget, event): + if event.button == 1: + if event.state & Gdk.ModifierType.CONTROL_MASK: + if event.type == Gdk.EventType.BUTTON_PRESS: + self.adjustment.set_value_db(0) + return True + elif event.type == Gdk.EventType.BUTTON_PRESS: + self._button_down = True + self._button_down_y = event.y + self._button_down_value = self.adjustment.get_value() + return True + elif event.type == Gdk.EventType._2BUTTON_PRESS: + self.adjustment.set_value(0) + return True + + return False + + def button_release_event(self, widget, event): + self._button_down = False + return False + + def motion_notify_event(self, widget, event): + slider_length = widget.get_allocation().height - widget.get_style_context().get_property( + "min-height", Gtk.StateFlags.NORMAL + ) + if self._button_down: + delta_y = (self._button_down_y - event.y) / slider_length + y = self._button_down_value + delta_y + if y >= 1: + y = 1 + elif y <= 0: + y = 0 + + self.adjustment.set_value(y) + return True + + def scroll_event(self, widget, event): + delta = self.adjustment.step_increment + value = self.adjustment.get_value() + if event.direction == Gdk.ScrollDirection.UP: + y = value + delta + elif event.direction == Gdk.ScrollDirection.DOWN: + y = value - delta + elif event.direction == Gdk.ScrollDirection.SMOOTH: + y = value - event.delta_y * delta + + if y >= 1: + y = 1 + elif y <= 0: + y = 0 + + self.adjustment.set_value(y) + return True + + +class BalanceSlider(Gtk.Scale): + def __init__(self, adjustment, preferred_width, preferred_height): + super().__init__(orientation=Gtk.Orientation.HORIZONTAL) + self.adjustment = adjustment + self.set_adjustment(adjustment) + self.set_has_origin(False) + self.set_draw_value(False) + self.set_property("has-tooltip", True) + self._preferred_width = preferred_width + self._preferred_height = preferred_height + self._button_down = False +
View file
jack_mixer-15.1.tar.xz/jack_mixer/styling.py
Added
@@ -0,0 +1,207 @@ +# This file is part of jack_mixer +# +# Copyright (C) 2006-2009 Nedko Arnaudov <nedko@arnaudov.name> +# Copyright (C) 2009-2020 Frederic Peters <fpeters@0d.be> et al. +# Copyright (C) 2020-2021 Christopher Arndt <info@chrisarndt> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +from random import random + +import gi # noqa: F401 +from gi.repository import Gtk +from gi.repository import Gdk + + +# CSS widget styling +DEFAULT_CSS = """\ +/* Global color definitions */ + +@define-color monitor_bgcolor_hover #C0BFBC; +@define-color monitor_bgcolor_checked #9A9996; +@define-color mute_bgcolor_hover #FFBC80; +@define-color mute_bgcolor_checked #FF7800; +@define-color solo_bgcolor_hover #76A28E; +@define-color solo_bgcolor_checked #26A269; +@define-color prefader_bgcolor_hover #A6C2E4; +@define-color prefader_bgcolor_checked #3584E4; + + +/* Channel strips */ + +.top_label { + padding: 0px .1em; + min-height: 1.5rem; +} + +.wide { + font-size: medium; +} + +.narrow { + font-size: smaller; +} + +.vbox_fader { + border: 1px inset #111; +} + +.readout { + font-size: 80%; + margin: .1em; + padding: 0; + border: 1px inset #111; + color: white; + background-color: #333; + background-image: none; +} + + +/* Channel buttons */ + +button { + padding: 0px .2em; +} +button.monitor:hover, +button.mute:hover, +button.solo:hover, +button.monitor:checked, +button.mute:checked, +button.solo:checked { + color: white; + text-shadow: unset; + background-image: none; +} +button.monitor:hover { + background-color: @monitor_bgcolor_hover; +} +button.monitor:checked { + background-color: @monitor_bgcolor_checked; +} +button.mute:hover { + background-color: @mute_bgcolor_hover; +} +button.mute:checked { + background-color: @mute_bgcolor_checked; +} +button.solo:hover { + background-color: @solo_bgcolor_hover; +} +button.solo:checked { + background-color: @solo_bgcolor_checked; +} + + +/* Control groups */ + +.control_group { + min-width: 0px; + padding: 0px; +} + +.control_group .label, +.control_group .mute, +.control_group .prefader, +.control_group .solo { + font-size: smaller; + padding: 0px .1em; +} + +.control_group .mute:hover, +.control_group .solo:hover, +.control_group .prefader:hover, +.control_group .mute:checked, +.control_group .solo:checked, +.control_group .prefader:checked { + color: white; + text-shadow: unset; + background-image: none; +} +.control_group .mute:hover { + background-color: @mute_bgcolor_hover; +} +.control_group .mute:checked { + background-color:@mute_bgcolor_checked; +} +.control_group .solo:hover { + background-color: @solo_bgcolor_hover; +} +.control_group .solo:checked { + background-color: @solo_bgcolor_checked; +} +.control_group .prefader:hover { + background-color: @prefader_bgcolor_hover; +} +.control_group .prefader:checked { + background-color: @prefader_bgcolor_checked; +} + + +/* Peak meters */ + +.over_zero { + background-color: #cc4c00; +} + +.is_nan { + background-color: #b20000; +} +""" + +COLOR_TMPL_CSS = """\ +.{} {{ + background-color: {}; + color: {}; +}} +""" + + +def add_css_provider(css, priority=Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION): + css_provider = Gtk.CssProvider() + css_provider.load_from_data(css.encode("utf-8")) + context = Gtk.StyleContext() + screen = Gdk.Screen.get_default() + context.add_provider_for_screen(screen, css_provider, priority) + + +def get_text_color(background_color): + """Calculate the luminance of the given color (GdkRGBA) + and return an appropriate text color.""" + # luminance coefficients taken from section C-9 from + # http://www.faqs.org/faqs/graphics/colorspace-faq/ + brightess = ( + background_color.red * 0.212671 + + background_color.green * 0.715160 + + background_color.blue * 0.072169 + ) + + if brightess > 0.5: + return "black" + else: + return "white" + + +def load_css_styles(): + add_css_provider(DEFAULT_CSS) + + +def set_background_color(widget, name, color):
View file
jack_mixer-15.1.tar.xz/jack_mixer/version.py.in
Added
@@ -0,0 +1,1 @@ +__version__ = "@VERSION@"
View file
jack_mixer-15.1.tar.xz/meson.build
Added
@@ -0,0 +1,74 @@ +project( + 'jack_mixer', + 'c', + version: '15.1', + license: 'GPL2+', + default_options: [ + 'warning_level=2' + ], + meson_version: '>=0.53.0' +) + +# Dependencies +cc = meson.get_compiler('c') +glib_dep = dependency('glib-2.0') +math_dep = cc.find_library('m', required: false) +jack2_dep = dependency('jack', version:'>=1.9.11', required: false) +jack1_dep = dependency('jack', version:'>=0.125.0, <1.0', required: false) + +if not jack2_dep.found() and jack1_dep.found() + jack_dep = jack1_dep +elif jack2_dep.found() + jack_dep = jack2_dep +else + error('No recent enough (jack2>=1.9.11 or jack1>=0.125.0) version of JACK found.') +endif + +if get_option('gui').disabled() and get_option('jack-midi').disabled() + error('Disabling both GUI and JACK-MIDI is not supported.') +endif + +if get_option('gui').enabled() + pymod = import('python') + python = pymod.find_installation( + 'python3', + required: true, + modules: get_option('check-py-modules') ? ['gi', 'cairo', 'xdg'] : [] + ) +endif + +# Installation directories +prefix = get_option('prefix') +bindir = join_paths(prefix, get_option('bindir')) +datadir = join_paths(prefix, get_option('datadir')) +#localedir = join_paths(prefix, get_option('localedir')) +#pythondir = join_paths(prefix, python.get_path('purelib')) +desktopdir = join_paths(datadir, 'applications') +icondir = join_paths(datadir, 'icons', 'hicolor') + +# Build jack_mix_box and generate _jack_mixer extension source +subdir('src') + +# Build & install C extension module and Python package +if get_option('gui').enabled() + subdir('jack_mixer') +endif + +# Install desktop file and icons +if get_option('gui').enabled() + subdir('data') +endif + +# Install documentation +subdir('docs') + +if get_option('gui').enabled() and not get_option('wheel') + meson.add_install_script('meson_postinstall.py') +endif + +summary({ + 'Build jack_mixer GUI': get_option('gui').enabled(), + 'JACK MIDI support': get_option('jack-midi').enabled(), + 'Debug messages (verbose)': get_option('verbose'), + 'Build for wheel': get_option('wheel'), +}, section: 'Configuration')
View file
jack_mixer-15.1.tar.xz/meson_options.txt
Added
@@ -0,0 +1,25 @@ +option('gui', + type: 'feature', + value: 'enabled', + description: 'Enable GUI (disable to only build jack-mix_box)' +) +option('jack-midi', + type: 'feature', + value: 'enabled', + description: 'Enable JACK MIDI support' +) +option('check-py-modules', + type: 'boolean', + value: true, + description: 'Check whether required Python modules are installed' +) +option('verbose', + type: 'boolean', + value: false, + description: 'Turn on debug logging (for development)' +) +option('wheel', + type: 'boolean', + value: false, + description: 'Turn on build mode for creating a Python wheel (should not be used directly)' +)
View file
jack_mixer-15.1.tar.xz/meson_postinstall.py
Added
@@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import sysconfig +from compileall import compile_dir +from os import environ, path + +prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') +datadir = path.join(prefix, 'share') +destdir = environ.get('MESON_INSTALL_DESTDIR_PREFIX', '') + +# Package managers set this so we don't need to run +if 'DESTDIR' not in environ: + from subprocess import call + print('Updating icon cache...') + call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) + +print('Compiling Python module to bytecode...') +moduledir = sysconfig.get_path('purelib', vars={'base': destdir}) +compile_dir(path.join(moduledir, 'jack_mixer'), optimize=1)
View file
jack_mixer-15.1.tar.xz/pyproject.toml
Added
@@ -0,0 +1,75 @@ +[build-system] +# https://thiblahute.gitlab.io/mesonpep517/ +build-backend = "mesonpep517.buildapi" +requires = [ + "cython", + "docutils", + "wheel", + "mesonpep517>=0.2", + "ninja" +] + + +[tool.mesonpep517.entry-points] +console_scripts = [ + "jack_mixer = jack_mixer.app:main" +] + + +[tool.mesonpep517.metadata] +summary = "A GTK+ JACK audio mixer application" +description-file = "README.md" +# 'keywords' metadata field not supported by mesonpep517 (yet) +#keywords = "mixer,audio,music,jack,gtk" +license = "GPL2+" +author = "Nedko Arnaudov" +author-email = "nedko (a.t) arnaudov (dot) name" +maintainer = "Christopher Arndt" +maintainer-email = "info (a.t.) chrisarndt.de" +home-page = "https://rdio.space/jackmixer/" +project-urls = [ + "Source, https://github.com/jack-mixer/jack-mixer", +] +requires= [ + "PyGObject", + "pycairo", + "pyxdg", +] +requires-python = ">=3.6" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Environment :: X11 Applications :: GTK", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: MacOS :: MacOS X", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Multimedia :: Sound/Audio :: Mixers", +] +meson-python-option-name = "python3" +meson-options = [ + "-Dwheel=true", + "--buildtype=release" +] + + +[tool.isort] +ensure_newline_before_comments = true +force_grid_wrap = 0 +include_trailing_comma = true +line_length = 99 +multi_line_output = 3 +use_parentheses = true + + +[tool.black] +line-length = 99 +target-version = ['py36', 'py37', 'py38'] +force-exclude = 'jack_mixer/nsmclient\.py'
View file
jack_mixer-15.1.tar.xz/src
Added
+(directory)
View file
jack_mixer-15.1.tar.xz/src/_jack_mixer.pxd
Added
@@ -0,0 +1,154 @@ +# +# _jack_mixer.pxd +# +# cython: language_level=3 +# + +from libcpp cimport bool + +cdef extern from "jack_mixer.h": + # scale.h + ctypedef void * jack_mixer_scale_t; + + cdef jack_mixer_scale_t scale_create() + + cdef bool scale_add_threshold(jack_mixer_scale_t scale, float db, float scale_value) + cdef void scale_remove_thresholds(jack_mixer_scale_t scale) + cdef void scale_calculate_coefficients(jack_mixer_scale_t scale) + cdef double scale_db_to_scale(jack_mixer_scale_t scale, double db) + cdef double scale_scale_to_db(jack_mixer_scale_t scale, double scale_value) + cdef void scale_destroy(jack_mixer_scale_t scale) + + # jack_mixer.h + ctypedef void * jack_mixer_t + ctypedef void * jack_mixer_channel_t + ctypedef void * jack_mixer_output_channel_t + ctypedef void * jack_mixer_threshold_t + + ctypedef void (*midi_change_callback)(void *) + + cdef enum midi_behavior_mode: + pass + + # mixer + cdef jack_mixer_t mixer_create "create" (const char * jack_client_name_ptr, bool stereo) + cdef void mixer_destroy "destroy" (jack_mixer_t mixer) + cdef unsigned int mixer_get_channels_count "get_channels_count" (jack_mixer_t mixer) + cdef const char * mixer_get_client_name "get_client_name" (jack_mixer_t mixer) + cdef int mixer_get_last_midi_cc "get_last_midi_cc" (jack_mixer_t mixer) + cdef unsigned int mixer_set_last_midi_cc "set_last_midi_cc" ( + jack_mixer_t mixer, + int new_channel) + cdef int mixer_get_midi_behavior_mode "get_midi_behavior_mode" (jack_mixer_t mixer) + cdef unsigned int mixer_set_midi_behavior_mode "set_midi_behavior_mode" ( + jack_mixer_t mixer, + midi_behavior_mode mode) + cdef jack_mixer_channel_t mixer_add_channel "add_channel" ( + jack_mixer_t mixer, + const char * channel_name, + bool stereo) + cdef jack_mixer_output_channel_t mixer_add_output_channel "add_output_channel" ( + jack_mixer_t mixer, + const char * channel_name, + bool stereo, + bool system) + + # not used by Python + #cdef void channels_volumes_read(jack_mixer_t mixer) + #cdef void remove_channels(jack_mixer_t mixer) + + # channel + cdef const char * channel_get_name(jack_mixer_channel_t channel) + cdef void channel_rename(jack_mixer_channel_t channel, const char * name) + + cdef double channel_abspeak_read(jack_mixer_channel_t channel) + cdef void channel_abspeak_reset(jack_mixer_channel_t channel) + + cdef void channel_mono_meter_read(jack_mixer_channel_t channel, double * mono_ptr) + cdef void channel_stereo_meter_read( + jack_mixer_channel_t channel, + double * left_ptr, + double * right_ptr) + + cdef void channel_mono_kmeter_read( + jack_mixer_channel_t channel, + double * left_ptr, + double * left_rms_ptr) + cdef void channel_stereo_kmeter_read( + jack_mixer_channel_t channel, + double * left_ptr, + double * right_ptr, + double * left_rms_ptr, + double * right_rms_ptr) + + cdef void channel_volume_write(jack_mixer_channel_t channel, double volume) + cdef double channel_volume_read(jack_mixer_channel_t channel) + + cdef double channel_balance_read(jack_mixer_channel_t channel) + cdef void channel_balance_write(jack_mixer_channel_t channel, double balance) + + cdef bool channel_is_out_muted(jack_mixer_channel_t channel) + cdef void channel_out_mute(jack_mixer_channel_t channel) + cdef void channel_out_unmute(jack_mixer_channel_t channel) + + cdef bool channel_is_soloed(jack_mixer_channel_t channel) + cdef void channel_solo(jack_mixer_channel_t channel) + cdef void channel_unsolo(jack_mixer_channel_t channel) + + cdef bool channel_is_stereo(jack_mixer_channel_t channel) + + cdef void channel_set_midi_change_callback( + jack_mixer_channel_t channel, + midi_change_callback callback, + void * user_data) + cdef bool channel_get_midi_in_got_events(jack_mixer_channel_t channel) + + cdef int channel_autoset_balance_midi_cc(jack_mixer_channel_t channel) + cdef int channel_autoset_mute_midi_cc(jack_mixer_channel_t channel) + cdef int channel_autoset_solo_midi_cc(jack_mixer_channel_t channel) + cdef int channel_autoset_volume_midi_cc(jack_mixer_channel_t channel) + + cdef int channel_get_balance_midi_cc(jack_mixer_channel_t channel) + cdef int channel_get_mute_midi_cc(jack_mixer_channel_t channel) + cdef int channel_get_solo_midi_cc(jack_mixer_channel_t channel) + cdef int channel_get_volume_midi_cc(jack_mixer_channel_t channel) + cdef unsigned int channel_set_balance_midi_cc(jack_mixer_channel_t channel, int new_cc) + cdef unsigned int channel_set_mute_midi_cc(jack_mixer_channel_t channel, int new_cc) + cdef unsigned int channel_set_solo_midi_cc(jack_mixer_channel_t channel, int new_cc) + cdef unsigned int channel_set_volume_midi_cc(jack_mixer_channel_t channel, int new_cc) + + cdef void channel_set_midi_scale(jack_mixer_channel_t channel, jack_mixer_scale_t scale) + + cdef void channel_set_midi_cc_balance_picked_up(jack_mixer_channel_t channel, bool status) + cdef void channel_set_midi_cc_volume_picked_up(jack_mixer_channel_t channel, bool status) + + cdef void remove_channel(jack_mixer_channel_t channel) + + # output channel + cdef bool output_channel_is_muted( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t channel) + cdef void output_channel_set_muted( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t channel, + bool muted_value) + cdef bool output_channel_is_prefader( + jack_mixer_output_channel_t output_channel) + cdef void output_channel_set_prefader( + jack_mixer_output_channel_t output_channel, + bool pfl_value) + cdef bool output_channel_is_in_prefader( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t input_channel) + cdef void output_channel_set_in_prefader( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t input_channel, + bool prefader_value) + cdef bool output_channel_is_solo( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t channel) + cdef void output_channel_set_solo( + jack_mixer_output_channel_t output_channel, + jack_mixer_channel_t channel, + bool solo_value) + cdef void remove_output_channel(jack_mixer_output_channel_t output_channel)
View file
jack_mixer-15.1.tar.xz/src/_jack_mixer.pyx
Added
@@ -0,0 +1,462 @@ +# +# cython: language_level=3 +# +"""Python bindings for jack_mixer.c and scale.c using Cython.""" + +__all__ = ("Scale", "MidiBehaviour", "Mixer") + +import enum + +from _jack_mixer cimport * + + +cdef void midi_change_callback_func(void *userdata) with gil: + """Wrapper for a Python callback function for MIDI input.""" + channel = <object> userdata + channel._midi_change_callback() + + +class MidiBehaviour(enum.IntEnum): + """MIDI control behaviour. + + `JUMP_TO_VALUE` + + Received MIDI control messages affect mixer directly. + + `PICK_UP` + + Received MIDI control messages have to match up with current + mixer value first (within a small margin), before further + changes take effect. + """ + JUMP_TO_VALUE = 0 + PICK_UP = 1 + + +cdef class Scale: + """Mixer level scale representation. + + Wraps `jack_mixer_scale_t` struct. + """ + + cdef jack_mixer_scale_t _scale + + def __cinit__(self): + self._scale = scale_create() + + def __dealloc__(self): + if self._scale: + scale_destroy(self._scale) + + cpdef bool add_threshold(self, float db, float scale_value): + """Add scale treshold.""" + return scale_add_threshold(self._scale, db, scale_value) + + cpdef void remove_thresholds(self): + """Remove scale threshold.""" + scale_remove_thresholds(self._scale) + + cpdef void calculate_coefficients(self): + """Calculate scale coefficents.""" + scale_calculate_coefficients(self._scale) + + cpdef double db_to_scale(self, double db): + """Return scale value responding to given dB value.""" + return scale_db_to_scale(self._scale, db) + + cpdef double scale_to_db(self, double scale_value): + """Return dB value responding to given scale value.""" + return scale_scale_to_db(self._scale, scale_value) + + +cdef class Mixer: + """Jack Mixer representation. + + Wraps `jack_mixer_t` struct. + """ + + cdef jack_mixer_t _mixer + cdef bool _stereo + + def __cinit__(self, name, stereo=True): + self._stereo = stereo + self._mixer = mixer_create(name.encode('utf-8'), stereo) + + def __dealloc__(self): + if self._mixer: + mixer_destroy(self._mixer) + + def destroy(self): + """Close mixer Jack client and destroy mixer instance. + + The instance must not be used anymore after calling this + method. + """ + if self._mixer: + mixer_destroy(self._mixer) + + @property + def channels_count(self): + """Number of mixer channels.""" + return mixer_get_channels_count(self._mixer) + + @property + def client_name(self): + """Jack client name of mixer.""" + return mixer_get_client_name(self._mixer).decode('utf-8') + + @property + def last_midi_cc(self): + """Last received MIDI control change message.""" + return mixer_get_last_midi_cc(self._mixer) + + @last_midi_cc.setter + def last_midi_cc(self, int channel): + mixer_set_last_midi_cc(self._mixer, channel) + + @property + def midi_behavior_mode(self): + """MIDI control change behaviour mode. + + See `MidiBehaviour` enum for more information. + """ + return MidiBehaviour(mixer_get_midi_behavior_mode(self._mixer)) + + @midi_behavior_mode.setter + def midi_behavior_mode(self, mode): + mixer_set_midi_behavior_mode(self._mixer, + mode.value if isinstance(mode, MidiBehaviour) else mode) + + cpdef add_channel(self, channel_name, stereo=None): + """Add a stereo or mono input channel with given name to the mixer. + + Returns a `Channel` instance when successfull or `None` if channel + creation failed. + """ + cdef jack_mixer_channel_t chan_ptr + if stereo is None: + stereo = self._stereo + + chan_ptr = mixer_add_channel(self._mixer, channel_name.encode('utf-8'), stereo) + if chan_ptr == NULL: + return None + + return Channel.new(chan_ptr) + + cpdef add_output_channel(self, channel_name, stereo=None, system=False): + """Add a stereo or mono output channel with given name to the mixer. + + Returns a `OutputChannel` instance when successfull or `None` if + channel creation failed. + """ + cdef jack_mixer_output_channel_t chan_ptr + + if stereo is None: + stereo = self._stereo + + chan_ptr = mixer_add_output_channel(self._mixer, channel_name.encode('utf-8'), stereo, + system) + + if chan_ptr == NULL: + return None + + return OutputChannel.new(chan_ptr) + + +cdef class Channel: + """Jack Mixer (input) channel representation. + + Wraps `jack_mixer_channel_t` struct. + """ + + cdef jack_mixer_channel_t _channel + cdef object _midi_change_callback + + def __init__(self): + raise TypeError("Channel instances can only be created via Mixer.add_channel().") + + @staticmethod + cdef Channel new(jack_mixer_channel_t chan_ptr): + """Create a new Channel instance. + + A pointer to an initialized `jack_mixer_channel_t` struct must be + passed in. + + This should not be called directly but only via `Mixer.add_channel()`. + """ + cdef Channel channel = Channel.__new__(Channel) + channel._channel = chan_ptr + return channel + + @property + def abspeak(self): + """Absolute peak of channel meter. + + Set to `None` to reset the absolute peak to -inf. + Trying to set it to any other value will raise a `ValueError`. + """ + return channel_abspeak_read(self._channel) +
View file
jack_mixer-15.1.tar.xz/src/jack_mix_box.c
Added
@@ -0,0 +1,183 @@ +/***************************************************************************** + * + * This file is part of jack_mixer + * + * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> + * Copyright (C) 2009-2011 Frederic Peters <fpeters@0d.be> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +/* + * jack_mix_box is a most minimalistic jack mixer, a set of mono/sterero input + * channels, mixed to a single output channel, with the volume of the + * input channels controlled by MIDI control change (CC) codes. + * + */ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> +#include <getopt.h> +#include <signal.h> +#include <unistd.h> +#include "jack_mixer.h" + +jack_mixer_t mixer; +bool keepRunning = true; + +void +usage() +{ + printf("Usage: "); + printf("jack_mix_box [-n <name>] [-p] [-s] [-v <dB>] MIDI_CC...\n"); + printf("\n"); + printf("-h|--help\tprint this help message\n"); + printf("-n|--name\tset JACK client name\n"); + printf("-p|--pickup\tenable MIDI pickup mode (default: jump-to-value)\n"); + printf("-s|--stereo\tmake all input channels stereo with left+right input\n"); + printf("-v|--volume\tinitial volume gain in dB, default is 0.0 (i.e. unity gain)\n"); + printf("\n"); + printf("Each positional argument is interpreted as a MIDI Control Change number and adds\n"); + printf("a mixer channel with one (mono) or left+right (stereo) inputs, whose volume can\n"); + printf("be controlled via the given MIDI Control Change.\n"); + printf("\n"); + printf("Send SIGUSR1 to the process to have the current volumes reported per input channel.\n\n"); +} + +void +reportVolume(int sig) +{ + (void)sig; + channels_volumes_read(mixer); +} + +void +triggerShutDown(int sig) +{ + (void)sig; + keepRunning = false; +} + +int +main(int argc, char *argv[]) +{ + jack_mixer_scale_t scale; + jack_mixer_channel_t main_mix_channel; + char *jack_cli_name = NULL; + int channel_index; + bool bStereo = false; + enum midi_behavior_mode ePickup = Jump_To_Value; + double initialVolume = 0.0f; //in dbFS + + while (1) { + int c; + static struct option long_options[] = + { + {"name", required_argument, 0, 'n'}, + {"help", no_argument, 0, 'h'}, + {"pickup", no_argument, 0, 'p'}, + {"stereo", no_argument, 0, 's'}, + {"volume", required_argument, 0, 'v'}, + {0, 0, 0, 0} + }; + int option_index = 0; + + c = getopt_long (argc, argv, "sphn:v:", long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'n': + jack_cli_name = strdup(optarg); + break; + case 's': + bStereo = true; + break; + case 'v': + initialVolume = strtod(optarg, NULL); + break; + case 'h': + usage(); + exit(0); + break; + case 'p': + ePickup = Pick_Up; + break; + default: + fprintf(stderr, "Unknown argument, aborting.\n"); + exit(1); + } + } + + if (optind == argc) { + fprintf(stderr, "You must specify at least one input channel\n"); + exit(1); + } + + scale = scale_create(); + scale_add_threshold(scale, -70.0, 0.0); + scale_add_threshold(scale, 0.0, 1.0); + scale_calculate_coefficients(scale); + + if (jack_cli_name == NULL) { + jack_cli_name = strdup("jack_mix_box"); + } + + mixer = create(jack_cli_name, false); + main_mix_channel = add_output_channel(mixer, "MAIN", true, false); + channel_set_midi_scale(main_mix_channel, scale); + channel_volume_write(main_mix_channel, 0.0); + set_midi_behavior_mode(mixer, ePickup); + + channel_index = 0; + while (optind < argc) { + char *channel_name; + jack_mixer_channel_t channel; + + channel_index += 1; + channel_name = malloc(15); + if (snprintf(channel_name, 15, "Channel %d", channel_index) >= 15) { + free(channel_name); + abort(); + } + channel = add_channel(mixer, channel_name, bStereo); + if (channel == NULL) { + fprintf(stderr, "Failed to add channel %d, aborting\n", channel_index); + exit(1); + } + channel_set_volume_midi_cc(channel, atoi(argv[optind++])); + channel_set_midi_scale(channel, scale); + channel_volume_write(channel, initialVolume); + free(channel_name); + } + + signal(SIGUSR1, reportVolume); + signal(SIGTERM, triggerShutDown); + signal(SIGHUP, triggerShutDown); + signal(SIGINT, triggerShutDown); + + while (keepRunning) { + usleep(500u * 1000u); //500msec + } + + remove_channels(mixer); + remove_output_channel(main_mix_channel); + destroy(mixer); + scale_destroy(scale); + free(jack_cli_name); + return 0; +}
View file
jack_mixer-15.1.tar.xz/src/jack_mixer.c
Added
@@ -0,0 +1,2225 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * This file is part of jack_mixer + * + * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> + * Copyright (C) 2009 Frederic Peters <fpeters@0d.be> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> +#include <stdint.h> +#include <math.h> +#include <jack/jack.h> +#if defined(HAVE_JACK_MIDI) +#include <jack/midiport.h> +#endif +#include <assert.h> +#include <pthread.h> + +#include <glib.h> + +#include "jack_mixer.h" +#include "log.h" + +struct kmeter { + float _z1; // filter state + float _z2; // filter state + float _rms; // max rms value since last read() + float _dpk; // current digital peak value + int _cnt; // digital peak hold counter + bool _flag; // flag set by read(), resets _rms + + int _hold; // number of JACK periods to hold peak value + float _fall; // per period fallback multiplier for peak value + float _omega; // ballistics filter constant. +}; + +struct channel { + struct jack_mixer * mixer_ptr; + char * name; + bool stereo; + bool out_mute; + float volume_transition_seconds; + unsigned int num_volume_transition_steps; + float volume; + jack_nframes_t volume_idx; + float volume_new; + float balance; + jack_nframes_t balance_idx; + float balance_new; + float volume_left; + float volume_left_new; + float volume_right; + float volume_right_new; + float meter_left; + float meter_right; + float abspeak; + struct kmeter kmeter_left; + struct kmeter kmeter_right; + + jack_port_t * port_left; + jack_port_t * port_right; + + jack_nframes_t peak_frames; + float peak_left; + float peak_right; + + jack_default_audio_sample_t * tmp_mixed_frames_left; + jack_default_audio_sample_t * tmp_mixed_frames_right; + jack_default_audio_sample_t * frames_left; + jack_default_audio_sample_t * frames_right; + jack_default_audio_sample_t * prefader_frames_left; + jack_default_audio_sample_t * prefader_frames_right; + + jack_default_audio_sample_t * left_buffer_ptr; + jack_default_audio_sample_t * right_buffer_ptr; + + bool NaN_detected; + + int8_t midi_cc_volume_index; + int8_t midi_cc_balance_index; + int8_t midi_cc_mute_index; + int8_t midi_cc_solo_index; + bool midi_cc_volume_picked_up; + bool midi_cc_balance_picked_up; + + bool midi_in_got_events; + int midi_out_has_events; + void (*midi_change_callback) (void*); + void *midi_change_callback_data; + + jack_mixer_scale_t midi_scale; +}; + +struct output_channel { + struct channel channel; + GSList *soloed_channels; + GSList *muted_channels; + GSList *prefader_channels; + + bool system; /* system channel, without any associated UI */ + bool prefader; +}; + +struct jack_mixer { + pthread_mutex_t mutex; + jack_client_t * jack_client; + GSList *input_channels_list; + GSList *output_channels_list; + GSList *soloed_channels; + + jack_port_t * port_midi_in; + jack_port_t * port_midi_out; + int8_t last_midi_cc; + enum midi_behavior_mode midi_behavior; + + struct channel* midi_cc_map[128]; +}; + +static jack_mixer_output_channel_t +create_output_channel( + jack_mixer_t mixer, + const char * channel_name, + bool stereo, + bool system); + +static inline void +update_channel_buffers( + struct channel * channel_ptr, + jack_nframes_t nframes); + +static void +unset_midi_cc_mapping( + struct jack_mixer * mixer, + int8_t cc); + +float +value_to_db( + float value) +{ + if (value <= 0) + { + return -INFINITY; + } + + return 20.0 * log10f(value); +} + +float +db_to_value( + float db) +{ + return powf(10.0, db / 20.0); +} + +double +interpolate( + double start, + double end, + int step, + int steps) +{ + double ret; + double frac = 0.01; + LOG_DEBUG("%f -> %f, %d", start, end, step); + if (start <= 0) { + if (step <= frac * steps) { + ret = frac * end * step / steps; + } + else { + ret = db_to_value(value_to_db(frac * end) + (value_to_db(end) - value_to_db(frac * end)) * step / steps);; + } + } + else if (end <= 0) { + if (step >= (1 - frac) * steps) { + ret = frac * start - frac * start * step / steps; + } + else { + ret = db_to_value(value_to_db(start) + (value_to_db(frac * start) - value_to_db(start)) * step / steps); + } + } + else {
View file
jack_mixer-15.1.tar.xz/src/jack_mixer.h
Added
@@ -0,0 +1,356 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * This file is part of jack_mixer + * + * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED +#define JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED + +#include <stdbool.h> +#include <stdint.h> +#include <jack/jack.h> + +#include "scale.h" + +typedef void * jack_mixer_t; +typedef void * jack_mixer_channel_t; +typedef void * jack_mixer_kmeter_t; +typedef void * jack_mixer_output_channel_t; +typedef void * jack_mixer_threshold_t; + +/* Masks bits for channel.midi_out_has_events */ +#define CHANNEL_VOLUME 1 +#define CHANNEL_BALANCE 2 +#define CHANNEL_MUTE 4 +#define CHANNEL_SOLO 8 + +#define VOLUME_TRANSITION_SECONDS 0.01 + +#define BALANCE_PICKUP_THRESHOLD 0.015625 // -1.0..+1.0 / 128 + +#define PEAK_FRAMES_CHUNK 4800 + +// we don't know how much to allocate, but we don't want to wait with +// allocating until we're in the process() callback, so we just take a +// fairly big chunk: 4 periods per buffer, 4096 samples per period. +// (not sure if the '*4' is needed) +#define MAX_BLOCK_SIZE (4 * 4096) + +#define FLOAT_EXISTS(x) (!((x) - (x))) + +#ifndef MAP +#define MAP(v, imin, imax, omin, omax) (((v) - (imin)) * ((omax) - (omin)) / ((imax) - (imin)) + (omin)) +#endif + +enum midi_behavior_mode { Jump_To_Value, Pick_Up }; + +jack_mixer_t +create( + const char * jack_client_name_ptr, + bool stereo); + +void +destroy( + jack_mixer_t mixer); + +unsigned int +get_channels_count( + jack_mixer_t mixer); + +const char* +get_client_name( + jack_mixer_t mixer); + +int8_t +get_last_midi_cc( + jack_mixer_t mixer); + +unsigned int +set_last_midi_cc( + jack_mixer_t mixer, + int8_t new_cc); + +int +get_midi_behavior_mode( + jack_mixer_t mixer); + +unsigned int +set_midi_behavior_mode( + jack_mixer_t mixer, + enum midi_behavior_mode mode); + +jack_mixer_channel_t +add_channel( + jack_mixer_t mixer, + const char * channel_name, + bool stereo); + +void +kmeter_init( + jack_mixer_kmeter_t km, + int sr, + int fsize, + float hold, + float fall); + +void +kmeter_process( + jack_mixer_kmeter_t km, + jack_default_audio_sample_t *p, + int start, + int end); + +const char * +channel_get_name( + jack_mixer_channel_t channel); + +/* returned values are in dBFS */ +void +channel_stereo_meter_read( + jack_mixer_channel_t channel, + double * left_ptr, + double * right_ptr); + +/* returned value is in dBFS */ +void +channel_mono_meter_read( + jack_mixer_channel_t channel, + double * mono_ptr); + +/* returned values are in dBFS */ +void +channel_stereo_kmeter_read( + jack_mixer_channel_t channel, + double * left_ptr, + double * right_ptr, + double * left_rms_ptr, + double * right_rms_ptr); + +/* returned value is in dBFS */ +void +channel_mono_kmeter_read( + jack_mixer_channel_t channel, + double * mono_ptr, + double * mono_rms_ptr); + +bool +channel_is_stereo( + jack_mixer_channel_t channel); + +void +channel_set_midi_change_callback( + jack_mixer_channel_t channel, + void (*midi_change_callback) (void*), + void *user_data); + +/* volume is in dBFS */ +void +channel_volume_write( + jack_mixer_channel_t channel, + double volume); + +double +channel_volume_read( + jack_mixer_channel_t channel); + +void +channels_volumes_read( + jack_mixer_t mixer_ptr); + +/* balance is from -1.0 (full left) to +1.0 (full right) */ +void +channel_balance_write( + jack_mixer_channel_t channel, + double balance); + +double +channel_balance_read( + jack_mixer_channel_t channel); + +int8_t +channel_get_balance_midi_cc( + jack_mixer_channel_t channel); + +unsigned int +channel_set_balance_midi_cc( + jack_mixer_channel_t channel, + int8_t new_cc); + +int8_t +channel_get_volume_midi_cc( + jack_mixer_channel_t channel); +
View file
jack_mixer-15.1.tar.xz/src/list.h
Changed
(renamed from list.h)
View file
jack_mixer-15.1.tar.xz/src/log.c
Added
@@ -0,0 +1,36 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> + +#include "log.h" + +void jack_mixer_log(int level, const char * format, ...) +{ + (void)level; + va_list arglist; + + va_start(arglist, format); + vfprintf(stderr, format, arglist); + va_end(arglist); +}
View file
jack_mixer-15.1.tar.xz/src/log.h
Added
@@ -0,0 +1,86 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED +#define LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED + +void jack_mixer_log(int level, const char * format, ...); + +#define LOG_LEVEL_DEBUG 0 +#define LOG_LEVEL_INFO 1 +#define LOG_LEVEL_WARNING 2 +#define LOG_LEVEL_NOTICE 3 +#define LOG_LEVEL_ERROR 4 +#define LOG_LEVEL_FATAL 5 +#define LOG_LEVEL_BLACK_HOLE 6 + +#if !defined(LOG_LEVEL) +#define LOG_LEVEL LOG_LEVEL_WARNING +#endif + +#if LOG_LEVEL <= LOG_LEVEL_DEBUG +# define LOG_DEBUG(format, ...) \ + jack_mixer_log(LOG_LEVEL_DEBUG, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_DEBUG(format, ...) +#endif + +#if LOG_LEVEL <= LOG_LEVEL_INFO +# define LOG_INFO(format, ...) \ + jack_mixer_log(LOG_LEVEL_INFO, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_INFO(format, ...) +#endif + +#if LOG_LEVEL <= LOG_LEVEL_WARNING +# define LOG_WARNING(format, ...) \ + jack_mixer_log(LOG_LEVEL_WARNING, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_WARNING(format, ...) +#endif + +#if LOG_LEVEL <= LOG_LEVEL_NOTICE +# define LOG_NOTICE(format, ...) \ + jack_mixer_log(LOG_LEVEL_NOTICE, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_NOTICE(format, ...) +#endif + +#if LOG_LEVEL <= LOG_LEVEL_ERROR +# define LOG_ERROR(format, ...) \ + jack_mixer_log(LOG_LEVEL_ERROR, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_ERROR(format, ...) +#endif + +#if LOG_LEVEL <= LOG_LEVEL_FATAL +# define LOG_FATAL(format, ...) \ + jack_mixer_log(LOG_LEVEL_FATAL, \ + format "\n", ## __VA_ARGS__) +#else +# define LOG_FATAL(format, ...) +#endif + +#endif /* #ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED */
View file
jack_mixer-15.1.tar.xz/src/meson.build
Added
@@ -0,0 +1,52 @@ +jack_mixer_sources = files([ + 'jack_mixer.c', + 'log.c', + 'scale.c' +]) + +jack_mixer_inc = include_directories('.') + + +# Build 'jack_mix_box' command line program +executable( + 'jack_mix_box', + ['jack_mix_box.c', jack_mixer_sources], + dependencies: [ + glib_dep, + jack_dep, + math_dep + ], + include_directories: jack_mixer_inc, + c_args: get_option('jack-midi').enabled() ? '-DHAVE_JACK_MIDI' : [], + install: true, +) + + +# Generate extension module C source from Cython sources +if get_option('gui').enabled() + fs = import('fs') + + jack_mixer_mod_pyx = '_jack_mixer.pyx' + jack_mixer_mod_c = '_jack_mixer.c' + + cython = find_program('cython3', 'cython', required: false) + + if fs.exists(jack_mixer_mod_c) + jack_mixer_cython = files(jack_mixer_mod_c) + elif cython.found() + jack_mixer_mod_pxd = '_jack_mixer.pxd' + + jack_mixer_cython = custom_target( + 'jack_mixer_cython', + output: jack_mixer_mod_c, + input: jack_mixer_mod_pyx, + depend_files: [jack_mixer_mod_pyx, jack_mixer_mod_pxd], + command: [cython, '-o', '@OUTPUT@', '@INPUT@'], + ) + else + error('The \'cython\' program was not found but is required.\n' + + 'Please install Cython from: https://pypi.org/project/Cython/.') + endif + + meson.add_dist_script('meson_dist_cython.py', jack_mixer_mod_c) +endif
View file
jack_mixer-15.1.tar.xz/src/meson_dist_cython.py
Added
@@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import argparse +import shutil +import sys +from os import chdir, environ, getcwd +from os.path import join + +from subprocess import run + +build_root = environ.get("MESON_BUILD_ROOT") +dist_root = environ.get("MESON_DIST_ROOT") +source_root = environ.get("MESON_SOURCE_ROOT") + +ap = argparse.ArgumentParser() +ap.add_argument("-v", "--verbose", action="store_true", help="Be more verbose.") +ap.add_argument("mod_source", nargs="*", help="Cython module C source target(s) (*.c).") +args = ap.parse_args() + +if args.verbose: + print("cwd:", getcwd()) + print("build root:", build_root) + print("dist root:", dist_root) + print("source root:", source_root) + print("sys.argv:", sys.argv) + +for mod in args.mod_source: + target = join("src", mod) + dst = join(dist_root, "src", mod) + + print("Updating Cython module C source '%s'..." % target) + cmd = ["ninja"] + + if args.verbose: + cmd += ["-v"] + + cmd += [target] + + chdir(build_root) + proc = run(cmd) + + if proc.returncode != 0: + sys.exit("'ninja' returned non-zero (%i) for target '%s'." % (proc.returncode, target)) + + shutil.copy(target, dst)
View file
jack_mixer-15.1.tar.xz/src/scale.c
Added
@@ -0,0 +1,217 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * This file is part of jack_mixer + * + * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#include <stddef.h> +#include <stdbool.h> +#include <stdlib.h> +#include <math.h> +#include <assert.h> + +#include "jack_mixer.h" +//#define LOG_LEVEL LOG_LEVEL_DEBUG +#include "log.h" +#include "list.h" + +struct threshold +{ + struct list_head scale_siblings; + double db; + double scale; + double a; + double b; +}; + +struct scale +{ + struct list_head thresholds; + double max_db; +}; + +jack_mixer_scale_t +scale_create() +{ + struct scale * scale_ptr; + + scale_ptr = malloc(sizeof(struct scale)); + if (scale_ptr == NULL) + { + return NULL; + } + + INIT_LIST_HEAD(&scale_ptr->thresholds); + scale_ptr->max_db = -INFINITY; + + LOG_DEBUG("Scale %p created", scale_ptr); + + return (jack_mixer_scale_t)scale_ptr; +} + +#define scale_ptr ((struct scale *)scale) + +void +scale_destroy( + jack_mixer_scale_t scale) +{ + scale_remove_thresholds(scale); + free(scale_ptr); +} + +void +scale_remove_thresholds( + jack_mixer_scale_t scale) +{ + + struct threshold * threshold_ptr; + struct threshold * node_ptr; + + list_for_each_entry_safe(threshold_ptr, node_ptr, &scale_ptr->thresholds, scale_siblings) + { + list_del(&(threshold_ptr->scale_siblings)); + free(threshold_ptr); + threshold_ptr = NULL; + } +} + +bool +scale_add_threshold( + jack_mixer_scale_t scale, + float db, + float scale_value) +{ + struct threshold * threshold_ptr; + + LOG_DEBUG("Adding threshold (%f dBFS -> %f) to scale %p", db, scale, scale_ptr); + + threshold_ptr = malloc(sizeof(struct threshold)); + LOG_DEBUG("Threshold %p created ", threshold_ptr, db, scale); + + if (threshold_ptr == NULL) + { + return false; + } + + threshold_ptr->db = db; + threshold_ptr->scale = scale_value; + + list_add_tail(&threshold_ptr->scale_siblings, &scale_ptr->thresholds); + + if (db > scale_ptr->max_db) + { + scale_ptr->max_db = db; + } + + return true; +} + +#undef threshold_ptr + +void +scale_calculate_coefficients( + jack_mixer_scale_t scale) +{ + struct threshold * threshold_ptr; + struct threshold * prev_ptr; + struct list_head * node_ptr; + + prev_ptr = NULL; + + list_for_each(node_ptr, &scale_ptr->thresholds) + { + threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings); + + LOG_DEBUG("Calculating coefficients for threshold %p", threshold_ptr); + + if (prev_ptr != NULL) + { + threshold_ptr->a = (prev_ptr->scale - threshold_ptr->scale) / (prev_ptr->db - threshold_ptr->db); + threshold_ptr->b = threshold_ptr->scale - threshold_ptr->a * threshold_ptr->db; + LOG_DEBUG("%.0f dB - %.0f dB: scale = %f * dB + %f", prev_ptr->db, threshold_ptr->db, threshold_ptr->a, threshold_ptr->b); + } + + prev_ptr = threshold_ptr; + } +} + +/* Convert dBFS value to number in range 0.0-1.0 */ +double +scale_db_to_scale( + jack_mixer_scale_t scale, + double db) +{ + struct threshold * threshold_ptr; + struct threshold * prev_ptr; + struct list_head * node_ptr; + + prev_ptr = NULL; + + list_for_each(node_ptr, &scale_ptr->thresholds) + { + threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings); + + if (db < threshold_ptr->db) + { + LOG_DEBUG("Match at %f dB treshold", threshold_ptr->db); + if (prev_ptr == NULL) + { + return 0.0; + } + + return threshold_ptr->a * db + threshold_ptr->b; + } + + prev_ptr = threshold_ptr; + } + + return 1.0; +} + +/* Convert number in range 0.0-1.0 to dBFS value */ +double +scale_scale_to_db( + jack_mixer_scale_t scale, + double scale_value) +{ + struct threshold * threshold_ptr; + struct threshold * prev_ptr; + struct list_head * node_ptr; + + prev_ptr = NULL; + + list_for_each(node_ptr, &scale_ptr->thresholds)
View file
jack_mixer-15.1.tar.xz/src/scale.h
Added
@@ -0,0 +1,59 @@ +/* -*- Mode: C ; c-basic-offset: 2 -*- */ +/***************************************************************************** + * + * This file is part of jack_mixer + * + * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> + * + * 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; version 2 of the License + * + * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *****************************************************************************/ + +#ifndef JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED +#define JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED + +typedef void * jack_mixer_scale_t; + +jack_mixer_scale_t +scale_create(); + +bool +scale_add_threshold( + jack_mixer_scale_t scale, + float db, + float scale_value); + +void +scale_remove_thresholds( + jack_mixer_scale_t scale); + +void +scale_calculate_coefficients( + jack_mixer_scale_t scale); + +double +scale_db_to_scale( + jack_mixer_scale_t scale, + double db); + +double +scale_scale_to_db( + jack_mixer_scale_t scale, + double scale_value); + +void +scale_destroy( + jack_mixer_scale_t scale); + +#endif /* #ifndef JACK_SCALE_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED */
View file
jack_mixer-15.1.tar.xz/tests
Added
+(directory)
View file
jack_mixer-15.1.tar.xz/tests/test.py
Added
@@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# This file is part of jack_mixer +# +# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> +# +# 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; version 2 of the License +# +# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. + +import jack_mixer_c + +mixer = jack_mixer_c.Mixer("test") + +print("Channels count: %u" % mixer.channels_count) +channel = mixer.add_channel("Channel 1", True) + +if channel.is_stereo: + channel_type = "Stereo" +else: + channel_type = "Mono" + +channel_name = channel.name + +print('%s channel "%s"' % (channel_type, channel_name)) + +print("Channel meter read %s" % repr(channel.meter)) +print("Channels count: %u" % mixer.channels_count) + +channel.remove() + +print("Channels count: %u" % mixer.channels_count)
View file
jack_mixer-9.tar.gz/INSTALL
Deleted
@@ -1,265 +0,0 @@ -Installation -============ - -This program uses autotools. So you do the usual - ./configure && make && make install - -If you're building directly from version control, you first need to: - ./autogen.sh - -Build requirements: - * You need gcc (3.4.3 should work) - * You need Python headers (python-dev package or something like that) - * You need JACK headers (jack-dev package or something like that) - -Runtime requirements (checked by configure script): - * You need Python (2.4 should work, maybe 2.3 too - please report) - * PyGTK with cairo support - * fpconst (floating point constants) Python module. - You can use this URL if you cannot find it in more sane place - http://nedko.arnaudov.name/soft/jack_mixer/fpconst-0.7.2.tar.gz - -Runtime optional things, that will enable you to get full functionality: - * To get LASH (Linux audio session) support, you need LASH compiled - with Python bindings. This means at least 0.5.3 release. - * If you want your settings to be preserved in GConf you need Python - bindings for GConf, part of the Python bindings for GNOME. Chances - are that package you need to install is called gnome-python - -=================================================== -These are the generic installation instructions. - -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -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. - - 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. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. 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. - -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 `..'. - - 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. - -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'. - - 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. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' 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
View file
jack_mixer-9.tar.gz/Makefile.am
Deleted
@@ -1,75 +0,0 @@ -# -# This file is part of jack_mixer -# -# Copyright (C) 2007 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. -# - -AM_CFLAGS = $(JACKMIXER_CFLAGS) -D_GNU_SOURCE -Wall -fno-strict-aliasing -if DEV_VERSION -AM_CFLAGS += -Werror -endif - -SUBDIRS = data - -INCLUDES = $(PYTHON_INCLUDES) - -jack_mixerdir = $(pkgdatadir) -pkgpyexecdir = $(pythondir) -pkgpyexec_LTLIBRARIES = jack_mixer_c.la - -jack_mixer_c_la_LDFLAGS = -module -avoid-version - -jack_mixer_c_la_LIBADD = $(JACKMIXER_LIBS) - -jack_mixer_c_la_SOURCES = \ - jack_mixer.c jack_mixer.h list.h memory_atomic.c memory_atomic.h log.h log.c scale.c jack_compat.h \ - jack_mixer_c.c - -dist_jack_mixer_DATA = abspeak.py channel.py gui.py meter.py scale.py serialization.py serialization_xml.py slider.py preferences.py - -CLEANFILES = *.pyc -EXTRA_DIST = test.py COPYING jack_mixer.schemas jack_mixer.py NEWS - -bin_SCRIPTS = $(srcdir)/jack_mixer.py - -jack_mixer_c.so: jack_mixer_c.la - ln -nfs .libs/jack_mixer_c.so - -test: _jack_mixer_c.so - @./test.py - -schemadir = @GCONF_SCHEMA_FILE_DIR@ -schema_DATA = jack_mixer.schemas - -install-exec-hook: - ln -vfs jack_mixer.py $(DESTDIR)$(bindir)/jack_mixer - -if GCONF_SCHEMAS_INSTALL -install-data-hook: - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA) - -uninstall-hook: - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(srcdir)/$(schema_DATA) - rm -vf $(DESTDIR)$(bindir)/jack_mixer -endif - -pacoinstall: - test `whoami` == root # test for root - -paco -rvB jack_mixer - -paco -lE `pwd` -E /etc -p jack_mixer-`svnversion` "make install" - -paco -i jack_mixer - -
View file
jack_mixer-9.tar.gz/Makefile.in
Deleted
@@ -1,1012 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in 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. - -@SET_MAKE@ - -# -# This file is part of jack_mixer -# -# Copyright (C) 2007 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. -# - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@DEV_VERSION_TRUE@am__append_1 = -Werror -subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_jack_mixer_DATA) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ - INSTALL NEWS config/config.guess config/config.sub \ - config/depcomp config/install-sh config/ltmain.sh \ - config/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/jack.m4 \ - $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(jack_mixerdir)" "$(DESTDIR)$(schemadir)" -LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) -am__DEPENDENCIES_1 = -jack_mixer_c_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_jack_mixer_c_la_OBJECTS = jack_mixer.lo memory_atomic.lo log.lo \ - scale.lo jack_mixer_c.lo -jack_mixer_c_la_OBJECTS = $(am_jack_mixer_c_la_OBJECTS) -jack_mixer_c_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(jack_mixer_c_la_LDFLAGS) $(LDFLAGS) -o $@ -SCRIPTS = $(bin_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(jack_mixer_c_la_SOURCES) -DIST_SOURCES = $(jack_mixer_c_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -DATA = $(dist_jack_mixer_DATA) $(schema_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@
View file
jack_mixer-9.tar.gz/NEWS
Deleted
@@ -1,56 +0,0 @@ -========= -Version 9 -========= - - * Changed to no longer appends PID to jack client name (#15006) - * Added 'Edit .. channel' submenus - * Set a default 'apply' button in channel properties - * Fixed creation of mono channels - * Removed bad crackling when changing the volume through MIDI - * Moved back to polling for MIDI events, to avoid the need for threads - * Changed to use backward compatible call to gobject.timeout_add (#14999) - * Updated not to fail if we can't get lash server name - * Added support for Ladish level 1 - * Improved SIGUSR1 handling - -With contributions from Nedko Arnaudov and Arnout Engelen. - -========= -Version 8 -========= - - * Fix private modules lookup - * Fix rotation of output channel colours - * New menu items to remove output channels - * New command line parameter to not connect to LASH - -========= -Version 7 -========= - - * New maintainer, thanks Nedko for everything! - * New icon by Lapo Calamandrei - * Option to have a gradient in the vumeters - * Option to use stock GtkScale widget for volume and balance - * Rewrite of the C/Python binding (this removed the dependency on SWIG) - * Improve performance when drawing vumeters - * New menu items to load/save settings - * New "Channel Properties" dialog, allowing to change assigned MIDI CCs - * Automatic post fader outputs for input channels - * Possibility to add new output channels, besides main mix - * New "monitor" output, assignable to any output channel, or input channel - (in which case it will take its prefader volume) - * Removal of PyXML dependency - -With contributions from Nedko Arnaudov, Lapo Calamandrei, Arnout Engelen, -and Krzysztof Foltman. - -========= -Version 6 -========= - - * Fix building against jack 0.102.20 - * Handle python prefix different from install prefix - * Fix LASH-less operation - * Update install instructions after lash-0.5.3 and phat-0.4.1 releases - * Apply Markus patch (thanks!) for sr #1698 (can't restore session using LASH)
View file
jack_mixer-9.tar.gz/README
Deleted
@@ -1,52 +0,0 @@ -jack_mixer -- Jack Audio Mixer -============================== - -jack_mixer is a GTK+ JACK audio mixer app with look similar to its hardware -counterpart. It has lot of useful features, apart from being able to mix -multiple JACK audio streams. - -It is licensed under GPL version 2 (or later), check COPYING for more info. - -Please visit project homepage is at http://home.gna.org/jackmixer/ for more -info. - - -Installation ------------- - -Read INSTALL for information on installation. - - -Using MIDI CCs to control jack_mixer ------------------------------------- - -MIDI CCs can be used to control volume and balance/panorama of channels. - -The default controller for main channel volume is 7, and the default for -main channel balance is 8. Default controllers for added channels are -chosen using predefined algorithm, first free controller starting from 11, -first for volume, next for balance/panorama. - -So, if you don't delete channels, you will get CC#11 used for first input -channel volume, CC#12 for first channel balance/panorama, CC#13 for second -channel volume, CC#14 for second channel balance/panorama, etc. - -It is also possible to select other CCs when creating the channel, or -afterwards from the channel properties dialog (accessible by double clicking -on the channel name). - -MIDI CC values (0-127) are mapped to dBFS using current slider scale for -corresponding channel. - - -Feedback --------- - -If you have trouble getting jack_mixer working, find a bug or you miss some -feature, please submit a support request with the GNA issue tracker: -https://gna.org/support/?func=additem&group=jackmixer - -jack_mixer was initially written and supported by Nedko Arnaudov, it is now -maintained by Frederic Peters. You can reach Frederic at fpeters (a.t) 0d -(dot) be, and Nedko at nedko (a.t) arnaudov (dot) name. They can also be -found in #lad on FreeNode (as fredp and nedko).
View file
jack_mixer-9.tar.gz/abspeak.py
Deleted
@@ -1,62 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gtk -import fpconst -import pango -import gobject - -class AbspeakWidget(gtk.EventBox): - def __init__(self): - gtk.EventBox.__init__(self) - self.label = gtk.Label() - attrs = pango.AttrList() - font_attr = pango.AttrFamily("monospace") - attrs.insert(font_attr) - self.label.set_attributes(attrs) - self.add(self.label) - self.connect("button-press-event", self.on_mouse) - self.peak = fpconst.NegInf - - def on_mouse(self, widget, event): - if event.type == gtk.gdk.BUTTON_PRESS: - if event.button == 1: - self.emit("reset") - elif event.button == 2: - adjust = -self.peak - if abs(adjust) < 30: # we better don't adjust more than +- 30 dB - self.emit("volume-adjust", adjust) - - def set_peak(self, peak): - self.peak = peak - if fpconst.isNaN(peak): - self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(int(65535 * 0.7), 0, 0)) - self.label.set_text("NaN") - else: - text = "%+.1f" % peak - - if peak > 0: - self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(int(65535 * 0.8), int(65535 * 0.3), 0)) - else: - self.modify_bg(gtk.STATE_NORMAL, self.label.style.bg[gtk.STATE_NORMAL]) - - self.label.set_text(text) - -gobject.signal_new("reset", AbspeakWidget, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, []) -gobject.signal_new("volume-adjust", AbspeakWidget, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_FLOAT])
View file
jack_mixer-9.tar.gz/aclocal.m4
Deleted
@@ -1,9344 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 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_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# 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. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# 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. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because
View file
jack_mixer-9.tar.gz/channel.py
Deleted
@@ -1,1014 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gtk -import gobject -import slider -import meter -import abspeak -from serialization import SerializedObject - -try: - import phat -except: - phat = None - - -class Channel(gtk.VBox, SerializedObject): - '''Widget with slider and meter used as base class for more specific - channel widgets''' - monitor_button = None - - def __init__(self, app, name, stereo): - gtk.VBox.__init__(self) - self.app = app - self.mixer = app.mixer - self.gui_factory = app.gui_factory - self._channel_name = name - self.stereo = stereo - self.meter_scale = self.gui_factory.get_default_meter_scale() - self.slider_scale = self.gui_factory.get_default_slider_scale() - self.slider_adjustment = slider.AdjustmentdBFS(self.slider_scale, 0.0) - self.balance_adjustment = gtk.Adjustment(0.0, -1.0, 1.0, 0.02) - self.future_volume_midi_cc = None - self.future_balance_midi_cc = None - - def get_channel_name(self): - return self._channel_name - - label_name = None - channel = None - post_fader_output_channel = None - def set_channel_name(self, name): - self.app.on_channel_rename(self._channel_name, name); - self._channel_name = name - if self.label_name: - self.label_name.set_text(name) - if self.channel: - self.channel.name = name - if self.post_fader_output_channel: - self.post_fader_output_channel.name = "%s Out" % name; - channel_name = property(get_channel_name, set_channel_name) - - def realize(self): - #print "Realizing channel \"%s\"" % self.channel_name - - self.slider_adjustment.connect("volume-changed", self.on_volume_changed) - self.balance_adjustment.connect("value-changed", self.on_balance_changed) - - self.slider = None - self.create_slider_widget() - - if self.stereo: - self.meter = meter.StereoMeterWidget(self.meter_scale) - else: - self.meter = meter.MonoMeterWidget(self.meter_scale) - self.on_vumeter_color_changed(self.gui_factory) - - self.meter.set_events(gtk.gdk.SCROLL_MASK) - - self.gui_factory.connect("default-meter-scale-changed", self.on_default_meter_scale_changed) - self.gui_factory.connect("default-slider-scale-changed", self.on_default_slider_scale_changed) - self.gui_factory.connect('vumeter-color-changed', self.on_vumeter_color_changed) - self.gui_factory.connect('vumeter-color-scheme-changed', self.on_vumeter_color_changed) - self.gui_factory.connect('use-custom-widgets-changed', self.on_custom_widgets_changed) - - self.abspeak = abspeak.AbspeakWidget() - self.abspeak.connect("reset", self.on_abspeak_reset) - self.abspeak.connect("volume-adjust", self.on_abspeak_adjust) - - self.volume_digits = gtk.Entry() - self.volume_digits.connect("key-press-event", self.on_volume_digits_key_pressed) - self.volume_digits.connect("focus-out-event", self.on_volume_digits_focus_out) - - self.connect("key-press-event", self.on_key_pressed) - self.connect("scroll-event", self.on_scroll) - - def unrealize(self): - #print "Unrealizing channel \"%s\"" % self.channel_name - pass - - def create_balance_widget(self): - if self.gui_factory.use_custom_widgets and phat: - self.balance = phat.HFanSlider() - self.balance.set_default_value(0) - self.balance.set_adjustment(self.balance_adjustment) - else: - self.balance = gtk.HScale(self.balance_adjustment) - self.balance.set_draw_value(False) - self.pack_start(self.balance, False) - if self.monitor_button: - self.reorder_child(self.monitor_button, -1) - self.balance.show() - - def create_slider_widget(self): - parent = None - if self.slider: - parent = self.slider.get_parent() - self.slider.destroy() - if self.gui_factory.use_custom_widgets: - self.slider = slider.CustomSliderWidget(self.slider_adjustment) - else: - self.slider = slider.GtkSlider(self.slider_adjustment) - if parent: - parent.pack_start(self.slider) - parent.reorder_child(self.slider, 0) - self.slider.show() - - def on_default_meter_scale_changed(self, gui_factory, scale): - #print "Default meter scale change detected." - self.meter.set_scale(scale) - - def on_default_slider_scale_changed(self, gui_factory, scale): - #print "Default slider scale change detected." - self.slider_scale = scale - self.slider_adjustment.set_scale(scale) - self.channel.midi_scale = self.slider_scale.scale - - def on_vumeter_color_changed(self, gui_factory, *args): - color = gui_factory.get_vumeter_color() - color_scheme = gui_factory.get_vumeter_color_scheme() - if color_scheme != 'solid': - self.meter.set_color(None) - else: - self.meter.set_color(gtk.gdk.color_parse(color)) - - def on_custom_widgets_changed(self, gui_factory, value): - self.balance.destroy() - self.create_balance_widget() - self.create_slider_widget() - - def on_abspeak_adjust(self, abspeak, adjust): - #print "abspeak adjust %f" % adjust - self.slider_adjustment.set_value_db(self.slider_adjustment.get_value_db() + adjust) - self.channel.abspeak = None - #self.update_volume(False) # We want to update gui even if actual decibels have not changed (scale wrap for example) - - def on_abspeak_reset(self, abspeak): - #print "abspeak reset" - self.channel.abspeak = None - - def on_volume_digits_key_pressed(self, widget, event): - if (event.keyval == gtk.keysyms.Return or event.keyval == gtk.keysyms.KP_Enter): - db_text = self.volume_digits.get_text() - try: - db = float(db_text) - #print "Volume digits confirmation \"%f dBFS\"" % db - except (ValueError), e: - #print "Volume digits confirmation ignore, reset to current" - self.update_volume(False) - return - self.slider_adjustment.set_value_db(db) - #self.grab_focus() - #self.update_volume(False) # We want to update gui even if actual decibels have not changed (scale wrap for example) - - def on_volume_digits_focus_out(self, widget, event): - #print "volume digits focus out detected" - self.update_volume(False) - - def read_meter(self): - if not self.channel: - return - if self.stereo: - meter_left, meter_right = self.channel.meter - self.meter.set_values(meter_left, meter_right) - else: - self.meter.set_value(self.channel.meter[0]) - - self.abspeak.set_peak(self.channel.abspeak) - - def on_scroll(self, widget, event): - if event.direction == gtk.gdk.SCROLL_DOWN: - self.slider_adjustment.step_down() - elif event.direction == gtk.gdk.SCROLL_UP: - self.slider_adjustment.step_up() - return True
View file
jack_mixer-9.tar.gz/config
Deleted
-(directory)
View file
jack_mixer-9.tar.gz/config.h.in
Deleted
@@ -1,71 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Defined if we have JACK MIDI support. */ -#undef HAVE_JACK_MIDI - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* whether or not we building against old JACK MIDI (0.102.20) */ -#undef HAVE_OLD_JACK_MIDI - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Defined if we JACK MIDI functions need nframes parameter. */ -#undef JACK_MIDI_NEEDS_NFRAMES - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* 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 - -/* Version number of package */ -#undef VERSION
View file
jack_mixer-9.tar.gz/config/config.guess
Deleted
@@ -1,1533 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-10' - -# This file 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. -# -# 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. - - -# Originally written by Per Bothner <per@bothner.com>. -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
View file
jack_mixer-9.tar.gz/config/config.sub
Deleted
@@ -1,1693 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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. -# -# 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. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;;
View file
jack_mixer-9.tar.gz/config/depcomp
Deleted
@@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# 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, 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, see <http://www.gnu.org/licenses/>. - -# 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. - -# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \
View file
jack_mixer-9.tar.gz/config/install-sh
Deleted
@@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0
View file
jack_mixer-9.tar.gz/config/ltmain.sh
Deleted
@@ -1,8413 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to <bug-libtool@gnu.org>. - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2" -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=:
View file
jack_mixer-9.tar.gz/config/missing
Deleted
@@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. - -# 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, 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, see <http://www.gnu.org/licenses/>. - -# 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to <bug-automake@gnu.org>." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\
View file
jack_mixer-9.tar.gz/configure
Deleted
@@ -1,13719 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for jack_mixer 9. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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. -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 - -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" - 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
View file
jack_mixer-9.tar.gz/configure.ac
Deleted
@@ -1,110 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -# -# This file is part of jack_mixer -# -# Copyright (C) 2007 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. -# - -AC_PREREQ(2.61) -AC_INIT(jack_mixer, 9) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE -AC_CONFIG_HEADER([config.h]) - -# not real check but hack (because version is not parameter to configure script) to detect development version -AM_CONDITIONAL(DEV_VERSION, test $VERSION = dev) - -AC_SUBST(DATADIR) - -# Checks for programs. -AC_PROG_CC -AC_DISABLE_STATIC -AC_PROG_LIBTOOL -AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4") - -# Checks for libraries. - -PKG_CHECK_MODULES(JACKMIXER, [glib-2.0 jack]) - -# JACK MIDI -have_jackmidi="unknown" -AC_ARG_ENABLE(jackmidi, [AS_HELP_STRING(--disable-jackmidi, [Force disable JACK MIDI support [default=no]])], [ have_jackmidi="no (disabled)" ]) -if test "$have_jackmidi" = "unknown" -then - have_jackmidi="no" - PKG_CHECK_MODULES(JACK_MIDI, jack >= 0.102.0, AC_DEFINE([HAVE_JACK_MIDI], [], [Defined if we have JACK MIDI support.]) have_jackmidi="yes") - if test "$have_jackmidi" = "yes" - then - PKG_CHECK_MODULES(OLD_JACK_MIDI, jack < 0.102.27, have_jackmidi="yes (old one)" AC_DEFINE(HAVE_OLD_JACK_MIDI, 1, [whether or not we building against old JACK MIDI (0.102.20)]), echo -n) - fi -fi - -AM_CONDITIONAL(HAVE_JACK_MIDI, test "$have_jackmidi" = "yes" -o "$have_jackmidi" = "yes (old one)") - -if test "$have_jackmidi" = "no" -then - AC_MSG_WARN([Your JACK is missing MIDI support.]) -fi - -if test "$have_jackmidi" = "yes" -o "$have_jackmidi" = "yes (old one)" -then - AC_JACK_MIDI_NFRAMES_CHECK() - if test "$jackmidi_nframes" = "yes" - then - AC_DEFINE([JACK_MIDI_NEEDS_NFRAMES], 1, [Defined if we JACK MIDI functions need nframes parameter.]) - fi -fi - -# Python checking -AM_PATH_PYTHON(2.4) -AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(Could not find Python headers)]) -#AS_AC_EXPAND(PYTHONDIR, $pythondir) -#AC_SUBST(PYTHONDIR) - -AC_ARG_ENABLE(pymod-checks, [AS_HELP_STRING(--disable-pymod-checks, [Force disable checks for Python modules required at run time])], [ disable_pymod_checks="yes" ], [ disable_pymod_checks="no" ]) - -if test "$disable_pymod_checks" != "yes" -then - AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find PyGTK)]) - AM_CHECK_PYMOD(cairo,,,[AC_MSG_ERROR(Could not find Pycairo)]) - AM_CHECK_PYMOD(fpconst,,,[AC_MSG_ERROR(Could not find fpconst Python module)]) -else - AC_MSG_WARN([Checks for python modules required runtime have been force disabled]) -fi - -AC_PATH_PROG(GCONFTOOL, gconftool-2, no) -AM_GCONF_SOURCE_2 -AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "x$ac_cv_path_GCONFTOOL" != "xno"]) - -AC_OUTPUT([ -Makefile -data/Makefile -data/art/Makefile -]) - -AC_MSG_RESULT([]) -AC_MSG_RESULT([**********************************************************************]) -AC_MSG_RESULT([]) -AC_MSG_RESULT([Prefix: $prefix]) -AC_MSG_RESULT([Python dir: $pythondir]) -#AC_MSG_RESULT([GConf schema dir: $GCONF_SCHEMA_FILE_DIR]) -AC_MSG_RESULT([]) -AC_MSG_RESULT([MIDI support: $have_jackmidi]) -AC_MSG_RESULT([]) -AC_MSG_RESULT([**********************************************************************]) -AC_MSG_RESULT([])
View file
jack_mixer-9.tar.gz/data/Makefile.am
Deleted
@@ -1,6 +0,0 @@ -SUBDIRS = art - -desktopdir = $(datadir)/applications -desktop_DATA = jack_mixer.desktop - -EXTRA_DIST = $(desktop_DATA)
View file
jack_mixer-9.tar.gz/data/Makefile.in
Deleted
@@ -1,626 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in 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. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = data -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/jack.m4 \ - $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(desktopdir)" -DATA = $(desktop_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GCONFTOOL = @GCONFTOOL@ -GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ -GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JACKMIXER_CFLAGS = @JACKMIXER_CFLAGS@ -JACKMIXER_LIBS = @JACKMIXER_LIBS@ -JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ -JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ -OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@
View file
jack_mixer-9.tar.gz/data/art/Makefile.am
Deleted
@@ -1,47 +0,0 @@ -# ****************************************************************************** -# Images and icon -# ****************************************************************************** - -16icondir = $(datadir)/icons/hicolor/16x16/apps -16icon_DATA = 16x16/jack_mixer.png - -22icondir = $(datadir)/icons/hicolor/22x22/apps -22icon_DATA = 22x22/jack_mixer.png - -24icondir = $(datadir)/icons/hicolor/24x24/apps -24icon_DATA = 24x24/jack_mixer.png - -32icondir = $(datadir)/icons/hicolor/32x32/apps -32icon_DATA = 32x32/jack_mixer.png - -48icondir = $(datadir)/icons/hicolor/48x48/apps -48icon_DATA = 48x48/jack_mixer.png - -svgicondir = $(datadir)/icons/hicolor/scalable/apps -svgicon_DATA = scalable/jack_mixer.svg - -gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor - -install-data-hook: update-icon-cache -uninstall-hook: update-icon-cache -update-icon-cache: - @-if test -z "$(DESTDIR)"; then \ - echo "Updating Gtk icon cache."; \ - $(gtk_update_icon_cache); \ - else \ - echo "*** Icon cache not updated. After (un)install, run this:"; \ - echo "*** $(gtk_update_icon_cache)"; \ - fi - -EXTRA_DIST = \ - $(16icon_DATA) \ - $(22icon_DATA) \ - $(24icon_DATA) \ - $(32icon_DATA) \ - $(48icon_DATA) \ - $(svgicon_DATA) \ - 16x16/jack_mixer.svg \ - 22x22/jack_mixer.svg \ - 32x32/jack_mixer.svg \ - 48x48/jack_mixer.svg -
View file
jack_mixer-9.tar.gz/data/art/Makefile.in
Deleted
@@ -1,573 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in 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. - -@SET_MAKE@ - -# ****************************************************************************** -# Images and icon -# ****************************************************************************** - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = data/art -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/jack.m4 \ - $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(16icondir)" "$(DESTDIR)$(22icondir)" \ - "$(DESTDIR)$(24icondir)" "$(DESTDIR)$(32icondir)" \ - "$(DESTDIR)$(48icondir)" "$(DESTDIR)$(svgicondir)" -DATA = $(16icon_DATA) $(22icon_DATA) $(24icon_DATA) $(32icon_DATA) \ - $(48icon_DATA) $(svgicon_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIR = @DATADIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GCONFTOOL = @GCONFTOOL@ -GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ -GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -JACKMIXER_CFLAGS = @JACKMIXER_CFLAGS@ -JACKMIXER_LIBS = @JACKMIXER_LIBS@ -JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ -JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ -OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@
View file
jack_mixer-9.tar.gz/gui.py
Deleted
@@ -1,172 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gobject - -try: - import gconf -except: - print "Cannot load Python bindings for GConf, your preferences will not be preserved across jack_mixer invocations" - gconf = None - -def lookup_scale(scales, scale_id): - for scale in scales: - if scale_id == scale.scale_id: - return scale - return None - -class Factory(gobject.GObject): - def __init__(self, topwindow, meter_scales, slider_scales): - gobject.GObject.__init__(self) - self.topwindow = topwindow - self.meter_scales = meter_scales - self.slider_scales = slider_scales - - if gconf: - self.gconf_client = gconf.client_get_default() - - scale_id = self.gconf_client.get_string("/apps/jack_mixer/default_meter_scale") - self.default_meter_scale = lookup_scale(meter_scales, scale_id) - if not self.default_meter_scale: - self.default_meter_scale = meter_scales[0] - - scale_id = self.gconf_client.get_string("/apps/jack_mixer/default_slider_scale") - self.default_slider_scale = lookup_scale(slider_scales, scale_id) - if not self.default_slider_scale: - self.default_slider_scale = slider_scales[0] - - self.vumeter_color_scheme = self.gconf_client.get_string( - '/apps/jack_mixer/vumeter_color_scheme') - self.vumeter_color = self.gconf_client.get_string( - '/apps/jack_mixer/vumeter_color') - if not self.vumeter_color: - self.vumeter_color = '#ccb300' - - self.use_custom_widgets = self.gconf_client.get_bool( - '/apps/jack_mixer/use_custom_widgets') - - self.gconf_client.add_dir("/apps/jack_mixer", gconf.CLIENT_PRELOAD_NONE) - self.gconf_client.notify_add("/apps/jack_mixer/default_meter_scale", self.on_gconf_default_meter_scale_changed) - self.gconf_client.notify_add("/apps/jack_mixer/default_slider_scale", self.on_gconf_default_slider_scale_changed) - self.gconf_client.notify_add('/apps/jack_mixer/vumeter_color', - self.on_gconf_vumeter_color_change) - self.gconf_client.notify_add('/apps/jack_mixer/vumeter_color_scheme', - self.on_gconf_vumeter_color_scheme_change) - self.gconf_client.notify_add('/apps/jack_mixer/use_custom_widgets', - self.on_gconf_use_custom_widgets_change) - else: - self.default_meter_scale = meter_scales[0] - self.default_slider_scale = slider_scales[0] - self.vumeter_color = '#ccb300' - self.vumeter_color_scheme = 'default' - self.use_custom_widgets = False - - def on_gconf_default_meter_scale_changed(self, client, connection_id, entry, args): - #print "GConf default_meter_scale changed" - scale_id = entry.get_value().get_string() - scale = lookup_scale(self.meter_scales, scale_id) - self.set_default_meter_scale(scale, from_gconf=True) - - def set_default_meter_scale(self, scale, from_gconf=False): - if scale: - if gconf and not from_gconf: - self.gconf_client.set_string("/apps/jack_mixer/default_meter_scale", scale.scale_id) - else: - self.default_meter_scale = scale - self.emit("default-meter-scale-changed", self.default_meter_scale) - else: - print "Ignoring GConf default_meter_scale setting, because \"%s\" scale is not known" % scale_id - - def on_gconf_default_slider_scale_changed(self, client, connection_id, entry, args): - #print "GConf default_slider_scale changed" - scale_id = entry.get_value().get_string() - scale = lookup_scale(self.slider_scales, scale_id) - self.set_default_slider_scale(scale, from_gconf=True) - - def set_default_slider_scale(self, scale, from_gconf=False): - if scale: - if gconf and not from_gconf: - self.gconf_client.set_string("/apps/jack_mixer/default_slider_scale", scale.scale_id) - else: - self.default_slider_scale = scale - self.emit("default-slider-scale-changed", self.default_slider_scale) - else: - print "Ignoring GConf default_slider_scale setting, because \"%s\" scale is not known" % scale_id - - def set_vumeter_color(self, color, from_gconf=False): - if gconf and not from_gconf: - self.gconf_client.set_string('/apps/jack_mixer/vumeter_color', color) - else: - self.vumeter_color = color - self.emit('vumeter-color-changed', self.vumeter_color) - - def on_gconf_vumeter_color_change(self, client, connection_id, entry, args): - color = entry.get_value().get_string() - self.set_vumeter_color(color, from_gconf=True) - - def set_vumeter_color_scheme(self, color_scheme, from_gconf=False): - if gconf and not from_gconf: - self.gconf_client.set_string('/apps/jack_mixer/vumeter_color_scheme', color_scheme) - else: - self.vumeter_color_scheme = color_scheme - self.emit('vumeter-color-scheme-changed', self.vumeter_color_scheme) - - def on_gconf_vumeter_color_scheme_change(self, client, connection_id, entry, args): - color_scheme = entry.get_value().get_string() - self.set_vumeter_color_scheme(color_scheme, from_gconf=True) - - def set_use_custom_widgets(self, use_custom, from_gconf=False): - if gconf and not from_gconf: - self.gconf_client.set_bool('/apps/jack_mixer/use_custom_widgets', use_custom) - else: - self.use_custom_widgets = use_custom - self.emit('use-custom-widgets-changed', self.use_custom_widgets) - - def on_gconf_use_custom_widgets_change(self, client, connection_id, entry, args): - use_custom = entry.get_value().get_bool() - self.set_use_custom_widgets(use_custom, from_gconf=True) - - def get_default_meter_scale(self): - return self.default_meter_scale - - def get_default_slider_scale(self): - return self.default_slider_scale - - def get_vumeter_color(self): - return self.vumeter_color - - def get_vumeter_color_scheme(self): - return self.vumeter_color_scheme - - def get_use_custom_widgets(self): - return self.use_custom_widgets - -gobject.signal_new("default-meter-scale-changed", Factory, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, - gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT]) -gobject.signal_new("default-slider-scale-changed", Factory, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, - gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT]) -gobject.signal_new('vumeter-color-changed', Factory, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, - gobject.TYPE_NONE, [str]) -gobject.signal_new('vumeter-color-scheme-changed', Factory, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, - gobject.TYPE_NONE, [str]) -gobject.signal_new('use-custom-widgets-changed', Factory, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, - gobject.TYPE_NONE, [bool])
View file
jack_mixer-9.tar.gz/jack_compat.h
Deleted
@@ -1,64 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * This file is part of jack_nuke - * - * Copyright (C) 2007 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#if defined(JACK_MIDI_NEEDS_NFRAMES) - -jack_nframes_t -jack_midi_get_event_count_compat( - void * port_buffer) -{ -#if defined(HAVE_OLD_JACK_MIDI) - return jack_midi_port_get_info(port_buffer, 0)->event_count; -#else - return jack_midi_get_event_count(port_buffer, 0); -#endif -} - -#define jack_midi_get_event_count jack_midi_get_event_count_compat - -int -jack_midi_event_get_compat( - jack_midi_event_t * event, - void * port_buffer, - jack_nframes_t event_index) -{ - return jack_midi_event_get(event, port_buffer, event_index, 0); -} - -#define jack_midi_event_get jack_midi_event_get_compat - -void -jack_midi_clear_buffer_compat( - void * port_buffer) -{ - jack_midi_clear_buffer(port_buffer, 0); -} - -#define jack_midi_clear_buffer jack_midi_clear_buffer_compat - -#else - -#if defined(HAVE_OLD_JACK_MIDI) -#error "Old (0.102.20) JACK MIDI API needs nframes (autotools probably gone mad)" -#endif - -#endif /* #if defined(JACK_MIDI_NEEDS_NFRAMES) */
View file
jack_mixer-9.tar.gz/jack_mixer.c
Deleted
@@ -1,1442 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * This file is part of jack_mixer - * - * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> - * Copyright (C) 2009 Frederic Peters <fpeters@0d.be> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#include "config.h" - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <stdbool.h> -#include <math.h> -#include <jack/jack.h> -#if defined(HAVE_JACK_MIDI) -#include <jack/midiport.h> -#endif -#include <assert.h> -#include <pthread.h> - -#include <glib.h> - -#include "jack_mixer.h" -//#define LOG_LEVEL LOG_LEVEL_DEBUG -#include "log.h" - -#include "jack_compat.h" - -#define PEAK_FRAMES_CHUNK 4800 - -// we don't know how much to allocate, but we don't want to wait with -// allocating until we're in the process() callback, so we just take a -// fairly big chunk: 4 periods per buffer, 4096 samples per period. -// (not sure if the '*4' is needed) -#define MAX_BLOCK_SIZE (4 * 4096) - -#define FLOAT_EXISTS(x) (!((x) - (x))) - -struct channel -{ - struct jack_mixer * mixer_ptr; - char * name; - bool stereo; - float volume; - float balance; - float volume_left; - float volume_right; - float meter_left; - float meter_right; - float abspeak; - jack_port_t * port_left; - jack_port_t * port_right; - - jack_nframes_t peak_frames; - float peak_left; - float peak_right; - - jack_default_audio_sample_t * frames_left; - jack_default_audio_sample_t * frames_right; - jack_default_audio_sample_t * prefader_frames_left; - jack_default_audio_sample_t * prefader_frames_right; - - bool NaN_detected; - - int midi_cc_volume_index; - int midi_cc_balance_index; - - jack_default_audio_sample_t * left_buffer_ptr; - jack_default_audio_sample_t * right_buffer_ptr; - - bool midi_got_events; - void (*midi_change_callback) (void*); - void *midi_change_callback_data; - - jack_mixer_scale_t midi_scale; -}; - -struct output_channel { - struct channel channel; - GSList *soloed_channels; - GSList *muted_channels; - bool system; /* system channel, without any associated UI */ - bool prefader; -}; - -struct jack_mixer -{ - pthread_mutex_t mutex; - jack_client_t * jack_client; - GSList *input_channels_list; - GSList *output_channels_list; - struct output_channel *main_mix_channel; - - jack_port_t * port_midi_in; - unsigned int last_midi_channel; - - struct channel* midi_cc_map[128]; -}; - -static jack_mixer_output_channel_t create_output_channel( - jack_mixer_t mixer, - const char * channel_name, - bool stereo, - bool system); - -static inline void -update_channel_buffers( - struct channel * channel_ptr, - jack_nframes_t nframes); - - -float -value_to_db( - float value) -{ - if (value <= 0) - { - return -INFINITY; - } - - return 20.0 * log10f(value); -} - -float -db_to_value( - float db) -{ - return powf(10.0, db/20.0); -} - -void -calc_channel_volumes( - struct channel * channel_ptr) -{ - if (channel_ptr->stereo) - { - if (channel_ptr->balance > 0) - { - channel_ptr->volume_left = channel_ptr->volume * (1 - channel_ptr->balance); - channel_ptr->volume_right = channel_ptr->volume; - } - else - { - channel_ptr->volume_left = channel_ptr->volume; - channel_ptr->volume_right = channel_ptr->volume * (1 + channel_ptr->balance); - } - } - else - { - channel_ptr->volume_left = channel_ptr->volume * (1 - channel_ptr->balance); - channel_ptr->volume_right = channel_ptr->volume * (1 + channel_ptr->balance); - } -} - -void -calc_all_channel_volumes( - struct jack_mixer * mixer_ptr) -{ - struct channel * channel_ptr; - GSList *list_ptr; - - for (list_ptr = mixer_ptr->input_channels_list; list_ptr; list_ptr = g_slist_next(list_ptr)) - { - channel_ptr = list_ptr->data; - calc_channel_volumes(channel_ptr); - } -} - -#define channel_ptr ((struct channel *)channel) - -const char* -channel_get_name( - jack_mixer_channel_t channel) -{ - return channel_ptr->name; -} - -void -channel_rename( - jack_mixer_channel_t channel, - const char * name) -{
View file
jack_mixer-9.tar.gz/jack_mixer.h
Deleted
@@ -1,257 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * This file is part of jack_mixer - * - * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#ifndef JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED -#define JACK_MIXER_H__DAEB51D8_5861_40F2_92E4_24CA495A384D__INCLUDED - -#ifdef SWIG -%module jack_mixer_c -%include "typemaps.i" -%apply double *OUTPUT { double * left_ptr, double * right_ptr, double * mono_ptr }; -%{ -#include <stdbool.h> -#include "jack_mixer.h" -%} -#endif - -typedef void * jack_mixer_t; -typedef void * jack_mixer_channel_t; -typedef void * jack_mixer_output_channel_t; -typedef void * jack_mixer_scale_t; -typedef void * jack_mixer_threshold_t; - -jack_mixer_t -create( - const char * jack_client_name_ptr); - -void -destroy( - jack_mixer_t mixer); - -jack_mixer_channel_t -get_main_mix_channel( - jack_mixer_t mixer); - -unsigned int -get_channels_count( - jack_mixer_t mixer); - -unsigned int -get_last_midi_channel( - jack_mixer_t mixer); - -jack_mixer_channel_t -add_channel( - jack_mixer_t mixer, - const char * channel_name, - bool stereo); - -const char * -channel_get_name( - jack_mixer_channel_t channel); - -/* returned values are in dBFS */ -void -channel_stereo_meter_read( - jack_mixer_channel_t channel, - double * left_ptr, - double * right_ptr); - -/* returned value is in dBFS */ -void -channel_mono_meter_read( - jack_mixer_channel_t channel, - double * mono_ptr); - -bool -channel_is_stereo( - jack_mixer_channel_t channel); - -void -channel_set_midi_change_callback( - jack_mixer_channel_t channel, - void (*midi_change_callback) (void*), - void *user_data); - -/* volume is in dBFS */ -void -channel_volume_write( - jack_mixer_channel_t channel, - double volume); - -double -channel_volume_read( - jack_mixer_channel_t channel); - -/* balance is from -1.0 (full left) to +1.0 (full right) */ -void -channel_balance_write( - jack_mixer_channel_t channel, - double balance); - -double -channel_balance_read( - jack_mixer_channel_t channel); - -unsigned int -channel_get_balance_midi_cc( - jack_mixer_channel_t channel); - -unsigned int -channel_set_balance_midi_cc( - jack_mixer_channel_t channel, - unsigned int new_cc); - -unsigned int -channel_get_volume_midi_cc( - jack_mixer_channel_t channel); - -unsigned int -channel_set_volume_midi_cc( - jack_mixer_channel_t channel, - unsigned int new_cc); - -void -channel_autoset_midi_cc( - jack_mixer_channel_t channel); - -void -remove_channel( - jack_mixer_channel_t channel); - -/* returned value is in dBFS */ -double -channel_abspeak_read( - jack_mixer_channel_t channel); - -void -channel_abspeak_reset( - jack_mixer_channel_t channel); - -void -channel_mute( - jack_mixer_channel_t channel); - -void -channel_unmute( - jack_mixer_channel_t channel); - -void -channel_solo( - jack_mixer_channel_t channel); - -void -channel_unsolo( - jack_mixer_channel_t channel); - -bool -channel_is_muted( - jack_mixer_channel_t channel); - -bool -channel_is_soloed( - jack_mixer_channel_t channel); - -void -channel_rename( - jack_mixer_channel_t channel, - const char * name); - -void -channel_set_midi_scale( - jack_mixer_channel_t channel, - jack_mixer_scale_t scale); - -bool -channel_get_midi_got_events( - jack_mixer_channel_t channel); - -jack_mixer_scale_t -scale_create(); - -bool -scale_add_threshold( - jack_mixer_scale_t scale, - float db, - float scale_value); - -void -scale_calculate_coefficients( - jack_mixer_scale_t scale);
View file
jack_mixer-9.tar.gz/jack_mixer.py
Deleted
@@ -1,768 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# This file is part of jack_mixer -# -# Copyright (C) 2006-2009 Nedko Arnaudov <nedko@arnaudov.name> -# Copyright (C) 2009 Frederic Peters <fpeters@0d.be> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -from optparse import OptionParser - -import gtk -import gobject -import sys -import os -import signal - -try: - import lash -except: - lash = None - print >> sys.stderr, "Cannot load LASH python bindings, you want them unless you enjoy manual jack plumbing each time you use this app" - -# temporary change Python modules lookup path to look into installation -# directory ($prefix/share/jack_mixer/) -old_path = sys.path -sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), '..', 'share', 'jack_mixer')) - -import jack_mixer_c -import scale -from channel import * - -import gui -from preferences import PreferencesDialog - -from serialization_xml import XmlSerialization -from serialization import SerializedObject, Serializator - -# restore Python modules lookup path -sys.path = old_path - -class JackMixer(SerializedObject): - - # scales suitable as meter scales - meter_scales = [scale.IEC268(), scale.Linear70dB(), scale.IEC268Minimalistic()] - - # scales suitable as volume slider scales - slider_scales = [scale.Linear30dB(), scale.Linear70dB()] - - # name of settngs file that is currently open - current_filename = None - - def __init__(self, name, lash_client): - self.mixer = jack_mixer_c.Mixer(name) - if not self.mixer: - return - self.monitor_channel = self.mixer.add_output_channel("Monitor", True, True) - - self.save = False - - if lash_client: - # Send our client name to server - lash_event = lash.lash_event_new_with_type(lash.LASH_Client_Name) - lash.lash_event_set_string(lash_event, name) - lash.lash_send_event(lash_client, lash_event) - - lash.lash_jack_client_name(lash_client, name) - - gtk.window_set_default_icon_name('jack_mixer') - - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.set_title(name) - - self.gui_factory = gui.Factory(self.window, self.meter_scales, self.slider_scales) - - self.vbox_top = gtk.VBox() - self.window.add(self.vbox_top) - - self.menubar = gtk.MenuBar() - self.vbox_top.pack_start(self.menubar, False) - - mixer_menu_item = gtk.MenuItem("_Mixer") - self.menubar.append(mixer_menu_item) - edit_menu_item = gtk.MenuItem('_Edit') - self.menubar.append(edit_menu_item) - help_menu_item = gtk.MenuItem('_Help') - self.menubar.append(help_menu_item) - - self.window.set_default_size(120, 300) - - mixer_menu = gtk.Menu() - mixer_menu_item.set_submenu(mixer_menu) - - add_input_channel = gtk.ImageMenuItem('New _Input Channel') - mixer_menu.append(add_input_channel) - add_input_channel.connect("activate", self.on_add_input_channel) - - add_output_channel = gtk.ImageMenuItem('New _Output Channel') - mixer_menu.append(add_output_channel) - add_output_channel.connect("activate", self.on_add_output_channel) - - mixer_menu.append(gtk.SeparatorMenuItem()) - open = gtk.ImageMenuItem(gtk.STOCK_OPEN) - mixer_menu.append(open) - open.connect('activate', self.on_open_cb) - save = gtk.ImageMenuItem(gtk.STOCK_SAVE) - mixer_menu.append(save) - save.connect('activate', self.on_save_cb) - save_as = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS) - mixer_menu.append(save_as) - save_as.connect('activate', self.on_save_as_cb) - - mixer_menu.append(gtk.SeparatorMenuItem()) - - quit = gtk.ImageMenuItem(gtk.STOCK_QUIT) - mixer_menu.append(quit) - quit.connect('activate', self.on_quit_cb) - - edit_menu = gtk.Menu() - edit_menu_item.set_submenu(edit_menu) - - self.channel_edit_input_menu_item = gtk.MenuItem('_Edit Input Channel') - edit_menu.append(self.channel_edit_input_menu_item) - self.channel_edit_input_menu = gtk.Menu() - self.channel_edit_input_menu_item.set_submenu(self.channel_edit_input_menu) - - self.channel_edit_output_menu_item = gtk.MenuItem('Edit _Output Channel') - edit_menu.append(self.channel_edit_output_menu_item) - self.channel_edit_output_menu = gtk.Menu() - self.channel_edit_output_menu_item.set_submenu(self.channel_edit_output_menu) - - self.channel_remove_input_menu_item = gtk.MenuItem('Remove _Input Channel') - edit_menu.append(self.channel_remove_input_menu_item) - self.channel_remove_input_menu = gtk.Menu() - self.channel_remove_input_menu_item.set_submenu(self.channel_remove_input_menu) - - self.channel_remove_output_menu_item = gtk.MenuItem('_Remove Output Channel') - edit_menu.append(self.channel_remove_output_menu_item) - self.channel_remove_output_menu = gtk.Menu() - self.channel_remove_output_menu_item.set_submenu(self.channel_remove_output_menu) - - channel_remove_all_menu_item = gtk.ImageMenuItem(gtk.STOCK_CLEAR) - edit_menu.append(channel_remove_all_menu_item) - channel_remove_all_menu_item.connect("activate", self.on_channels_clear) - - edit_menu.append(gtk.SeparatorMenuItem()) - - preferences = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES) - preferences.connect('activate', self.on_preferences_cb) - edit_menu.append(preferences) - - help_menu = gtk.Menu() - help_menu_item.set_submenu(help_menu) - - about = gtk.ImageMenuItem(gtk.STOCK_ABOUT) - help_menu.append(about) - about.connect("activate", self.on_about) - - self.hbox_top = gtk.HBox() - self.vbox_top.pack_start(self.hbox_top, True) - - self.scrolled_window = gtk.ScrolledWindow() - self.hbox_top.pack_start(self.scrolled_window, True) - - self.hbox_inputs = gtk.HBox() - self.hbox_inputs.set_spacing(0) - self.hbox_inputs.set_border_width(0) - self.hbox_top.set_spacing(0) - self.hbox_top.set_border_width(0) - self.channels = [] - self.output_channels = [] - - self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.scrolled_window.add_with_viewport(self.hbox_inputs) - - self.main_mix = MainMixChannel(self) - self.hbox_outputs = gtk.HBox() - self.hbox_outputs.set_spacing(0) - self.hbox_outputs.set_border_width(0) - frame = gtk.Frame() - frame.add(self.main_mix) - self.hbox_outputs.pack_start(frame, False) - self.hbox_top.pack_start(self.hbox_outputs, False) - - self.window.connect("destroy", gtk.main_quit) - - gobject.timeout_add(80, self.read_meters)
View file
jack_mixer-9.tar.gz/jack_mixer.schemas
Deleted
@@ -1,67 +0,0 @@ -<gconfschemafile> - <schemalist> - <schema> - <key>/schemas/apps/jack_mixer/default_meter_scale</key> - <applyto>/apps/jack_mixer/default_meter_scale</applyto> - <owner>jack_mixer</owner> - <type>string</type> - <default>iec_268</default> - <locale name="C"> - <short>Default scale to use for peak meters</short> - <long>Default scale to use for peak meters. "iec_268" uses - scale close or maybe confirming to IEC 60268-18 - standard. "linear_70dB" is linear scale with range from -70 to - 0 dBFS. - </long> - </locale> - </schema> - <schema> - <key>/schemas/apps/jack_mixer/default_slider_scale</key> - <applyto>/apps/jack_mixer/default_slider_scale</applyto> - <owner>jack_mixer</owner> - <type>string</type> - <default>linear_30dB</default> - <locale name="C"> - <short>Default scale to use for volume siliders</short> - <long>Default scale to use for volume siliders. "linear_30dB" - is linear scale with range from -30 to +30 dBFS. "linear_70dB" - is linear scale with range from -70 to 0 dBFS. - </long> - </locale> - </schema> - <schema> - <key>/schemas/apps/jack_mixer/vumeter_color_scheme</key> - <applyto>/apps/jack_mixer/vumeter_color_scheme</applyto> - <owner>jack_mixer</owner> - <type>string</type> - <default>gradient</default> - <locale name="C"> - <short>Scheme used for the coloring of vumeters</short> - <long>Gradient (default) or solid.</long> - </locale> - </schema> - <schema> - <key>/schemas/apps/jack_mixer/vumeter_color</key> - <applyto>/apps/jack_mixer/vumeter_color</applyto> - <owner>jack_mixer</owner> - <type>string</type> - <default>#ccb300</default> - <locale name="C"> - <short>Color for vumeters</short> - <long>Color to be used in vumeters when configured to display a solid - color.</long> - </locale> - </schema> - <schema> - <key>/schemas/apps/jack_mixer/use_custom_widgets</key> - <applyto>/apps/jack_mixer/use_custom_widgets</applyto> - <owner>jack_mixer</owner> - <type>bool</type> - <default>false</default> - <locale name="C"> - <short>Use custom widgets</short> - <long>Whether to use custom widgets for the slider and balance.</long> - </locale> - </schema> - </schemalist> -</gconfschemafile>
View file
jack_mixer-9.tar.gz/jack_mixer_c.c
Deleted
@@ -1,968 +0,0 @@ -/* - * This file is part of jack_mixer - * - * Copyright (C) 2009 Frederic Peters <fpeters@0d.be> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include <Python.h> - -#include <stdlib.h> -#include <string.h> -#include <stdbool.h> - -#include <structmember.h> - -#include "jack_mixer.h" - - -/** Scale Type **/ - -typedef struct { - PyObject_HEAD - jack_mixer_scale_t scale; -} ScaleObject; - -static void -Scale_dealloc(ScaleObject *self) -{ - if (self->scale) - scale_destroy(self->scale); - self->ob_type->tp_free((PyObject*)self); -} - -static int -Scale_init(ScaleObject *self, PyObject *args, PyObject *kwds) -{ - self->scale = scale_create(); - return 0; -} - -static PyObject* -Scale_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - ScaleObject *self; - - self = (ScaleObject*)type->tp_alloc(type, 0); - - return (PyObject*)self; -} - -static PyObject* -Scale_add_threshold(ScaleObject *self, PyObject *args) -{ - float db, scale_value; - - if (! PyArg_ParseTuple(args, "ff", &db, &scale_value)) return NULL; - - scale_add_threshold(self->scale, db, scale_value); - - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject* -Scale_calculate_coefficients(ScaleObject *self, PyObject *args) -{ - if (! PyArg_ParseTuple(args, "")) return NULL; - scale_calculate_coefficients(self->scale); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject* -Scale_db_to_scale(ScaleObject *self, PyObject *args) -{ - double db; - if (! PyArg_ParseTuple(args, "d", &db)) return NULL; - return PyFloat_FromDouble(scale_db_to_scale(self->scale, db)); -} - -static PyObject* -Scale_scale_to_db(ScaleObject *self, PyObject *args) -{ - double scale_value; - if (! PyArg_ParseTuple(args, "d", &scale_value)) return NULL; - return PyFloat_FromDouble(scale_scale_to_db(self->scale, scale_value)); -} - -static PyMethodDef Scale_methods[] = { - {"add_threshold", (PyCFunction)Scale_add_threshold, METH_VARARGS, "Add threshold"}, - {"calculate_coefficients", (PyCFunction)Scale_calculate_coefficients, - METH_VARARGS, "Calculate coefficients"}, - {"db_to_scale", (PyCFunction)Scale_db_to_scale, METH_VARARGS, "dB to scale"}, - {"scale_to_db", (PyCFunction)Scale_scale_to_db, METH_VARARGS, "scale to dB"}, - {NULL} -}; - -static PyTypeObject ScaleType = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "jack_mixer_c.Scale", /*tp_name*/ - sizeof(ScaleObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)Scale_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash */ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - "Scale objects", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - Scale_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Scale_init, /* tp_init */ - 0, /* tp_alloc */ - Scale_new, /* tp_new */ -}; - - -/** Channel Type **/ - -typedef struct { - PyObject_HEAD - PyObject *midi_change_callback; - jack_mixer_channel_t channel; -} ChannelObject; - -static void -Channel_dealloc(ChannelObject *self) -{ - Py_XDECREF(self->midi_change_callback); - self->ob_type->tp_free((PyObject*)self); -} - -static int -Channel_init(ChannelObject *self, PyObject *args, PyObject *kwds) -{ - self->midi_change_callback = NULL; - return 0; -} - -static PyObject* -Channel_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - ChannelObject *self; - - self = (ChannelObject*)type->tp_alloc(type, 0); - - if (self != NULL) { - self->channel = NULL; - self->midi_change_callback = NULL; - } - - return (PyObject*)self; -} - -static PyObject* -Channel_get_is_stereo(ChannelObject *self, void *closure) -{ - PyObject *result; - - bool is_stereo = channel_is_stereo(self->channel); - if (is_stereo) { - result = Py_True; - } else { - result = Py_False;
View file
jack_mixer-9.tar.gz/log.c
Deleted
@@ -1,35 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> - -#include "log.h" - -void jack_mixer_log(int level, const char * format, ...) -{ - va_list arglist; - - va_start(arglist, format); - vprintf(format, arglist); - va_end(arglist); -}
View file
jack_mixer-9.tar.gz/log.h
Deleted
@@ -1,86 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED -#define LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED - -void jack_mixer_log(int level, const char * format, ...); - -#define LOG_LEVEL_DEBUG 0 -#define LOG_LEVEL_INFO 1 -#define LOG_LEVEL_WARNING 2 -#define LOG_LEVEL_NOTICE 3 -#define LOG_LEVEL_ERROR 4 -#define LOG_LEVEL_FATAL 5 -#define LOG_LEVEL_BLACK_HOLE 6 - -#if !defined(LOG_LEVEL) -#define LOG_LEVEL LOG_LEVEL_WARNING -#endif - -#if LOG_LEVEL <= LOG_LEVEL_DEBUG -# define LOG_DEBUG(format, arg...) \ - jack_mixer_log(LOG_LEVEL_DEBUG, \ - format "\n", ## arg) -#else -# define LOG_DEBUG(format, arg...) -#endif - -#if LOG_LEVEL <= LOG_LEVEL_INFO -# define LOG_INFO(format, arg...) \ - jack_mixer_log(LOG_LEVEL_INFO, \ - format "\n", ## arg) -#else -# define LOG_INFO(format, arg...) -#endif - -#if LOG_LEVEL <= LOG_LEVEL_WARNING -# define LOG_WARNING(format, arg...) \ - jack_mixer_log(LOG_LEVEL_WARNING, \ - format "\n", ## arg) -#else -# define LOG_WARNING(format, arg...) -#endif - -#if LOG_LEVEL <= LOG_LEVEL_NOTICE -# define LOG_NOTICE(format, arg...) \ - jack_mixer_log(LOG_LEVEL_NOTICE, \ - format "\n", ## arg) -#else -# define LOG_NOTICE(format, arg...) -#endif - -#if LOG_LEVEL <= LOG_LEVEL_ERROR -# define LOG_ERROR(format, arg...) \ - jack_mixer_log(LOG_LEVEL_ERROR, \ - format "\n", ## arg) -#else -# define LOG_ERROR(format, arg...) -#endif - -#if LOG_LEVEL <= LOG_LEVEL_FATAL -# define LOG_FATAL(format, arg...) \ - jack_mixer_log(LOG_LEVEL_FATAL, \ - format "\n", ## arg) -#else -# define LOG_FATAL(format, arg...) -#endif - -#endif /* #ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED */
View file
jack_mixer-9.tar.gz/m4
Deleted
-(directory)
View file
jack_mixer-9.tar.gz/m4/jack.m4
Deleted
@@ -1,15 +0,0 @@ -# Copyright (C) 2007 Nedko Arnaudov <nedko@arnaudov.name> -# This file is distributed under the same terms as the Autoconf macro files. - -AC_DEFUN([AC_JACK_MIDI_NFRAMES_CHECK], [ -AC_MSG_CHECKING([whether JACK MIDI functions need nframes parameter]) -AC_LANG_PUSH(C) -AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ -#include <jack/jack.h> -#include <jack/midiport.h> -]], [[ -jack_midi_event_get(0, 0, 0, 0); -]]), [jackmidi_nframes='yes'], [jackmidi_nframes='no']) -AC_MSG_RESULT([$jackmidi_nframes]) -AC_LANG_POP() -])
View file
jack_mixer-9.tar.gz/m4/python.m4
Deleted
@@ -1,62 +0,0 @@ -## this one is commonly used with AM_PATH_PYTHONDIR ... -dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) -dnl Check if a module containing a given symbol is visible to python. -AC_DEFUN([AM_CHECK_PYMOD], -[AC_REQUIRE([AM_PATH_PYTHON]) -py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) -AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ -ifelse([$2],[], [prog=" -import sys -try: - import $1 -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)"], [prog=" -import $1 -$1.$2"]) -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -]) -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - AC_MSG_RESULT(yes) - ifelse([$3], [],, [$3 -])dnl -else - AC_MSG_RESULT(no) - ifelse([$4], [],, [$4 -])dnl -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], -[AC_REQUIRE([AM_PATH_PYTHON]) -AC_MSG_CHECKING(for headers required to compile python extensions) -dnl deduce PYTHON_INCLUDES -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi -AC_SUBST(PYTHON_INCLUDES) -dnl check if the headers exist: -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include <Python.h>],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -])
View file
jack_mixer-9.tar.gz/memory_atomic.c
Deleted
@@ -1,470 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * Non-sleeping memory allocation - * - * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#include <stdlib.h> -#include <assert.h> -#include <stdbool.h> -#include <pthread.h> - -#include "memory_atomic.h" -#include "list.h" -#include "log.h" - -struct rtsafe_memory_pool -{ - size_t data_size; - size_t min_preallocated; - size_t max_preallocated; - - unsigned int used_count; - struct list_head unused; - unsigned int unused_count; - - bool enforce_thread_safety; - /* next members are initialized/used only if enforce_thread_safety is true */ - pthread_mutex_t mutex; - unsigned int unused_count2; - struct list_head pending; -}; - -#define RTSAFE_GROUPS_PREALLOCATE 1024 - -bool -rtsafe_memory_pool_create( - size_t data_size, - size_t min_preallocated, - size_t max_preallocated, - bool enforce_thread_safety, - rtsafe_memory_pool_handle * pool_handle_ptr) -{ - int ret; - struct rtsafe_memory_pool * pool_ptr; - - assert(min_preallocated <= max_preallocated); - - pool_ptr = malloc(sizeof(struct rtsafe_memory_pool)); - if (pool_ptr == NULL) - { - return false; - } - - pool_ptr->data_size = data_size; - pool_ptr->min_preallocated = min_preallocated; - pool_ptr->max_preallocated = max_preallocated; - - pool_ptr->used_count = 0; - - INIT_LIST_HEAD(&pool_ptr->unused); - pool_ptr->unused_count = 0; - - pool_ptr->enforce_thread_safety = enforce_thread_safety; - if (enforce_thread_safety) - { - ret = pthread_mutex_init(&pool_ptr->mutex, NULL); - if (ret != 0) - { - free(pool_ptr); - return false; - } - - INIT_LIST_HEAD(&pool_ptr->pending); - pool_ptr->unused_count2 = 0; - } - - rtsafe_memory_pool_sleepy((rtsafe_memory_pool_handle)pool_ptr); - *pool_handle_ptr = pool_ptr; - - return true; -} - -#define pool_ptr ((struct rtsafe_memory_pool *)pool_handle) - -void -rtsafe_memory_pool_destroy( - rtsafe_memory_pool_handle pool_handle) -{ - int ret; - struct list_head * node_ptr; - - /* caller should deallocate all chunks prior releasing pool itself */ - assert(pool_ptr->used_count == 0); - - while (pool_ptr->unused_count != 0) - { - assert(!list_empty(&pool_ptr->unused)); - - node_ptr = pool_ptr->unused.next; - - list_del(node_ptr); - pool_ptr->unused_count--; - - free(node_ptr); - } - - assert(list_empty(&pool_ptr->unused)); - - if (pool_ptr->enforce_thread_safety) - { - while (!list_empty(&pool_ptr->pending)) - { - node_ptr = pool_ptr->pending.next; - - list_del(node_ptr); - - free(node_ptr); - } - - ret = pthread_mutex_destroy(&pool_ptr->mutex); - assert(ret == 0); - } - - free(pool_ptr); -} - -/* adjust unused list size */ -void -rtsafe_memory_pool_sleepy( - rtsafe_memory_pool_handle pool_handle) -{ - struct list_head * node_ptr; - unsigned int count; - - if (pool_ptr->enforce_thread_safety) - { - pthread_mutex_lock(&pool_ptr->mutex); - - count = pool_ptr->unused_count2; - - assert(pool_ptr->min_preallocated < pool_ptr->max_preallocated); - - while (count < pool_ptr->min_preallocated) - { - node_ptr = malloc(sizeof(struct list_head) + pool_ptr->data_size); - if (node_ptr == NULL) - { - break; - } - - list_add_tail(node_ptr, &pool_ptr->pending); - - count++; - } - - while (count > pool_ptr->max_preallocated && !list_empty(&pool_ptr->pending)) - { - node_ptr = pool_ptr->pending.next; - - list_del(node_ptr); - - free(node_ptr); - - count--; - } - - pthread_mutex_unlock(&pool_ptr->mutex); - } - else - { - while (pool_ptr->unused_count < pool_ptr->min_preallocated) - { - node_ptr = malloc(sizeof(struct list_head) + pool_ptr->data_size); - if (node_ptr == NULL) - { - return; - } - - list_add_tail(node_ptr, &pool_ptr->unused); - pool_ptr->unused_count++; - } - - while (pool_ptr->unused_count > pool_ptr->max_preallocated)
View file
jack_mixer-9.tar.gz/memory_atomic.h
Deleted
@@ -1,96 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * Non-sleeping memory allocation - * - * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#ifndef MEMORY_ATOMIC_H__7B572547_304D_4597_8808_990BE4476CC3__INCLUDED -#define MEMORY_ATOMIC_H__7B572547_304D_4597_8808_990BE4476CC3__INCLUDED - -typedef void * rtsafe_memory_pool_handle; - -/* will sleep */ -bool -rtsafe_memory_pool_create( - size_t data_size, /* chunk size */ - size_t min_preallocated, /* min chunks preallocated */ - size_t max_preallocated, /* max chunks preallocated */ - bool enforce_thread_safety, /* true - enforce thread safety (internal mutex), - false - assume caller code is already thread-safe */ - rtsafe_memory_pool_handle * pool_ptr); - -/* will sleep */ -void -rtsafe_memory_pool_destroy( - rtsafe_memory_pool_handle pool); - -/* may sleep */ -void -rtsafe_memory_pool_sleepy( - rtsafe_memory_pool_handle pool); - -/* will not sleep, returns NULL if no memory is available */ -void * -rtsafe_memory_pool_allocate( - rtsafe_memory_pool_handle pool); - -/* may sleep, will not fail */ -void * -rtsafe_memory_pool_allocate_sleepy( - rtsafe_memory_pool_handle pool); - -/* will not sleep */ -void -rtsafe_memory_pool_deallocate( - rtsafe_memory_pool_handle pool, - void * data); - -typedef void * rtsafe_memory_handle; - -/* will sleep */ -bool -rtsafe_memory_init( - size_t max_size, - size_t prealloc_min, - size_t prealloc_max, - bool enforce_thread_safety, /* true - enforce thread safety (internal mutex), - false - assume caller code is already thread-safe */ - rtsafe_memory_handle * handle_ptr); - -/* will not sleep, returns NULL if no memory is available */ -void * -rtsafe_memory_allocate( - rtsafe_memory_handle handle_ptr, - size_t size); - -/* may sleep */ -void -rtsafe_memory_sleepy( - rtsafe_memory_handle handle_ptr); - -/* will not sleep */ -void -rtsafe_memory_deallocate( - void * data); - -void -rtsafe_memory_uninit( - rtsafe_memory_handle handle_ptr); - -#endif /* #ifndef MEMORY_ATOMIC_H__7B572547_304D_4597_8808_990BE4476CC3__INCLUDED */
View file
jack_mixer-9.tar.gz/meter.py
Deleted
@@ -1,162 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gtk -import cairo - -class MeterWidget(gtk.DrawingArea): - def __init__(self, scale): - gtk.DrawingArea.__init__(self) - - self.scale = scale - - self.connect("expose-event", self.on_expose) - self.connect("size-request", self.on_size_request) - self.connect("size_allocate", self.on_size_allocate) - - self.color_bg = gtk.gdk.Color(0,0,0) - self.color_value = None - self.color_mark = gtk.gdk.Color(int(65535 * 0.2), int(65535 * 0.2), int(65535 * 0.2)) - self.width = 0 - self.height = 0 - self.cache_surface = None - - def set_color(self, color): - self.color_value = color - self.cache_surface = None - self.invalidate_all() - - def on_expose(self, widget, event): - cairo_ctx = widget.window.cairo_create() - - # set a clip region for the expose event - cairo_ctx.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) - cairo_ctx.clip() - - self.draw(cairo_ctx) - - return False - - def on_size_allocate(self, widget, allocation): - #print allocation.x, allocation.y, allocation.width, allocation.height - self.width = float(allocation.width) - self.height = float(allocation.height) - self.font_size = 10 - self.cache_surface = None - - def on_size_request(self, widget, requisition): - #print "size-request, %u x %u" % (requisition.width, requisition.height) - requisition.width = 20 - return - - def invalidate_all(self): - self.queue_draw_area(0, 0, int(self.width), int(self.height)) - - def draw_background(self, cairo_ctx): - if not self.cache_surface: - self.cache_surface = cairo.Surface.create_similar( - cairo_ctx.get_target(), - cairo.CONTENT_COLOR, - int(self.width), - int(self.height)) - cache_cairo_ctx = cairo.Context(self.cache_surface) - - cache_cairo_ctx.set_source_rgba(0, 0, 0, 0) - cache_cairo_ctx.rectangle(0, 0, self.width, self.height) - cache_cairo_ctx.fill() - - cache_cairo_ctx.set_source_rgba(0.2, 0.2, 0.2, 1) - cache_cairo_ctx.select_font_face("Fixed") - cache_cairo_ctx.set_font_size(self.font_size) - glyph_width = self.font_size * 3 / 5 # avarage glyph ratio - for mark in self.scale.get_marks(): - mark_position = int(self.height * (1 - mark.scale)) - cache_cairo_ctx.move_to(0, mark_position) - cache_cairo_ctx.line_to(self.width, mark_position) - cache_cairo_ctx.stroke() - x_correction = self.width / 2 - glyph_width * len(mark.text) / 2 - cache_cairo_ctx.move_to(x_correction, mark_position - 2) - cache_cairo_ctx.show_text(mark.text) - cairo_ctx.set_source_surface(self.cache_surface, 0, 0) - cairo_ctx.paint() - - def draw_value(self, cairo_ctx, value, x, width): - if self.color_value is not None: - cairo_ctx.set_source_color(self.color_value) - else: - height = self.allocation.height - gradient = cairo.LinearGradient(1, 1, width-1, height-1) - gradient.add_color_stop_rgb(0, 1, 0, 0) - gradient.add_color_stop_rgb(0.2, 1, 1, 0) - gradient.add_color_stop_rgb(1, 0, 1, 0) - cairo_ctx.set_source(gradient) - cairo_ctx.rectangle(x, self.height * (1 - value), width, self.height * value) - cairo_ctx.fill() - - def set_scale(self, scale): - self.scale = scale - self.cache_surface = None - self.invalidate_all() - -class MonoMeterWidget(MeterWidget): - def __init__(self, scale): - MeterWidget.__init__(self, scale) - self.value = 0.0 - self.raw_value = 0.0 - - def draw(self, cairo_ctx): - self.draw_background(cairo_ctx) - self.draw_value(cairo_ctx, self.value, self.width/4.0, self.width/2.0) - - def set_value(self, value): - if value != self.raw_value: - self.raw_value = value - self.value = self.scale.db_to_scale(value) - self.invalidate_all() - if value == self.raw_value: - return - self.raw_value = value - old_value = self.value - self.value = self.scale.db_to_scale(value) - if (abs(old_value-self.value) * self.height) > 1: - self.invalidate_all() - -class StereoMeterWidget(MeterWidget): - def __init__(self, scale): - MeterWidget.__init__(self, scale) - self.left = 0.0 - self.right = 0.0 - - self.raw_left = 0.0 - self.raw_right = 0.0 - - def draw(self, cairo_ctx): - self.draw_background(cairo_ctx) - self.draw_value(cairo_ctx, self.left, self.width/5.0, self.width/5.0) - self.draw_value(cairo_ctx, self.right, self.width/5.0 * 3.0, self.width/5.0) - - def set_values(self, left, right): - if left == self.raw_left and right == self.raw_right: - return - self.raw_left = left - self.raw_right = right - old_left = self.left - old_right = self.right - self.left = self.scale.db_to_scale(left) - self.right = self.scale.db_to_scale(right) - if (abs(old_left-self.left) * self.height) > 1 or (abs(old_right-self.right) * self.height) > 1: - self.invalidate_all()
View file
jack_mixer-9.tar.gz/preferences.py
Deleted
@@ -1,170 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# Copyright (C) 2009 Frederic Peters <fpeters@0d.be> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gtk -import gobject - -try: - import gconf -except ImportError: - gconf = None - -def lookup_scale(scales, scale_id): - for scale in scales: - if scale_id == scale.scale_id: - return scale - return None - -class PreferencesDialog(gtk.Dialog): - def __init__(self, parent): - self.app = parent - gtk.Dialog.__init__(self, '', self.app.window) - self.create_ui() - self.connect('response', self.on_response_cb) - self.connect('delete-event', self.on_response_cb) - - def create_frame(self, label, child): - frame = gtk.Frame('') - frame.set_border_width(3) - frame.set_shadow_type(gtk.SHADOW_NONE) - frame.get_label_widget().set_markup('<b>%s</b>' % label) - - alignment = gtk.Alignment() - alignment.set_padding(0, 0, 12, 0) - frame.add(alignment) - alignment.add(child) - - return frame - - def create_ui(self): - vbox = gtk.VBox() - self.vbox.add(vbox) - - interface_vbox = gtk.VBox() - self.custom_widgets_checkbutton = gtk.CheckButton('Use custom widgets') - self.custom_widgets_checkbutton.set_active( - self.app.gui_factory.get_use_custom_widgets()) - self.custom_widgets_checkbutton.connect('toggled', - self.on_custom_widget_toggled) - interface_vbox.pack_start(self.custom_widgets_checkbutton) - - self.vumeter_color_checkbutton = gtk.CheckButton('Use custom vumeter color') - self.vumeter_color_checkbutton.set_active( - self.app.gui_factory.get_vumeter_color_scheme() == 'solid') - self.vumeter_color_checkbutton.connect('toggled', - self.on_vumeter_color_change) - interface_vbox.pack_start(self.vumeter_color_checkbutton) - hbox = gtk.HBox() - interface_vbox.pack_start(hbox) - self.custom_color_box = hbox - self.custom_color_box.set_sensitive( - self.vumeter_color_checkbutton.get_active() == True) - hbox.pack_start(gtk.Label('Custom color:')) - self.vumeter_color_picker = gtk.ColorButton() - self.vumeter_color_picker.set_color(gtk.gdk.color_parse( - self.app.gui_factory.get_vumeter_color())) - self.vumeter_color_picker.connect('color-set', - self.on_vumeter_color_change) - hbox.pack_start(self.vumeter_color_picker) - vbox.pack_start(self.create_frame('Interface', interface_vbox)) - - table = gtk.Table(2, 2, False) - table.set_row_spacings(5) - table.set_col_spacings(5) - - table.attach(gtk.Label('Meter scale'), 0, 1, 0, 1) - self.meter_scale_combo = self.create_meter_store_and_combo() - table.attach(self.meter_scale_combo, 1, 2, 0, 1) - - table.attach(gtk.Label('Slider scale'), 0, 1, 1, 2) - self.slider_scale_combo = self.create_slider_store_and_combo() - table.attach(self.slider_scale_combo, 1, 2, 1, 2) - - vbox.pack_start(self.create_frame('Scales', table)) - - self.vbox.show_all() - - self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) - - def create_meter_store_and_combo(self): - store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT) - for scale in self.app.meter_scales: - row = scale.scale_id, scale - current_iter = store.append(row) - if scale is self.app.gui_factory.get_default_meter_scale(): - active_iter = current_iter - self.meter_store = store - - meter_scale_combo = gtk.ComboBox(store) - cell = gtk.CellRendererText() - meter_scale_combo.pack_start(cell, True) - meter_scale_combo.add_attribute(cell, 'text', 0) - meter_scale_combo.set_active_iter(active_iter) - meter_scale_combo.connect('changed', - self.on_meter_scale_combo_changed) - - return meter_scale_combo - - def create_slider_store_and_combo(self): - store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT) - for scale in self.app.slider_scales: - row = scale.scale_id, scale - current_iter = store.append(row) - if scale is self.app.gui_factory.get_default_slider_scale(): - active_iter = current_iter - self.slider_store = store - - slider_scale_combo = gtk.ComboBox(store) - cell = gtk.CellRendererText() - slider_scale_combo.pack_start(cell, True) - slider_scale_combo.add_attribute(cell, 'text', 0) - slider_scale_combo.set_active_iter(active_iter) - slider_scale_combo.connect('changed', - self.on_slider_scale_combo_changed) - - return slider_scale_combo - - def on_response_cb(self, dlg, response_id, *args): - self.app.preferences_dialog = None - self.destroy() - - def on_meter_scale_combo_changed(self, *args): - active_iter = self.meter_scale_combo.get_active_iter() - scale = self.meter_store.get(active_iter, 1)[0] - self.app.gui_factory.set_default_meter_scale(scale) - - def on_slider_scale_combo_changed(self, *args): - active_iter = self.slider_scale_combo.get_active_iter() - scale = self.slider_store.get(active_iter, 1)[0] - self.app.gui_factory.set_default_slider_scale(scale) - - def on_vumeter_color_change(self, *args): - color_scheme = 'default' - if self.vumeter_color_checkbutton.get_active(): - color_scheme = 'solid' - self.app.gui_factory.set_vumeter_color_scheme(color_scheme) - - color = self.vumeter_color_picker.get_color().to_string() - self.app.gui_factory.set_vumeter_color(color) - - self.custom_color_box.set_sensitive( - self.vumeter_color_checkbutton.get_active() == True) - - def on_custom_widget_toggled(self, *args): - self.app.gui_factory.set_use_custom_widgets( - self.custom_widgets_checkbutton.get_active())
View file
jack_mixer-9.tar.gz/scale.c
Deleted
@@ -1,199 +0,0 @@ -/* -*- Mode: C ; c-basic-offset: 2 -*- */ -/***************************************************************************** - * - * This file is part of jack_mixer - * - * Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> - * - * 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; version 2 of the License - * - * 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *****************************************************************************/ - -#include <stddef.h> -#include <stdbool.h> -#include <stdlib.h> -#include <math.h> -#include <assert.h> - -#include "jack_mixer.h" -//#define LOG_LEVEL LOG_LEVEL_DEBUG -#include "log.h" -#include "list.h" - -struct threshold -{ - struct list_head scale_siblings; - double db; - double scale; - double a; - double b; -}; - -struct scale -{ - struct list_head thresholds; - double max_db; -}; - -jack_mixer_scale_t -scale_create() -{ - struct scale * scale_ptr; - - scale_ptr = malloc(sizeof(struct scale)); - if (scale_ptr == NULL) - { - return NULL; - } - - INIT_LIST_HEAD(&scale_ptr->thresholds); - scale_ptr->max_db = -INFINITY; - - LOG_DEBUG("Scale %p created", scale_ptr); - - return (jack_mixer_scale_t)scale_ptr; -} - -#define scale_ptr ((struct scale *)scale) - -void -scale_destroy( - jack_mixer_scale_t scale) -{ - free(scale_ptr); -} - -bool -scale_add_threshold( - jack_mixer_scale_t scale, - float db, - float scale_value) -{ - struct threshold * threshold_ptr; - - LOG_DEBUG("Adding threshold (%f dBFS -> %f) to scale %p", db, scale, scale_ptr); - LOG_DEBUG("Threshold %p created ", threshold_ptr, db, scale); - - threshold_ptr = malloc(sizeof(struct threshold)); - if (threshold_ptr == NULL) - { - return false; - } - - threshold_ptr->db = db; - threshold_ptr->scale = scale_value; - - list_add_tail(&threshold_ptr->scale_siblings, &scale_ptr->thresholds); - - if (db > scale_ptr->max_db) - { - scale_ptr->max_db = db; - } - - return true; -} - -#undef threshold_ptr - -void -scale_calculate_coefficients( - jack_mixer_scale_t scale) -{ - struct threshold * threshold_ptr; - struct threshold * prev_ptr; - struct list_head * node_ptr; - - prev_ptr = NULL; - - list_for_each(node_ptr, &scale_ptr->thresholds) - { - threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings); - - LOG_DEBUG("Calculating coefficients for threshold %p", threshold_ptr); - - if (prev_ptr != NULL) - { - threshold_ptr->a = (prev_ptr->scale - threshold_ptr->scale) / (prev_ptr->db - threshold_ptr->db); - threshold_ptr->b = threshold_ptr->scale - threshold_ptr->a * threshold_ptr->db; - LOG_DEBUG("%.0f dB - %.0f dB: scale = %f * dB + %f", prev_ptr->db, threshold_ptr->db, threshold_ptr->a, threshold_ptr->b); - } - - prev_ptr = threshold_ptr; - } -} - -/* Convert dBFS value to number in range 0.0-1.0 */ -double -scale_db_to_scale( - jack_mixer_scale_t scale, - double db) -{ - struct threshold * threshold_ptr; - struct threshold * prev_ptr; - struct list_head * node_ptr; - - prev_ptr = NULL; - - list_for_each(node_ptr, &scale_ptr->thresholds) - { - threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings); - - if (db < threshold_ptr->db) - { - LOG_DEBUG("Match at %f dB treshold", threshold_ptr->db); - if (prev_ptr == NULL) - { - return 0.0; - } - - return threshold_ptr->a * db + threshold_ptr->b; - } - - prev_ptr = threshold_ptr; - } - - return 1.0; -} - -/* Convert number in range 0.0-1.0 to dBFS value */ -double -scale_scale_to_db( - jack_mixer_scale_t scale, - double scale_value) -{ - struct threshold * threshold_ptr; - struct threshold * prev_ptr; - struct list_head * node_ptr; - - prev_ptr = NULL; - - list_for_each(node_ptr, &scale_ptr->thresholds) - { - threshold_ptr = list_entry(node_ptr, struct threshold, scale_siblings); - - if (scale_value <= threshold_ptr->scale) - { - if (prev_ptr == NULL) - { - return -INFINITY; - } - - return (scale_value - threshold_ptr->b) / threshold_ptr->a; - } - - prev_ptr = threshold_ptr; - } - - return scale_ptr->max_db; -}
View file
jack_mixer-9.tar.gz/scale.py
Deleted
@@ -1,153 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import math -import jack_mixer_c - -class Mark: - '''Encapsulates scale linear function edge and coefficients for scale = a * dB + b formula''' - def __init__(self, db, scale): - self.db = db - self.scale = scale - self.text = "%.0f" % math.fabs(db) - -class Base: - '''Scale abstraction, various scale implementation derive from this class''' - def __init__(self, scale_id, description): - self.marks = [] - self.scale_id = scale_id - self.description = description - self.scale = jack_mixer_c.Scale() - - def add_threshold(self, db, scale, is_mark): - self.scale.add_threshold(db, scale) - if is_mark: - self.marks.append(Mark(db, scale)) - - def calculate_coefficients(self): - self.scale.calculate_coefficients() - - def db_to_scale(self, db): - '''Convert dBFS value to number in range 0.0-1.0 used in GUI''' - #print "db_to_scale(%f)" % db - return self.scale.db_to_scale(db) - - def scale_to_db(self, scale): - '''Convert number in range 0.0-1.0 used in GUI to dBFS value''' - return self.scale.scale_to_db(scale) - - def add_mark(self, db): - self.marks.append(Mark(db, -1.0)) - - def get_marks(self): - return self.marks - - def scale_marks(self): - for i in self.marks: - if i.scale == -1.0: - i.scale = self.db_to_scale(i.db) - -# IEC 60268-18 Peak programme level meters - Digital audio peak level meter -# Adapted from meterpridge, may be wrong, I'm not buying standards, event if they cost $45 -# If someone has the standart, please eighter share it with me or fix the code. -class IEC268(Base): - '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter''' - def __init__(self): - Base.__init__(self, "iec_268", - "IEC 60268-18 Peak programme level meters - Digital audio peak level meter") - self.add_threshold(-70.0, 0.0, False) - self.add_threshold(-60.0, 0.05, True) - self.add_threshold(-50.0, 0.075, True) - self.add_threshold(-40.0, 0.15, True) - self.add_mark(-35.0) - self.add_threshold(-30.0, 0.3, True) - self.add_mark(-25.0) - self.add_threshold(-20.0, 0.5, True) - self.add_mark(-15.0) - self.add_mark(-10.0) - self.add_mark(-5.0) - self.add_threshold(0.0, 1.0, True) - self.calculate_coefficients() - self.scale_marks() - -class IEC268Minimalistic(Base): - '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter, - fewer marks''' - def __init__(self): - Base.__init__(self, 'iec_268_minimalistic', - 'IEC 60268-18 Peak programme level meters - Digital audio peak level meter, fewer marks') - self.add_threshold(-70.0, 0.0, False) - self.add_threshold(-60.0, 0.05, True) - self.add_threshold(-50.0, 0.075, False) - self.add_threshold(-40.0, 0.15, True) - self.add_threshold(-30.0, 0.3, True) - self.add_threshold(-20.0, 0.5, True) - self.add_mark(-10.0) - self.add_threshold(0.0, 1.0, True) - self.calculate_coefficients() - self.scale_marks() - -class Linear70dB(Base): - '''Linear scale with range from -70 to 0 dBFS''' - def __init__(self): - Base.__init__(self, "linear_70dB", "Linear scale with range from -70 to 0 dBFS") - self.add_threshold(-70.0, 0.0, False) - self.add_mark(-60.0) - self.add_mark(-50.0) - self.add_mark(-40.0) - self.add_mark(-35.0) - self.add_mark(-30.0) - self.add_mark(-25.0) - self.add_mark(-20.0) - self.add_mark(-15.0) - self.add_mark(-10.0) - self.add_mark(-5.0) - self.add_threshold(0.0, 1.0, True) - self.calculate_coefficients() - self.scale_marks() - -class Linear30dB(Base): - '''Linear scale with range from -30 to +30 dBFS''' - def __init__(self): - Base.__init__(self, "linear_30dB", "Linear scale with range from -30 to +30 dBFS") - self.add_threshold(-30.0, 0.0, False) - self.add_threshold(+30.0, 1.0, True) - self.calculate_coefficients() - self.scale_marks() - -def scale_test1(scale): - for i in range(-97 * 2, 1, 1): - db = float(i)/2.0 - print "%5.1f dB maps to %f" % (db, scale.db_to_scale(db)) - -def scale_test2(scale): - for i in range(101): - s = float(i)/100.0 - print "%.2f maps to %.1f dB" % (s, scale.scale_to_db(s)) - -def print_db_to_scale(db): - print "%-.1f dB maps to %f" % (db, scale.db_to_scale(db)) - -def scale_test3(scale): - print_db_to_scale(+77.0) - print_db_to_scale(+7.0) - print_db_to_scale(0.0) - print_db_to_scale(-107.0) - -#scale = linear_30dB() -#scale_test2(scale) -#scale_test3(scale)
View file
jack_mixer-9.tar.gz/serialization.py
Deleted
@@ -1,105 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -class SerializationBackend: - '''Base class for serialization backends''' - def get_root_serialization_object(self, name): - '''Returns serialization object where properties of root object - will be serialized to''' - # this method should never be called for the base class - raise NotImplementedError - - def get_child_serialization_object(self, name, backend_object): - # this method should never be called for the base class - raise NotImplementedError - -class SerializationObjectBackend: - '''Base class for serialization backend objects where real object - properties will be serialized to or unserialized from.''' - def add_property(self, name, value): - '''Serialize particular property''' - pass - - def get_childs(self): - pass - - def get_properties(self): - pass - - def serialization_name(self): - return None - -class SerializedObject: - '''Base class for object supporting serialization''' - def serialization_name(self): - return None - - def serialize(self, object_backend): - '''Serialize properties of called object into supplied serialization_object_backend''' - pass - - def serialization_get_childs(self): - '''Get child objects tha required and support serialization''' - return [] - - def unserialize_property(self, name, value): - pass - - def unserialize_child(self, name): - return None - -class Serializator: - def __init__(self): - pass - - def serialize(self, root, backend): - self.serialize_one(backend, root, backend.get_root_serialization_object(root.serialization_name())) - - def unserialize(self, root, backend): - backend_object = backend.get_root_unserialization_object(root.serialization_name()) - if backend_object == None: - return False - - return self.unserialize_one(backend, root, backend_object) - - def unserialize_one(self, backend, object, backend_object): - #print "Unserializing " + repr(object) - properties = backend_object.get_properties() - for name, value in properties.iteritems(): - #print "%s = %s" % (name, value) - if not object.unserialize_property(name, value): - return False - - backend_childs = backend_object.get_childs() - for backend_child in backend_childs: - name = backend_child.serialization_name() - child = object.unserialize_child(name) - if not child: - return False - if not self.unserialize_one(backend, child, backend_child): - return False - - return True - - def serialize_one(self, backend, object, backend_object): - object.serialize(backend_object) - childs = object.serialization_get_childs() - for child in childs: - #print "serializing child " + repr(child) - self.serialize_one(backend, child, - backend.get_child_serialization_object( - child.serialization_name(), backend_object))
View file
jack_mixer-9.tar.gz/serialization_xml.py
Deleted
@@ -1,76 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -from serialization import * -import xml.dom -import xml.dom.minidom - -class XmlSerialization(SerializationBackend): - def get_root_serialization_object(self, name): - self.doc = xml.dom.getDOMImplementation().createDocument(xml.dom.EMPTY_NAMESPACE, name, None) - return XmlSerializationObject(self.doc, self.doc.documentElement) - - def get_root_unserialization_object(self, name): - if name != self.doc.documentElement.nodeName: - return None - return XmlSerializationObject(self.doc, self.doc.documentElement) - - def get_child_serialization_object(self, name, backend_object): - child = self.doc.createElement(name) - backend_object.element.appendChild(child) - return XmlSerializationObject(self.doc, child) - - def save(self, file): - file.write(self.doc.toprettyxml()) - - def load(self, file): - self.doc = xml.dom.minidom.parse(file) - -class XmlSerializationObject: - def __init__(self, doc, element): - self.doc = doc - self.element = element - - def add_property(self, name, value): - self.add_property_as_attribute(name, value) - - def add_property_as_attribute(self, name, value): - self.element.setAttribute(name, value) - - #def add_property_as_child_element(self, name, value): - # child = self.doc.createElement(name) - # value = self.doc.createTextNode(value) - # child.appendChild(value) - # self.element.appendChild(child) - - def get_childs(self): - child_elements = self.element.childNodes - childs = [] - for child in child_elements: - if child.nodeType == child.ELEMENT_NODE: - childs.append(XmlSerializationObject(self.doc, child)) - return childs - - def get_properties(self): - properties = self.element.attributes - dictionary = {} - for i in range(properties.length): - dictionary[properties.item(i).name] = properties.item(i).nodeValue - return dictionary - - def serialization_name(self): - return self.element.nodeName
View file
jack_mixer-9.tar.gz/slider.py
Deleted
@@ -1,208 +0,0 @@ -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import gtk -import gobject - -class AdjustmentdBFS(gtk.Adjustment): - def __init__(self, scale, default_db): - self.default_value = scale.db_to_scale(default_db) - self.db = default_db - self.scale = scale - gtk.Adjustment.__init__(self, self.default_value, 0.0, 1.0, 0.02) - self.connect("value-changed", self.on_value_changed) - self.disable_value_notify = False - - def step_up(self): - self.set_value(self.get_value() + self.step_increment) - - def step_down(self): - self.set_value(self.get_value() - self.step_increment) - - def reset(self): - self.set_value(self.default_value) - - def get_value_db(self): - return self.db - - def set_value_db(self, db): - self.db = db - self.disable_value_notify = True - self.set_value(self.scale.db_to_scale(db)) - self.disable_value_notify = False - self.emit("volume-changed") - - def on_value_changed(self, adjustment): - if not self.disable_value_notify: - self.db = self.scale.scale_to_db(self.get_value()) - self.emit("volume-changed") - - def set_scale(self, scale): - self.scale = scale - self.disable_value_notify = True - self.set_value(self.scale.db_to_scale(self.db)) - self.disable_value_notify = False - -gobject.signal_new("volume-changed", AdjustmentdBFS, - gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, []) - - -class GtkSlider(gtk.VScale): - def __init__(self, adjustment): - gtk.VScale.__init__(self, adjustment) - self.set_draw_value(False) - self.set_inverted(True) - - # HACK: we want the behaviour you get with the middle button, so we - # mangle the events. Clicking with other buttons moves the slider in - # step increments, clicking with the middle button moves the slider - # to the location of the click. - self.connect('button-press-event', self.button_press_event) - self.connect('button-release-event', self.button_release_event) - - def button_press_event(self, widget, event): - event.button = 2 - return False - - def button_release_event(self, widget, event): - event.button = 2 - return False - - -class CustomSliderWidget(gtk.DrawingArea): - def __init__(self, adjustment): - gtk.DrawingArea.__init__(self) - - self.adjustment = adjustment - - self.connect("expose-event", self.on_expose) - self.connect("size-request", self.on_size_request) - self.connect("size_allocate", self.on_size_allocate) - adjustment.connect("value-changed", self.on_value_changed) - self.connect("button-press-event", self.on_mouse) - self.connect("motion-notify-event", self.on_mouse) - self.set_events(gtk.gdk.BUTTON1_MOTION_MASK | gtk.gdk.BUTTON1_MOTION_MASK | gtk.gdk.BUTTON_PRESS_MASK) - - def on_mouse(self, widget, event): - if event.type == gtk.gdk.BUTTON_PRESS: - #print "mouse button %u pressed %u:%u" % (event.button, event.x, event.y) - if event.button == 1: - if event.y >= self.slider_rail_up and event.y < self.slider_rail_up + self.slider_rail_height: - self.adjustment.set_value(1 - float(event.y - self.slider_rail_up)/float(self.slider_rail_height)) - elif event.button == 2: - self.adjustment.reset() - elif event.type == gtk.gdk.MOTION_NOTIFY: - #print "mouse motion %u:%u" % (event.x, event.y) - if event.y < self.slider_rail_up: - y = self.slider_rail_up - elif event.y > self.slider_rail_up + self.slider_rail_height: - y = self.slider_rail_up + self.slider_rail_height - else: - y = event.y - self.adjustment.set_value(1 - float(y - self.slider_rail_up)/float(self.slider_rail_height)) - - return False - - def on_value_changed(self, adjustment): - self.invalidate_all() - - def on_expose(self, widget, event): - cairo_ctx = widget.window.cairo_create() - - # set a clip region for the expose event - cairo_ctx.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) - cairo_ctx.clip() - - self.draw(cairo_ctx) - - return False - - def on_size_allocate(self, widget, allocation): - #print allocation.x, allocation.y, allocation.width, allocation.height - self.width = float(allocation.width) - self.height = float(allocation.height) - self.font_size = 10 - - def on_size_request(self, widget, requisition): - #print "size-request, %u x %u" % (requisition.width, requisition.height) - requisition.width = 20 - return - - def invalidate_all(self): - self.queue_draw_area(0, 0, int(self.width), int(self.height)) - - def draw(self, cairo_ctx): - if self.flags() & gtk.HAS_FOCUS: - state = gtk.STATE_PRELIGHT - else: - state = gtk.STATE_NORMAL - - #cairo_ctx.rectangle(0, 0, self.width, self.height) - #cairo_ctx.set_source_color(self.style.bg[state]) - #cairo_ctx.fill_preserve() - cairo_ctx.set_source_color(self.style.fg[state]) - #cairo_ctx.stroke() - - slider_knob_width = self.width * 3 / 4 - slider_knob_height = self.width * 3 / 2 - slider_knob_height -= slider_knob_height % 2 - slider_knob_height += 1 - - slider_x = self.width/2 - - cairo_ctx.set_line_width(1) - - # slider rail - cairo_ctx.set_source_color(self.style.dark[state]) - self.slider_rail_up = slider_knob_height/2 + (self.width - slider_knob_width)/2 - self.slider_rail_height = self.height - 2 * self.slider_rail_up - cairo_ctx.move_to(slider_x, self.slider_rail_up) - cairo_ctx.line_to(slider_x, self.slider_rail_height + self.slider_rail_up) - cairo_ctx.stroke() - - # slider knob - slider_y = round(self.slider_rail_up + self.slider_rail_height * (1 - self.adjustment.get_value())) - cairo_ctx.rectangle(slider_x - float(slider_knob_width)/2, - slider_y - slider_knob_height/2, - float(slider_knob_width), - slider_knob_height) - cairo_ctx.set_source_color(self.style.bg[state]) - cairo_ctx.fill_preserve() - cairo_ctx.set_source_color(self.style.fg[state]) - cairo_ctx.stroke() - # slider knob marks - cairo_ctx.set_source_color(self.style.fg[state]) - for i in range(int(slider_knob_height/2))[8:]: - if i % 2 == 0: - correction = 1.0 + (float(slider_knob_height)/2.0 - float(i)) / 10.0 - correction *= 2 - y = slider_y - i - w = float(slider_knob_width)/2.0 - correction - x1 = slider_x - w - x2 = slider_x + w - cairo_ctx.move_to(x1, y+0.5) - cairo_ctx.line_to(x2, y+0.5) - y = slider_y + i
View file
jack_mixer-9.tar.gz/test.py
Deleted
@@ -1,42 +0,0 @@ -#!/usr/bin/env python -# -# This file is part of jack_mixer -# -# Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> -# -# 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; version 2 of the License -# -# 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 St, Fifth Floor, Boston, MA 02110-1301 USA. - -import jack_mixer_c - -mixer = jack_mixer_c.Mixer("test") - -print "Channels count: %u" % mixer.channels_count -channel = mixer.add_channel("Channel 1", True) - -if channel.is_stereo: - channel_type = "Stereo" -else: - channel_type = "Mono" - -channel_name = channel.name - -print "%s channel \"%s\"" % (channel_type, channel_name) - -print "Channel meter read %s" % repr(channel.meter) -print "Channels count: %u" % mixer.channels_count - -channel.remove() - -print "Channels count: %u" % mixer.channels_count -
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.