void OnAudioFilterRead(float[] data, int channels) { int numSamples = data.Length / channels; float time = (float)numSamples / sampleRate; int ticks = (int)(time * SunVox.sv_get_ticks_per_second()); // I think I got this right but I'm not sure? // TODO check the docs again... e.g. what is "user_ticks_per_second"? SunVox.sv_audio_callback(data, numSamples, numSamples, SunVox.sv_get_ticks() + ticks); }