Hi guys I need help BASS_ChannelSetFX function
BASS_DX8_PARAMEQ;
My AMS Code:
Play Bass Code:
PHP Code:
HFX BASS_ChannelSetFX(
DWORD handle,
DWORD type,
int priority
);
PHP Code:
typedef struct {
float fCenter;
float fBandwidth;
float fGain;
}
PHP Code:
BOOL BASS_FXSetParameters(
HFX handle,
void *params
);
PHP Code:
fx = {}
nStruct = MemoryEx.DefineStruct{
FLOAT("fCenter");
FLOAT("fBandwidth");
FLOAT("fGain");
};
fx[0] = BassDll.BASS_ChannelSetFX(nStream, BASS_DX8_PARAMEQ, 1);
fx[1] = BassDll.BASS_ChannelSetFX(nStream, BASS_DX8_PARAMEQ, 1);
fx[2] = BassDll.BASS_ChannelSetFX(nStream, BASS_DX8_PARAMEQ, 1);
local lpBuff = MemoryEx.Allocate(MemoryEx.StructSize(nStruct));
if(lpBuff)then
local hStruct = MemoryEx.AssignStruct(lpBuff, nStruct);
if(hStruct)then
hStruct.fGain = 0;
hStruct.fBandwidth = 18;
hStruct.fCenter = 80;
BassDll.BASS_FXSetParameters(fx[0], hStruct);
hStruct.fCenter = 170;
BassDll.BASS_FXSetParameters(fx[1], hStruct);
hStruct.fCenter = 310;
BassDll.BASS_FXSetParameters(fx[2], hStruct);
end
end
PHP Code:
BassDll = Library.Load(_SourceFolder.."\\bass.dll");
BASS.Init = function (nFlags, nDevice, nFreq, nWin, nCLSID)
return BassDll.BASS_Init(nDevice, nFreq, nFlags, nWin, nCLSID);
end
BASS.StreamCreateFile = function (bMem, sFile, nOffset, nLength, nFlags)
if (type(bMem) == 'boolean') then
if (bMem == true) then
bMem = 1;
else
bMem = 0;
end
else
bMem = 0;
end
return BassDll.BASS_StreamCreateFile(bMem, sFile, nOffset, nLength, Bitwise.Or(nFlags, 0x80000000));
end
BASS.ChannelPlay = function (nHandle, bRestart)
if (type(bRestart) == 'boolean') then
if (bRestart == true) then
bRestart = 1;
else
bRestart = 0;
end
end
return BassDll.BASS_ChannelPlay(nHandle, bRestart);
end
nStream = BASS.StreamCreateFile(false, sFilePath, 0, 0, 0);
BASS.ChannelPlay(nStream, true);