Open
Description
Describe the bug
The callbacks onCurrentExtractedWaveformData and onExtractionProgress are working as expected, but when using await on extractWaveformData(), it neither throws an error nor returns — it just gets stuck
To Reproduce
final waveformExtraction = WaveformExtractionController();
final style = PlayerWaveStyle(waveThickness: 0.5, spacing: 1);
final samples = style.getSamplesForWidth(5 * duration * 2);
try {
waveformExtraction.onCurrentExtractedWaveformData.listen((data) {
debugLog("data: $data");
}); // Provides latest data while extracting the waveforms.
waveformExtraction.onExtractionProgress.listen((progress) {
debugLog("progress: $progress");
}); // Provides progress of the waveform extractions.
final waveformData = await waveformExtraction.extractWaveformData(
path: path,
noOfSamples: samples,
);
debugLog("waveformData: $waveformData");
} catch (e, stackTrace) {
debugLog("error: $e");
debugLog("stackTrace: $stackTrace");
}
Expected behavior
Make sure extractWaveformData returns correctly after finishing
Smartphone (please complete the following information):
- Device: [iPhone 16 Pro]
- OS: [iOS18.4]
- audio_waveforms branch: main
- Flutter version 3.29.2 on channel stable
- Dart version 3.7.2
Metadata
Metadata
Assignees
Labels
No labels