/// <summary> /// Gets called when the analysis is completed. /// </summary> private void EndOfAnalysis() { //fill beats till end if (_calculateTempo) { beatTracker.FillEnd(); } if (_preCalculate) { //Do post-analysis here. if (_storeAnalyses) { List <AnalysisData> datas = new List <AnalysisData>(); foreach (Analysis a in analyses) { datas.Add(a.analysisData); } SongData songData = new SongData(datas, audioSource.clip.name, totalFrames, beatTracker, segmenter); songData.Serialize(); } } analysisDone = true; }
private void OnAnalysisDone() { if (_trackBeat) { beatTracker.FillEnd(totalFrames); } analysisDone = true; if (cacheAnalysis && preAnalyze) { Save(); } }