scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Not start when playing music

Open suienzan opened this issue 1 year ago • 2 comments

  • [x] I have read the FAQ.
  • [x] I have searched in existing issues.

Environment

  • OS: Arch Linux
  • scrcpy version: 2.0
  • installation method: pacman
  • device model:
  • Android version: 13

Describe the bug Not start when playing music. Works when no sound in playing or downgrade scrcpy to version 1.25.

On errors, please provide the output of the console (and adb logcat if relevant).

scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 162.7 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: Google Pixel 6 (Android 13)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.0.0
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ERROR: Could not open audio device: ALSA: Couldn't open audio device: Device or resource busy
ERROR: Demuxer error
WARN: Killing the server...

suienzan avatar Mar 27 '23 06:03 suienzan

ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave ERROR: Could not open audio device: ALSA: Couldn't open audio device: Device or resource busy

The alsa device is already used.

It is weird that it attempts to use alsa instead of pulseaudio/pipewire.

Try to set the SDL_AUDIODRIVER environment variable to use another driver: https://wiki.libsdl.org/SDL2/FAQUsingSDL#linux_1

rom1v avatar Mar 27 '23 06:03 rom1v

I don't have pulseaudio installed.

It works with SDL_AUDIODRIVER set to pipewire.

suienzan avatar Mar 27 '23 06:03 suienzan