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

Right to left rendering of waveforms in AudioWaveforms widget #250

Open
guplem opened this issue Sep 22, 2023 · 3 comments
Open

Right to left rendering of waveforms in AudioWaveforms widget #250

guplem opened this issue Sep 22, 2023 · 3 comments

Comments

@guplem
Copy link

guplem commented Sep 22, 2023

Describe the bug
When recording, the waveform renders the "audio lines" from left to right, like so:

[ |||| ---- ]

It does so until they reach the right side (filling the whole widget). Then, the old lines are displaced to the left and the widgets keep rendering the newest ones on the right.

Expected behavior
I would expect the lines to be rendered always from right to left, looking this at the beginning:

[ ------|||| ]

And no change should happen whenever the lines reach the left end of the widget (filling the whole widget). The new lines should be placed on the right side and keep pushing old ones to the left.

You can see examples of this behaviour in many apps like WhatsApp

Screenshots
This is how it behaves right now (wrong):
image

This is how I expected it to behave:
image

@manoj-simform
Copy link
Collaborator

@guplem I have implemented this feature. Can you please review it once and give suggestions?

@guplem
Copy link
Author

guplem commented Oct 19, 2023

@manojSimfrom thank you very, very much for your collaboration.

Your changes work and reverse the direction of the waveforms.

However, the result is not the desired one...

This is the behavior we are looking for:

This is a representation of how the waveform should eveolve over time, from top to bottom.

image

Let me clearly explain what I am looking for:

The desired behavior is for the audio lines to always render from right to left. Now, this can be achieved with the rlt WaveDirection that you added.
But, as the recording continues and more audio data is generated, the newer lines should appear on the rightmost part of the widget, progressively pushing the older lines to the left.

I encourage you to test this right-to-left rendering is consistent with user experiences in popular applications like WhatsApp.

@manoj-simform
Copy link
Collaborator

manoj-simform commented Oct 20, 2023

@guplem Thanks for the replay & suggestion
I understand your scenario. Let me make the changes regarding the same as you asked. I will notify you once the changes are done.

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