Bug#664863: qjackctl: Do not stop Jack server unconditionnally on exit

2012-03-23 Thread Roland Mas
Hi,

Please find attached a git patch fixing #664863 by introducing a new
setting allowing to control whether the Jack server should be stopped
when qjackctl exits.  I'll also send it to the upstream author (as a
simple patch).

From cb739f6958159099719fcff0fb96b0c62de43f13 Mon Sep 17 00:00:00 2001
From: Roland Mas lola...@debian.org
Date: Fri, 23 Mar 2012 11:13:49 +0100
Subject: [PATCH] Make stop jackd on quit configurable (closes: #664863)

---
 debian/changelog   |6 +
 debian/patches/10_optional-stopjack-on-close.patch |  115 
 debian/patches/series  |1 +
 3 files changed, 122 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/10_optional-stopjack-on-close.patch

diff --git a/debian/changelog b/debian/changelog
index 66da30d..11a0093 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qjackctl (0.3.8-1+lld1) UNRELEASED; urgency=low
+
+  * Make stop jackd on quit configurable (closes: #664863)
+
+ -- Roland Mas lola...@debian.org  Fri, 23 Mar 2012 11:01:09 +0100
+
 qjackctl (0.3.8-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/patches/10_optional-stopjack-on-close.patch b/debian/patches/10_optional-stopjack-on-close.patch
new file mode 100644
index 000..9d86bfc
--- /dev/null
+++ b/debian/patches/10_optional-stopjack-on-close.patch
@@ -0,0 +1,115 @@
+Description: Make stop jackd on quit configurable (closes: #664863)
+ Added a setting to make the killing of jackd on application exit
+ optional and configurable.  The default value is to kill jackd, so
+ as to preserve the previous behaviour.
+Author: Roland Mas lola...@debian.org
+Bug-Debian: http://bugs.debian.org/664863
+
+Index: qjackctl/src/qjackctlSetup.cpp
+===
+--- qjackctl.orig/src/qjackctlSetup.cpp
 qjackctl/src/qjackctlSetup.cpp
+@@ -67,6 +67,7 @@
+ //	sServerName  = m_settings.value(/ServerName).toString();
+ 	bStartJack   = m_settings.value(/StartJack, false).toBool();
+ //	bStartJackCmd= m_settings.value(/StartJackCmd, false).toBool();
++	bStopJack= m_settings.value(/StopJack, false).toBool();
+ 	bStartupScript   = m_settings.value(/StartupScript, false).toBool();
+ 	sStartupScriptShell  = m_settings.value(/StartupScriptShell).toString();
+ 	bPostStartupScript   = m_settings.value(/PostStartupScript, false).toBool();
+Index: qjackctl/src/qjackctlSetupForm.ui
+===
+--- qjackctl.orig/src/qjackctlSetupForm.ui
 qjackctl/src/qjackctlSetupForm.ui
+@@ -3741,6 +3741,25 @@
+  /widget
+ /item
+ item
++ widget class=QCheckBox name=StopJackCheckBox
++  property name=font
++   font
++weight50/weight
++boldfalse/bold
++   /font
++  /property
++  property name=toolTip
++   stringWhether to stop JACK audio server on application quit/string
++  /property
++  property name=text
++   stringStop JACK audio server on application amp;quit/string
++  /property
++  property name=shortcut
++   stringAlt+Q/string
++  /property
++ /widget
++/item
++item
+  widget class=QCheckBox name=QueryCloseCheckBox
+   property name=font
+font
+Index: qjackctl/src/qjackctlSetup.h
+===
+--- qjackctl.orig/src/qjackctlSetup.h
 qjackctl/src/qjackctlSetup.h
+@@ -107,6 +107,9 @@
+ 	bool bStartJack;
+ 	bool bStartJackCmd;
+ 
++	// Server stop options.
++	bool bStopJack;
++
+ 	// User supplied command line.
+ 	QString sCmdLine;
+ 
+Index: qjackctl/src/qjackctlMainForm.cpp
+===
+--- qjackctl.orig/src/qjackctlMainForm.cpp
 qjackctl/src/qjackctlMainForm.cpp
+@@ -764,6 +764,7 @@
+ 
+ 	// Check if JACK daemon is currently running...
+ 	if (bQueryClose  m_pJack   m_pJack-state() == QProcess::Running
++		 m_pSetup-bStopJack
+ 		 (m_pSetup-bQueryClose || m_pSetup-bQueryShutdown)) {
+ 		bQueryClose = (QMessageBox::warning(this,
+ 			tr(Warning) +  -  QJACKCTL_SUBTITLE1,
+@@ -821,7 +822,8 @@
+ 		if (m_pSystemTray)
+ 			m_pSystemTray-close();
+ 		// Stop any service out there...
+-		stopJackServer();
++		if (m_pSetup-bStopJack)
++			stopJackServer();
+ 	}
+ 
+ 	return bQueryClose;
+Index: qjackctl/src/qjackctlSetupForm.cpp
+===
+--- qjackctl.orig/src/qjackctlSetupForm.cpp
 qjackctl/src/qjackctlSetupForm.cpp
+@@ -373,6 +373,9 @@
+ 	QObject::connect(m_ui.StartJackCheckBox,
+ 		SIGNAL(stateChanged(int)),
+ 		SLOT(optionsChanged()));
++	QObject

Bug#664863: qjackctl: Do not stop Jack server unconditionnally on exit

2012-03-23 Thread Roland Mas
Roland Mas, 2012-03-23 11:25:26 +0100 :

 Hi,

 Please find attached a git patch fixing #664863 by introducing a new
 setting allowing to control whether the Jack server should be stopped
 when qjackctl exits.  I'll also send it to the upstream author (as a
 simple patch).

Actually, please use the following one.  dpkg-source and git both
conspire to make my life harder, and parts of the patch were omitted in
the previous email.

From 316ed9b289af8c01962c3b7f56d9b9f9f7463e75 Mon Sep 17 00:00:00 2001
From: Roland Mas lola...@debian.org
Date: Fri, 23 Mar 2012 11:13:49 +0100
Subject: [PATCH] Make stop jackd on quit configurable (closes: #664863)

---
 debian/changelog   |6 +
 debian/patches/10_optional-stopjack-on-close.patch |  133 
 debian/patches/series  |1 +
 3 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/10_optional-stopjack-on-close.patch

diff --git a/debian/changelog b/debian/changelog
index 66da30d..8b0f1c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qjackctl (0.3.8-1+lld1) UNRELEASED; urgency=low
+
+  * Make stop jackd on quit configurable (closes: #664863)
+
+ -- Roland Mas lola...@debian.org  Fri, 23 Mar 2012 11:40:21 +0100
+
 qjackctl (0.3.8-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/patches/10_optional-stopjack-on-close.patch b/debian/patches/10_optional-stopjack-on-close.patch
new file mode 100644
index 000..ca17564
--- /dev/null
+++ b/debian/patches/10_optional-stopjack-on-close.patch
@@ -0,0 +1,133 @@
+Description: Make stop jackd on quit configurable (closes: #664863)
+ Added a setting to make the killing of jackd on application exit
+ optional and configurable.  The default value is to kill jackd, so
+ as to preserve the previous behaviour.
+Author: Roland Mas lola...@debian.org
+Bug-Debian: http://bugs.debian.org/664863
+
+Index: qjackctl/src/qjackctlSetup.cpp
+===
+--- qjackctl.orig/src/qjackctlSetup.cpp
 qjackctl/src/qjackctlSetup.cpp
+@@ -67,6 +67,7 @@
+ //	sServerName  = m_settings.value(/ServerName).toString();
+ 	bStartJack   = m_settings.value(/StartJack, false).toBool();
+ //	bStartJackCmd= m_settings.value(/StartJackCmd, false).toBool();
++	bStopJack= m_settings.value(/StopJack, true).toBool();
+ 	bStartupScript   = m_settings.value(/StartupScript, false).toBool();
+ 	sStartupScriptShell  = m_settings.value(/StartupScriptShell).toString();
+ 	bPostStartupScript   = m_settings.value(/PostStartupScript, false).toBool();
+@@ -177,6 +178,7 @@
+ //	m_settings.setValue(/ServerName,  sServerName);
+ 	m_settings.setValue(/StartJack,   bStartJack);
+ //	m_settings.setValue(/StartJackCmd,bStartJackCmd);
++	m_settings.setValue(/StopJack,bStopJack);
+ 	m_settings.setValue(/StartupScript,   bStartupScript);
+ 	m_settings.setValue(/StartupScriptShell,  sStartupScriptShell);
+ 	m_settings.setValue(/PostStartupScript,   bPostStartupScript);
+Index: qjackctl/src/qjackctlSetupForm.ui
+===
+--- qjackctl.orig/src/qjackctlSetupForm.ui
 qjackctl/src/qjackctlSetupForm.ui
+@@ -3741,6 +3741,25 @@
+  /widget
+ /item
+ item
++ widget class=QCheckBox name=StopJackCheckBox
++  property name=font
++   font
++weight50/weight
++boldfalse/bold
++   /font
++  /property
++  property name=toolTip
++   stringWhether to stop JACK audio server on application quit/string
++  /property
++  property name=text
++   stringStop JACK audio server on application amp;quit/string
++  /property
++  property name=shortcut
++   stringAlt+Q/string
++  /property
++ /widget
++/item
++item
+  widget class=QCheckBox name=QueryCloseCheckBox
+   property name=font
+font
+Index: qjackctl/src/qjackctlSetup.h
+===
+--- qjackctl.orig/src/qjackctlSetup.h
 qjackctl/src/qjackctlSetup.h
+@@ -107,6 +107,9 @@
+ 	bool bStartJack;
+ 	bool bStartJackCmd;
+ 
++	// Server stop options.
++	bool bStopJack;
++
+ 	// User supplied command line.
+ 	QString sCmdLine;
+ 
+Index: qjackctl/src/qjackctlMainForm.cpp
+===
+--- qjackctl.orig/src/qjackctlMainForm.cpp
 qjackctl/src/qjackctlMainForm.cpp
+@@ -415,7 +415,8 @@
+ qjackctlMainForm::~qjackctlMainForm (void)
+ {
+ 	// Stop server, if not already...
+-	stopJackServer();
++	if (m_pSetup-bStopJack)
++		stopJackServer

Bug#664863: Patch accepted upstream

2012-03-23 Thread Roland Mas
  Just for the record: I got an answer from upstream, saying my patch
has been committed to svn trunk rev.722 (aka. qjackctl 0.3.8.8).  So
no particular action is needed on the Debian side, apart from closing
the bug with the next new upstream release upload.  I'll keep my
locally-patched package until then :-)

Roland.
-- 
Roland Mas

Meaning lies as much / In the mind of the reader / As in the haiku
  -- in Gödel, Escher, Bach: an Eternal Golden Braid (Douglas Hofstadter)



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#664863: qjackctl: Do not stop Jack server unconditionnally on exit

2012-03-21 Thread Roland Mas
Package: qjackctl
Version: 0.3.8-1
Severity: wishlist

Qjackctl can be configured to start, or not, the Jack server on startup;
however, it apparently can't be told to leave the server running on
exit.  This should be made configurable; alternatively, Qjackctl should
remember whether it started the server itself and only stop it if it
did.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages qjackctl depends on:
ii  jackd 5
ii  libasound21.0.25-2
ii  libc6 2.13-27
ii  libgcc1   1:4.6.3-1
ii  libjack-jackd2-0 [libjack-0.116]  1.9.8~dfsg.2-1
ii  libqt4-dbus   4:4.7.4-2
ii  libqt4-xml4:4.7.4-2
ii  libqtcore44:4.7.4-2
ii  libqtgui4 4:4.7.4-2
ii  libstdc++64.6.3-1
ii  libx11-6  2:1.4.4-4

qjackctl recommends no packages.

Versions of packages qjackctl suggests:
ii  pulseaudio-utils  1.1-3

-- no debconf information

-- 
Roland Mas

Time is a drug.  Too much of it kills you.
  -- in Small Gods (Terry Pratchett)



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#661820: jackd2: Missing alsarawmidi driver

2012-03-01 Thread Roland Mas
Package: jackd2
Version: 1.9.8~dfsg.1-1
Severity: normal

JACK 1.9.8 introduced a new alsarawmidi driver; however, the packaging
system builds it, but doesn't include it into the binary package.  I
therefore suggest adding the following line to debian/rules, within the
ifeq ($(DEB_HOST_ARCH_OS),linux) block:

dh_install -pjackd2 debian/tmp/usr/lib/jack/jack_alsarawmidi.so

Thanks!

Roland.
-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages jackd2 depends on:
ii  coreutils  8.13-3
ii  debconf [debconf-2.0]  1.5.41
ii  libasound2 1.0.25-2
ii  libc6  2.13-27
ii  libcelt0-0 0.7.1-1
ii  libdbus-1-31.4.18-1
ii  libexpat1  2.0.1-7.2
ii  libgcc11:4.6.2-16
ii  libjack-jackd2-0   1.9.8~dfsg.1-1
ii  libncurses55.9-4
ii  libreadline6   6.2-8
ii  libsamplerate0 0.1.8-3
ii  libsndfile11.0.25-4
ii  libstdc++6 4.6.2-16
ii  libtinfo5  5.9-4
ii  python 2.7.2-10
ii  python-dbus0.84.0-3

Versions of packages jackd2 recommends:
ii  jackd2-firewire  1.9.8~dfsg.1-1
ii  libpam-modules   1.1.3-7
ii  qjackctl 0.3.8-1

Versions of packages jackd2 suggests:
pn  jack-tools   none
pn  meterbridge  none

-- debconf information:
* jackd/tweak_rt_limits: true

-- 
Roland Mas

How does an octopus go into battle?
Fully-armed.



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#661725: hydrogen: JACK MIDI sends note-off events instead of note-on

2012-02-29 Thread Roland Mas
Package: hydrogen
Version: 0.9.6~beta1-2
Severity: normal

Hi,

I've started moving my Hydrogen pattern to use JACK for MIDI too, but I
found a strange behaviour that I believe is probably a bug.  My
instruments are configured to send MIDI events; this works if the MIDI
backend is ALSA, but with JACK the appropriate event is sent too late.
Fooling around with gmidimonitor led me to observe the following
timelines, where t0 is the time where the note is actually sounded (like
when I click on the instrument) :

With ALSA:
t0: note-off for the current instrument
t0: note-on
t0+length of the current sample: note-off

With JACK:
t0: note-off for the *previous* instrument
t0+length of the current sample: note-on for the current instrument

When the current instrument is a crash cymbal, for instance, or anything
with non-negligible sample length, the delay becomes quite noticeable
(seconds).

Roland.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hydrogen depends on:
ii  libarchive12  3.0.3-5
ii  libasound21.0.25-2
ii  libc6 2.13-27
ii  libgcc1   1:4.6.2-16
ii  libjack-jackd2-0 [libjack-0.116]  1.9.8~dfsg.1-1
ii  libportaudio2 19+svn2021-1
ii  libportmidi0  1:184-2
ii  libqt4-network4:4.7.4-2
ii  libqt4-xml4:4.7.4-2
ii  libqt4-xmlpatterns4:4.7.4-2
ii  libqtcore44:4.7.4-2
ii  libqtgui4 4:4.7.4-2
ii  libsndfile1   1.0.25-4
ii  libstdc++64.6.2-16

Versions of packages hydrogen recommends:
ii  hydrogen-drumkits  0.9.3.20070703-3
ii  rubberband-cli 1.3-1.2

hydrogen suggests no packages.

-- no debconf information

-- 
Roland Mas

Il vaut mieux insulter une commode Louis XV qu'une armoire à glace.



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#661725: hydrogen: JACK MIDI sends note-off events instead of note-on

2012-02-29 Thread Roland Mas
Roland Mas, 2012-02-29 19:46:53 +0100 :

[...]

 With ALSA:
 t0: note-off for the current instrument
 t0: note-on
 t0+length of the current sample: note-off

 With JACK:
 t0: note-off for the *previous* instrument
 t0+length of the current sample: note-on for the current instrument

  It occurs to me that there are actually two bugs in there.
1. the lack of the first note-off event for the current sample;
2. the lagging of the events.

Number 1 could be argued not to be a bug; after all, the note-off is
only there as a safety net.  However, number 2 seems to be that the
events that are actually sent lag by one event behind those that are
enqueued, which is why t0 includes the note-off related to the previous
instrument.

Further debugging leads me to the included patch.  I added the note-off
event too (second hunk).  The fix is tested here, but I'd appreciate
upstream review of course :-)

Description: Fix off-by-one error in JACK MIDI
 Fixed bug whereby a MIDI event is only sent when there is another
 one queued.
Author: Roland Mas lola...@debian.org
Bug-Debian: http://bugs.debian.org/661725

--- hydrogen-0.9.6~beta1.orig/src/core/src/IO/jack_midi_driver.cpp
+++ hydrogen-0.9.6~beta1/src/core/src/IO/jack_midi_driver.cpp
@@ -222,11 +222,12 @@ JackMidiDriver::JackMidiRead(jack_nframe
 		if (buffer == NULL)
 			break;
 
-memcpy(buffer, jack_buffer + (4 * rx_in_pos) + 1, len);
 		t++;
 		rx_in_pos++;
 		if (rx_in_pos = JACK_MIDI_BUFFER_MAX)
 			rx_in_pos = 0;
+
+memcpy(buffer, jack_buffer + (4 * rx_in_pos) + 1, len);
 	}
 	unlock();
 }
@@ -379,6 +380,13 @@ void JackMidiDriver::handleQueueNote(Not
 	if (vel  0 || vel  127)
 		return;
 
+buffer[0] = 0x80 | channel;	/* note off */
+	buffer[1] = key;
+	buffer[2] = 0;
+	buffer[3] = 0;
+
+	JackMidiOutEvent(buffer, 3);
+
 	buffer[0] = 0x90 | channel;	/* note on */
 	buffer[1] = key;
 	buffer[2] = vel;

Roland.
-- 
Roland Mas

Le weblog entièrement nu -- http://roland.entierement.nu/
Le photoblog entièrement net -- http://roland.entierement.net/
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers