19 Jun '13 - 14:55 *
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: C# ChannelGetPosition returns an earlier position at low tempo  (Read 511 times)
aevia
Guest
« on: 26 Sep '11 - 23:57 »
Reply with quoteQuote

Hi, im using this code to create a tempo stream

int h = Bass.BASS_StreamCreateFile(path, 0L, 0, BASSFlag.BASS_STREAM_DECODE);
h = BassFx.BASS_FX_TempoCreate(h, 0);
Bass.BASS_ChannelSetAttribute(h, BASSAttribute.BASS_ATTRIB_TEMPO_FREQ, 44100);

which is working fine, except for after using

Bass.BASS_ChannelSetAttribute(handle, BASSAttribute.BASS_ATTRIB_TEMPO, value);

to adjust the tempo. I have some other sounds playing at certain offsets, which i determine with

return Bass.BASS_ChannelBytes2Seconds(handle, Bass.BASS_ChannelGetPosition(handle));

and the sounds are perfectly in sync when at regular tempo or faster, but when slowing down, the more i slow down, the value returned with the above code (returning as double) would for example be 400, when the audio is actually at 420, so all of my extra sounds play late. The more i decrease the tempo, the larger the gap becomes. If I change the frequency, not the tempo, the position from ChannelGetPosition is accurate no matter what frequency I use, but for this I need the frequency to stay the same and the tempo to change.

Is there some flag i am missing that would make the value always be correct, or is there another way I need to be doing this in order to get the correct value at low tempo?

Thanks in advance
Logged
NeverDie
Guest
« Reply #1 on: 28 Sep '11 - 11:29 »
Reply with quoteQuote

Interesting, I seem to be having a similar problem to this as well. In for a response.
Logged
(: JOBnik! :)
Posts: 991


« Reply #2 on: 4 Oct '11 - 11:08 »
Reply with quoteQuote

Hi Grin

Thank for the info. I'll check it soon Smiley
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines