I tried
Code: Select all
int thePosition = Global.Buzz.Song.PlayPosition * host.MasterInfo.SamplesPerTick + host.MasterInfo.PosInTick;
Code: Select all
pMasterInfo->SamplesPerTick * pCB->GetSongPosition() + pMasterInfo->PosInTick
Code: Select all
int thePosition = Global.Buzz.Song.PlayPosition * host.MasterInfo.SamplesPerTick + host.MasterInfo.PosInTick;
Code: Select all
pMasterInfo->SamplesPerTick * pCB->GetSongPosition() + pMasterInfo->PosInTick
[12:56] oskari if you have Engine -> Accurate BPM enabled that calculation is not correct
[12:56] oskari because SamplesPerTicks changes
[12:57] wde ok. is there way to go around this?
[12:59] oskari double avgSamplesPerTick = (60.0 * host.MasterInfo.SamplesPerSec) / (host.MasterInfo.BeatsPerMin * host.MasterInfo.TicksPerBeat);
[12:59] oskari int thePosition = (int)(host.Machine.Graph.Buzz.Song.PlayPosition * avgSamplesPerTick + host.MasterInfo.PosInTick);
Code: Select all
public bool Work(Sample[] output, Sample[] input, int numsamples, WorkModes mode)