0

my program uses Pygame to play sounds. I used Noobs before and my program worked fine in Thonny. Now, i switched to Raspbian Full Stretch and now I get the error No available Audio Device. I already added os.environ['SDL_AUDIODRIVER'] = 'dsp', but nothing changed Could some help maybe ? Thanks!

 import pygame
 import os

 os.environ['SDL_AUDIODRIVER'] = 'dsp'
 pygame.init() screen =
 pygame.display.set_mode((640, 480))
 pygame.mixer.init()

 -----
  • Hey guys, it worked, but instead I tried: os.environ['SDL_AUDIODRIVER'] = 'alsa' and this worked. I am so confused. I am using Raspbian Stretch. Can someone explain this? – Derick Kolln Jun 14 at 11:57
  • Please make your comment an answer. This will finish your question and show others that it has a solution so they don't try to help you for nothing. – Ingo Jun 14 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.