MIDI: Update BASS, BASSMIDI, BASSFLAC, and BASSOpus
parent
ea853109ed
commit
6b1d4e7350
|
@ -19,7 +19,9 @@ typedef uint8_t BYTE;
|
|||
typedef uint16_t WORD;
|
||||
typedef uint32_t DWORD;
|
||||
typedef uint64_t QWORD;
|
||||
#ifndef __OBJC__
|
||||
#ifdef __OBJC__
|
||||
#include <objc/objc.h>
|
||||
#else
|
||||
typedef int BOOL;
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
|
@ -70,6 +72,7 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_ERROR_START 9 // BASS_Start has not been successfully called
|
||||
#define BASS_ERROR_SSL 10 // SSL/HTTPS support isn't available
|
||||
#define BASS_ERROR_ALREADY 14 // already initialized/paused/whatever
|
||||
#define BASS_ERROR_NOTAUDIO 17 // file does not contain audio
|
||||
#define BASS_ERROR_NOCHAN 18 // can't get a free channel
|
||||
#define BASS_ERROR_ILLTYPE 19 // an illegal type was specified
|
||||
#define BASS_ERROR_ILLPARAM 20 // an illegal parameter was specified
|
||||
|
@ -94,6 +97,7 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_ERROR_CODEC 44 // codec is not available/supported
|
||||
#define BASS_ERROR_ENDED 45 // the channel/file has ended
|
||||
#define BASS_ERROR_BUSY 46 // the device is busy
|
||||
#define BASS_ERROR_UNSTREAMABLE 47 // unstreamable file
|
||||
#define BASS_ERROR_UNKNOWN -1 // some other mystery problem
|
||||
|
||||
// BASS_SetConfig options
|
||||
|
@ -119,6 +123,7 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_CONFIG_DEV_BUFFER 27
|
||||
#define BASS_CONFIG_REC_LOOPBACK 28
|
||||
#define BASS_CONFIG_VISTA_TRUEPOS 30
|
||||
#define BASS_CONFIG_IOS_SESSION 34
|
||||
#define BASS_CONFIG_IOS_MIXAUDIO 34
|
||||
#define BASS_CONFIG_DEV_DEFAULT 36
|
||||
#define BASS_CONFIG_NET_READTIMEOUT 37
|
||||
|
@ -142,8 +147,10 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_CONFIG_AM_DISABLE 58
|
||||
#define BASS_CONFIG_NET_PLAYLIST_DEPTH 59
|
||||
#define BASS_CONFIG_NET_PREBUF_WAIT 60
|
||||
#define BASS_CONFIG_ANDROID_SESSIONID 62
|
||||
#define BASS_CONFIG_WASAPI_PERSIST 65
|
||||
#define BASS_CONFIG_REC_WASAPI 66
|
||||
#define BASS_CONFIG_ANDROID_AAUDIO 67
|
||||
|
||||
// BASS_SetConfigPtr options
|
||||
#define BASS_CONFIG_NET_AGENT 16
|
||||
|
@ -151,6 +158,13 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_CONFIG_IOS_NOTIFY 46
|
||||
#define BASS_CONFIG_LIBSSL 64
|
||||
|
||||
// BASS_CONFIG_IOS_SESSION flags
|
||||
#define BASS_IOS_SESSION_MIX 1
|
||||
#define BASS_IOS_SESSION_DUCK 2
|
||||
#define BASS_IOS_SESSION_AMBIENT 4
|
||||
#define BASS_IOS_SESSION_SPEAKER 8
|
||||
#define BASS_IOS_SESSION_DISABLE 16
|
||||
|
||||
// BASS_Init flags
|
||||
#define BASS_DEVICE_8BITS 1 // 8 bit
|
||||
#define BASS_DEVICE_MONO 2 // mono
|
||||
|
@ -376,6 +390,7 @@ typedef struct {
|
|||
#define BASS_CTYPE_SAMPLE 1
|
||||
#define BASS_CTYPE_RECORD 2
|
||||
#define BASS_CTYPE_STREAM 0x10000
|
||||
#define BASS_CTYPE_STREAM_VORBIS 0x10002
|
||||
#define BASS_CTYPE_STREAM_OGG 0x10002
|
||||
#define BASS_CTYPE_STREAM_MP1 0x10003
|
||||
#define BASS_CTYPE_STREAM_MP2 0x10004
|
||||
|
@ -497,8 +512,7 @@ enum
|
|||
#define EAX_PRESET_PSYCHOTIC EAX_ENVIRONMENT_PSYCHOTIC,0.486F,7.563F,0.806F
|
||||
|
||||
typedef DWORD (CALLBACK STREAMPROC)(HSTREAM handle, void *buffer, DWORD length, void *user);
|
||||
/* User stream callback function. NOTE: A stream function should obviously be as quick
|
||||
as possible, other streams (and MOD musics) can't be mixed until it's finished.
|
||||
/* User stream callback function.
|
||||
handle : The stream that needs writing
|
||||
buffer : Buffer to write the samples in
|
||||
length : Number of bytes to write
|
||||
|
@ -568,23 +582,19 @@ user : The 'user' parameter value given when calling BASS_StreamCreateURL */
|
|||
#define BASS_SYNC_OGG_CHANGE 12
|
||||
#define BASS_SYNC_DEV_FAIL 14
|
||||
#define BASS_SYNC_DEV_FORMAT 15
|
||||
#define BASS_SYNC_THREAD 0x20000000 // flag: call sync in other thread
|
||||
#define BASS_SYNC_MIXTIME 0x40000000 // flag: sync at mixtime, else at playtime
|
||||
#define BASS_SYNC_ONETIME 0x80000000 // flag: sync only once, else continuously
|
||||
|
||||
typedef void (CALLBACK SYNCPROC)(HSYNC handle, DWORD channel, DWORD data, void *user);
|
||||
/* Sync callback function. NOTE: a sync callback function should be very
|
||||
quick as other syncs can't be processed until it has finished. If the sync
|
||||
is a "mixtime" sync, then other streams and MOD musics can't be mixed until
|
||||
it's finished either.
|
||||
/* Sync callback function.
|
||||
handle : The sync that has occured
|
||||
channel: Channel that the sync occured in
|
||||
data : Additional data associated with the sync's occurance
|
||||
user : The 'user' parameter given when calling BASS_ChannelSetSync */
|
||||
|
||||
typedef void (CALLBACK DSPPROC)(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user);
|
||||
/* DSP callback function. NOTE: A DSP function should obviously be as quick as
|
||||
possible... other DSP functions, streams and MOD musics can not be processed
|
||||
until it's finished.
|
||||
/* DSP callback function.
|
||||
handle : The DSP handle
|
||||
channel: Channel that the DSP is being applied to
|
||||
buffer : Buffer to apply the DSP to
|
||||
|
@ -620,6 +630,7 @@ RETURN : TRUE = continue recording, FALSE = stop */
|
|||
#define BASS_ATTRIB_NORAMP 11
|
||||
#define BASS_ATTRIB_BITRATE 12
|
||||
#define BASS_ATTRIB_BUFFER 13
|
||||
#define BASS_ATTRIB_GRANULE 14
|
||||
#define BASS_ATTRIB_MUSIC_AMPLIFY 0x100
|
||||
#define BASS_ATTRIB_MUSIC_PANSEP 0x101
|
||||
#define BASS_ATTRIB_MUSIC_PSCALER 0x102
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
BASSMIDI 2.4 C/C++ header file
|
||||
Copyright (c) 2006-2018 Un4seen Developments Ltd.
|
||||
Copyright (c) 2006-2020 Un4seen Developments Ltd.
|
||||
|
||||
See the BASSMIDI.CHM file for more detailed documentation
|
||||
*/
|
||||
|
@ -32,9 +32,13 @@ typedef DWORD HSOUNDFONT; // soundfont handle
|
|||
#define BASS_CONFIG_MIDI_VOICES 0x10401
|
||||
#define BASS_CONFIG_MIDI_AUTOFONT 0x10402
|
||||
#define BASS_CONFIG_MIDI_IN_PORTS 0x10404
|
||||
#define BASS_CONFIG_MIDI_SAMPLETHREADS 0x10406
|
||||
#define BASS_CONFIG_MIDI_SAMPLEMEM 0x10407
|
||||
#define BASS_CONFIG_MIDI_SAMPLEREAD 0x10408
|
||||
|
||||
// Additional BASS_SetConfigPtr options
|
||||
#define BASS_CONFIG_MIDI_DEFFONT 0x10403
|
||||
#define BASS_CONFIG_MIDI_SFZHEAD 0x10408
|
||||
|
||||
// Additional sync types
|
||||
#define BASS_SYNC_MIDI_MARK 0x10000
|
||||
|
@ -62,6 +66,9 @@ typedef DWORD HSOUNDFONT; // soundfont handle
|
|||
#define BASS_MIDI_FONT_XGDRUMS 0x40000
|
||||
#define BASS_MIDI_FONT_NOFX 0x80000
|
||||
#define BASS_MIDI_FONT_LINATTMOD 0x100000
|
||||
#define BASS_MIDI_FONT_LINDECVOL 0x200000
|
||||
#define BASS_MIDI_FONT_NORAMPIN 0x400000
|
||||
#define BASS_MIDI_FONT_NOLIMITS 0x800000
|
||||
|
||||
typedef struct {
|
||||
HSOUNDFONT font; // soundfont
|
||||
|
@ -187,6 +194,9 @@ typedef struct {
|
|||
#define MIDI_EVENT_MOD_PITCH 77
|
||||
#define MIDI_EVENT_MOD_FILTER 78
|
||||
#define MIDI_EVENT_MOD_VOLUME 79
|
||||
#define MIDI_EVENT_VIBRATO_RATE 80
|
||||
#define MIDI_EVENT_VIBRATO_DEPTH 81
|
||||
#define MIDI_EVENT_VIBRATO_DELAY 82
|
||||
#define MIDI_EVENT_MIXLEVEL 0x10000
|
||||
#define MIDI_EVENT_TRANSPOSE 0x10001
|
||||
#define MIDI_EVENT_SYSTEMEX 0x10002
|
||||
|
@ -238,6 +248,9 @@ typedef struct {
|
|||
#define BASS_ATTRIB_MIDI_STATE 0x12005
|
||||
#define BASS_ATTRIB_MIDI_SRC 0x12006
|
||||
#define BASS_ATTRIB_MIDI_KILL 0x12007
|
||||
#define BASS_ATTRIB_MIDI_SPEED 0x12008
|
||||
#define BASS_ATTRIB_MIDI_REVERB 0x12009
|
||||
#define BASS_ATTRIB_MIDI_VOL 0x1200a
|
||||
#define BASS_ATTRIB_MIDI_TRACK_VOL 0x12100 // + track #
|
||||
|
||||
// Additional tag type
|
||||
|
@ -255,9 +268,17 @@ seeking: TRUE = the event is being processed while seeking, FALSE = it is being
|
|||
user : The 'user' parameter value given when calling BASS_MIDI_StreamSetFilter
|
||||
RETURN : TRUE = process the event, FALSE = drop the event */
|
||||
|
||||
// BASS_MIDI_FontLoadEx flags
|
||||
#define BASS_MIDI_FONTLOAD_NOWAIT 1 // don't want for the samples to load
|
||||
#define BASS_MIDI_FONTLOAD_COMPACT 2 // compact samples
|
||||
#define BASS_MIDI_FONTLOAD_NOLOAD 4 // don't load (only compact)
|
||||
#define BASS_MIDI_FONTLOAD_TIME 8 // length is in milliseconds
|
||||
#define BASS_MIDI_FONTLOAD_KEEPDEC 16 // keep decoders
|
||||
|
||||
// BASS_MIDI_FontPack flags
|
||||
#define BASS_MIDI_PACK_NOHEAD 1 // don't send a WAV header to the encoder
|
||||
#define BASS_MIDI_PACK_16BIT 2 // discard low 8 bits of 24-bit sample data
|
||||
#define BASS_MIDI_PACK_48KHZ 4 // set encoding rate to 48000 Hz (else 44100 Hz)
|
||||
|
||||
typedef struct {
|
||||
const char *name; // description
|
||||
|
@ -299,6 +320,7 @@ BOOL BASSMIDIDEF(BASS_MIDI_FontGetInfo)(HSOUNDFONT handle, BASS_MIDI_FONTINFO *i
|
|||
BOOL BASSMIDIDEF(BASS_MIDI_FontGetPresets)(HSOUNDFONT handle, DWORD *presets);
|
||||
const char *BASSMIDIDEF(BASS_MIDI_FontGetPreset)(HSOUNDFONT handle, int preset, int bank);
|
||||
BOOL BASSMIDIDEF(BASS_MIDI_FontLoad)(HSOUNDFONT handle, int preset, int bank);
|
||||
BOOL BASSMIDIDEF(BASS_MIDI_FontLoadEx)(HSOUNDFONT handle, int preset, int bank, DWORD length, DWORD flags);
|
||||
BOOL BASSMIDIDEF(BASS_MIDI_FontUnload)(HSOUNDFONT handle, int preset, int bank);
|
||||
BOOL BASSMIDIDEF(BASS_MIDI_FontCompact)(HSOUNDFONT handle);
|
||||
BOOL BASSMIDIDEF(BASS_MIDI_FontPack)(HSOUNDFONT handle, const void *outfile, const void *encoder, DWORD flags);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue