google / android-emulator-container-scripts

1.87k stars 262 forks source link

How to enable sound? #133

Closed danielmalmq closed 4 years ago

danielmalmq commented 4 years ago

How can I enable the sound without sharing the hosts /dev/snd or similar?

pokowaka commented 4 years ago

This is not a scenario we have not yet covered completely. Let me do some investigation on how we can make this possible.

danielmalmq commented 4 years ago

Hey, any update on the issue? Or any hints as to how to solve it?

pokowaka commented 4 years ago

There are 2 ways to enable sound:

The first one might be possible as described here: https://github.com/mviereck/x11docker/wiki/Container-sound:-ALSA-or-Pulseaudio

The basic idea would be to configure a working pulse audio daemon through which the emulator will deliver sound.

danielmalmq commented 4 years ago

I see that you have added audio streaming in https://android-review.googlesource.com/c/platform/external/qemu/+/1310053 Can that be used to stream the audio over the goldfish webrtc link and if so do you have any hints as how to achieve this?

pokowaka commented 4 years ago

Yes this is possible, but will require some changes in our webrtc library. We are planning to:

Implementing audio directly from the gRPC endpoint might be possible, but might result in audio sync issues.

danielmalmq commented 4 years ago

Hey, just wondering what the status is of audio? I can see that the new webrtc m83 is added to emulator 30.0.15.

henriklewander commented 4 years ago

Hello, any news on audio implementation?

pokowaka commented 4 years ago

We are working on WebRTC audio support. I will link to the cl once we are closing in on enabling audio.

pokowaka commented 4 years ago

https://android-review.googlesource.com/c/platform/external/qemu/+/1354086

henriklewander commented 4 years ago

Thanks a lot for the update, looks very promising!