|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
BASSMIDI 2.4 Java class
|
|
|
- Copyright (c) 2006-2020 Un4seen Developments Ltd.
|
|
|
+ Copyright (c) 2006-2022 Un4seen Developments Ltd.
|
|
|
|
|
|
See the BASSMIDI.CHM file for more detailed documentation
|
|
|
*/
|
|
@@ -9,7 +9,7 @@ package com.un4seen.bass;
|
|
|
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
|
|
-@SuppressWarnings({"JniMissingFunction", "unused"})
|
|
|
+@SuppressWarnings({"all"})
|
|
|
public class BASSMIDI
|
|
|
{
|
|
|
// Additional error codes returned by BASS_ErrorGetCode
|
|
@@ -22,10 +22,11 @@ public class BASSMIDI
|
|
|
public static final int BASS_CONFIG_MIDI_SAMPLETHREADS = 0x10406;
|
|
|
public static final int BASS_CONFIG_MIDI_SAMPLEMEM = 0x10407;
|
|
|
public static final int BASS_CONFIG_MIDI_SAMPLEREAD = 0x10408;
|
|
|
+ public static final int BASS_CONFIG_MIDI_SAMPLELOADING = 0x1040a;
|
|
|
|
|
|
// Additional BASS_SetConfigPtr options
|
|
|
public static final int BASS_CONFIG_MIDI_DEFFONT = 0x10403;
|
|
|
- public static final int BASS_CONFIG_MIDI_SFZHEAD = 0x10408;
|
|
|
+ public static final int BASS_CONFIG_MIDI_SFZHEAD = 0x10409;
|
|
|
|
|
|
// Additional sync types
|
|
|
public static final int BASS_SYNC_MIDI_MARK = 0x10000;
|
|
@@ -33,12 +34,14 @@ public class BASSMIDI
|
|
|
public static final int BASS_SYNC_MIDI_TICK = 0x10005;
|
|
|
|
|
|
// Additional BASS_MIDI_StreamCreateFile/etc flags
|
|
|
+ public static final int BASS_MIDI_NODRUMPARAM = 0x400;
|
|
|
public static final int BASS_MIDI_NOSYSRESET = 0x800;
|
|
|
public static final int BASS_MIDI_DECAYEND = 0x1000;
|
|
|
public static final int BASS_MIDI_NOFX = 0x2000;
|
|
|
public static final int BASS_MIDI_DECAYSEEK = 0x4000;
|
|
|
public static final int BASS_MIDI_NOCROP = 0x8000;
|
|
|
public static final int BASS_MIDI_NOTEOFF1 = 0x10000;
|
|
|
+ public static final int BASS_MIDI_ASYNC = 0x400000;
|
|
|
public static final int BASS_MIDI_SINCINTER = 0x800000;
|
|
|
|
|
|
// BASS_MIDI_FontInit flags
|
|
@@ -49,6 +52,7 @@ public class BASSMIDI
|
|
|
public static final int BASS_MIDI_FONT_LINDECVOL = 0x200000;
|
|
|
public static final int BASS_MIDI_FONT_NORAMPIN = 0x400000;
|
|
|
public static final int BASS_MIDI_FONT_NOLIMITS = 0x800000;
|
|
|
+ public static final int BASS_MIDI_FONT_MINFX = 0x1000000;
|
|
|
|
|
|
public static class BASS_MIDI_FONT {
|
|
|
public int font; // soundfont
|
|
@@ -65,8 +69,20 @@ public class BASSMIDI
|
|
|
public int dbanklsb; // destination bank number LSB
|
|
|
}
|
|
|
|
|
|
+ public static class BASS_MIDI_FONTEX2 {
|
|
|
+ public int font; // soundfont
|
|
|
+ public int spreset; // source preset number
|
|
|
+ public int sbank; // source bank number
|
|
|
+ public int dpreset; // destination preset/program number
|
|
|
+ public int dbank; // destination bank number
|
|
|
+ public int dbanklsb; // destination bank number LSB
|
|
|
+ public int minchan; // minimum channel number
|
|
|
+ public int numchan; // number of channels from minchan
|
|
|
+ }
|
|
|
+
|
|
|
// BASS_MIDI_StreamSet/GetFonts flag
|
|
|
- public static final int BASS_MIDI_FONT_EX = 0x1000000; // BASS_MIDI_FONTEX (auto-detected)
|
|
|
+ public static final int BASS_MIDI_FONT_EX = 0x1000000; // BASS_MIDI_FONTEX (auto-detected)
|
|
|
+ public static final int BASS_MIDI_FONT_EX2 = 0x2000000; // BASS_MIDI_FONTEX2 (auto-detected)
|
|
|
|
|
|
public static class BASS_MIDI_FONTINFO {
|
|
|
public String name;
|
|
@@ -90,7 +106,6 @@ public class BASSMIDI
|
|
|
public byte[] text; // marker text
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// Marker types
|
|
|
public static final int BASS_MIDI_MARK_MARKER = 0; // marker
|
|
|
public static final int BASS_MIDI_MARK_CUE = 1; // cue point
|
|
@@ -184,10 +199,13 @@ public class BASSMIDI
|
|
|
public static final int MIDI_EVENT_VIBRATO_RATE = 80;
|
|
|
public static final int MIDI_EVENT_VIBRATO_DEPTH = 81;
|
|
|
public static final int MIDI_EVENT_VIBRATO_DELAY = 82;
|
|
|
+ public static final int MIDI_EVENT_MASTER_FINETUNE = 83;
|
|
|
+ public static final int MIDI_EVENT_MASTER_COARSETUNE = 84;
|
|
|
public static final int MIDI_EVENT_MIXLEVEL = 0x10000;
|
|
|
public static final int MIDI_EVENT_TRANSPOSE = 0x10001;
|
|
|
public static final int MIDI_EVENT_SYSTEMEX = 0x10002;
|
|
|
public static final int MIDI_EVENT_SPEED = 0x10004;
|
|
|
+ public static final int MIDI_EVENT_DEFDRUMS = 0x10006;
|
|
|
|
|
|
public static final int MIDI_EVENT_END = 0;
|
|
|
public static final int MIDI_EVENT_END_TRACK = 0x10003;
|
|
@@ -217,6 +235,9 @@ public class BASSMIDI
|
|
|
public static final int BASS_MIDI_EVENTS_CANCEL = 0x4000000; // flag: cancel pending events
|
|
|
public static final int BASS_MIDI_EVENTS_TIME = 0x8000000; // flag: delta-time info is present
|
|
|
public static final int BASS_MIDI_EVENTS_ABSTIME = 0x10000000; // flag: absolute time info is present
|
|
|
+ public static final int BASS_MIDI_EVENTS_ASYNC = 0x20000000; // flag: process asynchronously
|
|
|
+ public static final int BASS_MIDI_EVENTS_FILTER = 0x40000000; // flag: apply filtering
|
|
|
+ public static final int BASS_MIDI_EVENTS_FLUSH = 0x80000000; // flag: flush async events
|
|
|
|
|
|
// BASS_MIDI_StreamGetChannel special channels
|
|
|
public static final int BASS_MIDI_CHAN_CHORUS = -1;
|
|
@@ -270,6 +291,8 @@ public class BASSMIDI
|
|
|
public int flags;
|
|
|
}
|
|
|
|
|
|
+ public static native int BASS_MIDI_GetVersion();
|
|
|
+
|
|
|
public static native int BASS_MIDI_StreamCreate(int channels, int flags, int freq);
|
|
|
public static native int BASS_MIDI_StreamCreateFile(String file, long offset, long length, int flags, int freq);
|
|
|
public static native int BASS_MIDI_StreamCreateFile(ByteBuffer file, long offset, long length, int flags, int freq);
|
|
@@ -282,8 +305,10 @@ public class BASSMIDI
|
|
|
public static native int BASS_MIDI_StreamGetMarks(int handle, int track, int type, BASS_MIDI_MARKB[] marks);
|
|
|
public static native boolean BASS_MIDI_StreamSetFonts(int handle, BASS_MIDI_FONT[] fonts, int count);
|
|
|
public static native boolean BASS_MIDI_StreamSetFonts(int handle, BASS_MIDI_FONTEX[] fonts, int count);
|
|
|
+ public static native boolean BASS_MIDI_StreamSetFonts(int handle, BASS_MIDI_FONTEX2[] fonts, int count);
|
|
|
public static native int BASS_MIDI_StreamGetFonts(int handle, BASS_MIDI_FONT[] fonts, int count);
|
|
|
public static native int BASS_MIDI_StreamGetFonts(int handle, BASS_MIDI_FONTEX[] fonts, int count);
|
|
|
+ public static native int BASS_MIDI_StreamGetFonts(int handle, BASS_MIDI_FONTEX2[] fonts, int count);
|
|
|
public static native boolean BASS_MIDI_StreamLoadSamples(int handle);
|
|
|
public static native boolean BASS_MIDI_StreamEvent(int handle, int chan, int event, int param);
|
|
|
public static native int BASS_MIDI_StreamEvents(int handle, int mode, BASS_MIDI_EVENT[] events, int length);
|
|
@@ -308,12 +333,13 @@ public class BASSMIDI
|
|
|
public static native boolean BASS_MIDI_FontUnload(int handle, int preset, int bank);
|
|
|
public static native boolean BASS_MIDI_FontCompact(int handle);
|
|
|
public static native boolean BASS_MIDI_FontUnpack(int handle, String outfile, int flags);
|
|
|
+ public static native int BASS_MIDI_FontFlags(int handle, int flags, int mask);
|
|
|
public static native boolean BASS_MIDI_FontSetVolume(int handle, float volume);
|
|
|
public static native float BASS_MIDI_FontGetVolume(int handle);
|
|
|
|
|
|
public static native int BASS_MIDI_ConvertEvents(ByteBuffer data, int length, BASS_MIDI_EVENT[] events, int count, int flags);
|
|
|
|
|
|
- static {
|
|
|
- System.loadLibrary("bassmidi");
|
|
|
- }
|
|
|
+ static {
|
|
|
+ System.loadLibrary("bassmidi");
|
|
|
+ }
|
|
|
}
|