[kaffe] CVS kaffe (dalibor): Resynced with Tritonus.org

Kaffe CVS cvs-commits at kaffe.org
Sat Jan 10 14:56:02 PST 2004


PatchSet 4314 
Date: 2004/01/10 22:20:55
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with Tritonus.org

2004-01-10  Dalibor Topic <robilad at kaffe.org>

        Resynced with Tritonus.org.

        Reported by: Matthias Pfisterer <Matthias.Pfisterer at web.de>

        2004-01-05 12:18  pfisterer

        * src/lib/alsa/: org_tritonus_lowlevel_alsa_AlsaPcm.c,
          org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c,
          org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c: adapted to ALSA 1.0
          API

        2003-12-17 10:03  pfisterer

        * src/javax/sound/sampled/LineEvent.java: made serialVersionUID
          compatible to Sun JDK 1.4

        2004-01-05 12:14  pfisterer

        * src/org/tritonus/midi/device/alsa/AlsaSequencer.java: added
          comment

        2004-01-05 12:13  pfisterer

        *
          src/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:
          added documentation

        2004-01-08 15:48  pfisterer

        * src/org/tritonus/share/midi/TMidiDevice.java: added comment

        2004-01-05 12:09  pfisterer

        * src/org/tritonus/share/midi/: TPreloadingSequencer.java,
          TSequencer.java: attempt to clearify ple-loading behaviour

        2004-01-05 12:12  pfisterer

        * src/org/tritonus/share/sampled/FloatSampleBuffer.java: fixed
          documentation

        2004-01-05 12:07  pfisterer

        * src/org/tritonus/share/sampled/convert/:
          TAsynchronousFilteredAudioInputStream.java,
          TAudioInputStream.java,
          TSynchronousFilteredAudioInputStream.java: implemented properties

        2004-01-05 12:03  pfisterer

        * src/org/tritonus/share/sampled/file/TAudioFileFormat.java:
          implemented properties

Members: 
	ChangeLog:1.1901->1.1902 
	libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c:1.1->1.2 
	libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c:1.2->1.3 
	libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c:1.2->1.3 
	libraries/javalib/javax/sound/sampled/LineEvent.java:1.3->1.4 
	libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java:1.2->1.3 
	libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:1.1->1.2 
	libraries/javalib/org/tritonus/share/midi/TMidiDevice.java:1.1->1.2 
	libraries/javalib/org/tritonus/share/midi/TSequencer.java:1.4->1.5 
	libraries/javalib/org/tritonus/share/sampled/FloatSampleBuffer.java:1.2->1.3 
	libraries/javalib/org/tritonus/share/sampled/convert/TAsynchronousFilteredAudioInputStream.java:1.3->1.4 
	libraries/javalib/org/tritonus/share/sampled/convert/TSynchronousFilteredAudioInputStream.java:1.1->1.2 
	libraries/javalib/org/tritonus/share/sampled/file/TAudioFileFormat.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1901 kaffe/ChangeLog:1.1902
--- kaffe/ChangeLog:1.1901	Sat Jan 10 20:44:39 2004
+++ kaffe/ChangeLog	Sat Jan 10 22:20:55 2004
@@ -1,4 +1,60 @@
+2004-01-10  Dalibor Topic <robilad at kaffe.org>
+
+        Resynced with Tritonus.org.
+
+	Reported by: Matthias Pfisterer <Matthias.Pfisterer at web.de>
+
+	2004-01-05 12:18  pfisterer
+
+        * src/lib/alsa/: org_tritonus_lowlevel_alsa_AlsaPcm.c,
+          org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c,
+          org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c: adapted to ALSA 1.0
+          API
+
+	2003-12-17 10:03  pfisterer
+
+        * src/javax/sound/sampled/LineEvent.java: made serialVersionUID
+          compatible to Sun JDK 1.4
+
+	2004-01-05 12:14  pfisterer
+
+        * src/org/tritonus/midi/device/alsa/AlsaSequencer.java: added
+          comment
+
+	2004-01-05 12:13  pfisterer
+
+        *
+          src/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:
+          added documentation
+
+	2004-01-08 15:48  pfisterer
+
+        * src/org/tritonus/share/midi/TMidiDevice.java: added comment
+
+	2004-01-05 12:09  pfisterer
+
+        * src/org/tritonus/share/midi/: TPreloadingSequencer.java,
+          TSequencer.java: attempt to clearify ple-loading behaviour
+
+	2004-01-05 12:12  pfisterer
+
+        * src/org/tritonus/share/sampled/FloatSampleBuffer.java: fixed
+          documentation
+
+	2004-01-05 12:07  pfisterer
+
+        * src/org/tritonus/share/sampled/convert/:
+          TAsynchronousFilteredAudioInputStream.java,
+          TAudioInputStream.java,
+          TSynchronousFilteredAudioInputStream.java: implemented properties
+
+	2004-01-05 12:03  pfisterer
+
+        * src/org/tritonus/share/sampled/file/TAudioFileFormat.java:
+          implemented properties
+
 2004-01-10  Milos Negovanovic <milosn at xtra.co.nz>
