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

Spatial or Stereo Control for audio #58

Open
4 of 6 tasks
pooyakhosravi opened this issue Nov 2, 2018 · 8 comments · Fixed by #1248
Open
4 of 6 tasks

Spatial or Stereo Control for audio #58

pooyakhosravi opened this issue Nov 2, 2018 · 8 comments · Fixed by #1248

Comments

@pooyakhosravi
Copy link

pooyakhosravi commented Nov 2, 2018

Suggestion: to add a function to audioplayer to be able to control the balance of sound (left vs right) with simple values from -1 (left) to 1 (right). Where is the correct place to look to add the changes?

  • Linux
  • Windows
  • Android
  • Web
  • iOS
  • macOS
@luanpotter
Copy link
Member

Hi, @pooyakhosravi

That's a great suggestion! Would make a nice addition! Would you like to contribute with a PR? It'd be awesome! :)

@luanpotter
Copy link
Member

Sorry, I forgot to address your second question! Where is the correct place to look to add the changes? Well, I don't know exactly how to implement this natively on either platform, but the changes would be on:

  • lib/audioplayers.dart file, add a new method setRightBalance or something that takes the integer and send it to the native counterpart.
  • android/src/main/java/xyz/luan/audioplayers/AudioplayersPlugin.java for the implementation on the android side, upon receiving the message. Might need to change inside WrappedPlayer, depending whether this is state-dependent relating to the complex android's audio player's state flowchart hell.
  • ios/Classes/AudioplayersPlugin.m file for the ios implementation (this tends to be simpler).

If you have more questions regarding implementation, please let me know.

Again, sorry for not answering half your question, I was skimming fast through the issues and missed the end.

@novikov-studio
Copy link
Contributor

Hi, added stereo balance control for Windows. Also tried to add for Linux, but can't make it to work. Maybe somebody can help with Linux support?

@Gustl22
Copy link
Collaborator

Gustl22 commented Sep 23, 2022

Sorry, web, darwin and android are still missing...

@Gustl22 Gustl22 reopened this Sep 23, 2022
Gustl22 added a commit that referenced this issue Sep 23, 2022
Co-authored-by: Andrew Novikov <89590481+novikov-studio@users.noreply.github.com>
Gustl22 added a commit that referenced this issue Oct 8, 2022
Gustl22 added a commit that referenced this issue Oct 21, 2022
* feat(web): add setBalance (#58)

* docs: update parity table

* test(web): enable balance tests for web

Co-authored-by: Andrew Novikov <89590481+novikov-studio@users.noreply.github.com>
@emperor-limitless
Copy link

So is someone working on iOS/macOS support for this or I could look into it? Not sure if I could but no harm in trying.

@spydon
Copy link
Member

spydon commented Jun 25, 2023

@mohamedSulaimanAlmarzooqi go ahead, we're always open to PRs! :)

@dawsmith06
Copy link

is this working on IOS already?

@Gustl22
Copy link
Collaborator

Gustl22 commented Jul 23, 2023

@dawsmith06 , seems this is not the case at the moment, we are happy about any contributions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants