private void MyWaveFormCallback(int framesDone, int framesTotal, TimeSpan elapsedTime, bool finished) { if (finished) { _WF.SyncPlayback(_currentTrack.Channel); // and do pre-calculate the next track position // in this example we will only use the end-position long startPos = 0L; long endPos = 0L; if (_WF.GetCuePoints(ref startPos, ref endPos, -24.0, -12.0, true)) { _currentTrack.NextTrackPos = endPos; // if there is already a sync set, remove it first if (_currentTrack.NextTrackSync != 0) { BassMix.BASS_Mixer_ChannelRemoveSync(_currentTrack.Channel, _currentTrack.NextTrackSync); } // set the next track sync automatically _currentTrack.NextTrackSync = BassMix.BASS_Mixer_ChannelSetSync(_currentTrack.Channel, BASSSync.BASS_SYNC_POS | BASSSync.BASS_SYNC_MIXTIME, _currentTrack.NextTrackPos, _currentTrack.TrackSync, new IntPtr(1)); _WF.AddMarker("Next", _currentTrack.NextTrackPos); } } // will be called during rendering... DrawWave(); }
private void myWaveFormCallback(int framesDone, int framesTotal, TimeSpan elapsedTime, bool finished) { if (finished) { long cuein = 0; long cueout = 0; WF2.GetCuePoints(ref cuein, ref cueout, -25.0, -42.0, -1, -1); WF2.AddMarker("CUE", cuein); WF2.AddMarker("EED", cueout); } drawWave(); }
private void MyWaveFormCallback(int framesDone, int framesTotal, TimeSpan elapsedTime, bool finished) { if (finished) { //Console.WriteLine("Finished rendering in {0}sec.", elapsedTime); //Console.WriteLine("FramesRendered={0} of {1}", WF2.FramesRendered, WF2.FramesToRender); // eg.g use this to save the rendered wave form... //WF.WaveFormSaveToFile( @"C:\test.wf" ); // auto detect silence at beginning and end long cuein = 0; long cueout = 0; WF2.GetCuePoints(ref cuein, ref cueout, -25.0, -42.0, -1, -1); WF2.AddMarker("CUE", cuein); WF2.AddMarker("END", cueout); ReadProcessComplete?.Invoke(); } }