1
0

bassmix.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. BASSmix 2.4 C/C++ header file
  3. Copyright (c) 2005-2017 Un4seen Developments Ltd.
  4. See the BASSMIX.CHM file for more detailed documentation
  5. */
  6. #ifndef BASSMIX_H
  7. #define BASSMIX_H
  8. #include "bass.h"
  9. #if BASSVERSION!=0x204
  10. #error conflicting BASS and BASSmix versions
  11. #endif
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifndef BASSMIXDEF
  16. #define BASSMIXDEF(f) WINAPI f
  17. #endif
  18. // additional BASS_SetConfig option
  19. #define BASS_CONFIG_MIXER_BUFFER 0x10601
  20. #define BASS_CONFIG_MIXER_POSEX 0x10602
  21. #define BASS_CONFIG_SPLIT_BUFFER 0x10610
  22. // BASS_Mixer_StreamCreate flags
  23. #define BASS_MIXER_END 0x10000 // end the stream when there are no sources
  24. #define BASS_MIXER_NONSTOP 0x20000 // don't stall when there are no sources
  25. #define BASS_MIXER_RESUME 0x1000 // resume stalled immediately upon new/unpaused source
  26. #define BASS_MIXER_POSEX 0x2000 // enable BASS_Mixer_ChannelGetPositionEx support
  27. // source flags
  28. #define BASS_MIXER_BUFFER 0x2000 // buffer data for BASS_Mixer_ChannelGetData/Level
  29. #define BASS_MIXER_LIMIT 0x4000 // limit mixer processing to the amount available from this source
  30. #define BASS_MIXER_MATRIX 0x10000 // matrix mixing
  31. #define BASS_MIXER_PAUSE 0x20000 // don't process the source
  32. #define BASS_MIXER_DOWNMIX 0x400000 // downmix to stereo/mono
  33. #define BASS_MIXER_NORAMPIN 0x800000 // don't ramp-in the start
  34. // mixer attributes
  35. #define BASS_ATTRIB_MIXER_LATENCY 0x15000
  36. // splitter flags
  37. #define BASS_SPLIT_SLAVE 0x1000 // only read buffered data
  38. #define BASS_SPLIT_POS 0x2000
  39. // splitter attributes
  40. #define BASS_ATTRIB_SPLIT_ASYNCBUFFER 0x15010
  41. #define BASS_ATTRIB_SPLIT_ASYNCPERIOD 0x15011
  42. // envelope node
  43. typedef struct {
  44. QWORD pos;
  45. float value;
  46. } BASS_MIXER_NODE;
  47. // envelope types
  48. #define BASS_MIXER_ENV_FREQ 1
  49. #define BASS_MIXER_ENV_VOL 2
  50. #define BASS_MIXER_ENV_PAN 3
  51. #define BASS_MIXER_ENV_LOOP 0x10000 // flag: loop
  52. // additional sync type
  53. #define BASS_SYNC_MIXER_ENVELOPE 0x10200
  54. #define BASS_SYNC_MIXER_ENVELOPE_NODE 0x10201
  55. // additional BASS_Mixer_ChannelSetPosition flag
  56. #define BASS_POS_MIXER_RESET 0x10000 // flag: clear mixer's playback buffer
  57. // BASS_CHANNELINFO type
  58. #define BASS_CTYPE_STREAM_MIXER 0x10800
  59. #define BASS_CTYPE_STREAM_SPLIT 0x10801
  60. DWORD BASSMIXDEF(BASS_Mixer_GetVersion)();
  61. HSTREAM BASSMIXDEF(BASS_Mixer_StreamCreate)(DWORD freq, DWORD chans, DWORD flags);
  62. BOOL BASSMIXDEF(BASS_Mixer_StreamAddChannel)(HSTREAM handle, DWORD channel, DWORD flags);
  63. BOOL BASSMIXDEF(BASS_Mixer_StreamAddChannelEx)(HSTREAM handle, DWORD channel, DWORD flags, QWORD start, QWORD length);
  64. DWORD BASSMIXDEF(BASS_Mixer_StreamGetChannels)(HSTREAM handle, DWORD *channels, DWORD count);
  65. HSTREAM BASSMIXDEF(BASS_Mixer_ChannelGetMixer)(DWORD handle);
  66. DWORD BASSMIXDEF(BASS_Mixer_ChannelFlags)(DWORD handle, DWORD flags, DWORD mask);
  67. BOOL BASSMIXDEF(BASS_Mixer_ChannelRemove)(DWORD handle);
  68. BOOL BASSMIXDEF(BASS_Mixer_ChannelSetPosition)(DWORD handle, QWORD pos, DWORD mode);
  69. QWORD BASSMIXDEF(BASS_Mixer_ChannelGetPosition)(DWORD handle, DWORD mode);
  70. QWORD BASSMIXDEF(BASS_Mixer_ChannelGetPositionEx)(DWORD channel, DWORD mode, DWORD delay);
  71. DWORD BASSMIXDEF(BASS_Mixer_ChannelGetLevel)(DWORD handle);
  72. BOOL BASSMIXDEF(BASS_Mixer_ChannelGetLevelEx)(DWORD handle, float *levels, float length, DWORD flags);
  73. DWORD BASSMIXDEF(BASS_Mixer_ChannelGetData)(DWORD handle, void *buffer, DWORD length);
  74. HSYNC BASSMIXDEF(BASS_Mixer_ChannelSetSync)(DWORD handle, DWORD type, QWORD param, SYNCPROC *proc, void *user);
  75. BOOL BASSMIXDEF(BASS_Mixer_ChannelRemoveSync)(DWORD channel, HSYNC sync);
  76. BOOL BASSMIXDEF(BASS_Mixer_ChannelSetMatrix)(DWORD handle, const void *matrix);
  77. BOOL BASSMIXDEF(BASS_Mixer_ChannelSetMatrixEx)(DWORD handle, const void *matrix, float time);
  78. BOOL BASSMIXDEF(BASS_Mixer_ChannelGetMatrix)(DWORD handle, void *matrix);
  79. BOOL BASSMIXDEF(BASS_Mixer_ChannelSetEnvelope)(DWORD handle, DWORD type, const BASS_MIXER_NODE *nodes, DWORD count);
  80. BOOL BASSMIXDEF(BASS_Mixer_ChannelSetEnvelopePos)(DWORD handle, DWORD type, QWORD pos);
  81. QWORD BASSMIXDEF(BASS_Mixer_ChannelGetEnvelopePos)(DWORD handle, DWORD type, float *value);
  82. HSTREAM BASSMIXDEF(BASS_Split_StreamCreate)(DWORD channel, DWORD flags, const int *chanmap);
  83. DWORD BASSMIXDEF(BASS_Split_StreamGetSource)(HSTREAM handle);
  84. DWORD BASSMIXDEF(BASS_Split_StreamGetSplits)(DWORD handle, HSTREAM *splits, DWORD count);
  85. BOOL BASSMIXDEF(BASS_Split_StreamReset)(DWORD handle);
  86. BOOL BASSMIXDEF(BASS_Split_StreamResetEx)(DWORD handle, DWORD offset);
  87. DWORD BASSMIXDEF(BASS_Split_StreamGetAvailable)(DWORD handle);
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif