bass_fx.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. /*===========================================================================
  2. BASS_FX 2.4 - Copyright (c) 2002-2018 (: JOBnik! :) [Arthur Aminov, ISRAEL]
  3. [http://www.jobnik.org]
  4. bugs/suggestions/questions:
  5. forum : http://www.un4seen.com/forum/?board=1
  6. http://www.jobnik.org/forums
  7. e-mail : [email protected]
  8. --------------------------------------------------
  9. NOTE: This header will work only with BASS_FX version 2.4.12
  10. Check www.un4seen.com or www.jobnik.org for any later versions.
  11. * Requires BASS 2.4 (available at http://www.un4seen.com)
  12. ===========================================================================*/
  13. #ifndef BASS_FX_H
  14. #define BASS_FX_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #ifndef BASS_FXDEF
  19. #define BASS_FXDEF(f) WINAPI f
  20. #endif
  21. // BASS_CHANNELINFO types
  22. #define BASS_CTYPE_STREAM_TEMPO 0x1f200
  23. #define BASS_CTYPE_STREAM_REVERSE 0x1f201
  24. // Tempo / Reverse / BPM / Beat flag
  25. #define BASS_FX_FREESOURCE 0x10000 // Free the source handle as well?
  26. // BASS_FX Version
  27. DWORD BASS_FXDEF(BASS_FX_GetVersion)();
  28. /*===========================================================================
  29. DSP (Digital Signal Processing)
  30. ===========================================================================*/
  31. /*
  32. Multi-channel order of each channel is as follows:
  33. 3 channels left-front, right-front, center.
  34. 4 channels left-front, right-front, left-rear/side, right-rear/side.
  35. 5 channels left-front, right-front, center, left-rear/side, right-rear/side.
  36. 6 channels (5.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side.
  37. 8 channels (7.1) left-front, right-front, center, LFE, left-rear/side, right-rear/side, left-rear center, right-rear center.
  38. */
  39. // DSP channels flags
  40. #define BASS_BFX_CHANALL -1 // all channels at once (as by default)
  41. #define BASS_BFX_CHANNONE 0 // disable an effect for all channels
  42. #define BASS_BFX_CHAN1 1 // left-front channel
  43. #define BASS_BFX_CHAN2 2 // right-front channel
  44. #define BASS_BFX_CHAN3 4 // see above info
  45. #define BASS_BFX_CHAN4 8 // see above info
  46. #define BASS_BFX_CHAN5 16 // see above info
  47. #define BASS_BFX_CHAN6 32 // see above info
  48. #define BASS_BFX_CHAN7 64 // see above info
  49. #define BASS_BFX_CHAN8 128 // see above info
  50. // if you have more than 8 channels (7.1), use this macro
  51. #define BASS_BFX_CHANNEL_N(n) (1<<((n)-1))
  52. // DSP effects
  53. enum {
  54. BASS_FX_BFX_ROTATE = 0x10000, // A channels volume ping-pong / multi channel
  55. BASS_FX_BFX_ECHO, // Echo / 2 channels max (deprecated)
  56. BASS_FX_BFX_FLANGER, // Flanger / multi channel (deprecated)
  57. BASS_FX_BFX_VOLUME, // Volume / multi channel
  58. BASS_FX_BFX_PEAKEQ, // Peaking Equalizer / multi channel
  59. BASS_FX_BFX_REVERB, // Reverb / 2 channels max (deprecated)
  60. BASS_FX_BFX_LPF, // Low Pass Filter 24dB / multi channel (deprecated)
  61. BASS_FX_BFX_MIX, // Swap, remap and mix channels / multi channel
  62. BASS_FX_BFX_DAMP, // Dynamic Amplification / multi channel
  63. BASS_FX_BFX_AUTOWAH, // Auto Wah / multi channel
  64. BASS_FX_BFX_ECHO2, // Echo 2 / multi channel (deprecated)
  65. BASS_FX_BFX_PHASER, // Phaser / multi channel
  66. BASS_FX_BFX_ECHO3, // Echo 3 / multi channel (deprecated)
  67. BASS_FX_BFX_CHORUS, // Chorus/Flanger / multi channel
  68. BASS_FX_BFX_APF, // All Pass Filter / multi channel (deprecated)
  69. BASS_FX_BFX_COMPRESSOR, // Compressor / multi channel (deprecated)
  70. BASS_FX_BFX_DISTORTION, // Distortion / multi channel
  71. BASS_FX_BFX_COMPRESSOR2, // Compressor 2 / multi channel
  72. BASS_FX_BFX_VOLUME_ENV, // Volume envelope / multi channel
  73. BASS_FX_BFX_BQF, // BiQuad filters / multi channel
  74. BASS_FX_BFX_ECHO4, // Echo 4 / multi channel
  75. BASS_FX_BFX_PITCHSHIFT, // Pitch shift using FFT / multi channel (not available on mobile)
  76. BASS_FX_BFX_FREEVERB // Reverb using "Freeverb" algo / multi channel
  77. };
  78. /*
  79. Deprecated effects in 2.4.10 version:
  80. ------------------------------------
  81. BASS_FX_BFX_ECHO -> use BASS_FX_BFX_ECHO4
  82. BASS_FX_BFX_ECHO2 -> use BASS_FX_BFX_ECHO4
  83. BASS_FX_BFX_ECHO3 -> use BASS_FX_BFX_ECHO4
  84. BASS_FX_BFX_REVERB -> use BASS_FX_BFX_FREEVERB
  85. BASS_FX_BFX_FLANGER -> use BASS_FX_BFX_CHORUS
  86. BASS_FX_BFX_COMPRESSOR -> use BASS_FX_BFX_COMPRESSOR2
  87. BASS_FX_BFX_APF -> use BASS_FX_BFX_BQF with BASS_BFX_BQF_ALLPASS filter
  88. BASS_FX_BFX_LPF -> use 2x BASS_FX_BFX_BQF with BASS_BFX_BQF_LOWPASS filter and appropriate fQ values
  89. */
  90. // Rotate
  91. typedef struct {
  92. float fRate; // rotation rate/speed in Hz (A negative rate can be used for reverse direction)
  93. int lChannel; // BASS_BFX_CHANxxx flag/s (supported only even number of channels)
  94. } BASS_BFX_ROTATE;
  95. // Echo (deprecated)
  96. typedef struct {
  97. float fLevel; // [0....1....n] linear
  98. int lDelay; // [1200..30000]
  99. } BASS_BFX_ECHO;
  100. // Flanger (deprecated)
  101. typedef struct {
  102. float fWetDry; // [0....1....n] linear
  103. float fSpeed; // [0......0.09]
  104. int lChannel; // BASS_BFX_CHANxxx flag/s
  105. } BASS_BFX_FLANGER;
  106. // Volume
  107. typedef struct {
  108. int lChannel; // BASS_BFX_CHANxxx flag/s or 0 for global volume control
  109. float fVolume; // [0....1....n] linear
  110. } BASS_BFX_VOLUME;
  111. // Peaking Equalizer
  112. typedef struct {
  113. int lBand; // [0...............n] more bands means more memory & cpu usage
  114. float fBandwidth; // [0.1...........<10] in octaves - fQ is not in use (Bandwidth has a priority over fQ)
  115. float fQ; // [0...............1] the EE kinda definition (linear) (if Bandwidth is not in use)
  116. float fCenter; // [1Hz..<info.freq/2] in Hz
  117. float fGain; // [-15dB...0...+15dB] in dB (can be above/below these limits)
  118. int lChannel; // BASS_BFX_CHANxxx flag/s
  119. } BASS_BFX_PEAKEQ;
  120. // Reverb (deprecated)
  121. typedef struct {
  122. float fLevel; // [0....1....n] linear
  123. int lDelay; // [1200..10000]
  124. } BASS_BFX_REVERB;
  125. // Low Pass Filter (deprecated)
  126. typedef struct {
  127. float fResonance; // [0.01...........10]
  128. float fCutOffFreq; // [1Hz...info.freq/2] cutoff frequency
  129. int lChannel; // BASS_BFX_CHANxxx flag/s
  130. } BASS_BFX_LPF;
  131. // Swap, remap and mix
  132. typedef struct {
  133. const int *lChannel; // an array of channels to mix using BASS_BFX_CHANxxx flag/s (lChannel[0] is left channel...)
  134. } BASS_BFX_MIX;
  135. // Dynamic Amplification
  136. typedef struct {
  137. float fTarget; // target volume level [0<......1] linear
  138. float fQuiet; // quiet volume level [0.......1] linear
  139. float fRate; // amp adjustment rate [0.......1] linear
  140. float fGain; // amplification level [0...1...n] linear
  141. float fDelay; // delay in seconds before increasing level [0.......n] linear
  142. int lChannel; // BASS_BFX_CHANxxx flag/s
  143. } BASS_BFX_DAMP;
  144. // Auto Wah
  145. typedef struct {
  146. float fDryMix; // dry (unaffected) signal mix [-2......2]
  147. float fWetMix; // wet (affected) signal mix [-2......2]
  148. float fFeedback; // output signal to feed back into input [-1......1]
  149. float fRate; // rate of sweep in cycles per second [0<....<10]
  150. float fRange; // sweep range in octaves [0<....<10]
  151. float fFreq; // base frequency of sweep Hz [0<...1000]
  152. int lChannel; // BASS_BFX_CHANxxx flag/s
  153. } BASS_BFX_AUTOWAH;
  154. // Echo 2 (deprecated)
  155. typedef struct {
  156. float fDryMix; // dry (unaffected) signal mix [-2......2]
  157. float fWetMix; // wet (affected) signal mix [-2......2]
  158. float fFeedback; // output signal to feed back into input [-1......1]
  159. float fDelay; // delay sec [0<......n]
  160. int lChannel; // BASS_BFX_CHANxxx flag/s
  161. } BASS_BFX_ECHO2;
  162. // Phaser
  163. typedef struct {
  164. float fDryMix; // dry (unaffected) signal mix [-2......2]
  165. float fWetMix; // wet (affected) signal mix [-2......2]
  166. float fFeedback; // output signal to feed back into input [-1......1]
  167. float fRate; // rate of sweep in cycles per second [0<....<10]
  168. float fRange; // sweep range in octaves [0<....<10]
  169. float fFreq; // base frequency of sweep [0<...1000]
  170. int lChannel; // BASS_BFX_CHANxxx flag/s
  171. } BASS_BFX_PHASER;
  172. // Echo 3 (deprecated)
  173. typedef struct {
  174. float fDryMix; // dry (unaffected) signal mix [-2......2]
  175. float fWetMix; // wet (affected) signal mix [-2......2]
  176. float fDelay; // delay sec [0<......n]
  177. int lChannel; // BASS_BFX_CHANxxx flag/s
  178. } BASS_BFX_ECHO3;
  179. // Chorus/Flanger
  180. typedef struct {
  181. float fDryMix; // dry (unaffected) signal mix [-2......2]
  182. float fWetMix; // wet (affected) signal mix [-2......2]
  183. float fFeedback; // output signal to feed back into input [-1......1]
  184. float fMinSweep; // minimal delay ms [0<...6000]
  185. float fMaxSweep; // maximum delay ms [0<...6000]
  186. float fRate; // rate ms/s [0<...1000]
  187. int lChannel; // BASS_BFX_CHANxxx flag/s
  188. } BASS_BFX_CHORUS;
  189. // All Pass Filter (deprecated)
  190. typedef struct {
  191. float fGain; // reverberation time [-1=<..<=1]
  192. float fDelay; // delay sec [0<....<=n]
  193. int lChannel; // BASS_BFX_CHANxxx flag/s
  194. } BASS_BFX_APF;
  195. // Compressor (deprecated)
  196. typedef struct {
  197. float fThreshold; // compressor threshold [0<=...<=1]
  198. float fAttacktime; // attack time ms [0<.<=1000]
  199. float fReleasetime; // release time ms [0<.<=5000]
  200. int lChannel; // BASS_BFX_CHANxxx flag/s
  201. } BASS_BFX_COMPRESSOR;
  202. // Distortion
  203. typedef struct {
  204. float fDrive; // distortion drive [0<=...<=5]
  205. float fDryMix; // dry (unaffected) signal mix [-5<=..<=5]
  206. float fWetMix; // wet (affected) signal mix [-5<=..<=5]
  207. float fFeedback; // output signal to feed back into input [-1<=..<=1]
  208. float fVolume; // distortion volume [0=<...<=2]
  209. int lChannel; // BASS_BFX_CHANxxx flag/s
  210. } BASS_BFX_DISTORTION;
  211. // Compressor 2
  212. typedef struct {
  213. float fGain; // output gain of signal after compression [-60....60] in dB
  214. float fThreshold; // point at which compression begins [-60.....0] in dB
  215. float fRatio; // compression ratio [1.......n]
  216. float fAttack; // attack time in ms [0.01.1000]
  217. float fRelease; // release time in ms [0.01.5000]
  218. int lChannel; // BASS_BFX_CHANxxx flag/s
  219. } BASS_BFX_COMPRESSOR2;
  220. // Volume envelope
  221. typedef struct {
  222. int lChannel; // BASS_BFX_CHANxxx flag/s
  223. int lNodeCount; // number of nodes
  224. const struct BASS_BFX_ENV_NODE *pNodes; // the nodes
  225. BOOL bFollow; // follow source position
  226. } BASS_BFX_VOLUME_ENV;
  227. #pragma pack(push,4)
  228. typedef struct BASS_BFX_ENV_NODE {
  229. double pos; // node position in seconds (1st envelope node must be at position 0)
  230. float val; // node value
  231. } BASS_BFX_ENV_NODE;
  232. #pragma pack(pop)
  233. // BiQuad Filters
  234. enum {
  235. BASS_BFX_BQF_LOWPASS,
  236. BASS_BFX_BQF_HIGHPASS,
  237. BASS_BFX_BQF_BANDPASS, // constant 0 dB peak gain
  238. BASS_BFX_BQF_BANDPASS_Q, // constant skirt gain, peak gain = Q
  239. BASS_BFX_BQF_NOTCH,
  240. BASS_BFX_BQF_ALLPASS,
  241. BASS_BFX_BQF_PEAKINGEQ,
  242. BASS_BFX_BQF_LOWSHELF,
  243. BASS_BFX_BQF_HIGHSHELF
  244. };
  245. typedef struct {
  246. int lFilter; // BASS_BFX_BQF_xxx filter types
  247. float fCenter; // [1Hz..<info.freq/2] Cutoff (central) frequency in Hz
  248. float fGain; // [-15dB...0...+15dB] Used only for PEAKINGEQ and Shelving filters in dB (can be above/below these limits)
  249. float fBandwidth; // [0.1...........<10] Bandwidth in octaves (fQ is not in use (fBandwidth has a priority over fQ))
  250. // (between -3 dB frequencies for BANDPASS and NOTCH or between midpoint
  251. // (fGgain/2) gain frequencies for PEAKINGEQ)
  252. float fQ; // [0.1.............1] The EE kinda definition (linear) (if fBandwidth is not in use)
  253. float fS; // [0.1.............1] A "shelf slope" parameter (linear) (used only with Shelving filters)
  254. // when fS = 1, the shelf slope is as steep as you can get it and remain monotonically
  255. // increasing or decreasing gain with frequency.
  256. int lChannel; // BASS_BFX_CHANxxx flag/s
  257. } BASS_BFX_BQF;
  258. // Echo 4
  259. typedef struct {
  260. float fDryMix; // dry (unaffected) signal mix [-2.......2]
  261. float fWetMix; // wet (affected) signal mix [-2.......2]
  262. float fFeedback; // output signal to feed back into input [-1.......1]
  263. float fDelay; // delay sec [0<.......n]
  264. BOOL bStereo; // echo adjoining channels to each other [TRUE/FALSE]
  265. int lChannel; // BASS_BFX_CHANxxx flag/s
  266. } BASS_BFX_ECHO4;
  267. // Pitch shift (not available on mobile)
  268. typedef struct {
  269. float fPitchShift; // A factor value which is between 0.5 (one octave down) and 2 (one octave up) (1 won't change the pitch) [1 default]
  270. // (fSemitones is not in use, fPitchShift has a priority over fSemitones)
  271. float fSemitones; // Semitones (0 won't change the pitch) [0 default]
  272. long lFFTsize; // Defines the FFT frame size used for the processing. Typical values are 1024, 2048 and 4096 [2048 default]
  273. // It may be any value <= 8192 but it MUST be a power of 2
  274. long lOsamp; // Is the STFT oversampling factor which also determines the overlap between adjacent STFT frames [8 default]
  275. // It should at least be 4 for moderate scaling ratios. A value of 32 is recommended for best quality (better quality = higher CPU usage)
  276. int lChannel; // BASS_BFX_CHANxxx flag/s
  277. } BASS_BFX_PITCHSHIFT;
  278. // Freeverb
  279. #define BASS_BFX_FREEVERB_MODE_FREEZE 1
  280. typedef struct {
  281. float fDryMix; // dry (unaffected) signal mix [0........1], def. 0
  282. float fWetMix; // wet (affected) signal mix [0........3], def. 1.0f
  283. float fRoomSize; // room size [0........1], def. 0.5f
  284. float fDamp; // damping [0........1], def. 0.5f
  285. float fWidth; // stereo width [0........1], def. 1
  286. DWORD lMode; // 0 or BASS_BFX_FREEVERB_MODE_FREEZE, def. 0 (no freeze)
  287. int lChannel; // BASS_BFX_CHANxxx flag/s
  288. } BASS_BFX_FREEVERB;
  289. /*===========================================================================
  290. set dsp fx - BASS_ChannelSetFX
  291. remove dsp fx - BASS_ChannelRemoveFX
  292. set parameters - BASS_FXSetParameters
  293. retrieve parameters - BASS_FXGetParameters
  294. reset the state - BASS_FXReset
  295. ===========================================================================*/
  296. /*===========================================================================
  297. Tempo, Pitch scaling and Sample rate changers
  298. ===========================================================================*/
  299. // NOTE: Enable Tempo supported flags in BASS_FX_TempoCreate and the others to source handle.
  300. // tempo attributes (BASS_ChannelSet/GetAttribute)
  301. enum {
  302. BASS_ATTRIB_TEMPO = 0x10000,
  303. BASS_ATTRIB_TEMPO_PITCH,
  304. BASS_ATTRIB_TEMPO_FREQ
  305. };
  306. // tempo attributes options
  307. enum {
  308. BASS_ATTRIB_TEMPO_OPTION_USE_AA_FILTER = 0x10010, // TRUE (default) / FALSE (default for multi-channel on mobile devices for lower CPU usage)
  309. BASS_ATTRIB_TEMPO_OPTION_AA_FILTER_LENGTH, // 32 default (8 .. 128 taps)
  310. BASS_ATTRIB_TEMPO_OPTION_USE_QUICKALGO, // TRUE (default on mobile devices for lower CPU usage) / FALSE (default)
  311. BASS_ATTRIB_TEMPO_OPTION_SEQUENCE_MS, // 82 default, 0 = automatic
  312. BASS_ATTRIB_TEMPO_OPTION_SEEKWINDOW_MS, // 28 default, 0 = automatic
  313. BASS_ATTRIB_TEMPO_OPTION_OVERLAP_MS, // 8 default
  314. BASS_ATTRIB_TEMPO_OPTION_PREVENT_CLICK // TRUE / FALSE (default)
  315. };
  316. // tempo algorithm flags
  317. #define BASS_FX_TEMPO_ALGO_LINEAR 0x200
  318. #define BASS_FX_TEMPO_ALGO_CUBIC 0x400 // default
  319. #define BASS_FX_TEMPO_ALGO_SHANNON 0x800
  320. HSTREAM BASS_FXDEF(BASS_FX_TempoCreate)(DWORD chan, DWORD flags);
  321. DWORD BASS_FXDEF(BASS_FX_TempoGetSource)(HSTREAM chan);
  322. float BASS_FXDEF(BASS_FX_TempoGetRateRatio)(HSTREAM chan);
  323. /*===========================================================================
  324. Reverse playback
  325. ===========================================================================*/
  326. // NOTES: 1. MODs won't load without BASS_MUSIC_PRESCAN flag.
  327. // 2. Enable Reverse supported flags in BASS_FX_ReverseCreate and the others to source handle.
  328. // reverse attribute (BASS_ChannelSet/GetAttribute)
  329. #define BASS_ATTRIB_REVERSE_DIR 0x11000
  330. // playback directions
  331. #define BASS_FX_RVS_REVERSE -1
  332. #define BASS_FX_RVS_FORWARD 1
  333. HSTREAM BASS_FXDEF(BASS_FX_ReverseCreate)(DWORD chan, float dec_block, DWORD flags);
  334. DWORD BASS_FXDEF(BASS_FX_ReverseGetSource)(HSTREAM chan);
  335. /*===========================================================================
  336. BPM (Beats Per Minute)
  337. ===========================================================================*/
  338. // bpm flags
  339. #define BASS_FX_BPM_BKGRND 1 // if in use, then you can do other processing while detection's in progress. Available only in Windows platforms (BPM/Beat)
  340. #define BASS_FX_BPM_MULT2 2 // if in use, then will auto multiply bpm by 2 (if BPM < minBPM*2)
  341. // translation options (deprecated)
  342. enum {
  343. BASS_FX_BPM_TRAN_X2, // multiply the original BPM value by 2 (may be called only once & will change the original BPM as well!)
  344. BASS_FX_BPM_TRAN_2FREQ, // BPM value to Frequency
  345. BASS_FX_BPM_TRAN_FREQ2, // Frequency to BPM value
  346. BASS_FX_BPM_TRAN_2PERCENT, // BPM value to Percents
  347. BASS_FX_BPM_TRAN_PERCENT2 // Percents to BPM value
  348. };
  349. typedef void (CALLBACK BPMPROC)(DWORD chan, float bpm, void *user);
  350. typedef void (CALLBACK BPMPROGRESSPROC)(DWORD chan, float percent, void *user);
  351. typedef BPMPROGRESSPROC BPMPROCESSPROC; // back-compatibility
  352. float BASS_FXDEF(BASS_FX_BPM_DecodeGet)(DWORD chan, double startSec, double endSec, DWORD minMaxBPM, DWORD flags, BPMPROGRESSPROC *proc, void *user);
  353. BOOL BASS_FXDEF(BASS_FX_BPM_CallbackSet)(DWORD handle, BPMPROC *proc, double period, DWORD minMaxBPM, DWORD flags, void *user);
  354. BOOL BASS_FXDEF(BASS_FX_BPM_CallbackReset)(DWORD handle);
  355. float BASS_FXDEF(BASS_FX_BPM_Translate)(DWORD handle, float val2tran, DWORD trans); // deprecated
  356. BOOL BASS_FXDEF(BASS_FX_BPM_Free)(DWORD handle);
  357. /*===========================================================================
  358. Beat position trigger
  359. ===========================================================================*/
  360. typedef void (CALLBACK BPMBEATPROC)(DWORD chan, double beatpos, void *user);
  361. BOOL BASS_FXDEF(BASS_FX_BPM_BeatCallbackSet)(DWORD handle, BPMBEATPROC *proc, void *user);
  362. BOOL BASS_FXDEF(BASS_FX_BPM_BeatCallbackReset)(DWORD handle);
  363. BOOL BASS_FXDEF(BASS_FX_BPM_BeatDecodeGet)(DWORD chan, double startSec, double endSec, DWORD flags, BPMBEATPROC *proc, void *user);
  364. BOOL BASS_FXDEF(BASS_FX_BPM_BeatSetParameters)(DWORD handle, float bandwidth, float centerfreq, float beat_rtime);
  365. BOOL BASS_FXDEF(BASS_FX_BPM_BeatGetParameters)(DWORD handle, float *bandwidth, float *centerfreq, float *beat_rtime);
  366. BOOL BASS_FXDEF(BASS_FX_BPM_BeatFree)(DWORD handle);
  367. /*===========================================================================
  368. Macros
  369. ===========================================================================*/
  370. // translate linear level to logarithmic dB
  371. #define BASS_BFX_Linear2dB(level) (20*log10(level))
  372. // translate logarithmic dB level to linear
  373. #define BASS_BFX_dB2Linear(dB) pow(10,(dB)/20)
  374. #ifdef __cplusplus
  375. }
  376. #endif
  377. #endif