/hg/icedtea: 5 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Fri May 28 09:48:19 PDT 2010
changeset d12fd1d4a26e in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=d12fd1d4a26e
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 28 17:16:40 2010 +0100
Provide a single rule to build all PulseAudio object files without
explicit source file names.
2010-02-24 Andrew John Hughes <ahughes at redhat.com>
* pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Pul
seAudioStreamVolumeControl.c: Removed, never built and no
corresponding Java source file.
* Makefile.am: (PULSE_JAVA_NATIVE_SRCS): List of PulseAudio
source files. (PULSE_JAVA_NATIVE_OBJECTS): List of
PulseAudio object files. (PULSE_JAVA_TARGET):
Optional PulseAudio target. (icedtea.stamp): Replace
explicit pulse-java.stamp with PULSE_JAVA_TARGET.
(icedtea-debug.stamp): Likewise. (pulse-java.stamp): Depend
on compiled library rather than headers target.
($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): New target to compile
object files from source files using make substitution.
($(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so): New target
to build the shared library. (pulse-java-jar.stamp): Make
ENABLE_PULSE_JAVA conditional encompass all PulseAudio
targets. (pulse-java-class.stamp): Likewise. (pulse-
java-headers.stamp): Likewise, and remove unneeded BOOT_DIR
conditional (pulse-java-class.stamp now depends on the
appropriate bootstrap target). (pulse-java-native-
code.stamp): Removed.
changeset a389f4a8658c in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a389f4a8658c
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 28 17:22:46 2010 +0100
Refer to libpulse-java.so with full path to native build directory.
2010-02-24 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am: (icedtea.stamp): Prefix libpulse-
java.so with build directory path. (icedtea-
debug.stamp): Likewise. (clean-pulse-java): No need to
delete libpulse-java.so as no longer at top-level.
changeset cc07055da3e2 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=cc07055da3e2
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 28 17:26:04 2010 +0100
Make sure PulseAudio headers are picked up by adding
-I$(PULSE_JAVA_NATIVE_BUILDDIR)
2010-02-24 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am: Add missing pulse-java alias and
reorganise existing aliases alphabetically.
($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): Add include directive
for build directory to pick up generated headers.
changeset a0d045c13c13 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a0d045c13c13
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 28 17:29:01 2010 +0100
Use full path to jar application when rewriting Rhino files.
2010-02-24 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am: (rewrite-rhino.stamp): Use full path
to jar application to avoid relying on the one on
the path.
changeset 0b38b757f001 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=0b38b757f001
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 28 17:48:11 2010 +0100
Join Rhino class creation to jar creation with &&.
2010-05-28 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am: (rewrite-rhino.stamp): Join class
building to jar creation with &&.
diffstat:
3 files changed, 98 insertions(+), 120 deletions(-)
ChangeLog | 59 ++++++
Makefile.am | 92 ++++------
pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 67 -------
diffs (328 lines):
diff -r 44d5f7a1a79b -r 0b38b757f001 ChangeLog
--- a/ChangeLog Tue Feb 23 17:36:57 2010 +0000
+++ b/ChangeLog Fri May 28 17:48:11 2010 +0100
@@ -1,3 +1,62 @@ 2010-02-23 Gary Benson <gbenson at redhat
+2010-05-28 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ (rewrite-rhino.stamp): Join class building
+ to jar creation with &&.
+
+2010-02-24 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ (rewrite-rhino.stamp): Use full path to
+ jar application to avoid relying on the one
+ on the path.
+
+2010-02-24 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ Add missing pulse-java alias and reorganise
+ existing aliases alphabetically.
+ ($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): Add include
+ directive for build directory to pick up generated
+ headers.
+
+2010-02-24 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ (icedtea.stamp): Prefix libpulse-java.so with
+ build directory path.
+ (icedtea-debug.stamp): Likewise.
+ (clean-pulse-java): No need to delete libpulse-java.so
+ as no longer at top-level.
+
+2010-02-24 Andrew John Hughes <ahughes at redhat.com>
+
+ * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c:
+ Removed, never built and no corresponding
+ Java source file.
+ * Makefile.am:
+ (PULSE_JAVA_NATIVE_SRCS): List of PulseAudio source
+ files.
+ (PULSE_JAVA_NATIVE_OBJECTS): List of PulseAudio object
+ files.
+ (PULSE_JAVA_TARGET): Optional PulseAudio target.
+ (icedtea.stamp): Replace explicit pulse-java.stamp
+ with PULSE_JAVA_TARGET.
+ (icedtea-debug.stamp): Likewise.
+ (pulse-java.stamp): Depend on compiled library rather than
+ headers target.
+ ($(PULSE_JAVA_NATIVE_BUILDDIR)/%.o): New target to compile
+ object files from source files using make substitution.
+ ($(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so): New target
+ to build the shared library.
+ (pulse-java-jar.stamp): Make ENABLE_PULSE_JAVA conditional
+ encompass all PulseAudio targets.
+ (pulse-java-class.stamp): Likewise.
+ (pulse-java-headers.stamp): Likewise, and remove unneeded
+ BOOT_DIR conditional (pulse-java-class.stamp now depends on
+ the appropriate bootstrap target).
+ (pulse-java-native-code.stamp): Removed.
+
2010-02-23 Gary Benson <gbenson at redhat.com>
* ports/hotspot/make/linux/makefiles/shark.make: Whitespace fixes.
diff -r 44d5f7a1a79b -r 0b38b757f001 Makefile.am
--- a/Makefile.am Tue Feb 23 17:36:57 2010 +0000
+++ b/Makefile.am Fri May 28 17:48:11 2010 +0100
@@ -205,16 +205,14 @@ if ENABLE_PULSE_JAVA
# include the makefile in pulseaudio subdir
PULSE_JAVA_DIR = $(abs_top_srcdir)/pulseaudio
PULSE_JAVA_NATIVE_SRCDIR = $(PULSE_JAVA_DIR)/src/native
+PULSE_JAVA_NATIVE_SRCS = $(wildcard $(PULSE_JAVA_NATIVE_SRCDIR)/*.c)
PULSE_JAVA_BUILDDIR = $(abs_top_builddir)/pulseaudio
PULSE_JAVA_NATIVE_BUILDDIR = $(PULSE_JAVA_BUILDDIR)/native
+PULSE_JAVA_NATIVE_OBJECTS = \
+ $(subst $(PULSE_JAVA_NATIVE_SRCDIR),$(PULSE_JAVA_NATIVE_BUILDDIR),$(patsubst %.c,%.o,$(PULSE_JAVA_NATIVE_SRCS)))
PULSE_JAVA_JAVA_SRCDIR = $(PULSE_JAVA_DIR)/src/java
PULSE_JAVA_CLASS_DIR = $(PULSE_JAVA_BUILDDIR)/classes
-else
-PULSE_JAVA_DIR =
-PULSE_JAVA_NATIVE_SRCDIR =
-PULSE_JAVA_NATIVE_BUILDDIR =
-PULSE_JAVA_JAVA_SRCDIR =
-PULSE_JAVA_CLASS_DIR =
+PULSE_JAVA_TARGET = stamps/pulse-java.stamp
endif
# This should not depend on bootstrapping
@@ -1794,7 +1792,7 @@ stamps/icedtea.stamp: stamps/bootstrap-d
stamps/icedtea.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
stamps/download.stamp stamps/extract.stamp $(OPENJDK_TREE) \
stamps/plugin.stamp $(JNLP_ABOUT_TARGET) stamps/cacao.stamp \
- stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp \
+ stamps/netx-dist.stamp stamps/liveconnect-dist.stamp $(PULSE_JAVA_TARGET) \
stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1818,9 +1816,9 @@ endif
endif
endif
if ENABLE_PULSE_JAVA
- cp -pPRf libpulse-java.so \
+ cp -pPRf $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so \
$(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR)
- cp -pPRf libpulse-java.so \
+ cp -pPRf $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so \
$(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR)
cp -pPRf pulse-java.jar \
$(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext
@@ -1878,7 +1876,7 @@ stamps/icedtea-debug.stamp: stamps/boots
stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
stamps/download.stamp stamps/extract.stamp $(OPENJDK_TREE) \
stamps/plugin.stamp $(JNLP_ABOUT_TARGET) stamps/cacao.stamp \
- stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp \
+ stamps/netx-dist.stamp stamps/liveconnect-dist.stamp $(PULSE_JAVA_TARGET) \
stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1902,9 +1900,9 @@ endif
endif
endif
if ENABLE_PULSE_JAVA
- cp -pPRf libpulse-java.so \
+ cp -pPRf $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so \
$(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR)
- cp -pPRf libpulse-java.so \
+ cp -pPRf $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so \
$(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR)
cp -pPRf pulse-java.jar \
$(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext
@@ -2213,72 +2211,59 @@ extra-lib/about.jar: stamps/extra-class-
# PulseAudio based mixer
# (pulse-java)
+if ENABLE_PULSE_JAVA
-stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-native-code.stamp
+stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so
mkdir -p stamps
touch $@
stamps/pulse-java-class.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP)
-if ENABLE_PULSE_JAVA
mkdir -p $(PULSE_JAVA_CLASS_DIR)
(cd $(PULSE_JAVA_JAVA_SRCDIR); \
- $(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) -d $(PULSE_JAVA_CLASS_DIR)\
+ $(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) -d $(PULSE_JAVA_CLASS_DIR) \
-bootclasspath '$(ICEDTEA_BOOT_DIR)/jre/lib/rt.jar' \
org/classpath/icedtea/pulseaudio/*.java\
)
cp -r $(PULSE_JAVA_JAVA_SRCDIR)/META-INF $(PULSE_JAVA_CLASS_DIR)
chmod -R ug+w $(PULSE_JAVA_CLASS_DIR)/META-INF
-endif
mkdir -p stamps
touch $@
stamps/pulse-java-jar.stamp: stamps/pulse-java-class.stamp
-if ENABLE_PULSE_JAVA
- mkdir -p $(PULSE_JAVA_CLASS_DIR);
$(ICEDTEA_BOOT_DIR)/bin/jar cf pulse-java.jar -C $(PULSE_JAVA_CLASS_DIR) .;
-endif
mkdir -p stamps
touch $@
stamps/pulse-java-headers.stamp: stamps/pulse-java-class.stamp
-if ENABLE_PULSE_JAVA
- if ! test -d $(ICEDTEA_BOOT_DIR) ; \
- then \
- $(JAVAH) -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.EventLoop ; \
- $(JAVAH) -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Stream ; \
- $(JAVAH) -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Operation; \
- $(JAVAH) -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \
- $(JAVAH) -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \
- else \
- $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.EventLoop ; \
- $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Stream ; \
- $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Operation; \
- $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \
- $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \
- fi
-endif
+ mkdir -p $(PULSE_JAVA_NATIVE_BUILDDIR)
+ $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) \
+ org.classpath.icedtea.pulseaudio.EventLoop ;
+ $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) \
+ org.classpath.icedtea.pulseaudio.Stream
+ $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) \
+ org.classpath.icedtea.pulseaudio.Operation
+ $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) \
+ org.classpath.icedtea.pulseaudio.PulseAudioSourcePort
+ $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_BUILDDIR) -classpath $(PULSE_JAVA_CLASS_DIR) \
+ org.classpath.icedtea.pulseaudio.PulseAudioTargetPort
mkdir -p stamps
touch $@
-stamps/pulse-java-native-code.stamp: stamps/pulse-java-headers.stamp
-if ENABLE_PULSE_JAVA
- mkdir -p $(PULSE_JAVA_NATIVE_BUILDDIR)
- $(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c -o $(PULSE_JAVA_NATIVE_BUILDDIR)/jni-common.o
- $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(PULSE_JAVA_NATIVE_BUILDDIR) $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c -o $(PULSE_JAVA_NATIVE_BUILDDIR)/org_classpath_icedtea_pulseaudio_EventLoop.o
- $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(PULSE_JAVA_NATIVE_BUILDDIR) $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c -o $(PULSE_JAVA_NATIVE_BUILDDIR)/org_classpath_icedtea_pulseaudio_Operation.o
- $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(PULSE_JAVA_NATIVE_BUILDDIR) $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c -o $(PULSE_JAVA_NATIVE_BUILDDIR)/org_classpath_icedtea_pulseaudio_Stream.o
- $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(PULSE_JAVA_NATIVE_BUILDDIR) $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c -o $(PULSE_JAVA_NATIVE_BUILDDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o
- $(CC) $(LDFLAGS) -shared $(PULSE_JAVA_NATIVE_BUILDDIR)/org_*pulseaudio*.o $(PULSE_JAVA_NATIVE_BUILDDIR)/jni-common.o $(LIBPULSE_LIBS) -o libpulse-java.so
+$(PULSE_JAVA_NATIVE_BUILDDIR)/%.o: $(PULSE_JAVA_NATIVE_SRCDIR)/%.c stamps/pulse-java-headers.stamp
+ $(CC) $(CFLAGS) -fPIC -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include \
+ -I$(PULSE_JAVA_NATIVE_BUILDDIR) -o $@ -c $<
+
+$(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so: $(PULSE_JAVA_NATIVE_OBJECTS)
+ $(CC) $(LDFLAGS) -shared $(PULSE_JAVA_NATIVE_OBJECTS) $(LIBPULSE_LIBS) \
+ -o $(PULSE_JAVA_NATIVE_BUILDDIR)/libpulse-java.so
+
endif
- mkdir -p stamps
- touch $@
clean-pulse-java:
if ENABLE_PULSE_JAVA
[ -z "$(PULSE_JAVA_NATIVE_BUILDDIR)" ] || rm -rf $(PULSE_JAVA_NATIVE_BUILDDIR)
[ -z "$(PULSE_JAVA_CLASS_DIR)" ] || rm -rf $(PULSE_JAVA_CLASS_DIR)
rm -f pulse-java.jar
- rm -f libpulse-java.so
if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \
rmdir $(abs_top_builddir)/pulseaudio ; \
fi
@@ -2315,8 +2300,9 @@ if WITH_RHINO
cp -v $$files $$new_file ; \
sed -ie 's#org\.mozilla#sun.org.mozilla#g' $$new_file ; \
done \
- )
- (cd rhino/rhino.new && jar cfm ../rhino.jar META-INF/MANIFEST.MF sun )
+ ) && \
+ (cd rhino/rhino.new && \
+ $(ICEDTEA_BOOT_DIR)/bin/jar cfm ../rhino.jar META-INF/MANIFEST.MF sun )
endif
mkdir -p stamps
touch stamps/rewrite-rhino.stamp
@@ -2839,13 +2825,13 @@ plugin: stamps/plugin.stamp
plugin-tests: stamps/plugin-tests.stamp
+plugs: stamps/plugs.stamp
+
+pulse-java: $(PULSE_JAVA_TARGET)
+
rewriter: stamps/rewriter.stamp
rewrite-rhino: stamps/rewrite-rhino.stamp
-
-plugs: stamps/plugs.stamp
-
-pulse-java: stamps/pulse-java.stamp
rt: stamps/rt.stamp
diff -r 44d5f7a1a79b -r 0b38b757f001 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c Tue Feb 23 17:36:57 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/* org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c
- Copyright (C) 2008 Red Hat, Inc.
-
- This file is part of IcedTea.
-
- IcedTea is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as published by
- the Free Software Foundation, version 2.
-
- IcedTea 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 IcedTea; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA.
-
- Linking this library statically or dynamically with other modules is
- making a combined work based on this library. Thus, the terms and
- conditions of the GNU General Public License cover the whole
- combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent
- modules, and to copy and distribute the resulting executable under
- terms of your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of that
- module. An independent module is a module which is not derived from
- or based on this library. If you modify this library, you may extend
- this exception to your version of the library, but you are not
- obligated to do so. If you do not wish to do so, delete this
- exception statement from your version.
- */
-
-#include <jni.h>
-#include <pulse/pulseaudio.h>
-
-#include "jni-common.h"
-#include "org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.h"
-
-
-extern JNIEnv* pulse_thread_env;
-
-static void set_sink_input_volume_callback(pa_context* context, int success,
- void* userdata) {
-
- JNIEnv* env = pulse_thread_env;
-
- notifyWaitingOperations(env);
-
-}
-
-JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl_native_1setValue
-(JNIEnv *env, jobject obj, jfloat new_volume) {
- // printf("IN NATIVE SET VOLUME\n");
- pa_stream *stream = getJavaPointer(env, obj, "streamPointer");
- // printf("STREAM POINTER %d", (int) stream);
- pa_context *context = pa_stream_get_context(stream);
- int stream_id = pa_stream_get_index(stream);
- int channels = pa_stream_get_sample_spec(stream)->channels;
- pa_cvolume cv;
- return (jint) pa_context_set_sink_input_volume(context, stream_id, pa_cvolume_set(&cv, channels, new_volume), set_sink_input_volume_callback, NULL);
-}
-
More information about the distro-pkg-dev
mailing list