Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Progress wave #13

Closed
AgentNemo opened this issue Dec 30, 2021 · 3 comments
Closed

Feature: Progress wave #13

AgentNemo opened this issue Dec 30, 2021 · 3 comments

Comments

@AgentNemo
Copy link

I would like to create an audio wave during recording audio.
It would be cool to be able to put as sample a UInt8List as provided by flutter_sound or even pass a StreamController which gives the data. Instead of the maxDuration and the elapsedDuration it could have only maxDuration which defines how much of the recorded stream is shown.

@rutvik110
Copy link
Owner

That's an interesting idea. But, that would add an additional layer of responsibility/dependancy to the package and I believe would steer away from the definition of a UI library which I want this package to be. Letting the package handle only one thing is much better for users and to the people who maintain the package. Updating, adding new features is much easier this way if we have to deal with only single purpose. It's less error prone also.

What you're suggesting can be an independant package though like flutter_sound as you say that would get the raw data for incoming audio.
Though, atm flutter_audio_waveforms doesn't have proper implementation for real-time audio waveform creation. But it's definitely one of the interesting features on the roadmap.🙌

@rutvik110
Copy link
Owner

That's an interesting idea. But, that would add an additional layer of responsibility/dependancy to the package and I believe would steer away from the definition of a UI library which I want this package to be. Letting the package handle only one thing is much better for users and to the people who maintain the package. Updating, adding new features is much easier this way if we have to deal with only single purpose. It's less error prone also.

What you're suggesting can be an independant package though like flutter_sound as you say that would get the raw data for incoming audio. Though, atm flutter_audio_waveforms doesn't have proper implementation for real-time audio waveform creation. But it's definitely one of the interesting features on the roadmap.🙌

Ohk! I gotta take back the last statement that flutter_audio_waveforms can't do it!😅 It doesn't matter how the samples are coming in! The package just uses samples and draws the waveform based on that. So if samples are rapidly changing as in case of real-time audio then it will handle it just as usual.
Here's an example that uses real-time audio stream to visualize the audio with waveforms.
https://github.com/rutvik110/flutter_audio_waveforms/tree/experimentation

Screen.Recording.2022-01-02.at.1.32.19.PM.mov

@rutvik110
Copy link
Owner

I believe

I would like to create an audio wave during recording audio. It would be cool to be able to put as sample a UInt8List as provided by flutter_sound or even pass a StreamController which gives the data. Instead of the maxDuration and the elapsedDuration it could have only maxDuration which defines how much of the recorded stream is shown.

I believe, the above example solves the Progressive wave implementation. And also as you're assuming that maxDuration is responsible for showing the waveform but that's not correct. Samples are used to draw the InActiveWaveform. maxDuration and elapsedDuration are basically used to calculate the activeSamples(*internally defined) from the samples that are used to draw ActiveWaveform.

I hope this clears you doubts on how you can use this package to implement your use case. So for now I'm closing the issue.

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

No branches or pull requests

2 participants