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 Request] Channel splitting and merging with volume control. #2297

Open
7ammer opened this issue Apr 16, 2024 · 1 comment
Open

[Feature Request] Channel splitting and merging with volume control. #2297

7ammer opened this issue Apr 16, 2024 · 1 comment

Comments

@7ammer
Copy link

7ammer commented Apr 16, 2024

What is the need and use case of this feature?
I have a scenario where by the audio player needs be able to adjust the audio volume for music and narration separately.

Describe the ideal solution
A way to achieve this could be by having one file with two channels. One channel as the audio and the other channel as the narration. Some sort of API could then split those two channels, adjust the gain for each as needed and then merge the split channels to both channels to create, in effect, one mono channel.

The Web Audio API allows for this kind of thing and would be ideal. The createChannelSplitter and createChannelMerger are key.

I am not sure what the Android and iOS API's provide and if such a thing is possible with these API's. Is it: KotlinAudio and SwiftAudioEx?

Describe alternatives you've considered
The ability to stream two media files at the same time. This is complicated due to trying to keep the to files in sync. It feels very error prone.

How I can Help
I'd like to help but I'm not sure how useful I'd be.

@lovegaoshi
Copy link
Contributor

i believe your best bet is expo-AV and use 2 instances of them, and update both instances simutaneously on seek/next/previous, etc.
RNTP wont support playing multiple files (notification will simply not work) and the channel splitting seems not supported by exoplayer at least. if u happen to find code snippets perhaps someone bored enough will migrate over

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