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

Recording on Android Emulator stops after 3 seconds #416

Closed
twitchard opened this issue Oct 16, 2024 · 1 comment
Closed

Recording on Android Emulator stops after 3 seconds #416

twitchard opened this issue Oct 16, 2024 · 1 comment

Comments

@twitchard
Copy link

Package version

Environment

  • OS: Android Emulator, running from MacOS host

Describe the bug

I start recording, it records audio for about 3 seconds, and then stops recording. I've logged the bytes coming into .listen when I do .startStream and them seem normal for a few seconds and then it's just all 0's.

Record configuration: I can see this behavior with the example/ subdirectory in the repo.
const encoder = AudioEncoder.aacLc; const config = RecordConfig(encoder: encoder, numChannels: 1);

But I've also observed this with pcm16.

To Reproduce

Steps to reproduce the behavior:

  1. Create and start an Android emulator from Android Studio.
  2. Select the 'Virtual Microphone uses Host Audio Input' setting inside the emulator.
  3. Clone https://github.com/llfbandit/record and cd record/example within the repo.
  4. flutter run
  5. Try to record something longer than 3 seconds or so.
  6. Play it back and observed that audio stops after around the 3 second mark.

https://www.loom.com/share/e175f08e5cd240c2ac384efc1c7405fc?sid=b70b83f7-829a-4c24-aa19-4dc73432d69e

Expected behavior

Recording to continue for a longer duration.

Additional context

I'm sure this could be something unique to my machine/setup but I wanted to at least document it here in case somebody else is running into this.

@llfbandit
Copy link
Owner

Thanks for reporting.
Obviously, device emulator is not supported :)

I've already encountered issues with such a setup, sometimes with a specific version of the emulator.
Conclusion, never use the emulator for such experiment/testing.

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