Home Pygame will only play some .wav files
Reply: 0

Pygame will only play some .wav files

user617 Published in July 23, 2018, 1:19 pm

I am currently trying to programme some Christmas lights using the GPIO pins on the raspberry pi 3. and the lights work, so i decided to put some Christmas music to it as well. when using Pygame, Python won't let me use .mp3 files, and it only lets me play certain .wav files, so when i downloaded some christmas songs from http://www.thewavsite.com/christmas.htm, none of them worked. i will attach the code that i used. I hope you can be of help.

import pygame

s = pygame.mixer.Sound("all_i_want_for_christmas.wav")
print "Happy christmas!!"
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318776 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO