[Python] ALSA error while making a pygame app to play sounds when I type

Discussão em 'Python' iniciado por Stack, Junho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I've been making an app to play sounds as I type using pygame, and when I run it, it gives me this error: "File "/home/user/PythonProjects/mvClone/main.py", line 7, in

    pygame.mixer.init()


    pygame.error: ALSA: Couldn't open audio device: Host is down"

    this is when running it as sudo btw. It works fine if I run it normally, it just doesn't work if I don't have the app focused.


    I really haven't tried too much, since I'm super lost. I was expecting it to open a window and play sounds as I typed, even if the app wasn't focused.

    Continue reading...

Compartilhe esta Página