+
 	* kaffe/scripts/kaffe.in:
 	Add support for cgdb(vi based curses frontend for gdb).
 
Index: kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c
diff -u kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c:1.1 kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c:1.2
--- kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c:1.1	Mon Jan  6 17:14:29 2003
+++ kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcm.c	Sat Jan 10 22:20:57 2004
@@ -26,7 +26,7 @@
 #include "org_tritonus_lowlevel_alsa_AlsaPcm.h"
 
 
-// referring to methods in ..AlsaPcm_*.cc
+// referring to methods in ..AlsaPcm_*.c
 snd_pcm_hw_params_t*
 getHWParamsNativeHandle(JNIEnv *env, jobject obj);
 snd_pcm_format_mask_t*
@@ -235,7 +235,8 @@
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsRateNear(): begin\n"); }
 	handle = getHandle(env, obj);
 	hwParams = getHWParamsNativeHandle(env, objHwParams);
-	nReturn = snd_pcm_hw_params_set_rate_near(handle, hwParams, nRate, 0);
+	nReturn = snd_pcm_hw_params_set_rate_near(handle, hwParams,
+											  (unsigned int*)&nRate, 0);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsRateNear(): end\n"); }
 	return nReturn;
 }
@@ -258,7 +259,8 @@
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsBufferTimeNear(): begin\n"); }
 	handle = getHandle(env, obj);
 	hwParams = getHWParamsNativeHandle(env, objHwParams);
-	nReturn = snd_pcm_hw_params_set_buffer_time_near(handle, hwParams, nBufferTime, 0);
+	nReturn = snd_pcm_hw_params_set_buffer_time_near(handle, hwParams,
+													 (unsigned int*) &nBufferTime, 0);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsBufferTimeNear(): end\n"); }
 	return nReturn;
 }
@@ -281,7 +283,8 @@
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsPeriodTimeNear(): begin\n"); }
 	handle = getHandle(env, obj);
 	hwParams = getHWParamsNativeHandle(env, objHwParams);
-	nReturn = snd_pcm_hw_params_set_period_time_near(handle, hwParams, nPeriodTime, 0);
+	nReturn = snd_pcm_hw_params_set_period_time_near(handle, hwParams,
+													 (unsigned int*) &nPeriodTime, 0);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcm_setHWParamsPeriodTimeNear(): end\n"); }
 	return nReturn;
 }
Index: kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c
diff -u kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c:1.2 kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c:1.3
--- kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c:1.2	Tue Dec  9 16:17:25 2003
+++ kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmHWParams.c	Sat Jan 10 22:20:57 2004
@@ -20,11 +20,6 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-/* The following is needed for ALSA 1.x and doesn't have any effect on
- * ALSA 0.9.x
- */
-#define ALSA_PCM_OLD_HW_PARAMS_API 1
-
 #include "org_tritonus_lowlevel_alsa_AlsaPcmHWParams.h"
 #include "common.h"
 
@@ -179,13 +174,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_access_t		access;
+	int						nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getAccess(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_access(handle);
+	nReturn = snd_pcm_hw_params_get_access(handle, &access);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getAccess(): end\n"); }
-	return nReturn;
+	return access;
 }
 
 
@@ -200,13 +196,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_format_t	nValue;
+	int					nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getFormat(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_format(handle);
+	nReturn = snd_pcm_hw_params_get_format(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getFormat(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -241,13 +238,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_subformat_t	nValue;
+	int					nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getSubformat(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_subformat(handle);
+	nReturn = snd_pcm_hw_params_get_subformat(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getSubformat(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -262,13 +260,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	unsigned int	nValue;
+	int				nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannels(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_channels(handle);
+	nReturn = snd_pcm_hw_params_get_channels(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannels(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -283,13 +282,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	unsigned int	nValue;
+	int				nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannelsMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_channels_min(handle);
+	nReturn = snd_pcm_hw_params_get_channels_min(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannelsMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -304,13 +304,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
+	unsigned int	nValue;
+	int				nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannelsMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_channels_max(handle);
+	nReturn = snd_pcm_hw_params_get_channels_max(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getChannelsMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -325,15 +326,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRate(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_rate(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_rate(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRate(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 /*
@@ -346,15 +348,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRateMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_rate_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_rate_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRateMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -369,15 +372,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRateMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_rate_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_rate_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getRateMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -392,15 +396,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTime(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_time(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_time(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTime(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -416,14 +421,15 @@
 {
 	snd_pcm_hw_params_t*	handle;
 	int			nReturn;
+	unsigned int	nValue;
 	int			nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTimeMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_time_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_time_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTimeMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -438,15 +444,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTimeMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_time_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_time_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodTimeMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -461,15 +468,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int					nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSize(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_size(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_size(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSize(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -484,15 +492,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int					nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSizeMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_size_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_size_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSizeMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -507,15 +516,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int					nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSizeMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_period_size_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_period_size_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodSizeMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -530,15 +540,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriods(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_periods(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_periods(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriods(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -553,15 +564,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodsMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_periods_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_periods_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodsMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -576,15 +588,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodsMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_periods_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_periods_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getPeriodsMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -599,15 +612,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTime(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_time(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_buffer_time(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTime(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -622,15 +636,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTimeMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_time_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_buffer_time_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTimeMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -645,15 +660,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTimeMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_time_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_buffer_time_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferTimeMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -668,13 +684,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
+	snd_pcm_uframes_t		nValue;
 	int			nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSize(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_size(handle);
+	nReturn = snd_pcm_hw_params_get_buffer_size(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSize(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -689,13 +706,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
+	snd_pcm_uframes_t		nValue;
 	int			nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSizeMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_size_min(handle);
+	nReturn = snd_pcm_hw_params_get_buffer_size_min(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSizeMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -710,13 +728,14 @@
 (JNIEnv* env, jobject obj)
 {
 	snd_pcm_hw_params_t*	handle;
+	snd_pcm_uframes_t		nValue;
 	int			nReturn;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSizeMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_buffer_size_max(handle);
+	nReturn = snd_pcm_hw_params_get_buffer_size_max(handle, &nValue);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getBufferSizeMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -731,15 +750,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTime(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_tick_time(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_tick_time(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTime(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -754,15 +774,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTimeMin(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_tick_time_min(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_tick_time_min(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTimeMin(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
@@ -777,15 +798,16 @@
 (JNIEnv* env, jobject obj, jintArray anDirection)
 {
 	snd_pcm_hw_params_t*	handle;
-	int			nReturn;
-	int			nDirection;
+	int				nReturn;
+	unsigned int	nValue;
+	int				nDirection;
 
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTimeMax(): begin\n"); }
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_hw_params_get_tick_time_max(handle, &nDirection);
+	nReturn = snd_pcm_hw_params_get_tick_time_max(handle, &nValue, &nDirection);
 	setDirection(env, nDirection, anDirection);
 	if (debug_flag) { fprintf(debug_file, "Java_org_tritonus_lowlevel_alsa_AlsaPcmHWParams_getTickTimeMax(): end\n"); }
-	return nReturn;
+	return nValue;
 }
 
 
Index: kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c
diff -u kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c:1.2 kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c:1.3
--- kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c:1.2	Tue Dec  9 16:17:26 2003
+++ kaffe/libraries/extensions/sound/alsa/org_tritonus_lowlevel_alsa_AlsaPcmSWParams.c	Sat Jan 10 22:20:57 2004
@@ -20,11 +20,6 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-/* The following is required on ALSA 1.0.x and doesn't have any effect
- * on ALSA 0.9.x
- */
-#define ALSA_PCM_OLD_SW_PARAMS_API 1
-
 #include "common.h"
 #include "org_tritonus_lowlevel_alsa_AlsaPcmSWParams.h"
 
@@ -130,11 +125,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_tstamp_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_tstamp_mode(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_tstamp_mode(handle, &nValue);
+	return nValue;
 }
 
 
@@ -149,11 +145,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
+	unsigned int	nValue;
 	int			nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_sleep_min(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_sleep_min(handle, &nValue);
+	return nValue;
 }
 
 
@@ -168,11 +165,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_avail_min(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_avail_min(handle, &nValue);
+	return nValue;
 }
 
 
@@ -187,11 +185,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_xfer_align(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_xfer_align(handle, &nValue);
+	return nValue;
 }
 
 
@@ -207,11 +206,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_start_threshold(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_start_threshold(handle, &nValue);
+	return nValue;
 }
 
 
@@ -226,11 +226,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_stop_threshold(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_stop_threshold(handle, &nValue);
+	return nValue;
 }
 
 
@@ -244,11 +245,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_silence_threshold(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_silence_threshold(handle, &nValue);
+	return nValue;
 }
 
 
@@ -263,11 +265,12 @@
 (JNIEnv *env, jobject obj)
 {
 	snd_pcm_sw_params_t*	handle;
-	int			nReturn;
+	snd_pcm_uframes_t	nValue;
+	int					nReturn;
 
 	handle = getHandle(env, obj);
-	nReturn = snd_pcm_sw_params_get_silence_size(handle);
-	return nReturn;
+	nReturn = snd_pcm_sw_params_get_silence_size(handle, &nValue);
+	return nValue;
 }
 
 
Index: kaffe/libraries/javalib/javax/sound/sampled/LineEvent.java
diff -u kaffe/libraries/javalib/javax/sound/sampled/LineEvent.java:1.3 kaffe/libraries/javalib/javax/sound/sampled/LineEvent.java:1.4
--- kaffe/libraries/javalib/javax/sound/sampled/LineEvent.java:1.3	Sun Jan 12 19:56:24 2003
+++ kaffe/libraries/javalib/javax/sound/sampled/LineEvent.java	Sat Jan 10 22:20:57 2004
@@ -25,15 +25,15 @@
 
 package	javax.sound.sampled;
 
-import	java.io.Serializable;
-import	java.util.EventObject;
+import java.util.EventObject;
 
 
 
 public class LineEvent
-	extends	EventObject
-// implements	Serializable
+extends EventObject
 {
+	static final long serialVersionUID = -1274246333383880410L;
+
 	private Type	m_type;
 	private long	m_lPosition;
 
Index: kaffe/libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java
diff -u kaffe/libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java:1.2 kaffe/libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java:1.3
--- kaffe/libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java:1.2	Wed Dec  3 12:17:55 2003
+++ kaffe/libraries/javalib/org/tritonus/midi/device/alsa/AlsaSequencer.java	Sat Jan 10 22:20:57 2004
@@ -54,7 +54,8 @@
 
 
 public class AlsaSequencer
-	extends		TSequencer
+// TODO: derive from TPreloadingSequencer
+extends TSequencer
 {
 	/**	The syncronization modes the sequencer can sync to.
 	 */
Index: kaffe/libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java
diff -u kaffe/libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:1.1 kaffe/libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:1.2
--- kaffe/libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java:1.1	Mon Jan  6 17:14:35 2003
+++ kaffe/libraries/javalib/org/tritonus/sampled/convert/SmartFormatConversionProvider.java	Sat Jan 10 22:20:58 2004
@@ -37,6 +37,29 @@
 import	org.tritonus.share.sampled.convert.TFormatConversionProvider;
 
 
+// Name suggested by Florian: MetaFormatConversionProvider
+/* Additinal explanation:
+> Ich hab mal kurz in den SmartConverter reingeguckt, warum machst Du das mit den
+> Threads ? In Rekursion wird doch nicht ein neuer Thread benutzt ? Und sonst
+> koennte man das doch mit synchronized bzw. einem echten lock machen ?
+
+Bei der Rekursion bezu"glich der selben Konvertersuche befindet man sich
+im gleichen Thread; diese Eigenschaft nutze ich ja gerade aus. Es kann
+aber das Anwendungsprogramm von mehreren Threads aus gleichzeitig einen
+Konverter anfordern. Diese Aufrufe gehen alle in das gleiche SmartF.C.P.
+Objekt (es gibt nur eins). Die Methoden des Konverters (das gilt fu"r
+alle) mu"ssen also reentrant sein. Die Alternative wa"re ein globaler
+Lock. Das halte ich aber fu"r nicht akzeptabel. Bei meiner Soundmachine
+zum Beispiel wu"rde das zu Problemen fu"hren: da ist es no"tig, da? beim
+Abspielen mehrere Kana"le on the fly konvertiert wird. Ein globaler Lock
+wu"rde zu Verzo"gerungen im Abspielen fu"hren. Die "einfache" Variante der
+Rekursionserkennung (ohne Beru"cksichtigung von Threads) braucht nur ein
+einfaches Flag, das gesetzt wird, wenn keine Rekursion mehr stattfinden
+soll. Dieses Flag wird bei meiner Implementierung mit der Hashtabelle
+realisiert; sie simuliert ein thread-lokales Verhalten dieses Flags.
+Alles klar? Ich seh' ein, man braucht zwei Knoten im Hirn, um das zu
+verstehen...
+*/
 
 /**	"Smart" formatConversionProvider.
  *	This FormatConversionProvider tries to find combinations of other
Index: kaffe/libraries/javalib/org/tritonus/share/midi/TMidiDevice.java
diff -u kaffe/libraries/javalib/org/tritonus/share/midi/TMidiDevice.java:1.1 kaffe/libraries/javalib/org/tritonus/share/midi/TMidiDevice.java:1.2
--- kaffe/libraries/javalib/org/tritonus/share/midi/TMidiDevice.java:1.1	Mon Jan  6 17:14:37 2003
+++ kaffe/libraries/javalib/org/tritonus/share/midi/TMidiDevice.java	Sat Jan 10 22:20:58 2004
@@ -56,6 +56,7 @@
 	 */
 	private boolean			m_bOpen;
 
+	// TODO: rename to UseReceiver/UseTransmitter
 	/**	Whether to handle input from the physical port
 		and to allow Transmitters.
 	 */
Index: kaffe/libraries/javalib/org/tritonus/share/midi/TSequencer.java
diff -u kaffe/libraries/javalib/org/tritonus/share/midi/TSequencer.java:1.4 kaffe/libraries/javalib/org/tritonus/share/midi/TSequencer.java:1.5
--- kaffe/libraries/javalib/org/tritonus/share/midi/TSequencer.java:1.4	Wed Dec  3 12:17:58 2003
+++ kaffe/libraries/javalib/org/tritonus/share/midi/TSequencer.java	Sat Jan 10 22:20:58 2004
@@ -222,7 +222,7 @@
 		{@link javax.sound.midi.Sequencer#startRecording startRecording}
 		and {@link javax.sound.midi.Sequencer#stop stopRecording}.
 
-		@throw IllegalStateException if the <code>Sequencer</code> is not open
+		@throws IllegalStateException if the <code>Sequencer</code> is not open
 	 */
 	protected void checkOpen()
 	{
@@ -796,6 +796,29 @@
 	protected boolean isTrackEnabled(int nTrack)
 	{
 		return m_enabledBitSet.get(nTrack);
+	}
+
+
+
+	/** Sets the preloading intervall.
+		This is the time span between preloading events to an internal
+		queue and playing them. This intervall should be kept constant
+		by the implementation. However, this cannot be guaranteed.
+	*/
+	public void setLatency(int nMilliseconds)
+	{
+	}
+
+
+
+	/** Get the preloading intervall.
+
+	@return the preloading intervall in milliseconds, or -1 if the sequencer
+	doesn't repond to changes in the <code>Sequence</code> at all.
+	*/

*** Patch too long, truncated ***




More information about the kaffe mailing list