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

AVAudioEngine version #526

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

AVAudioEngine version #526

wants to merge 5 commits into from

Conversation

hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Dec 10, 2024

Uses lib with : webrtc-sdk/webrtc#158
Needs more testing with devices, please don't ship.

TODO

  • Allow custom audio session configuration

@bcherry bcherry self-requested a review December 10, 2024 07:25
private func _asyncConfigure(newState: State, oldState: State) async throws {
try await _configureRunner.run {
self.log("\(oldState) -> \(newState)")
let configureFunc = newState.customConfigureFunc ?? self.defaultConfigureAudioSessionFunc
Copy link
Contributor

Choose a reason for hiding this comment

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

make sure you also remove the customConfigureFunc property, and it seems like this will need to be a breaking change so we'll want to ensure this release goes out as 2.1.x and includes notes about this change

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes this is not intended to merge "as-is", I'll need to figure out backward compatibility.
The track counting approach was not a good idea. Instead this version gets direct callback from the audio device module, that session configuration is required.

Comment on lines +74 to +75
config.categoryOptions = [.allowBluetooth, .allowBluetoothA2DP, .allowAirPlay]
config.mode = AVAudioSession.Mode.videoChat.rawValue
Copy link

Choose a reason for hiding this comment

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

my 2c: it might be worth allowing end-users to customize these options. our current setup requires .defaultToSpeaker. We also did not allow airplay specifically because of issues with noise cancellation.

(THANK YOU for going down the AVAudioEngine rabbit hole. I know it's a huge one)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will allow devs to customize the session. 🙂

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