Skip to content

Conversation

@priyanshu-simformsolutions
Copy link
Contributor

@priyanshu-simformsolutions priyanshu-simformsolutions commented Mar 24, 2025

Add WaveformExtractionController and migrate below methods and getters into it.

  • waveformData
  • onCurrentExtractedWaveformData
  • onExtractionProgress
  • extractWaveformData()
  • stopWaveformExtraction()

@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch from 407dfb8 to 2e69aea Compare March 24, 2025 14:22
@priyanshu-simformsolutions priyanshu-simformsolutions marked this pull request as ready for review March 24, 2025 14:22
} else {
if (playerController.waveformData.isNotEmpty) {
_addWaveformData(playerController.waveformData);
if (playerController.waveformExtraction.waveformData.isNotEmpty) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take waveformExtraction into separate variable

@@ -0,0 +1,56 @@
part of 'player_controller.dart';

class WaveformExtractionController {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please docs above this and also above constructor.


final List<double> _waveformData = [];

List<double> get waveformData => _waveformData.toList();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_seprate_stop_call_for_waveform_extraction branch from 7605f27 to 11044ca Compare March 24, 2025 16:28
@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch from 2e69aea to 92c9821 Compare March 25, 2025 06:40
@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_seprate_stop_call_for_waveform_extraction branch from 11044ca to 6367e36 Compare March 25, 2025 06:45
@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch from 92c9821 to 70f5191 Compare March 25, 2025 06:46
Base automatically changed from feature/add_seprate_stop_call_for_waveform_extraction to main March 25, 2025 06:51
@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch 2 times, most recently from fff12e1 to 171339b Compare March 25, 2025 07:00
/// An unique key string associated with [this] player only
final playerKey = shortHash(UniqueKey());

late final waveformExtraction = WaveformExtractionController._(playerKey);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add smaller docs comments here as well


/// WaveformExtractionController is used for
/// extraction of waveform data as List<double>,
/// which can be used to show [AudioWaveforms]
Copy link
Collaborator

@ujas-m-simformsolutions ujas-m-simformsolutions Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// which can be used to show [AudioWaveforms]
/// which can be used to show **Audio Waveforms**

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In dart documentation comment if we add class name as [AudioWaveforms], then user can easily navigate to that class, so instead using [AudioFileWaveforms] here, which is a proper widget class ref.

@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch from 171339b to ec51d36 Compare March 25, 2025 07:09
@priyanshu-simformsolutions priyanshu-simformsolutions force-pushed the feature/add_waveform_extraction_class branch from ec51d36 to 5c92ffc Compare March 25, 2025 07:13
@ujas-m-simformsolutions ujas-m-simformsolutions merged commit feb7161 into main Mar 25, 2025
@ujas-m-simformsolutions ujas-m-simformsolutions deleted the feature/add_waveform_extraction_class branch March 25, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants