Skip to content
Snippets Groups Projects
Commit ae1dea05 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Add NativeAudioWin Plugin

parent d8de771c
No related branches found
No related tags found
No related merge requests found
Showing
with 456 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Plugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/YML"/>
<classpathentry kind="lib" path="j4n/jni4net.j-0.8.8.0.jar"/>
<classpathentry kind="lib" path="j4n/NativeAudio.j4n.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/PlayWallCore"/>
<classpathentry combineaccessrules="false" kind="src" path="/libUtils"/>
<classpathentry combineaccessrules="false" kind="src" path="/Updater"/>
<classpathentry kind="output" path="bin"/>
</classpath>
/bin/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PlayWallNativeWin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
File added
File added
File added
File added
<?xml version="1.0" encoding="utf-8"?>
<jni4net-proxygen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jni4net.sf.net/0.8.8.0/toolConfig.xsd">
<TargetDirJvm>.\jvm</TargetDirJvm>
<TargetDirClr>.\clr</TargetDirClr>
<AssemblyReference Assembly="NativeAudio.dll" Generate="true" />
</jni4net-proxygen>
\ No newline at end of file
@echo off
if not exist target mkdir target
if not exist target\classes mkdir target\classes
echo compile classes
javac -nowarn -d target\classes -sourcepath jvm -cp "d:\programmieren\git-java\playwall\playwallnativewin\j4n\jni4net-0.8.8.0-bin\lib\jni4net.j-0.8.8.0.jar"; "jvm\nativeaudio\LoopStream.java" "jvm\nativeaudio\NativeAudio.java"
IF %ERRORLEVEL% NEQ 0 goto end
echo NativeAudio.j4n.jar
jar cvf NativeAudio.j4n.jar -C target\classes "nativeaudio\LoopStream.class" -C target\classes "nativeaudio\NativeAudio.class" > nul
IF %ERRORLEVEL% NEQ 0 goto end
echo NativeAudio.j4n.dll
csc /nologo /warn:0 /t:library /out:NativeAudio.j4n.dll /recurse:clr\*.cs /reference:"D:\Programmieren\Git-Java\PlayWall\PlayWallNativeWin\j4n\NativeAudio.dll" /reference:"D:\Programmieren\Git-Java\PlayWall\PlayWallNativeWin\j4n\jni4net-0.8.8.0-bin\lib\jni4net.n-0.8.8.0.dll"
IF %ERRORLEVEL% NEQ 0 goto end
:end
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NativeAudio {
#region Component Designer generated code
public partial class LoopStream_ {
public static global::java.lang.Class _class {
get {
return global::NativeAudio.@__LoopStream.staticClass;
}
}
}
#endregion
#region Component Designer generated code
[global::net.sf.jni4net.attributes.JavaProxyAttribute(typeof(global::NativeAudio.LoopStream), typeof(global::NativeAudio.LoopStream_))]
[global::net.sf.jni4net.attributes.ClrWrapperAttribute(typeof(global::NativeAudio.LoopStream), typeof(global::NativeAudio.LoopStream_))]
internal sealed partial class @__LoopStream : global::java.lang.Object {
internal new static global::java.lang.Class staticClass;
private @__LoopStream(global::net.sf.jni4net.jni.JNIEnv @__env) :
base(@__env) {
}
private static void InitJNI(global::net.sf.jni4net.jni.JNIEnv @__env, java.lang.Class @__class) {
global::NativeAudio.@__LoopStream.staticClass = @__class;
}
private static global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> @__Init(global::net.sf.jni4net.jni.JNIEnv @__env, global::java.lang.Class @__class) {
global::System.Type @__type = typeof(__LoopStream);
global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> methods = new global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod>();
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "getEnableLooping", "EnableLooping0", "()Z"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "setEnableLooping", "EnableLooping1", "(Z)V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "__ctorLoopStream0", "__ctorLoopStream0", "(Lnet/sf/jni4net/inj/IClrProxy;Lsystem/io/Stream;)V"));
return methods;
}
private static bool EnableLooping0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()Z
// ()Z
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
bool @__return = default(bool);
try {
global::NativeAudio.LoopStream @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.LoopStream>(@__env, @__obj);
@__return = ((bool)(@__real.EnableLooping));
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
return @__return;
}
private static void EnableLooping1(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, bool value) {
// (Z)V
// (Z)V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.LoopStream @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.LoopStream>(@__env, @__obj);
@__real.EnableLooping = value;
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void @__ctorLoopStream0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__class, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle sourceStream) {
// (Lsystem/io/Stream;)V
// (LNAudio/Wave/WaveStream;)V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.LoopStream @__real = new global::NativeAudio.LoopStream(global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NAudio.Wave.WaveStream>(@__env, sourceStream));
global::net.sf.jni4net.utils.Convertor.InitProxy(@__env, @__obj, @__real);
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
new internal sealed class ContructionHelper : global::net.sf.jni4net.utils.IConstructionHelper {
public global::net.sf.jni4net.jni.IJvmProxy CreateProxy(global::net.sf.jni4net.jni.JNIEnv @__env) {
return new global::NativeAudio.@__LoopStream(@__env);
}
}
}
#endregion
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NativeAudio {
#region Component Designer generated code
public partial class NativeAudio_ {
public static global::java.lang.Class _class {
get {
return global::NativeAudio.@__NativeAudio.staticClass;
}
}
}
#endregion
#region Component Designer generated code
[global::net.sf.jni4net.attributes.JavaProxyAttribute(typeof(global::NativeAudio.NativeAudio), typeof(global::NativeAudio.NativeAudio_))]
[global::net.sf.jni4net.attributes.ClrWrapperAttribute(typeof(global::NativeAudio.NativeAudio), typeof(global::NativeAudio.NativeAudio_))]
internal sealed partial class @__NativeAudio : global::java.lang.Object {
internal new static global::java.lang.Class staticClass;
private @__NativeAudio(global::net.sf.jni4net.jni.JNIEnv @__env) :
base(@__env) {
}
private static void InitJNI(global::net.sf.jni4net.jni.JNIEnv @__env, java.lang.Class @__class) {
global::NativeAudio.@__NativeAudio.staticClass = @__class;
}
private static global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> @__Init(global::net.sf.jni4net.jni.JNIEnv @__env, global::java.lang.Class @__class) {
global::System.Type @__type = typeof(__NativeAudio);
global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> methods = new global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod>();
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "load", "load0", "(Ljava/lang/String;)Z"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "play", "play1", "()V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "pause", "pause2", "()V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "stop", "stop3", "()V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "getDuration", "getDuration4", "()D"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "getPosition", "getPosition5", "()D"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "isPlaying", "isPlaying6", "()Z"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "setVolume", "setVolume7", "(F)V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "setLoop", "setLoop8", "(Z)V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "unload", "unload9", "()V"));
methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "__ctorNativeAudio0", "__ctorNativeAudio0", "(Lnet/sf/jni4net/inj/IClrProxy;)V"));
return methods;
}
private static bool load0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle path) {
// (Ljava/lang/String;)Z
// (LSystem/String;)Z
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
bool @__return = default(bool);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__return = ((bool)(@__real.load(global::net.sf.jni4net.utils.Convertor.StrongJ2CString(@__env, path))));
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
return @__return;
}
private static void play1(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()V
// ()V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.play();
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void pause2(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()V
// ()V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.pause();
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void stop3(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()V
// ()V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.stop();
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static double getDuration4(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()D
// ()D
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
double @__return = default(double);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__return = ((double)(@__real.getDuration()));
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
return @__return;
}
private static double getPosition5(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()D
// ()D
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
double @__return = default(double);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__return = ((double)(@__real.getPosition()));
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
return @__return;
}
private static bool isPlaying6(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()Z
// ()Z
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
bool @__return = default(bool);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__return = ((bool)(@__real.isPlaying()));
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
return @__return;
}
private static void setVolume7(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, float volume) {
// (F)V
// (F)V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.setVolume(volume);
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void setLoop8(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, bool loop) {
// (Z)V
// (Z)V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.setLoop(loop);
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void unload9(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()V
// ()V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = global::net.sf.jni4net.utils.Convertor.StrongJp2C<global::NativeAudio.NativeAudio>(@__env, @__obj);
@__real.unload();
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
private static void @__ctorNativeAudio0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__class, global::net.sf.jni4net.utils.JniLocalHandle @__obj) {
// ()V
// ()V
global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp);
try {
global::NativeAudio.NativeAudio @__real = new global::NativeAudio.NativeAudio();
global::net.sf.jni4net.utils.Convertor.InitProxy(@__env, @__obj, @__real);
}catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);}
}
new internal sealed class ContructionHelper : global::net.sf.jni4net.utils.IConstructionHelper {
public global::net.sf.jni4net.jni.IJvmProxy CreateProxy(global::net.sf.jni4net.jni.JNIEnv @__env) {
return new global::NativeAudio.@__NativeAudio(@__env);
}
}
}
#endregion
}
proxygen.exe NativeAudio.dll -wd .
\ No newline at end of file
File added
File added
File added
File added
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package nativeaudio;
@net.sf.jni4net.attributes.ClrType
public class LoopStream extends system.io.Stream {
//<generated-proxy>
private static system.Type staticType;
protected LoopStream(net.sf.jni4net.inj.INJEnv __env, long __handle) {
super(__env, __handle);
}
@net.sf.jni4net.attributes.ClrConstructor("(LNAudio/Wave/WaveStream;)V")
public LoopStream(system.io.Stream sourceStream) {
super(((net.sf.jni4net.inj.INJEnv)(null)), 0);
nativeaudio.LoopStream.__ctorLoopStream0(this, sourceStream);
}
@net.sf.jni4net.attributes.ClrMethod("(Lsystem/io/Stream;)V")
private native static void __ctorLoopStream0(net.sf.jni4net.inj.IClrProxy thiz, system.io.Stream sourceStream);
@net.sf.jni4net.attributes.ClrMethod("()Z")
public native boolean getEnableLooping();
@net.sf.jni4net.attributes.ClrMethod("(Z)V")
public native void setEnableLooping(boolean value);
public static system.Type typeof() {
return nativeaudio.LoopStream.staticType;
}
private static void InitJNI(net.sf.jni4net.inj.INJEnv env, system.Type staticType) {
nativeaudio.LoopStream.staticType = staticType;
}
//</generated-proxy>
}
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by jni4net. See http://jni4net.sourceforge.net/
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
package nativeaudio;
@net.sf.jni4net.attributes.ClrType
public class NativeAudio extends system.Object {
//<generated-proxy>
private static system.Type staticType;
protected NativeAudio(net.sf.jni4net.inj.INJEnv __env, long __handle) {
super(__env, __handle);
}
@net.sf.jni4net.attributes.ClrConstructor("()V")
public NativeAudio() {
super(((net.sf.jni4net.inj.INJEnv)(null)), 0);
nativeaudio.NativeAudio.__ctorNativeAudio0(this);
}
@net.sf.jni4net.attributes.ClrMethod("()V")
private native static void __ctorNativeAudio0(net.sf.jni4net.inj.IClrProxy thiz);
@net.sf.jni4net.attributes.ClrMethod("(LSystem/String;)Z")
public native boolean load(java.lang.String path);
@net.sf.jni4net.attributes.ClrMethod("()V")
public native void play();
@net.sf.jni4net.attributes.ClrMethod("()V")
public native void pause();
@net.sf.jni4net.attributes.ClrMethod("()V")
public native void stop();
@net.sf.jni4net.attributes.ClrMethod("()D")
public native double getDuration();
@net.sf.jni4net.attributes.ClrMethod("()D")
public native double getPosition();
@net.sf.jni4net.attributes.ClrMethod("()Z")
public native boolean isPlaying();
@net.sf.jni4net.attributes.ClrMethod("(F)V")
public native void setVolume(float volume);
@net.sf.jni4net.attributes.ClrMethod("(Z)V")
public native void setLoop(boolean loop);
@net.sf.jni4net.attributes.ClrMethod("()V")
public native void unload();
public static system.Type typeof() {
return nativeaudio.NativeAudio.staticType;
}
private static void InitJNI(net.sf.jni4net.inj.INJEnv env, system.Type staticType) {
nativeaudio.NativeAudio.staticType = staticType;
}
//</generated-proxy>
}
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment