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

Play loudly and Use Microphone at the same time. #56

Open
RizanPSTU opened this issue Mar 18, 2022 · 1 comment
Open

Play loudly and Use Microphone at the same time. #56

RizanPSTU opened this issue Mar 18, 2022 · 1 comment

Comments

@RizanPSTU
Copy link

How to play audio and record at the same time. I am using this configuration but the audio play sound is low. @ryanheise


  await session.configure(const AudioSessionConfiguration(
    avAudioSessionCategory: AVAudioSessionCategory.playAndRecord,
    avAudioSessionCategoryOptions: AVAudioSessionCategoryOptions.defaultToSpeaker,
    avAudioSessionMode: AVAudioSessionMode.videoChat,
    avAudioSessionRouteSharingPolicy: AVAudioSessionRouteSharingPolicy.defaultPolicy,
    avAudioSessionSetActiveOptions: AVAudioSessionSetActiveOptions.none,
    androidAudioAttributes: AndroidAudioAttributes(
      contentType: AndroidAudioContentType.speech,
      flags: AndroidAudioFlags.none,
      usage: AndroidAudioUsage.voiceCommunication,
    ),
    androidAudioFocusGainType: AndroidAudioFocusGainType.gain,
    androidWillPauseWhenDucked: true,
  ));
@ryanheise
Copy link
Owner

I can't provide advice on how to use the AV foundation libraries, but I can only say that audio_session exposes the underlying API to Flutter for you to use as you see fit. What I would suggest is heading over to StackOverflow and searching for your question in relation to iOS development. Any answer you find there should also be applicable to audio_session in Flutter since it's the same API.

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