fix(audio-analysis): avoid spectrogram splice noise

This commit is contained in:
zarzet
2026-08-28 01:48:52 +07:00
parent 433f8ed685
commit 51f61c9c95
3 changed files with 55 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ part of 'audio_analysis_widget.dart';
// Analysis result models and per-run parameter records.
class AudioAnalysisData {
static const cacheVersion = 12;
static const cacheVersion = 13;
final String filePath;
final int fileSize;
+6 -1
View File
@@ -23,7 +23,12 @@ const int audioSpectrogramWidth = 1600;
const int audioSpectrogramHeight = 800;
const int audioSpectralAnalysisWidth = 400;
const double audioSpectrogramDynamicRangeDb = 120;
const int audioSpectrogramSampleWindowCount = 300;
// Keep splice boundaries well below the cutoff estimator's top temporal
// percentile. Too many short excerpts turn waveform discontinuities into a
// persistent broadband floor, which can make a real low-pass edge look like
// full-band content. Longer windows preserve the same whole-track coverage and
// memory bound while making the small number of seams statistical outliers.
const int audioSpectrogramSampleWindowCount = 16;
const int audioSpectrogramMaxSelectedChannelSamples = 8 * 1024 * 1024;
String formatAudioAnalysisSpectralCutoff(