[proaudio] [1383] update jack 9999 + cleanup

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Revision: 1383
Author:   gimpel
Date:     2008-12-09 20:54:30 +0100 (Tue, 09 Dec 2008)

Log Message:
-----------
update jack 9999 + cleanup

Modified Paths:
--------------
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/Manifest
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-0.116.1.ebuild
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-9999.ebuild

Removed Paths:
-------------
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-ppc64fix.patch
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-riceitdown.patch
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-mmap_complex.patch
    trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jackmidi_01dec05.patch


Modified: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/Manifest
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/Manifest	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/Manifest	2008-12-09 19:54:30 UTC (rev 1383)
@@ -1,15 +1,12 @@
-AUX jack-audio-connection-kit-0.103.0-ppc64fix.patch 2688 RMD160 f5e56bf524078be13f5b9114e1629c5bc4d2d0ac SHA1 bd4b823c54e06debec3b93b3bf850af06b69f045 SHA256 80e12c89348728ad9dc3022d00322b030102dbe7c5bd2b300a2b45dd696afb68
-AUX jack-audio-connection-kit-0.103.0-riceitdown.patch 1588 RMD160 9a4c86b480b580e16d407f88fc30b23fcd339efb SHA1 2e082c75e0927525f225e58e73f1a59811eb238c SHA256 4b26b1528cc9ec17bad3968af81ded11d378a5a2379a553f401c1ff2ec03a3c4
-AUX jack-audio-connection-kit-mmap_complex.patch 7078 RMD160 fcad1fe24412d58326a12bd26a3c123f17150178 SHA1 a0cb7b8616f03c5cc26eb325d6f243d4b4228a8b SHA256 69327de22eead1768609cc130449685bc9d519e8da4578d8227482ed3bcc66e5
 AUX jack-audio-connection-kit-transport.patch 309 RMD160 7b7130dd922ed14988eb591059d643ece39f6757 SHA1 ed8f9d90ec62476643f41ff60735d4aaaee84886 SHA256 74f1d155f365deb1461d070b37ccd7836c32c521d31960a3f4e6c3f2e528bada
 AUX jack-transport-start-at-zero-fix.diff 1613 RMD160 aa2e1492841c4299647af812d68e9585ebd53b10 SHA1 9e18d8ed0fa755fcd4aa53e82693e03d71a94b7b SHA256 f836d29c3ee71624968e8befb3f9972c1906b926d4737e02499a6bec646b5a1f
-AUX jackmidi_01dec05.patch 34782 RMD160 151415df3439c7d7b6f4109559ed3b212316e6bb SHA1 60d8a3064f349fa0897c78ded0e7d14a64f0f533 SHA256 3c0d5097f7b2fda5c35c963224dd7a59b097181415956317cf6f161d5e48048a
 DIST jack-audio-connection-kit-0.109.2.tar.gz 831141 RMD160 1e382cf6751b4df3d5d4ea75be7ee94adbc7746a SHA1 5a23c9817fb72858d5bc7b3077224575140b7f55 SHA256 27a7a70e5be0dbcdd98ee1a505399e006e06b4f58fcd3b8cd25763aa7e43bfd4
 DIST jack-audio-connection-kit-0.116.1.tar.gz 943593 RMD160 a13ab20b747d0cfd8551e5e2874fd249184078d0 SHA1 2fb1e4bcc3fe8cf18024d3ead93eb4e4fcef5e69 SHA256 da3e6133e4f0305d8a0759563b074722ab97894a81b8925a058bc4714f7e4fd9
 DIST jackdbus-patches-0.9.tar.bz2 39305 RMD160 0e9c348211684fa6b52261adca2c43ad1b5200db SHA1 342137f9763da9a2aebd818434515cf3cc41682d SHA256 c37fe0811b49da0dbaeb5fbc8ed7eddc47f514eda6b9dc662cff8f80847526f2
 DIST netjack-0.12.tar.bz2 28044 RMD160 13d13f2a66c891da243f9a286833554f680937ff SHA1 f850ed654d0f115065d96bee34d9f7c05e8c5725 SHA256 c443bcb6ec2b477c52cab2fca75aef80fe2c2c91499e45ffdbb1c28ffaa7ee60
 EBUILD jack-audio-connection-kit-0.109.2-r2.ebuild 4769 RMD160 0da7e08bf67145fc6f3b3379c463e32dc75eb04b SHA1 65f27fc56207e67716a57b566daf3d6184ba1a52 SHA256 d2cfa38406eb3ed863232c565abf6127984b59520ad1d9e00b4e0ca72aa1d972
-EBUILD jack-audio-connection-kit-0.116.1.ebuild 3667 RMD160 c9fbdb98a2a71bcd1b40e3582561243af564e8c7 SHA1 5e39defe108236ef73c70e0ea7bcffbd6890b202 SHA256 47a42ce0ea83e1021802ed6d9ce4e31afed2360b54c19952adc885bfd01ca721
-EBUILD jack-audio-connection-kit-9999.ebuild 5446 RMD160 a143fdf36a9614d2ddf8305891ec4d6b02103503 SHA1 6c1b7850cc276fcb6d674537039217fa877db059 SHA256 596603e021ca8c23b77ba784824335b45e35a86504f954dab6470dba182de0f6
+EBUILD jack-audio-connection-kit-0.116.1.ebuild 3749 RMD160 1f854f8ef1199331b57e902c90ace1360ebf94f1 SHA1 16693a049f9dd1b80227a50d7ee54d60a8797bcd SHA256 17d036adf5c3d8aaa02f951891873656ca586f4d9831e1ffbd11ca1991142862
+EBUILD jack-audio-connection-kit-9999.ebuild 4848 RMD160 f64941a574ef1717abd351b8edb5613279b90376 SHA1 8e82fecabff302ae0b514ae6fa29bec49207c881 SHA256 6a41d6cc692aa4d64b16b373f5d3dc12e7cba87381892ff7e930ff7b8fd6a6af
+MISC .jack-audio-connection-kit-0.116.1.ebuild.swp 16384 RMD160 d25be14c3b8af7326518237adb8b9f9d06f244ae SHA1 dfd0e15d16f6a021194f8ef626e1d19a783b1417 SHA256 f51825875f31e57a127b7042af0ea03a4073c5399826c40412f3660c0c196a51
 MISC ChangeLog 3539 RMD160 b086e2d0d85010139008f643f1cff9a734edb3fc SHA1 cbf8a1a6526b0d6512001cf978ce67f1b47178c4 SHA256 37ff9acc8c3112600739b86c6e0c0310794675d18ab1b341c541d08e82f47922
 MISC metadata.xml 268 RMD160 facc07bd885f20615a1f2555069329c642e1a566 SHA1 2456bdb8a218c9d477d2d6ee4bf158de070c7be4 SHA256 96629b266b743f566c29158d4498edeeb1cd6b1f0cd9629e42d4f10b4da82f89

Deleted: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-ppc64fix.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-ppc64fix.patch	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-ppc64fix.patch	2008-12-09 19:54:30 UTC (rev 1383)
@@ -1,83 +0,0 @@
---- configure.ac.orig	2007-10-08 00:19:25.000000000 -0500
-+++ configure.ac	2007-10-08 00:42:19.000000000 -0500
-@@ -219,8 +219,20 @@
- 
- dnl ----------------------------------------------------------------------
- 
--                                                                                
--if test "$target_cpu" = "powerpc"; then
-+
-+if test "$target_cpu" = "powerpc64" ; then
-+
-+    AC_ARG_ENABLE(cell,
-+       [  --enable-cell           enable Cell BE support (default=no)],,
-+       [ enable_cell=no ])
-+
-+    if test "x$enable_cell" = xyes; then
-+       AC_DEFINE(ENABLE_CELLBE, 1, [Define to 1 if you need support for the Cell BE.])
-+    fi
-+
-+fi
-+
-+if test "$target_cpu" = "powerpc" -o "$target_cpu" = "powerpc64" ; then
- 
-     AC_DEFINE(POWERPC, 1, "Are we running a ppc CPU?")
-     
-@@ -252,6 +262,9 @@
-     dnl -mcpu=7450 does not reliably work with gcc 3.*
-     
-     JACK_OPT_CFLAGS="-D_REENTRANT -mcpu=7400 $ALTIVEC_OPT_FLAGS_FLAGS -mhard-float -mpowerpc-gfxopt"
-+    if test "$target_cpu" = "powerpc64"; then
-+        JACK_OPT_CFLAGS="-D_REENTRANT -O2 -mcpu=powerpc64 $ALTIVEC_OPT_FLAGS -mhard-float"
-+    fi
- 
- elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
- 
---- config/cpu/powerpc/cycles.h.orig	2006-05-25 21:45:16.000000000 -0500
-+++ config/cpu/powerpc/cycles.h	2007-10-08 00:49:03.000000000 -0500
-@@ -25,6 +25,9 @@
- /* PowerPC */
- 
- #define CPU_FTR_601			0x00000100
-+#ifdef __powerpc64__
-+#define CPU_FTR_CELL_TB_BUG            0x0000800000000000UL
-+#endif /* __powerpc64__ */
- 
- typedef unsigned long cycles_t;
- 
-@@ -36,6 +39,27 @@
- {
- 	cycles_t ret = 0;
- 
-+#ifdef __powerpc64__
-+#ifdef ENABLE_CELLBE
-+	__asm__ __volatile__(                            \
-+	         "90:    mftb %0;\n"                     \
-+	         "97:    cmpwi %0,0;\n"                  \
-+	         "       beq- 90b;\n"                    \
-+	         "99:\n"                                 \
-+	         ".section __ftr_fixup,\"a\"\n"          \
-+	         ".align 3\n"                            \
-+	         "98:\n"                                 \
-+	         "       .llong %1\n"                    \
-+	         "       .llong %1\n"                    \
-+	         "       .llong 97b-98b\n"               \
-+	         "       .llong 99b-98b\n"               \
-+	         ".previous"                             \
-+	         : "=r" (ret) : "i" (CPU_FTR_CELL_TB_BUG));
-+
-+#else /* !ENABLE_CELLBE */
-+	__asm__ __volatile__("mftb %0" : "=r" (ret));
-+#endif /* !ENABLE_CELLBE */
-+#else
- 	__asm__ __volatile__(
- 		"98:	mftb %0\n"
- 		"99:\n"
-@@ -46,6 +70,7 @@
- 		"	.long 99b\n"
- 		".previous"
- 		: "=r" (ret) : "i" (CPU_FTR_601));
-+#endif /* !__powerpc64__ */
- 	return ret;
- }
- 

Deleted: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-riceitdown.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-riceitdown.patch	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-0.103.0-riceitdown.patch	2008-12-09 19:54:30 UTC (rev 1383)
@@ -1,41 +0,0 @@
-Index: jack-audio-connection-kit-0.103.0/configure.ac
-===================================================================
---- jack-audio-connection-kit-0.103.0.orig/configure.ac
-+++ jack-audio-connection-kit-0.103.0/configure.ac
-@@ -210,8 +210,6 @@ AM_CONDITIONAL(USE_POSIX_SHM, $USE_POSIX
- 
- JACK_CORE_CFLAGS="-I\$(top_srcdir)/config -I\$(top_srcdir) \
- -I\$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g"
--JACK_OPT_CFLAGS="$JACK_CORE_CFLAGS -march=pentium2 -mcpu=pentium4 -O3 \
---ffast-math -funroll-loops -fprefetch-loop-arrays"
- JACK_CFLAGS="$JACK_CORE_CFLAGS $CFLAGS"
- 
- dnl
-@@ -253,7 +251,7 @@ if test "$target_cpu" = "powerpc"; then
- 
-     dnl -mcpu=7450 does not reliably work with gcc 3.*
-     
--    JACK_OPT_CFLAGS="-D_REENTRANT -O2 -mcpu=7400 $ALTIVEC_OPT_FLAGS_FLAGS -mhard-float -mpowerpc-gfxopt"
-+    JACK_OPT_CFLAGS="-D_REENTRANT -mcpu=7400 $ALTIVEC_OPT_FLAGS_FLAGS -mhard-float -mpowerpc-gfxopt"
- 
- elif echo $target_cpu | egrep '(i.86|x86_64)' >/dev/null; then
- 
-@@ -339,17 +337,7 @@ elif echo $target_cpu | egrep '(i.86|x86
-     fi
- 
-     AC_DEFINE(x86, 1, "Nope it's intel")
--    COMMON_X86_OPT_FLAGS="-DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops"
--    
--    if test "$target_cpu" = "i586"; then
--	JACK_OPT_CFLAGS="-march=i586 "
--    elif test "$target_cpu" = "i686"; then
--	JACK_OPT_CFLAGS="-march=i686"
--    elif test "$target_cpu" = "x86_64"; then
--	JACK_OPT_CFLAGS="-march=k8"
--    else
--	:
--    fi
-+    COMMON_X86_OPT_FLAGS="-DREENTRANT"
-     
-     JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
- 

Deleted: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-mmap_complex.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-mmap_complex.patch	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jack-audio-connection-kit-mmap_complex.patch	2008-12-09 19:54:30 UTC (rev 1383)
@@ -1,196 +0,0 @@
-diff -ru jack-audio-connection-kit-0.100.0.orig/drivers/alsa/alsa_driver.c jack-audio-connection-kit-0.100.0/drivers/alsa/alsa_driver.c
---- jack-audio-connection-kit-0.100.0.orig/drivers/alsa/alsa_driver.c	2005-09-23 19:33:25.000000000 +0200
-+++ jack-audio-connection-kit-0.100.0/drivers/alsa/alsa_driver.c	2005-09-23 19:34:11.000000000 +0200
-@@ -70,6 +70,16 @@
- 		driver->capture_addr = 0;
- 	}
- 
-+	if (driver->playback_interleave_skip) {
-+		free (driver->playback_interleave_skip);
-+		driver->playback_interleave_skip = NULL;
-+	}
-+
-+	if (driver->capture_interleave_skip) {
-+		free (driver->capture_interleave_skip);
-+		driver->capture_interleave_skip = NULL;
-+	}
-+
- 	if (driver->silent) {
- 		free (driver->silent);
- 		driver->silent = 0;
-@@ -377,6 +387,9 @@
- 		if ((err = snd_pcm_hw_params_set_access (
- 			     handle, hw_params,
- 			     SND_PCM_ACCESS_MMAP_INTERLEAVED)) < 0) {
-+		    if ((err = snd_pcm_hw_params_set_access (
-+		    		handle, hw_params,
-+		    		SND_PCM_ACCESS_MMAP_COMPLEX)) < 0) {
- 			jack_error ("ALSA: mmap-based access is not possible"
- 				    " for the %s "
- 				    "stream of this audio interface",
-@@ -384,6 +397,7 @@
- 			return -1;
- 		}
- 	}
-+	}
- 
- 	format = sample_width == 4 ? 0 : NOFORMATS - 1;
- 	while (1) {
-@@ -683,7 +697,8 @@
-  		err = snd_pcm_hw_params_get_access (driver->playback_hw_params,
- 						    &access);
-  		driver->playback_interleaved =
--			(access == SND_PCM_ACCESS_MMAP_INTERLEAVED);
-+			(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) 
-+			|| (access == SND_PCM_ACCESS_MMAP_COMPLEX);
- 
- 		if (p_period_size != driver->frames_per_cycle) {
- 			jack_error ("alsa_pcm: requested an interrupt every %"
-@@ -705,8 +720,8 @@
-  		err = snd_pcm_hw_params_get_access (driver->capture_hw_params,
- 						    &access);
-  		driver->capture_interleaved =
--			(access == SND_PCM_ACCESS_MMAP_INTERLEAVED);
-- 
-+			(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) 
-+			|| (access == SND_PCM_ACCESS_MMAP_COMPLEX);
- 	
- 		if (c_period_size != driver->frames_per_cycle) {
- 			jack_error ("alsa_pcm: requested an interrupt every %"
-@@ -765,15 +780,11 @@
- 				    driver->alsa_name_playback);
- 			return -1;
- 		}
--		driver->playback_interleave_skip = my_areas[0].step / 8;
- 		driver->interleave_unit =
- 			snd_pcm_format_physical_width (
- 				driver->playback_sample_format) / 8;
- 	} else {
- 		driver->interleave_unit = 0;  /* NOT USED */
--		driver->playback_interleave_skip =
--			snd_pcm_format_physical_width (
--				driver->playback_sample_format) / 8;
- 	}
- 
- 	if (driver->capture_interleaved) {
-@@ -785,11 +796,6 @@
- 				    driver->alsa_name_capture);
- 			return -1;
- 		}
--		driver->capture_interleave_skip = my_areas[0].step / 8;
--	} else {
--		driver->capture_interleave_skip =
--			snd_pcm_format_physical_width (
--			driver->capture_sample_format) / 8;
- 	}
- 
- 	if (driver->playback_nchannels > driver->capture_nchannels) {
-@@ -819,6 +825,10 @@
- 			malloc (sizeof (char *) * driver->playback_nchannels);
- 		memset (driver->playback_addr, 0,
- 			sizeof (char *) * driver->playback_nchannels);
-+		driver->playback_interleave_skip = (unsigned long *)
-+			malloc (sizeof (unsigned long *) * driver->playback_nchannels);
-+		memset (driver->playback_interleave_skip, 0,
-+			sizeof (unsigned long *) * driver->playback_nchannels);
- 		driver->silent = (unsigned long *)
- 			malloc (sizeof (unsigned long)
- 				* driver->playback_nchannels);
-@@ -841,6 +851,10 @@
- 			malloc (sizeof (char *) * driver->capture_nchannels);
- 		memset (driver->capture_addr, 0,
- 			sizeof (char *) * driver->capture_nchannels);
-+		driver->capture_interleave_skip = (unsigned long *)
-+			malloc (sizeof (unsigned long *) * driver->capture_nchannels);
-+		memset (driver->capture_interleave_skip, 0,
-+			sizeof (unsigned long *) * driver->capture_nchannels);
- 	}
- 
- 	driver->clock_sync_data = (ClockSyncStatus *)
-@@ -897,6 +911,7 @@
- 				&driver->capture_areas[chn];
- 			driver->capture_addr[chn] = (char *) a->addr
- 				+ ((a->first + a->step * *capture_offset) / 8);
-+			driver->capture_interleave_skip[chn] = (unsigned long ) (a->step / 8);
- 		}
- 	} 
- 
-@@ -915,6 +930,7 @@
- 				&driver->playback_areas[chn];
- 			driver->playback_addr[chn] = (char *) a->addr
- 				+ ((a->first + a->step * *playback_offset) / 8);
-+			driver->playback_interleave_skip[chn] = (unsigned long ) (a->step / 8);
- 		}
- 	} 
- 	
-@@ -1991,6 +2007,8 @@
- 
- 	driver->playback_addr = 0;
- 	driver->capture_addr = 0;
-+	driver->playback_interleave_skip = NULL;
-+	driver->capture_interleave_skip = NULL;
- 
- 
- 	driver->silent = 0;
-Only in jack-audio-connection-kit-0.100.0/drivers/alsa: alsa_driver.c.orig
-diff -ru jack-audio-connection-kit-0.100.0.orig/drivers/alsa/alsa_driver.h jack-audio-connection-kit-0.100.0/drivers/alsa/alsa_driver.h
---- jack-audio-connection-kit-0.100.0.orig/drivers/alsa/alsa_driver.h	2005-09-23 19:33:25.000000000 +0200
-+++ jack-audio-connection-kit-0.100.0/drivers/alsa/alsa_driver.h	2005-09-23 19:34:11.000000000 +0200
-@@ -65,8 +65,8 @@
-     unsigned int                  playback_nfds;
-     unsigned int                  capture_nfds;
-     unsigned long                 interleave_unit;
--    unsigned long                 capture_interleave_skip;
--    unsigned long                 playback_interleave_skip;
-+    unsigned long                *capture_interleave_skip;
-+    unsigned long                *playback_interleave_skip;
-     channel_t                     max_nchannels;
-     channel_t                     user_nchannels;
-     channel_t                     playback_nchannels;
-@@ -155,7 +155,7 @@
- 			(driver->playback_addr[chn],
- 			 0, nframes * driver->playback_sample_bytes,
- 			 driver->interleave_unit,
--			 driver->playback_interleave_skip);
-+			 driver->playback_interleave_skip[chn]);
- 	} else {
- 		memset (driver->playback_addr[chn], 0,
- 			nframes * driver->playback_sample_bytes);
-@@ -171,7 +171,7 @@
- 			(driver->playback_addr[chn],
- 			 0, nframes * driver->playback_sample_bytes,
- 			 driver->interleave_unit,
--			 driver->playback_interleave_skip);
-+			 driver->playback_interleave_skip[chn]);
- 	} else {
- 		memset (driver->playback_addr[chn], 0,
- 			nframes * driver->playback_sample_bytes);
-@@ -187,7 +187,7 @@
- 	driver->read_via_copy (buf, 
- 			       driver->capture_addr[channel],
- 			       nsamples, 
--			       driver->capture_interleave_skip);
-+			       driver->capture_interleave_skip[channel]);
- }
- 
- static inline void 
-@@ -199,7 +199,7 @@
- 	driver->write_via_copy (driver->playback_addr[channel],
- 				buf, 
- 				nsamples, 
--				driver->playback_interleave_skip,
-+				driver->playback_interleave_skip[channel],
- 				driver->dither_state+channel);
- 	alsa_driver_mark_channel_done (driver, channel);
- }
-@@ -213,8 +213,8 @@
- 	driver->channel_copy (driver->playback_addr[output_channel],
- 			      driver->capture_addr[input_channel],
- 			      nsamples * driver->playback_sample_bytes,
--			      driver->playback_interleave_skip,
--			      driver->capture_interleave_skip);
-+			      driver->playback_interleave_skip[output_channel],
-+			      driver->capture_interleave_skip[input_channel]);
- 	alsa_driver_mark_channel_done (driver, output_channel);
- }
- 

Deleted: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jackmidi_01dec05.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jackmidi_01dec05.patch	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/files/jackmidi_01dec05.patch	2008-12-09 19:54:30 UTC (rev 1383)
@@ -1,994 +0,0 @@
-Index: jack/doc/Makefile.am
-===================================================================
-RCS file: /cvsroot/jackit/jack/doc/Makefile.am,v
-retrieving revision 1.16
-diff -u -r1.16 Makefile.am
---- jack/doc/Makefile.am	28 Nov 2004 00:29:44 -0000	1.16
-+++ jack/doc/Makefile.am	5 Dec 2005 02:36:55 -0000
-@@ -13,7 +13,8 @@
- 	../jack/ringbuffer.h \
- 	../jack/thread.h \
- 	../jack/transport.h \
--	../jack/types.h
-+	../jack/types.h \
-+	../jack/midiport.h
- 
- EXTRA_DIST=mainpage.dox transport.dox fsm.png fsm.eps porting.dox
- 
-Index: jack/doc/mainpage.dox
-===================================================================
-RCS file: /cvsroot/jackit/jack/doc/mainpage.dox,v
-retrieving revision 1.10
-diff -u -r1.10 mainpage.dox
---- jack/doc/mainpage.dox	31 Dec 2004 23:55:56 -0000	1.10
-+++ jack/doc/mainpage.dox	5 Dec 2005 02:36:55 -0000
-@@ -97,6 +97,8 @@
-   - @ref types.h "<jack/types.h>" defines the main JACK data types.
-   - @ref thread.h "<jack/thread.h>" functions standardize thread
-   creation for JACK and its clients.
-+  - @ref midiport.h "<jack/midiport.h>" functions to handle writing
-+  of midi data to a port
- 
- In addition, the example-clients directory provides numerous examples
- of simple JACK clients that nevertheless use the API to do something
-Index: jack/doc/reference.doxygen.in
-===================================================================
-RCS file: /cvsroot/jackit/jack/doc/reference.doxygen.in,v
-retrieving revision 1.15
-diff -u -r1.15 reference.doxygen.in
---- jack/doc/reference.doxygen.in	31 Dec 2004 23:55:56 -0000	1.15
-+++ jack/doc/reference.doxygen.in	5 Dec 2005 02:36:55 -0000
-@@ -373,7 +373,8 @@
-                          @top_srcdir@/jack/statistics.h \
-                          @top_srcdir@/jack/thread.h \
-                          @top_srcdir@/jack/transport.h \
--                         @top_srcdir@/jack/types.h
-+                         @top_srcdir@/jack/types.h \
-+                         @top_srcdir@/jack/midiport.h
- 
- # If the value of the INPUT tag contains directories, you can use the 
- # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-Index: jack/example-clients/Makefile.am
-===================================================================
-RCS file: /cvsroot/jackit/jack/example-clients/Makefile.am,v
-retrieving revision 1.21
-diff -u -r1.21 Makefile.am
---- jack/example-clients/Makefile.am	7 Apr 2004 04:52:58 -0000	1.21
-+++ jack/example-clients/Makefile.am	5 Dec 2005 02:36:55 -0000
-@@ -37,7 +37,9 @@
- 	       jack_lsp \
- 	       jack_freewheel \
- 	       $(JACKREC) \
--	       $(JACK_TRANSPORT)
-+	       $(JACK_TRANSPORT) \
-+		   jack_midisine \
-+		   jack_midiseq
- 
- if HAVE_SNDFILE
- # note! jackrec_CFLAGS syntax not supported by automake-1.4
-@@ -111,6 +113,14 @@
- jack_unload_LDFLAGS = @OS_LDFLAGS@
- jack_unload_LDADD = ../libjack/libjack.la
- 
-+jack_midiseq_SOURCES = midiseq.c
-+jack_midiseq_LDFLAGS = -lrt -ldl -lpthread
-+jack_midiseq_LDADD = ../libjack/libjack.la
-+
-+jack_midisine_SOURCES = midisine.c
-+jack_midisine_LDFLAGS = -lrt -ldl -lpthread -lm
-+jack_midisine_LDADD = ../libjack/libjack.la
-+
- #
- # sample in-process client(s)
- #
-Index: jack/example-clients/midiseq.c
-===================================================================
-RCS file: jack/example-clients/midiseq.c
-diff -N jack/example-clients/midiseq.c
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ jack/example-clients/midiseq.c	5 Dec 2005 02:36:55 -0000
-@@ -0,0 +1,117 @@
-+/*
-+    Copyright (C) 2004 Ian Esten
-+    
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 2 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License
-+    along with this program; if not, write to the Free Software
-+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+*/
-+
-+#include <jack/jack.h>
-+#include <jack/midiport.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+
-+jack_client_t *client;
-+jack_port_t *output_port;
-+
-+unsigned char* note_frqs;
-+jack_nframes_t* note_starts;
-+jack_nframes_t* note_lengths;
-+jack_nframes_t num_notes;
-+jack_nframes_t loop_nsamp;
-+jack_nframes_t loop_index;
-+
-+void usage()
-+{
-+	fprintf(stderr, "usage: jack_midiseq name nsamp [startindex note nsamp] ...... [startindex note nsamp]\n");
-+	fprintf(stderr, "eg: jack_midiseq 24000 0 60 8000 12000 63 8000\n");
-+	fprintf(stderr, "will play a 1/2 sec loop (if srate is 48khz) with a c4 note at the start of the loop\n");
-+	fprintf(stderr, "that lasts for 12000 samples, then a d4# that starts at 1/4 sec that lasts for 800 samples\n");
-+}
-+
-+int process(jack_nframes_t nframes, void *arg)
-+{
-+	int i,j;
-+	void* port_buf = jack_port_get_buffer(output_port, nframes);
-+	unsigned char* buffer;
-+	jack_midi_clear_buffer(port_buf, nframes);
-+	/*memset(buffer, 0, nframes*sizeof(jack_default_audio_sample_t));*/
-+
-+	for(i=0; i<nframes; i++)
-+	{
-+		for(j=0; j<num_notes; j++)
-+		{
-+			if(note_starts[j] == loop_index)
-+			{
-+				buffer = jack_midi_event_reserve(port_buf, i, 3, nframes);
-+/*				printf("wrote a note on, port buffer = 0x%x, event buffer = 0x%x\n", port_buf, buffer);*/
-+				buffer[1] = note_frqs[j];
-+				buffer[0] = 0x90;	/* note on */
-+			}
-+			else if(note_starts[j] + note_lengths[j] == loop_index)
-+			{
-+				buffer = jack_midi_event_reserve(port_buf, i, 3, nframes);
-+/*				printf("wrote a note off, port buffer = 0x%x, event buffer = 0x%x\n", port_buf, buffer);*/
-+				buffer[1] = note_frqs[j];
-+				buffer[0] = 0x80;	/* note off */
-+			}
-+		}
-+		loop_index = loop_index+1 >= loop_nsamp ? 0 : loop_index+1;
-+	}
-+	return 0;
-+}
-+
-+int main(int narg, char **args)
-+{
-+	int i;
-+	jack_nframes_t nframes;
-+	if((narg<6) || ((narg-3)%3 !=0))
-+	{
-+		usage();
-+		exit(1);
-+	}
-+	if((client = jack_client_new (args[1])) == 0)
-+	{
-+		fprintf (stderr, "jack server not running?\n");
-+		return 1;
-+	}
-+	jack_set_process_callback (client, process, 0);
-+	output_port = jack_port_register (client, "out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
-+	nframes = jack_get_buffer_size(client);
-+	jack_midi_reset_new_port(jack_port_get_buffer(output_port, nframes), nframes);
-+	loop_index = 0;
-+	num_notes = (narg - 3)/3;
-+	note_frqs = malloc(num_notes*sizeof(unsigned char));
-+	note_starts = malloc(num_notes*sizeof(unsigned char));
-+	note_lengths = malloc(num_notes*sizeof(jack_nframes_t));
-+	loop_nsamp = atoi(args[2]);
-+	for(i=0; i<num_notes; i++)
-+	{
-+		note_starts[i] = atoi(args[3 + 3*i]);
-+		note_frqs[i] = atoi(args[4 + 3*i]);
-+		note_lengths[i] = atoi(args[5 + 3*i]);
-+	}
-+
-+	if (jack_activate(client))
-+	{
-+		fprintf (stderr, "cannot activate client");
-+		return 1;
-+	}
-+
-+	while (1)
-+	{
-+		sleep(1);
-+	};
-+	
-+}
-Index: jack/example-clients/midisine.c
-===================================================================
-RCS file: jack/example-clients/midisine.c
-diff -N jack/example-clients/midisine.c
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ jack/example-clients/midisine.c	5 Dec 2005 02:36:55 -0000
-@@ -0,0 +1,138 @@
-+/*
-+    Copyright (C) 2004 Ian Esten
-+    
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 2 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License
-+    along with this program; if not, write to the Free Software
-+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+*/
-+
-+#include <stdio.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <math.h>
-+
-+#include <jack/jack.h>
-+#include <jack/midiport.h>
-+
-+jack_port_t *input_port;
-+jack_port_t *output_port;
-+jack_default_audio_sample_t ramp=0.0;
-+jack_default_audio_sample_t note_on;
-+unsigned char note = 0;
-+jack_default_audio_sample_t note_frqs[128];
-+
-+void calc_note_frqs(jack_default_audio_sample_t srate)
-+{
-+	int i;
-+	for(i=0; i<128; i++)
-+	{
-+		note_frqs[i] = (2.0 * 440.0 / 32.0) * pow(2, (((jack_default_audio_sample_t)i - 9.0) / 12.0)) / srate;
-+	}
-+}
-+
-+int process(jack_nframes_t nframes, void *arg)
-+{
-+	int i;
-+	void* port_buf = jack_port_get_buffer(input_port, nframes);
-+	jack_default_audio_sample_t *out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes);
-+	jack_midi_event_t in_event;
-+	jack_nframes_t event_index = 0;
-+	jack_nframes_t event_count = jack_midi_port_get_info(port_buf, nframes)->event_count;
-+	if(event_count > 1)
-+	{
-+		printf(" midisine: have %d events\n", event_count);
-+		for(i=0; i<event_count; i++)
-+		{
-+			jack_midi_event_get(&in_event, port_buf, i, nframes);
-+			printf("    event %d time is %d. 1st byte is 0x%x\n", i, in_event.time, *(in_event.buffer));
-+		}
-+/*		printf("1st byte of 1st event addr is %p\n", in_events[0].buffer);*/
-+	}
-+	jack_midi_event_get(&in_event, port_buf, 0, nframes);
-+	for(i=0; i<nframes; i++)
-+	{
-+		if((in_event.time == i) && (event_index < event_count))
-+		{
-+			if( ((*(in_event.buffer) & 0xf0)) == 0x90 )
-+			{
-+				/* note on */
-+				note = *(in_event.buffer + 1);
-+				note_on = 1.0;
-+			}
-+			else if( ((*(in_event.buffer)) & 0xf0) == 0x80 )
-+			{
-+				/* note off */
-+				note = *(in_event.buffer + 1);
-+				note_on = 0.0;
-+			}
-+			event_index++;
-+			if(event_index < event_count)
-+				jack_midi_event_get(&in_event, port_buf, event_index, nframes);
-+		}
-+		ramp += note_frqs[note];
-+		ramp = (ramp > 1.0) ? ramp - 2.0 : ramp;
-+		out[i] = note_on*sin(2*M_PI*ramp);
-+	}
-+	return 0;      
-+}
-+
-+int srate(jack_nframes_t nframes, void *arg)
-+{
-+	printf("the sample rate is now %" PRIu32 "/sec\n", nframes);
-+	calc_note_frqs((jack_default_audio_sample_t)nframes);
-+	return 0;
-+}
-+
-+void jack_shutdown(void *arg)
-+{
-+	exit(1);
-+}
-+
-+int main(int narg, char **args)
-+{
-+	jack_client_t *client;
-+
-+	if ((client = jack_client_new("midisine")) == 0)
-+	{
-+		fprintf(stderr, "jack server not running?\n");
-+		return 1;
-+	}
-+	
-+	calc_note_frqs(jack_get_sample_rate (client));
-+
-+	jack_set_process_callback (client, process, 0);
-+
-+	jack_set_sample_rate_callback (client, srate, 0);
-+
-+	jack_on_shutdown (client, jack_shutdown, 0);
-+
-+	input_port = jack_port_register (client, "midi_in", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
-+	output_port = jack_port_register (client, "audio_out", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
-+
-+	if (jack_activate (client))
-+	{
-+		fprintf(stderr, "cannot activate client");
-+		return 1;
-+	}
-+
-+	/* run until interrupted */
-+	while(1)
-+	{
-+		sleep(1);
-+	}
-+	jack_client_close(client);
-+	exit (0);
-+}
-+
-Index: jack/jack/Makefile.am
-===================================================================
-RCS file: /cvsroot/jackit/jack/jack/Makefile.am,v
-retrieving revision 1.27
-diff -u -r1.27 Makefile.am
---- jack/jack/Makefile.am	30 Oct 2005 11:01:31 -0000	1.27
-+++ jack/jack/Makefile.am	5 Dec 2005 02:36:55 -0000
-@@ -10,7 +10,8 @@
- 	thread.h                \
- 	timestamps.h		\
- 	transport.h		\
--	types.h	
-+	types.h	\
-+	midiport.h
- 
- noinst_HEADERS =		\
- 	atomicity.h		\
-Index: jack/jack/midiport.h
-===================================================================
-RCS file: jack/jack/midiport.h
-diff -N jack/jack/midiport.h
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ jack/jack/midiport.h	5 Dec 2005 02:36:55 -0000
-@@ -0,0 +1,168 @@
-+/*
-+    Copyright (C) 2004 Ian Esten
-+    
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU Lesser General Public License as published by
-+    the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
-+    
-+    You should have received a copy of the GNU Lesser General Public License
-+    along with this program; if not, write to the Free Software 
-+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+
-+*/
-+
-+
-+#ifndef __JACK_MIDIPORT_H
-+#define __JACK_MIDIPORT_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+	
-+#include <jack/types.h>
-+#include <stdlib.h>
-+
-+/** Type for raw event data contained in @ref jack_midi_event_t. */
-+typedef unsigned char jack_midi_data_t;
-+
-+/* buffer is a pointer to the midi data. time is the sample index at which this
-+ * event is valid. size_t is how many bytes of data are in 'buffer'. the events
-+ * in 'buffer' are standard midi messages. note that there is no event type field
-+ * anymore. that is now just byte 0 of the buffer.
-+ */
-+typedef struct _jack_midi_event
-+{
-+	jack_nframes_t time;
-+	size_t size;
-+	jack_midi_data_t* buffer;
-+} jack_midi_event_t;
-+
-+typedef struct _jack_midi_port_info
-+{
-+	jack_nframes_t event_count;
-+} jack_midi_port_info_t;
-+
-+/* returns an info struct. only info in there at the moment is how many
-+ * events are in the buffer
-+ */
-+jack_midi_port_info_t* jack_midi_port_get_info(void* port_buffer, jack_nframes_t nframes);
-+
-+
-+/** Get a MIDI event from an event port buffer.
-+ * 
-+ * The MIDI event returned is guaranteed to be a complete MIDI
-+ * event (i.e. clients do not have to deal with running status
-+ * as the status byte of the event will always be present).
-+ *
-+ * @param event Event structure to store retrieved event in.
-+ * @param port_buffer Port buffer from which to retrieve event.
-+ * @param event_index Index of event to retrieve.
-+ * @param nframes Number of valid frames this cycle.
-+ * @return 0 on success, ENODATA if buffer is empty.
-+ */
-+int jack_midi_event_get(jack_midi_event_t* event, void* port_buffer, jack_nframes_t event_idx, jack_nframes_t nframes);
-+
-+
-+/** Initialise the port state. This must be used after port_buffer is allocated */
-+void jack_midi_reset_new_port(void* port_buffer, jack_nframes_t nframes);
-+
-+
-+/** Clear an event buffer.
-+ * 
-+ * This should be called at the beginning of each process cycle before calling
-+ * @ref jack_midi_event_reserve or @ref jack_midi_event_write. This
-+ * function may not be called on an input port's buffer.
-+ *
-+ * @param port_buffer Port buffer to clear (must be an output port buffer).
-+ * @param nframes Number of valid frames this cycle.
-+ */
-+void jack_midi_clear_buffer(void* port_buffer, jack_nframes_t nframes);
-+
-+
-+/** Allocate space for an event to be written to an event port buffer.
-+ *
-+ * Clients are to write the actual event data to be written starting at the
-+ * pointer returned by this function. Clients must not write more than
-+ * @a data_size bytes into this buffer.
-+ *
-+ * @param port_buffer Buffer to write event to.
-+ * @param time Sample offset of event.
-+ * @param data_size Length of event's raw data in bytes.
-+ * @param nframes Number of valid frames this event.
-+ * @return Pointer to the beginning of the reserved event's data buffer, or
-+ * NULL on error (ie not enough space).
-+ */
-+jack_midi_data_t* jack_midi_event_reserve(void* port_buffer, jack_nframes_t time, 
-+										  size_t data_size, jack_nframes_t nframes);
-+
-+
-+/** Write an event into an event port buffer.
-+ *
-+ * This function is simply a wrapper for @ref jack_midi_event_reserve
-+ * which writes the event data into the space reserved in the buffer.
-+ * 
-+ * @param port_buffer Buffer to write event to.
-+ * @param time Sample offset of event.
-+ * @param data Message data to be written.
-+ * @param data_size Length of @ref data in bytes.
-+ * @param nframes Number of valid frames this event.
-+ * @return 0 on success, ENOBUFS if there's not enough space in buffer for event.
-+ */
-+int jack_midi_event_write(void* port_buffer, jack_nframes_t time, jack_midi_data_t* data, size_t data_size, jack_nframes_t nframes);
-+
-+
-+
-+/* function to make dealing with running status easier. calls to write update the
-+ * running status byte stored in a port, and this function returns it. note that
-+ * when a port is initialised, last_status_byte is set to 0, which is not a valid
-+ * status byte. valid status bytes are in the range 0x80 <= valid < 0xf8 */
-+/* this function cannot be supported because it cannot be guaranteed that the
-+ * last status byte stored will be correct. it was intended that
-+ * jack_midi_write_next_event would cache the status byte from the previous write.
-+ * this assumes that users are going to alternate calls to
-+ * jack_midi_write_next_event with writing of actual data. it is a pity that this
-+ * can't be forced as it makes things more efficient. it would have be made clear
-+ * in the api doc that users must write data after calling
-+ * jack_midi_write_next_event for this function to be implementable. either that
-+ * or jack_midi_write_next_event must be removed from the api, and only
-+ * jack_midi_write_next_event2 would be supported. jack_midi_write_next_event is
-+ * heavily used in the hardware i/o client, and removing it would make the input
-+ * thread more complex and use more memory.
-+ * the other way of making this function possible to implement is to force users
-+ * to pass in the first byte of the message (which they should know, as the
-+ * message size they request depends on it). this is probably the best way to do
-+ * things as now that i think about it, the first method suggested in this
-+ * comment might result in erroneous status byte reporting as last_status_byte
-+ * updated with a delay of one message */
-+/*jack_midi_data_t jack_midi_get_last_status_byte(void* port_buffer, jack_nframes_t nframes);*/
-+
-+
-+/** return the last status byte in the stream before event n */
-+jack_midi_data_t jack_midi_get_status_before_event_n(void* port_buffer, jack_nframes_t event_index, jack_nframes_t nframes);
-+							   
-+/** Get the number of events that could not be written to @a port_buffer.
-+ *
-+ * This function returning a non-zero value implies @a port_buffer is full.
-+ * Currently the only way this can happen is if events are lost on port mixdown.
-+ *
-+ * @param port_buffer Port to receive count for.
-+ * @param nframes Number of valid frames this cycle.
-+ * @returns Number of events that could not be written to @a port_buffer.
-+ */
-+jack_nframes_t jack_midi_get_lost_event_count(void* port_buffer, jack_nframes_t nframes);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+
-+#endif /* __JACK_MIDIPORT_H */
-+
-+
-Index: jack/jack/port.h
-===================================================================
-RCS file: /cvsroot/jackit/jack/jack/port.h,v
-retrieving revision 1.20
-diff -u -r1.20 port.h
---- jack/jack/port.h	20 Feb 2004 04:31:22 -0000	1.20
-+++ jack/jack/port.h	5 Dec 2005 02:36:55 -0000
-@@ -42,6 +42,9 @@
-  */              
- #define JACK_MAX_PORT_TYPES 4
- #define JACK_AUDIO_PORT_TYPE 0
-+#define JACK_MIDI_PORT_TYPE 1
-+
-+/* these should probably go somewhere else, but not in <jack/types.h> */
- #define JACK_CLIENT_NAME_SIZE 33
- typedef uint32_t jack_client_id_t;
- 
-Index: jack/jack/types.h
-===================================================================
-RCS file: /cvsroot/jackit/jack/jack/types.h,v
-retrieving revision 1.34
-diff -u -r1.34 types.h
---- jack/jack/types.h	25 Dec 2004 18:39:44 -0000	1.34
-+++ jack/jack/types.h	5 Dec 2005 02:36:55 -0000
-@@ -170,9 +170,10 @@
- 
- /**
-  * Used for the type argument of jack_port_register() for default
-- * audio ports.
-+ * audio and midi ports.
-  */
- #define JACK_DEFAULT_AUDIO_TYPE "32 bit float mono audio"
-+#define JACK_DEFAULT_MIDI_TYPE "8 bit raw midi"
- 
- /**
-  * For convenience, use this typedef if you want to be able to change
-Index: jack/libjack/Makefile.am
-===================================================================
-RCS file: /cvsroot/jackit/jack/libjack/Makefile.am,v
-retrieving revision 1.24
-diff -u -r1.24 Makefile.am
---- jack/libjack/Makefile.am	19 Dec 2004 18:41:29 -0000	1.24
-+++ jack/libjack/Makefile.am	5 Dec 2005 02:36:55 -0000
-@@ -16,6 +16,7 @@
- 	     messagebuffer.c \
- 	     pool.c \
- 	     port.c \
-+		 midiport.c \
- 	     ringbuffer.c \
- 	     shm.c \
- 	     thread.c \
-Index: jack/libjack/midiport.c
-===================================================================
-RCS file: jack/libjack/midiport.c
-diff -N jack/libjack/midiport.c
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ jack/libjack/midiport.c	5 Dec 2005 02:36:56 -0000
-@@ -0,0 +1,313 @@
-+/*
-+    Copyright (C) 2004 Ian Esten
-+    
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU Lesser General Public License as published by
-+    the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
-+    
-+    You should have received a copy of the GNU Lesser General Public License
-+    along with this program; if not, write to the Free Software 
-+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+
-+*/
-+
-+
-+#include <jack/jack.h>
-+#include <jack/midiport.h>
-+#include <jack/port.h>
-+#include <string.h>
-+#include <errno.h>
-+
-+/* even though the new implementation with byte offsets being stored instead of
-+ * pointers, last_write_loc can't be removed as it gets used in the mixdown
-+ * function. */   
-+typedef struct _jack_midi_port_info_private
-+{
-+	jack_midi_port_info_t	info;
-+	jack_nframes_t			last_write_loc;
-+	char					last_status;		/* status byte for last event in buffer */
-+	jack_nframes_t			events_lost;		/* number of events lost in this buffer.
-+												 * mixdown is the only place that sets
-+												 * this for now */
-+} jack_midi_port_info_private_t;
-+
-+typedef struct _jack_midi_port_internal_event
-+{
-+	jack_nframes_t time;
-+	size_t size;
-+	size_t byte_offset;
-+} jack_midi_port_internal_event_t;
-+
-+
-+jack_midi_port_info_t*
-+jack_midi_port_get_info(void* port_buffer, jack_nframes_t nframes)
-+{
-+	return (jack_midi_port_info_t*)port_buffer;
-+}
-+
-+
-+int
-+jack_midi_event_get(jack_midi_event_t* event, void* port_buffer, jack_nframes_t event_idx, jack_nframes_t nframes)
-+{
-+	jack_midi_port_internal_event_t* port_event;
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	if(event_idx >= info->info.event_count)
-+		return ENODATA;
-+	port_event = (jack_midi_port_internal_event_t*)(info+1);
-+	port_event += event_idx;
-+	event->time = port_event->time;
-+	event->size = port_event->size;
-+	event->buffer = ((jack_midi_data_t*)port_buffer) + port_event->byte_offset;
-+	return 0;
-+}
-+
-+
-+jack_midi_data_t*
-+jack_midi_event_reserve(void* port_buffer, jack_nframes_t time, size_t data_size, jack_nframes_t nframes)
-+{
-+	jack_midi_data_t* retbuf = (jack_midi_data_t*)port_buffer;
-+	/* bad: below line needs to know about buffer scale factor */
-+	jack_nframes_t buffer_size = nframes*sizeof(jack_default_audio_sample_t)/sizeof(unsigned char);
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	jack_midi_port_internal_event_t* event_buffer = (jack_midi_port_internal_event_t*)(info + 1);
-+	/* check there is enough space in the buffer for the event. */
-+	if(info->last_write_loc + sizeof(jack_midi_port_info_private_t)
-+		+ (info->info.event_count + 1) * sizeof(jack_midi_port_internal_event_t)
-+		+ data_size > buffer_size)
-+		return NULL;
-+	else
-+	{
-+		info->last_write_loc += data_size;
-+		retbuf = &retbuf[buffer_size - 1 - info->last_write_loc];
-+		event_buffer[info->info.event_count].time = time;
-+		event_buffer[info->info.event_count].size = data_size;
-+		event_buffer[info->info.event_count].byte_offset = buffer_size - 1 - info->last_write_loc;
-+		info->info.event_count += 1;
-+		return retbuf;
-+	}
-+}
-+
-+
-+int
-+jack_midi_event_write(void* port_buffer, jack_nframes_t time, jack_midi_data_t* data, size_t data_size, jack_nframes_t nframes)
-+{
-+	jack_midi_data_t* retbuf = jack_midi_event_reserve(port_buffer, time, data_size, nframes);
-+	if(retbuf)
-+	{
-+		memcpy(retbuf, data, data_size);
-+		return 0;
-+	}
-+	else
-+		return ENOBUFS;
-+}
-+
-+
-+/*jack_midi_data_t jack_midi_get_last_status_byte(void* port_buffer, jack_nframes_t nframes)
-+{
-+	return ((jack_midi_port_info_private_t*)(port_buffer))->last_status;
-+}*/
-+
-+
-+jack_midi_data_t jack_midi_get_status_before_event_n(void* port_buffer, jack_nframes_t event_index, jack_nframes_t nframes)
-+{
-+	jack_midi_data_t* event_buf = (jack_midi_data_t*)port_buffer;
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	jack_midi_port_internal_event_t* event_buffer = (jack_midi_port_internal_event_t*)(info + 1);
-+	
-+	/* safeguard against unitialised ports */
-+	if(info->info.event_count * sizeof(jack_midi_port_internal_event_t) + sizeof(jack_midi_port_info_private_t)
-+	   > nframes * sizeof(jack_default_audio_sample_t))
-+		return 0;
-+	/* don't know what to do here, so we return 0 */
-+	if(event_index >= info->info.event_count)
-+		return 0;
-+	if(info->info.event_count > 0)
-+	{
-+		event_index -= 1;
-+		while( (event_index >= 0)
-+				&& (event_buf[event_buffer[event_index].byte_offset] < 0x80)
-+				&& (event_buf[event_buffer[event_index].byte_offset] > 0xf7) )
-+			event_index--;
-+		if(event_index >= 0)
-+			return event_buf[event_buffer[event_index].byte_offset];
-+	}
-+	/* all the events in the port are running status, so we return the previous buffers last
-+	 * status byte */
-+	return info->last_status;
-+}
-+
-+
-+/* this function can be got rid of now, as the above function replaces it and is more general */
-+static jack_midi_data_t get_last_status_byte(void* port_buffer, jack_nframes_t nframes)
-+{
-+	int event_index = 0;
-+	jack_midi_data_t* event_buf = (jack_midi_data_t*)port_buffer;
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	jack_midi_port_internal_event_t* event_buffer = (jack_midi_port_internal_event_t*)(info + 1);
-+	
-+	/* safeguard against unitialised ports */
-+	if(info->info.event_count * sizeof(jack_midi_port_internal_event_t) + sizeof(jack_midi_port_info_private_t)
-+	   > nframes * sizeof(jack_default_audio_sample_t))
-+		return 0;
-+	if(info->info.event_count > 0)
-+	{
-+		event_index = info->info.event_count - 1;
-+		while( (event_index >= 0)
-+				&& (event_buf[event_buffer[event_index].byte_offset] < 0x80)
-+				&& (event_buf[event_buffer[event_index].byte_offset] > 0xf7) )
-+			event_index--;
-+		if(event_index >= 0)
-+			return event_buf[event_buffer[event_index].byte_offset];
-+	}
-+	return info->last_status;
-+}
-+
-+
-+/* can't check to make sure this port is an output anymore. if this gets
-+ * called on an input port, all clients after the client that calls it
-+ * will think there are no events in the buffer as the event count has
-+ * been reset
-+ * TODO: this function must take note of system realtime messages and
-+ * skip them when updating last_status. done. */
-+void jack_midi_clear_buffer(void* port_buffer, jack_nframes_t nframes)
-+{
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	if(port_buffer == NULL)
-+	{
-+/*		fprintf(stderr, "Error: port_buffer in jack_midi_clear_buffer is NULL!\n");*/
-+		return;
-+	}
-+	/* find the last status byte in the buffer for use in the mixdown function */
-+	/* this code is dangerous when used on a freshly allocated buffer that has
-+	 * not has jack_midi_reset_new_port called on it, because the event_count
-+	 * may be some huge number... */
-+	info->last_status = get_last_status_byte(port_buffer, nframes);
-+	info->info.event_count = 0;
-+	info->last_write_loc = 0;
-+	info->events_lost = 0;
-+}
-+
-+
-+void jack_midi_reset_new_port(void* port_buffer, jack_nframes_t nframes)
-+{
-+	jack_midi_port_info_private_t* info = (jack_midi_port_info_private_t*)port_buffer;
-+	info->info.event_count = 0;
-+	info->last_write_loc = 0;
-+	info->last_status = 0;
-+	info->events_lost = 0;
-+}
-+
-+
-+void jack_midi_port_mixdown (jack_port_t *port, jack_nframes_t nframes)
-+{
-+	JSList *node;
-+	jack_port_t *input;
-+	jack_nframes_t num_events = 0, i = 0;
-+	int err = 0;
-+	/* smallest_info is for the data buffer holding the next event */
-+	jack_midi_port_info_private_t *in_info, *out_info, *smallest_info;
-+	/* smallest_event is for the event buffer holding the next event */
-+	jack_midi_port_internal_event_t *in_events, *smallest_event, *out_events;
-+	/* for assembling new events if running status is interrupted */
-+	jack_midi_data_t new_event_buf[3], *smallest_buffer;
-+	
-+	out_info = (jack_midi_port_info_private_t*)port->mix_buffer;
-+	out_events = (jack_midi_port_internal_event_t*)(out_info + 1);
-+	/* cache last status byte */
-+	out_info->last_status = get_last_status_byte(port->mix_buffer, nframes);
-+
-+	out_info->info.event_count = 0;
-+	
-+	/* initialise smallest_info to point to the first port buffer */
-+	smallest_info = (jack_midi_port_info_private_t*)jack_output_port_buffer((jack_port_t*)(port->connections->data));
-+	smallest_event = (jack_midi_port_internal_event_t*)(smallest_info + 1);
-+
-+	/* in this loop we can use last_write_loc in jack_midi_port_info_private_t
-+	 * to store indexes of the last event read from that buffer. this is ok
-+	 * because last_write_loc is used when writing events to a buffer, which
-+	 * is already complete.
-+	 */
-+	for(node = port->connections; node; node = jack_slist_next (node))
-+	{
-+		input = (jack_port_t *) node->data;
-+		in_info = (jack_midi_port_info_private_t*)jack_output_port_buffer (input);
-+		num_events += in_info->info.event_count;
-+		in_info->last_write_loc = 0;
-+		/* look to see if first event in each buffer is running status */
-+	}
-+		
-+	printf(" jack_midi_port_mixdown got %d events\n", num_events);
-+
-+	while(i<num_events)
-+	{
-+		node = port->connections;
-+		/* had something else to do here, to do with smallest_info/buf? */
-+		while(node)
-+		{
-+			in_info = (jack_midi_port_info_private_t*)jack_output_port_buffer (((jack_port_t *) node->data));
-+			in_events = (jack_midi_port_internal_event_t*)(in_info + 1);
-+			/* make sure there are events left in this port */
-+			if(in_info->info.event_count > in_info->last_write_loc)
-+			{
-+				/* (first_event_in_buffer_timestamp < smallest_timestamp_event) */
-+				if(in_events[in_info->last_write_loc].time <= smallest_event[smallest_info->last_write_loc].time)
-+				{
-+					smallest_info = in_info;
-+					smallest_event = (jack_midi_port_internal_event_t*)(&in_events[in_info->last_write_loc]);
-+					smallest_buffer = (jack_midi_data_t*)in_info;
-+				}
-+			}
-+			/* else buffer has no events remaining in it */
-+			node = jack_slist_next(node);
-+		}
-+		/* write event to output port.
-+		 * things to consider:
-+		 * if event is running status, make sure previous event in its port is of the same
-+		 * type as the last event in the output port.
-+		 */
-+		
-+		
-+		
-+		/* test to see if this event is running status, or 1 byte realtime msg */
-+		if( (smallest_buffer[smallest_event[smallest_info->last_write_loc].byte_offset] < 0x80)
-+			&& ((*new_event_buf = get_last_status_byte((void*)smallest_info, nframes))
-+				!= get_last_status_byte((void*)port->mix_buffer, nframes)) )
-+		{
-+			memcpy(new_event_buf + 1,
-+				   &smallest_buffer[smallest_event[smallest_info->last_write_loc].byte_offset],
-+				   smallest_event[smallest_info->last_write_loc].size);
-+			err = jack_midi_event_write(jack_output_port_buffer((jack_port_t*)node->data),
-+										smallest_event[smallest_info->last_write_loc].time,
-+										new_event_buf,
-+										smallest_event[smallest_info->last_write_loc].size + 1,
-+										nframes);
-+		}
-+		else
-+		{
-+			err = jack_midi_event_write(jack_output_port_buffer((jack_port_t*)node->data),
-+										smallest_event[smallest_info->last_write_loc].time,
-+										&smallest_buffer[smallest_event[smallest_info->last_write_loc].byte_offset],
-+										smallest_event[smallest_info->last_write_loc].size,
-+										nframes);
-+		}
-+		if(err < 0)
-+		{
-+			out_info->events_lost = num_events - i - 1;
-+			break;
-+		}
-+		else
-+			i++;
-+	}
-+}
-+
-+
-+jack_nframes_t jack_midi_get_lost_event_count(void* port_buffer, jack_nframes_t nframes)
-+{
-+	return ((jack_midi_port_info_private_t*)port_buffer)->events_lost;
-+}
-Index: jack/libjack/port.c
-===================================================================
-RCS file: /cvsroot/jackit/jack/libjack/port.c,v
-retrieving revision 1.19
-diff -u -r1.19 port.c
---- jack/libjack/port.c	4 Sep 2005 19:50:57 -0000	1.19
-+++ jack/libjack/port.c	5 Dec 2005 02:36:56 -0000
-@@ -31,6 +31,7 @@
- #include <jack/engine.h>
- #include <jack/pool.h>
- #include <jack/port.h>
-+#include <jack/midiport.h>
- #include <jack/jslist.h>
- #include <jack/intsimd.h>
- 
-@@ -39,6 +40,9 @@
- static void    jack_audio_port_mixdown (jack_port_t *port,
- 					jack_nframes_t nframes);
- 
-+extern void jack_midi_port_mixdown (jack_port_t *port,
-+ 					jack_nframes_t nframes);
-+ 
- /* These function pointers are local to each address space.  For
-  * internal clients they reside within jackd; for external clients in
-  * the application process. */
-@@ -46,15 +50,22 @@
- 	.mixdown = jack_audio_port_mixdown, 
- };
- 
-+jack_port_functions_t jack_builtin_midi_functions = {
-+	.mixdown = jack_midi_port_mixdown, 
-+};
-+
- jack_port_functions_t jack_builtin_NULL_functions = {
- 	.mixdown = NULL, 
- };
- 
--/* Only the Audio port type is currently built in. */
-+/* Only the Audio and MIDI port types are currently built in. */
- jack_port_type_info_t jack_builtin_port_types[] = {
- 	{ .type_name = JACK_DEFAULT_AUDIO_TYPE, 
- 	  .buffer_scale_factor = 1,
- 	},
-+	{ .type_name = JACK_DEFAULT_MIDI_TYPE, 
-+	  .buffer_scale_factor = 1,
-+	},
- 	{ .type_name = "", }
- };
- 
-@@ -336,6 +347,11 @@
- 			port->fptr = jack_builtin_audio_functions;
- 			port->shared->has_mixdown = TRUE;
- 
-+		} else if (ptid == JACK_MIDI_PORT_TYPE) {
-+
-+			port->fptr = jack_builtin_midi_functions;
-+			port->shared->has_mixdown = TRUE;
-+
- 		} else {	/* no other builtin functions */
- 
- 			port->fptr = jack_builtin_NULL_functions;
-@@ -719,7 +735,7 @@
- 				* nframes);
- 	}
- 	port->fptr.mixdown (port, nframes);
--	return (jack_default_audio_sample_t *) port->mix_buffer;
-+	return (void *) port->mix_buffer;
- }
- 
- int
-@@ -949,3 +965,8 @@
- #endif /* ARCH_X86 */
- 	}
- }
-+
-+
-+
-+
-+

Modified: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-0.116.1.ebuild
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-0.116.1.ebuild	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-0.116.1.ebuild	2008-12-09 19:54:30 UTC (rev 1383)
@@ -33,7 +33,8 @@
 		if kernel_is 2 4 ; then
 			einfo "will build jackstart for 2.4 kernel"
 		else
-			einfo "using compatibility symlink for jackstart"
+			ewarn "USE=\"caps\" is unneded on Linux 2.6 kernels"
+			einfo "Anyways, compiling it and using compatibility symlink for jackstart"
 		fi
 	fi
 }

Modified: trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-9999.ebuild
===================================================================
--- trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-9999.ebuild	2008-12-08 17:08:42 UTC (rev 1382)
+++ trunk/overlays/proaudio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-9999.ebuild	2008-12-09 19:54:30 UTC (rev 1383)
@@ -4,35 +4,36 @@
 
 inherit flag-o-matic eutils multilib subversion linux-info autotools unipatch-001
 
-NETJACK="netjack-0.12"
 #JACKDBUS="jackdbus-patches-0.12.tar.bz2"
 
 RESTRICT="nostrip nomirror"
 DESCRIPTION="A low-latency audio server"
 HOMEPAGE="http://www.jackaudio.org";
-SRC_URI="!jackdmp? ( 
-			netjack? ( mirror://sourceforge/netjack/${NETJACK}.tar.bz2 )
-		)"
-		#	dbus? ( http://download.tuxfamily.org/proaudio/distfiles/${JACKDBUS} )
 
+#SRC_URI="!jackdmp? ( 
+#			dbus? ( http://download.tuxfamily.org/proaudio/distfiles/${JACKDBUS} )
+#		)"
+
 ESVN_REPO_URI="http://subversion.jackaudio.org/jack/trunk/jack";
 
 LICENSE="GPL-2 LGPL-2.1"
 SLOT="0"
 KEYWORDS=""
-IUSE="3dnow altivec alsa caps coreaudio cpudetection doc debug jack-tmpfs
+IUSE="3dnow altivec alsa caps celt coreaudio cpudetection doc debug jack-tmpfs
 mmx oss portaudio sse netjack freebob ieee1394 jackdmp"
 
 RDEPEND="!jackdmp? ( 
 	>=media-libs/libsndfile-1.0.0
 	sys-libs/ncurses
 	caps? ( sys-libs/libcap )
+	celt? ( >=media-libs/celt-0.5.0 )
 	portaudio? ( =media-libs/portaudio-18* )
 	alsa? ( >=media-libs/alsa-lib-0.9.1 )
     dbus? ( sys-apps/dbus
 		dev-python/dbus-python )
 	freebob? ( sys-libs/libfreebob !media-libs/libffado )
-	ieee1394? ( =media-libs/libffado-9999 !sys-libs/libfreebob )
+	ieee1394? ( media-libs/libffado !sys-libs/libfreebob )
+	netjack? ( media-libs/libsamplerate )
 	!media-sound/jackdmp )"
 
 DEPEND="${RDEPEND}
@@ -55,13 +56,10 @@
 		if kernel_is 2 4 ; then
 			einfo "will build jackstart for 2.4 kernel"
 		else
-			einfo "using compatibility symlink for jackstart"
+			ewarn "USE=\"caps\" is unneded on Linux 2.6 kernels!"
+			einfo "Anyways, compiling it and using compatibility symlink for jackstart"
 		fi
 	fi
-
-	if use netjack; then
-		einfo "including support for experimental netjack, see http://netjack.sourceforge.net/";
-	fi
 }
 
 src_unpack() {
@@ -69,12 +67,9 @@
 		einfo "You requested to install jackdmp. Nothing to do"
 		return # no more to do
 	fi
-	use netjack && unpack ${A}
 	subversion_src_unpack
 
 	cd "${S}"
-	# jack transport patch from Torben Hohn
-	epatch "${FILESDIR}/jack-transport-start-at-zero-fix.diff"
 	
 	# dbus patches from Nedko Arnaudov
 	#if use dbus; then
@@ -82,7 +77,6 @@
 	#	unipatch
 	#fi
 
-	sed -i -e "s:include/nptl/:include/:g" configure.ac || die
 	eautoreconf
 }
 
@@ -92,12 +86,8 @@
 		return # no more to do
 	fi
 
-	local myconf
+	local myconf="--with-html-dir=/usr/share/doc/${PF}"
 
-	sed -i "s/^CFLAGS=\$JACK_CFLAGS/CFLAGS=\"\$JACK_CFLAGS $(get-flag -march)\"/" configure
-
-	use doc && myconf="--with-html-dir=/usr/share/doc/${PF}"
-
 	if use jack-tmpfs; then
 		myconf="${myconf} --with-default-tmpdir=/dev/shm"
 	else
@@ -156,12 +146,6 @@
 		cd "${S}"/jackd
 		emake jackstart || die "jackstart build failed."
 	fi
-
-	if use netjack; then
-		cd "${WORKDIR}/${NETJACK}"
-		scons jack_source_dir="${S}"
-	fi
-
 }
 
 src_install() {
@@ -197,13 +181,4 @@
 	fi
 
 	rm -rf ${D}/usr/share/doc/${PF}/reference
-
-	if use netjack; then
-		cd "${WORKDIR}/${NETJACK}"
-		dobin alsa_in
-		dobin alsa_out
-		dobin jacknet_client
-		insinto /usr/$(get_libdir)/jack
-		doins jack_net.so
-	fi
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/