Updated BASS, BASSFLAC, and BASSMIDI
parent
256040357e
commit
66931cc4fd
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
BASS 2.4 C/C++ header file
|
||||
Copyright (c) 1999-2013 Un4seen Developments Ltd.
|
||||
Copyright (c) 1999-2014 Un4seen Developments Ltd.
|
||||
|
||||
See the BASS.CHM file for more detailed documentation
|
||||
*/
|
||||
|
@ -43,6 +43,8 @@ extern "C" {
|
|||
|
||||
#ifndef BASSDEF
|
||||
#define BASSDEF(f) WINAPI f
|
||||
#else
|
||||
#define NOBASSOVERLOADS
|
||||
#endif
|
||||
|
||||
typedef DWORD HMUSIC; // MOD music handle
|
||||
|
@ -66,6 +68,7 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_ERROR_POSITION 7 // invalid position
|
||||
#define BASS_ERROR_INIT 8 // BASS_Init has not been successfully called
|
||||
#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_NOCHAN 18 // can't get a free channel
|
||||
#define BASS_ERROR_ILLTYPE 19 // an illegal type was specified
|
||||
|
@ -120,12 +123,18 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
#define BASS_CONFIG_NET_READTIMEOUT 37
|
||||
#define BASS_CONFIG_VISTA_SPEAKERS 38
|
||||
#define BASS_CONFIG_IOS_SPEAKER 39
|
||||
#define BASS_CONFIG_MF_DISABLE 40
|
||||
#define BASS_CONFIG_HANDLES 41
|
||||
#define BASS_CONFIG_UNICODE 42
|
||||
#define BASS_CONFIG_SRC 43
|
||||
#define BASS_CONFIG_SRC_SAMPLE 44
|
||||
#define BASS_CONFIG_ASYNCFILE_BUFFER 45
|
||||
#define BASS_CONFIG_OGG_PRESCAN 47
|
||||
#define BASS_CONFIG_MF_VIDEO 48
|
||||
#define BASS_CONFIG_AIRPLAY 49
|
||||
#define BASS_CONFIG_DEV_NONSTOP 50
|
||||
#define BASS_CONFIG_IOS_NOCATEGORY 51
|
||||
#define BASS_CONFIG_VERIFY_NET 52
|
||||
|
||||
// BASS_SetConfigPtr options
|
||||
#define BASS_CONFIG_NET_AGENT 16
|
||||
|
@ -149,7 +158,7 @@ typedef DWORD HPLUGIN; // Plugin handle
|
|||
|
||||
// Device info structure
|
||||
typedef struct {
|
||||
#ifdef _WIN32_WCE
|
||||
#if defined(_WIN32_WCE) || (WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
|
||||
const wchar_t *name; // description
|
||||
const wchar_t *driver; // driver
|
||||
#else
|
||||
|
@ -164,6 +173,22 @@ typedef struct {
|
|||
#define BASS_DEVICE_DEFAULT 2
|
||||
#define BASS_DEVICE_INIT 4
|
||||
|
||||
#define BASS_DEVICE_TYPE_MASK 0xff000000
|
||||
#define BASS_DEVICE_TYPE_NETWORK 0x01000000
|
||||
#define BASS_DEVICE_TYPE_SPEAKERS 0x02000000
|
||||
#define BASS_DEVICE_TYPE_LINE 0x03000000
|
||||
#define BASS_DEVICE_TYPE_HEADPHONES 0x04000000
|
||||
#define BASS_DEVICE_TYPE_MICROPHONE 0x05000000
|
||||
#define BASS_DEVICE_TYPE_HEADSET 0x06000000
|
||||
#define BASS_DEVICE_TYPE_HANDSET 0x07000000
|
||||
#define BASS_DEVICE_TYPE_DIGITAL 0x08000000
|
||||
#define BASS_DEVICE_TYPE_SPDIF 0x09000000
|
||||
#define BASS_DEVICE_TYPE_HDMI 0x0a000000
|
||||
#define BASS_DEVICE_TYPE_DISPLAYPORT 0x40000000
|
||||
|
||||
// BASS_GetDeviceInfo flags
|
||||
#define BASS_DEVICES_AIRPLAY 0x1000000
|
||||
|
||||
typedef struct {
|
||||
DWORD flags; // device capabilities (DSCAPS_xxx flags)
|
||||
DWORD hwsize; // size of total device hardware memory
|
||||
|
@ -304,6 +329,8 @@ typedef struct {
|
|||
#define BASS_UNICODE 0x80000000
|
||||
|
||||
#define BASS_RECORD_PAUSE 0x8000 // start recording paused
|
||||
#define BASS_RECORD_ECHOCANCEL 0x2000
|
||||
#define BASS_RECORD_AGC 0x4000
|
||||
|
||||
// DX7 voice allocation & management flags
|
||||
#define BASS_VAM_HARDWARE 1
|
||||
|
@ -347,7 +374,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
DWORD ctype; // channel type
|
||||
#ifdef _WIN32_WCE
|
||||
#if defined(_WIN32_WCE) || (WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
|
||||
const wchar_t *name; // format description
|
||||
const wchar_t *exts; // file extension filter (*.ext1;*.ext2;etc...)
|
||||
#else
|
||||
|
@ -491,6 +518,8 @@ typedef struct {
|
|||
#define BASS_FILEPOS_CONNECTED 4
|
||||
#define BASS_FILEPOS_BUFFER 5
|
||||
#define BASS_FILEPOS_SOCKET 6
|
||||
#define BASS_FILEPOS_ASYNCBUF 7
|
||||
#define BASS_FILEPOS_SIZE 8
|
||||
|
||||
typedef void (CALLBACK DOWNLOADPROC)(const void *buffer, DWORD length, void *user);
|
||||
/* Internet stream download callback function.
|
||||
|
@ -554,19 +583,24 @@ RETURN : TRUE = continue recording, FALSE = stop */
|
|||
#define BASS_ATTRIB_PAN 3
|
||||
#define BASS_ATTRIB_EAXMIX 4
|
||||
#define BASS_ATTRIB_NOBUFFER 5
|
||||
#define BASS_ATTRIB_VBR 6
|
||||
#define BASS_ATTRIB_CPU 7
|
||||
#define BASS_ATTRIB_SRC 8
|
||||
#define BASS_ATTRIB_NET_RESUME 9
|
||||
#define BASS_ATTRIB_SCANINFO 10
|
||||
#define BASS_ATTRIB_MUSIC_AMPLIFY 0x100
|
||||
#define BASS_ATTRIB_MUSIC_PANSEP 0x101
|
||||
#define BASS_ATTRIB_MUSIC_PSCALER 0x102
|
||||
#define BASS_ATTRIB_MUSIC_BPM 0x103
|
||||
#define BASS_ATTRIB_MUSIC_SPEED 0x104
|
||||
#define BASS_ATTRIB_MUSIC_VOL_GLOBAL 0x105
|
||||
#define BASS_ATTRIB_MUSIC_ACTIVE 0x106
|
||||
#define BASS_ATTRIB_MUSIC_VOL_CHAN 0x200 // + channel #
|
||||
#define BASS_ATTRIB_MUSIC_VOL_INST 0x300 // + instrument #
|
||||
|
||||
// BASS_ChannelGetData flags
|
||||
#define BASS_DATA_AVAILABLE 0 // query how much data is buffered
|
||||
#define BASS_DATA_FIXED 0x20000000 // flag: return 8.24 fixed-point data
|
||||
#define BASS_DATA_FLOAT 0x40000000 // flag: return floating-point sample data
|
||||
#define BASS_DATA_FFT256 0x80000000 // 256 sample FFT
|
||||
#define BASS_DATA_FFT512 0x80000001 // 512 FFT
|
||||
|
@ -580,6 +614,11 @@ RETURN : TRUE = continue recording, FALSE = stop */
|
|||
#define BASS_DATA_FFT_REMOVEDC 0x40 // FFT flag: pre-remove DC bias
|
||||
#define BASS_DATA_FFT_COMPLEX 0x80 // FFT flag: return complex data
|
||||
|
||||
// BASS_ChannelGetLevelEx flags
|
||||
#define BASS_LEVEL_MONO 1
|
||||
#define BASS_LEVEL_STEREO 2
|
||||
#define BASS_LEVEL_RMS 4
|
||||
|
||||
// BASS_ChannelGetTags types : what's returned
|
||||
#define BASS_TAG_ID3 0 // ID3v1 tags : TAG_ID3 structure
|
||||
#define BASS_TAG_ID3V2 1 // ID3v2 tags : variable length block
|
||||
|
@ -717,8 +756,10 @@ typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
|
|||
#define BASS_POS_BYTE 0 // byte position
|
||||
#define BASS_POS_MUSIC_ORDER 1 // order.row position, MAKELONG(order,row)
|
||||
#define BASS_POS_OGG 3 // OGG bitstream number
|
||||
#define BASS_POS_INEXACT 0x8000000 // flag: allow seeking to inexact position
|
||||
#define BASS_POS_DECODE 0x10000000 // flag: get the decoding (not playing) position
|
||||
#define BASS_POS_DECODETO 0x20000000 // flag: decode to the position instead of seeking
|
||||
#define BASS_POS_SCAN 0x40000000 // flag: scan to the position
|
||||
|
||||
// BASS_RecordSetInput flags
|
||||
#define BASS_INPUT_OFF 0x10000
|
||||
|
@ -849,7 +890,7 @@ void *BASSDEF(BASS_GetConfigPtr)(DWORD option);
|
|||
DWORD BASSDEF(BASS_GetVersion)();
|
||||
int BASSDEF(BASS_ErrorGetCode)();
|
||||
BOOL BASSDEF(BASS_GetDeviceInfo)(DWORD device, BASS_DEVICEINFO *info);
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
|
||||
BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, HWND win, const GUID *dsguid);
|
||||
#else
|
||||
BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win, void *dsguid);
|
||||
|
@ -857,7 +898,7 @@ BOOL BASSDEF(BASS_Init)(int device, DWORD freq, DWORD flags, void *win, void *ds
|
|||
BOOL BASSDEF(BASS_SetDevice)(DWORD device);
|
||||
DWORD BASSDEF(BASS_GetDevice)();
|
||||
BOOL BASSDEF(BASS_Free)();
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
|
||||
void *BASSDEF(BASS_GetDSoundObject)(DWORD object);
|
||||
#endif
|
||||
BOOL BASSDEF(BASS_GetInfo)(BASS_INFO *info);
|
||||
|
@ -878,7 +919,7 @@ BOOL BASSDEF(BASS_Get3DFactors)(float *distf, float *rollf, float *doppf);
|
|||
BOOL BASSDEF(BASS_Set3DPosition)(const BASS_3DVECTOR *pos, const BASS_3DVECTOR *vel, const BASS_3DVECTOR *front, const BASS_3DVECTOR *top);
|
||||
BOOL BASSDEF(BASS_Get3DPosition)(BASS_3DVECTOR *pos, BASS_3DVECTOR *vel, BASS_3DVECTOR *front, BASS_3DVECTOR *top);
|
||||
void BASSDEF(BASS_Apply3D)();
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !(WINAPI_FAMILY && WINAPI_FAMILY!=WINAPI_FAMILY_DESKTOP_APP)
|
||||
BOOL BASSDEF(BASS_SetEAXParameters)(int env, float vol, float decay, float damp);
|
||||
BOOL BASSDEF(BASS_GetEAXParameters)(DWORD *env, float *vol, float *decay, float *damp);
|
||||
#endif
|
||||
|
@ -934,6 +975,8 @@ BOOL BASSDEF(BASS_ChannelSetAttribute)(DWORD handle, DWORD attrib, float value);
|
|||
BOOL BASSDEF(BASS_ChannelGetAttribute)(DWORD handle, DWORD attrib, float *value);
|
||||
BOOL BASSDEF(BASS_ChannelSlideAttribute)(DWORD handle, DWORD attrib, float value, DWORD time);
|
||||
BOOL BASSDEF(BASS_ChannelIsSliding)(DWORD handle, DWORD attrib);
|
||||
BOOL BASSDEF(BASS_ChannelSetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
|
||||
DWORD BASSDEF(BASS_ChannelGetAttributeEx)(DWORD handle, DWORD attrib, void *value, DWORD size);
|
||||
BOOL BASSDEF(BASS_ChannelSet3DAttributes)(DWORD handle, int mode, float min, float max, int iangle, int oangle, float outvol);
|
||||
BOOL BASSDEF(BASS_ChannelGet3DAttributes)(DWORD handle, DWORD *mode, float *min, float *max, DWORD *iangle, DWORD *oangle, float *outvol);
|
||||
BOOL BASSDEF(BASS_ChannelSet3DPosition)(DWORD handle, const BASS_3DVECTOR *pos, const BASS_3DVECTOR *orient, const BASS_3DVECTOR *vel);
|
||||
|
@ -942,6 +985,7 @@ QWORD BASSDEF(BASS_ChannelGetLength)(DWORD handle, DWORD mode);
|
|||
BOOL BASSDEF(BASS_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);
|
||||
QWORD BASSDEF(BASS_ChannelGetPosition)(DWORD handle, DWORD mode);
|
||||
DWORD BASSDEF(BASS_ChannelGetLevel)(DWORD handle);
|
||||
BOOL BASSDEF(BASS_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags);
|
||||
DWORD BASSDEF(BASS_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
|
||||
HSYNC BASSDEF(BASS_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user);
|
||||
BOOL BASSDEF(BASS_ChannelRemoveSync)(DWORD handle, HSYNC sync);
|
||||
|
@ -959,7 +1003,7 @@ BOOL BASSDEF(BASS_FXReset)(HFX handle);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(NOBASSOVERLOADS)
|
||||
static inline HPLUGIN BASS_PluginLoad(const WCHAR *file, DWORD flags)
|
||||
{
|
||||
return BASS_PluginLoad((const char*)file, flags|BASS_UNICODE);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
BASSMIDI 2.4 C/C++ header file
|
||||
Copyright (c) 2006-2013 Un4seen Developments Ltd.
|
||||
Copyright (c) 2006-2014 Un4seen Developments Ltd.
|
||||
|
||||
See the BASSMIDI.CHM file for more detailed documentation
|
||||
*/
|
||||
|
@ -28,6 +28,7 @@ typedef DWORD HSOUNDFONT; // soundfont handle
|
|||
#define BASS_CONFIG_MIDI_COMPACT 0x10400
|
||||
#define BASS_CONFIG_MIDI_VOICES 0x10401
|
||||
#define BASS_CONFIG_MIDI_AUTOFONT 0x10402
|
||||
#define BASS_CONFIG_MIDI_IN_PORTS 0x10404
|
||||
|
||||
// Additional BASS_SetConfigPtr options
|
||||
#define BASS_CONFIG_MIDI_DEFFONT 0x10403
|
||||
|
@ -44,15 +45,18 @@ typedef DWORD HSOUNDFONT; // soundfont handle
|
|||
#define BASS_SYNC_MIDI_KEYSIG 0x10007
|
||||
|
||||
// Additional BASS_MIDI_StreamCreateFile/etc flags
|
||||
#define BASS_MIDI_NOSYSRESET 0x800
|
||||
#define BASS_MIDI_DECAYEND 0x1000
|
||||
#define BASS_MIDI_NOFX 0x2000
|
||||
#define BASS_MIDI_DECAYSEEK 0x4000
|
||||
#define BASS_MIDI_NOCROP 0x8000
|
||||
#define BASS_MIDI_NOTEOFF1 0x10000
|
||||
#define BASS_MIDI_SINCINTER 0x800000
|
||||
|
||||
// BASS_MIDI_FontInit flags
|
||||
#define BASS_MIDI_FONT_MEM 0x10000
|
||||
#define BASS_MIDI_FONT_MMAP 0x20000
|
||||
#define BASS_MIDI_FONT_XGDRUMS 0x40000
|
||||
|
||||
typedef struct {
|
||||
HSOUNDFONT font; // soundfont
|
||||
|
@ -129,6 +133,7 @@ typedef struct {
|
|||
#define MIDI_EVENT_RESONANCE 26
|
||||
#define MIDI_EVENT_RELEASE 27
|
||||
#define MIDI_EVENT_ATTACK 28
|
||||
#define MIDI_EVENT_DECAY 29
|
||||
#define MIDI_EVENT_REVERB_MACRO 30
|
||||
#define MIDI_EVENT_CHORUS_MACRO 31
|
||||
#define MIDI_EVENT_REVERB_TIME 32
|
||||
|
@ -142,6 +147,10 @@ typedef struct {
|
|||
#define MIDI_EVENT_CHORUS_FEEDBACK 40
|
||||
#define MIDI_EVENT_CHORUS_LEVEL 41
|
||||
#define MIDI_EVENT_CHORUS_REVERB 42
|
||||
#define MIDI_EVENT_USERFX 43
|
||||
#define MIDI_EVENT_USERFX_LEVEL 44
|
||||
#define MIDI_EVENT_USERFX_REVERB 45
|
||||
#define MIDI_EVENT_USERFX_CHORUS 46
|
||||
#define MIDI_EVENT_DRUM_FINETUNE 50
|
||||
#define MIDI_EVENT_DRUM_COARSETUNE 51
|
||||
#define MIDI_EVENT_DRUM_PAN 52
|
||||
|
@ -150,6 +159,7 @@ typedef struct {
|
|||
#define MIDI_EVENT_DRUM_CUTOFF 55
|
||||
#define MIDI_EVENT_DRUM_RESONANCE 56
|
||||
#define MIDI_EVENT_DRUM_LEVEL 57
|
||||
#define MIDI_EVENT_DRUM_USERFX 58
|
||||
#define MIDI_EVENT_SOFT 60
|
||||
#define MIDI_EVENT_SYSTEM 61
|
||||
#define MIDI_EVENT_TEMPO 62
|
||||
|
@ -161,6 +171,11 @@ typedef struct {
|
|||
#define MIDI_EVENT_CHANPRES_VOLUME 68
|
||||
#define MIDI_EVENT_MODRANGE 69
|
||||
#define MIDI_EVENT_BANK_LSB 70
|
||||
#define MIDI_EVENT_KEYPRES 71
|
||||
#define MIDI_EVENT_KEYPRES_VIBRATO 72
|
||||
#define MIDI_EVENT_KEYPRES_PITCH 73
|
||||
#define MIDI_EVENT_KEYPRES_FILTER 74
|
||||
#define MIDI_EVENT_KEYPRES_VOLUME 75
|
||||
#define MIDI_EVENT_MIXLEVEL 0x10000
|
||||
#define MIDI_EVENT_TRANSPOSE 0x10001
|
||||
#define MIDI_EVENT_SYSTEMEX 0x10002
|
||||
|
@ -183,9 +198,15 @@ typedef struct {
|
|||
} BASS_MIDI_EVENT;
|
||||
|
||||
// BASS_MIDI_StreamEvents modes
|
||||
#define BASS_MIDI_EVENTS_STRUCT 0 // BASS_MIDI_EVENT structures
|
||||
#define BASS_MIDI_EVENTS_RAW 0x10000 // raw MIDI event data
|
||||
#define BASS_MIDI_EVENTS_SYNC 0x1000000 // FLAG: trigger event syncs
|
||||
#define BASS_MIDI_EVENTS_STRUCT 0 // BASS_MIDI_EVENT structures
|
||||
#define BASS_MIDI_EVENTS_RAW 0x10000 // raw MIDI event data
|
||||
#define BASS_MIDI_EVENTS_SYNC 0x1000000 // FLAG: trigger event syncs
|
||||
#define BASS_MIDI_EVENTS_NORSTATUS 0x2000000 // FLAG: no running status
|
||||
|
||||
// BASS_MIDI_StreamGetChannel special channels
|
||||
#define BASS_MIDI_CHAN_CHORUS (DWORD)-1
|
||||
#define BASS_MIDI_CHAN_REVERB (DWORD)-2
|
||||
#define BASS_MIDI_CHAN_USERFX (DWORD)-3
|
||||
|
||||
// BASS_CHANNELINFO type
|
||||
#define BASS_CTYPE_STREAM_MIDI 0x10d00
|
||||
|
@ -206,6 +227,7 @@ typedef struct {
|
|||
|
||||
// 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
|
||||
|
||||
typedef struct {
|
||||
const char *name; // description
|
||||
|
@ -213,7 +235,7 @@ typedef struct {
|
|||
DWORD flags;
|
||||
} BASS_MIDI_DEVICEINFO;
|
||||
|
||||
typedef void (CALLBACK MIDIINPROC)(DWORD device, double time, const void *buffer, DWORD length, void *user);
|
||||
typedef void (CALLBACK MIDIINPROC)(DWORD device, double time, const BYTE *buffer, DWORD length, void *user);
|
||||
/* User MIDI input callback function.
|
||||
device : MIDI input device
|
||||
time : Timestamp
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue