Announcement

Collapse
No announcement yet.

BASS_ChannelSetFX MemoryEx

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BASS_ChannelSetFX MemoryEx

    Hi guys I need help BASS_ChannelSetFX function

    PHP Code:
    HFX BASS_ChannelSetFX(
        
    DWORD handle,
        
    DWORD type,
        
    int priority
    ); 
    BASS_DX8_PARAMEQ;

    PHP Code:
    typedef struct {
        
    float fCenter;
        
    float fBandwidth;
        
    float fGain;

    PHP Code:
    BOOL BASS_FXSetParameters(
        
    HFX handle,
        
    void *params
    ); 
    My AMS Code:

    PHP Code:
    fx = {}

    nStruct MemoryEx.DefineStruct{
    FLOAT("fCenter");
    FLOAT("fBandwidth");
    FLOAT("fGain");
    };

    fx[0] = BassDll.BASS_ChannelSetFX(nStreamBASS_DX8_PARAMEQ1);
    fx[1] = BassDll.BASS_ChannelSetFX(nStreamBASS_DX8_PARAMEQ1);
    fx[2] = BassDll.BASS_ChannelSetFX(nStreamBASS_DX8_PARAMEQ1);

    local lpBuff MemoryEx.Allocate(MemoryEx.StructSize(nStruct));
    if(
    lpBuff)then
    local hStruct 
    MemoryEx.AssignStruct(lpBuffnStruct);
      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 
    Play Bass Code:

    PHP Code:
    BassDll Library.Load(_SourceFolder.."\\bass.dll");

    BASS.Init = function (nFlagsnDevicenFreqnWinnCLSID)
        return 
    BassDll.BASS_Init(nDevicenFreqnFlagsnWinnCLSID);
    end

    BASS
    .StreamCreateFile = function (bMemsFilenOffsetnLengthnFlags)
        if (
    type(bMem) == 'boolean'then
            
    if (bMem == truethen
                bMem 
    1;
            else
                
    bMem 0;
            
    end
        
    else
            
    bMem 0;
        
    end
        
    return BassDll.BASS_StreamCreateFile(bMemsFilenOffsetnLengthBitwise.Or(nFlags0x80000000));
    end

    BASS
    .ChannelPlay = function (nHandlebRestart)
        if (
    type(bRestart) == 'boolean'then
            
    if (bRestart == truethen
                bRestart 
    1;
            else
                
    bRestart 0;
            
    end
        end
        
    return BassDll.BASS_ChannelPlay(nHandlebRestart);
    end

    nStream 
    BASS.StreamCreateFile(falsesFilePath000);
    BASS.ChannelPlay(nStreamtrue); 
Working...
X