Author Topic: how to use the bass_fx reverse?  (Read 2782 times)

dman10001

  • Posts: 100
how to use the bass_fx reverse?
« on: 10 Sep '10 - 08:44 »
i'm trying to use the bass_fx reverse, but it only go in reverse even when I change the settings.

please let me know what I'm doing wrong.

Code: [Select]
#constant DECODE            0x200000
#constant LOOP_CHN         4
#constant AUTOFREE          0x40000
#constant PRESCAN            0x20000
#constant FLOAT_CHN       256
#constant REVERSE_ATTRIBUTE 0x11000
#constant FORWARD           1
#constant REVERSE          -1



type img

  x as integer
  y as integer

endtype

global dim ins(640*30) as img
global stream1 as dword
global stream2 as dword
global length
global bpp1
global bpp2
global i





set display mode 640,480,32
  sync on
ink rgb(255,255,0),rgb(0,0,0)

load dll "bass.dll",1
load dll "bass_fx.dll",2

call dll 1,"BASS_Init",-1,44100,0,0,0

stream1 = call dll (1,"BASS_StreamCreateFile",0,"1.mp3",0,0,DECODE || PRESCAN || FLOAT_CHN)
stream2 = call dll (2,"BASS_FX_ReverseCreate",stream1,2.0,AUTOFREE || LOOP_CHN)

length = call dll (1,"BASS_ChannelGetLength",stream1,0)

bpp1 = call dll (1,"BASS_ChannelSeconds2Bytes",stream1,0.02)

call dll 1,"BASS_ChannelSetAttributes",stream2,REVERSE_ATTRIBUTE,FORWARD

(: JOBnik! :)

  • Posts: 1065
Re: how to use the bass_fx reverse?
« Reply #1 on: 10 Sep '10 - 12:39 »
Hi ;D

There's no such a function BASS_ChannelSetAttributes, remove the "s" at the end of function name ;)

dman10001

  • Posts: 100
Re: how to use the bass_fx reverse?
« Reply #2 on: 10 Sep '10 - 12:51 »
I know, I'm using BASS_FX version 2.3.0.3

(: JOBnik! :)

  • Posts: 1065
Re: how to use the bass_fx reverse?
« Reply #3 on: 10 Sep '10 - 12:56 »
Hi ;D

I would suggest upgrading to the most latest BASS and BASS_FX.
Back then, the reverse direction couldn't be changed using the BASS_ChannelSetAttributes function.
Please use:
     BASS_FX_ReverseSetDirection
     BASS_FX_ReverseGetDirection

dman10001

  • Posts: 100
Re: how to use the bass_fx reverse?
« Reply #4 on: 10 Sep '10 - 13:39 »
I do not see those function in the doc.

how would I use them?


(: JOBnik! :)

  • Posts: 1065
Re: how to use the bass_fx reverse?
« Reply #5 on: 12 Sep '10 - 12:31 »
Hi ;D

Are you reading the docs from the BASS_FX 2.3.0.3 version?

Quote
BASS_FX_ReverseSetDirection

--------------------------------------------------------------------------------

Change playback direction.

BOOL BASS_FX_ReverseSetDirection(
    HSTREAM chan,
    DWORD direction
);
 


Parameters
chan Reverse stream (or source channel) handle
 
direction playback direction: BASS_FX_RVS_REVERSE or BASS_FX_RVS_FORWARD


Return value
If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes
BASS_ERROR_HANDLE chan is not valid
BASS_ERROR_ILLPARAM An illegal parameter was specified

Quote
BASS_FX_ReverseGetDirection

--------------------------------------------------------------------------------

Get playback direction.

DWORD BASS_FX_ReverseGetDirection(
    HSTREAM chan
);


Parameters
chan reverse stream (or source channel) handle


Return value
If successful, playback direction is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error code
BASS_ERROR_HANDLE chan is not valid