|
| 1 | +/* |
| 2 | + BASSmix 2.4 C/C++ header file |
| 3 | + Copyright (c) 2005-2021 Un4seen Developments Ltd. |
| 4 | +
|
| 5 | + See the BASSMIX.CHM file for more detailed documentation |
| 6 | +*/ |
| 7 | + |
| 8 | +#ifndef BASSMIX_H |
| 9 | +#define BASSMIX_H |
| 10 | + |
| 11 | +#include "bass.h" |
| 12 | + |
| 13 | +#if BASSVERSION!=0x204 |
| 14 | +#error conflicting BASS and BASSmix versions |
| 15 | +#endif |
| 16 | + |
| 17 | +#ifdef __OBJC__ |
| 18 | +typedef int BOOL32; |
| 19 | +#define BOOL BOOL32 // override objc's BOOL |
| 20 | +#endif |
| 21 | + |
| 22 | +#ifdef __cplusplus |
| 23 | +extern "C" { |
| 24 | +#endif |
| 25 | + |
| 26 | +#ifndef BASSMIXDEF |
| 27 | +#define BASSMIXDEF(f) WINAPI f |
| 28 | +#endif |
| 29 | + |
| 30 | +// Additional BASS_SetConfig options |
| 31 | +#define BASS_CONFIG_MIXER_BUFFER 0x10601 |
| 32 | +#define BASS_CONFIG_MIXER_POSEX 0x10602 |
| 33 | +#define BASS_CONFIG_SPLIT_BUFFER 0x10610 |
| 34 | + |
| 35 | +// BASS_Mixer_StreamCreate flags |
| 36 | +#define BASS_MIXER_END 0x10000 // end the stream when there are no sources |
| 37 | +#define BASS_MIXER_NONSTOP 0x20000 // don't stall when there are no sources |
| 38 | +#define BASS_MIXER_RESUME 0x1000 // resume stalled immediately upon new/unpaused source |
| 39 | +#define BASS_MIXER_POSEX 0x2000 // enable BASS_Mixer_ChannelGetPositionEx support |
| 40 | + |
| 41 | +// BASS_Mixer_StreamAddChannel/Ex flags |
| 42 | +#define BASS_MIXER_CHAN_ABSOLUTE 0x1000 // start is an absolute position |
| 43 | +#define BASS_MIXER_CHAN_BUFFER 0x2000 // buffer data for BASS_Mixer_ChannelGetData/Level |
| 44 | +#define BASS_MIXER_CHAN_LIMIT 0x4000 // limit mixer processing to the amount available from this source |
| 45 | +#define BASS_MIXER_CHAN_MATRIX 0x10000 // matrix mixing |
| 46 | +#define BASS_MIXER_CHAN_PAUSE 0x20000 // don't process the source |
| 47 | +#define BASS_MIXER_CHAN_DOWNMIX 0x400000 // downmix to stereo/mono |
| 48 | +#define BASS_MIXER_CHAN_NORAMPIN 0x800000 // don't ramp-in the start |
| 49 | +#define BASS_MIXER_BUFFER BASS_MIXER_CHAN_BUFFER |
| 50 | +#define BASS_MIXER_LIMIT BASS_MIXER_CHAN_LIMIT |
| 51 | +#define BASS_MIXER_MATRIX BASS_MIXER_CHAN_MATRIX |
| 52 | +#define BASS_MIXER_PAUSE BASS_MIXER_CHAN_PAUSE |
| 53 | +#define BASS_MIXER_DOWNMIX BASS_MIXER_CHAN_DOWNMIX |
| 54 | +#define BASS_MIXER_NORAMPIN BASS_MIXER_CHAN_NORAMPIN |
| 55 | + |
| 56 | +// Mixer attributes |
| 57 | +#define BASS_ATTRIB_MIXER_LATENCY 0x15000 |
| 58 | +#define BASS_ATTRIB_MIXER_THREADS 0x15001 |
| 59 | + |
| 60 | +// Additional BASS_Mixer_ChannelIsActive return values |
| 61 | +#define BASS_ACTIVE_WAITING 5 |
| 62 | + |
| 63 | +// BASS_Split_StreamCreate flags |
| 64 | +#define BASS_SPLIT_SLAVE 0x1000 // only read buffered data |
| 65 | +#define BASS_SPLIT_POS 0x2000 |
| 66 | + |
| 67 | +// Splitter attributes |
| 68 | +#define BASS_ATTRIB_SPLIT_ASYNCBUFFER 0x15010 |
| 69 | +#define BASS_ATTRIB_SPLIT_ASYNCPERIOD 0x15011 |
| 70 | + |
| 71 | +// Envelope node |
| 72 | +typedef struct { |
| 73 | + QWORD pos; |
| 74 | + float value; |
| 75 | +} BASS_MIXER_NODE; |
| 76 | + |
| 77 | +// Envelope types |
| 78 | +#define BASS_MIXER_ENV_FREQ 1 |
| 79 | +#define BASS_MIXER_ENV_VOL 2 |
| 80 | +#define BASS_MIXER_ENV_PAN 3 |
| 81 | +#define BASS_MIXER_ENV_LOOP 0x10000 // flag: loop |
| 82 | +#define BASS_MIXER_ENV_REMOVE 0x20000 // flag: remove at end |
| 83 | + |
| 84 | +// Additional sync types |
| 85 | +#define BASS_SYNC_MIXER_ENVELOPE 0x10200 |
| 86 | +#define BASS_SYNC_MIXER_ENVELOPE_NODE 0x10201 |
| 87 | + |
| 88 | +// Additional BASS_Mixer_ChannelSetPosition flag |
| 89 | +#define BASS_POS_MIXER_RESET 0x10000 // flag: clear mixer's playback buffer |
| 90 | + |
| 91 | +// Additional BASS_Mixer_ChannelGetPosition mode |
| 92 | +#define BASS_POS_MIXER_DELAY 5 |
| 93 | + |
| 94 | +// BASS_CHANNELINFO types |
| 95 | +#define BASS_CTYPE_STREAM_MIXER 0x10800 |
| 96 | +#define BASS_CTYPE_STREAM_SPLIT 0x10801 |
| 97 | + |
| 98 | +DWORD BASSMIXDEF(BASS_Mixer_GetVersion)(void); |
| 99 | + |
| 100 | +HSTREAM BASSMIXDEF(BASS_Mixer_StreamCreate)(DWORD freq, DWORD chans, DWORD flags); |
| 101 | +BOOL BASSMIXDEF(BASS_Mixer_StreamAddChannel)(HSTREAM handle, DWORD channel, DWORD flags); |
| 102 | +BOOL BASSMIXDEF(BASS_Mixer_StreamAddChannelEx)(HSTREAM handle, DWORD channel, DWORD flags, QWORD start, QWORD length); |
| 103 | +DWORD BASSMIXDEF(BASS_Mixer_StreamGetChannels)(HSTREAM handle, DWORD *channels, DWORD count); |
| 104 | + |
| 105 | +HSTREAM BASSMIXDEF(BASS_Mixer_ChannelGetMixer)(DWORD handle); |
| 106 | +DWORD BASSMIXDEF(BASS_Mixer_ChannelIsActive)(DWORD handle); |
| 107 | +DWORD BASSMIXDEF(BASS_Mixer_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask); |
| 108 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelRemove)(DWORD handle); |
| 109 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode); |
| 110 | +QWORD BASSMIXDEF(BASS_Mixer_ChannelGetPosition)(DWORD handle, DWORD mode); |
| 111 | +QWORD BASSMIXDEF(BASS_Mixer_ChannelGetPositionEx)(DWORD channel, DWORD mode, DWORD delay); |
| 112 | +DWORD BASSMIXDEF(BASS_Mixer_ChannelGetLevel)(DWORD handle); |
| 113 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags); |
| 114 | +DWORD BASSMIXDEF(BASS_Mixer_ChannelGetData)(DWORD handle, void *buffer, DWORD length); |
| 115 | +HSYNC BASSMIXDEF(BASS_Mixer_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user); |
| 116 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelRemoveSync)(DWORD channel, HSYNC sync); |
| 117 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelSetMatrix)(DWORD handle, const void *matrix); |
| 118 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelSetMatrixEx)(DWORD handle, const void *matrix, float time); |
| 119 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelGetMatrix)(DWORD handle, void *matrix); |
| 120 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelSetEnvelope)(DWORD handle, DWORD type, const BASS_MIXER_NODE *nodes, DWORD count); |
| 121 | +BOOL BASSMIXDEF(BASS_Mixer_ChannelSetEnvelopePos)(DWORD handle, DWORD type, QWORD pos); |
| 122 | +QWORD BASSMIXDEF(BASS_Mixer_ChannelGetEnvelopePos)(DWORD handle, DWORD type, float *value); |
| 123 | + |
| 124 | +HSTREAM BASSMIXDEF(BASS_Split_StreamCreate)(DWORD channel, DWORD flags, const int *chanmap); |
| 125 | +DWORD BASSMIXDEF(BASS_Split_StreamGetSource)(HSTREAM handle); |
| 126 | +DWORD BASSMIXDEF(BASS_Split_StreamGetSplits)(DWORD handle, HSTREAM *splits, DWORD count); |
| 127 | +BOOL BASSMIXDEF(BASS_Split_StreamReset)(DWORD handle); |
| 128 | +BOOL BASSMIXDEF(BASS_Split_StreamResetEx)(DWORD handle, DWORD offset); |
| 129 | +DWORD BASSMIXDEF(BASS_Split_StreamGetAvailable)(DWORD handle); |
| 130 | + |
| 131 | +#ifdef __cplusplus |
| 132 | +} |
| 133 | +#endif |
| 134 | + |
| 135 | +#ifdef __OBJC__ |
| 136 | +#undef BOOL |
| 137 | +#endif |
| 138 | + |
| 139 | +#endif |
0 commit comments