25 May '13 - 23:59 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: ChannelSlide  (Read 472 times)
Ops2011
Posts: 42


« on: 26 Nov '11 - 13:00 »
Reply with quoteQuote

Hi there,
I'am using BASS_ChannelSlideAttribute(PlayerLeft.Stream, BASS_ATTRIB_VOL, -1, FadeUntilEnd);
Is it possible to fade down 'BASS_ChannelGetData' and 'BASS_ChannelGetLevel' at the same time?
If the music fades, no fade there?
Is there a trick for? Or what do i wrong.
Thank you.


Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #1 on: 28 Nov '11 - 16:44 »
Reply with quoteQuote

The BASS_ATTRIB_VOL attribute is applied during playback (in the output mix) and is not present in the decoded sample data, which is what BASS_ChannelGetData/Level deal with. To make the effect of the volume level visible, you could apply it yourself, something like this...

DWORD level=BASS_ChannelGetLevel(handle); // get the sample data level
float volume;
BASS_ChannelGetAttribute(handle, BASS_ATTRIB_VOL, &volume); // get the volume level
float left=LOWORD(level)*volume; // extract the left level and apply the volume
float right=HIWORD(level)*volume; // extract the right level and apply the volume

A similar thing could be done with BASS_ChannelGetData, ie. apply the volume level to the returned sample/FFT data.
Logged
Ops2011
Posts: 42


« Reply #2 on: 2 Dec '11 - 05:56 »
Reply with quoteQuote

Looks good!
Thank you Ian.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines