chore: Follow up wrong amplitude

This commit is contained in:
Krille Fear 2022-01-02 10:11:55 +01:00
parent 7ddd7ad39a
commit e0d4798fd8
2 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
eventWaveForm.removeAt(i); eventWaveForm.removeAt(i);
i = (i + step) % AudioPlayerWidget.wavesCount; i = (i + step) % AudioPlayerWidget.wavesCount;
} }
return eventWaveForm; return eventWaveForm.map((i) => i > 1024 ? 1024 : i).toList();
} }
late final List<int> waveform; late final List<int> waveform;

View File

@ -98,7 +98,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
: (amplitudeTimeline.length / waveCount).round(); : (amplitudeTimeline.length / waveCount).round();
final waveform = <int>[]; final waveform = <int>[];
for (var i = 0; i < amplitudeTimeline.length; i += step) { for (var i = 0; i < amplitudeTimeline.length; i += step) {
waveform.add((amplitudeTimeline[i] / waveCount * 1024).round()); waveform.add((amplitudeTimeline[i] / 100 * 1024).round());
} }
Navigator.of(context, rootNavigator: false).pop<RecordingResult>( Navigator.of(context, rootNavigator: false).pop<RecordingResult>(
RecordingResult( RecordingResult(