Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 pygame.mixer.init() devicename issue
#1
Hi everyone:
I tried to use pygame to play a sound file on the raspberry pi with respeaker hat on it. I tried to specify the respeaker's ac101 to be the sound device using: pygame.mixer.init(frequency=48000,channels=1,buffer=4096,devicename='ac101'), but I got an error: "pygame.error: Couldn't find any hardware audio formats". I then clear the parameters and pygame.mixer.init(), the error still exist.

Do anyone have encountered this issue before? Could u help me?

PS: I am using Raspberry pi 3B with Respeaker 4 mic linear array, and pygame version is 2.0.0.dev1
Quote
#2
It could be SDL failing to open the audio file.

(Sep-13-2019, 08:33 AM)wanhr Wrote: and pygame version is 2.0.0.dev1
Why are you using a dev branch? The latest version i see is pygame 1.9.6
Quote
#3
(Sep-13-2019, 10:54 AM)metulburr Wrote: It could be SDL failing to open the audio file.

(Sep-13-2019, 08:33 AM)wanhr Wrote: and pygame version is 2.0.0.dev1
Why are you using a dev branch? The latest version i see is pygame 1.9.6

thank u for replying metulburr, I use the dev branch because I found the doc page of pygame is 2.0.0.dev3 and tried to follow the latest. And I want to use the parameter of devicename in pygame.mixer.init() to specify the audio device, I am not sure if there is devicename in other version of pygame.

I have solved the problem by changing another piece of Raspberry pi, because in the ealier time that day I somehow broke default sound card of that Raspberry pi...
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  pygame.init help raichu4vuhs 2 2,427 May-18-2017, 08:33 PM
Last Post: kennybassett

Forum Jump:


Users browsing this thread: 1 Guest(s)