feat: enhanced audio analysis with loudness, clipping, and spectral cutoff

Audio Analysis Enhancements:
- Display codec name and container format
- Show decoded sample format (s16, s32, fltp, etc.)
- Add LUFS integrated loudness measurement (broadcast standard)
- Add true peak measurement (dBTP)
- Detect and count clipping samples per channel
- Estimate spectral cutoff frequency (helps detect fake upscales)
- Show per-channel statistics (Peak, RMS, DR, Clip count)

UI Improvements:
- MetricChip now handles long text with ellipsis
- Constrained max width for better layout

Cache version bumped to 4 to force rescan with new metrics.
This commit is contained in:
zarzet
2026-05-14 16:28:49 +07:00
parent 60f1df1488
commit 1b8d6ce7fa
18 changed files with 857 additions and 36 deletions
+14 -17
View File
@@ -428,23 +428,20 @@ void main() {
});
group('audio conversion utils', () {
test('detects Dolby formats from stored scan format before file extension', () {
expect(
convertibleAudioSourceFormat(
storedFormat: 'eac3',
filePath: 'content://media/song.m4a',
),
'EAC3',
);
expect(
convertibleAudioSourceFormat(fileName: 'Song.ac-3'),
'AC3',
);
expect(
convertibleAudioSourceFormat(storedFormat: 'ac4'),
'AC4',
);
});
test(
'detects Dolby formats from stored scan format before file extension',
() {
expect(
convertibleAudioSourceFormat(
storedFormat: 'eac3',
filePath: 'content://media/song.m4a',
),
'EAC3',
);
expect(convertibleAudioSourceFormat(fileName: 'Song.ac-3'), 'AC3');
expect(convertibleAudioSourceFormat(storedFormat: 'ac4'), 'AC4');
},
);
test('allows Dolby sources only for lossy batch conversion targets', () {
expect(