chore: Follow up wrong amplitude
This commit is contained in:
parent
60d7632536
commit
7f3c5b8c52
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue