async void GetBeatPos_Callback(int Channel, double beatPosition, IntPtr User) { var curpos = Bass.ChannelBytes2Seconds(Channel, Bass.ChannelGetPosition(Channel)); await Task.Delay(TimeSpan.FromSeconds(beatPosition - curpos)); BeatPosition = Bass.ChannelBytes2Seconds(Channel, Bass.ChannelGetPosition(Channel)) / BassFx.TempoGetRateRatio(Channel); }