I'm writing an audio player in python using pyglet's Player class. This module is just a test of the Player and Source classes and it produces nothing. No sound, no error, just one warning about vsync that probably has nothing to do with the actual problem.
import pyglet.media as media
def main():
fname='D:\\Music\\JRR Tolkien\\LotR Part I The Fellowship of the Ring\\01-- 0001 Credits.mp3'
src=media.load(fname)
player=media.Player()
player.queue(src)
player.volume=1.0
player.play()
if __name__=="__main__":
main()
Also, src.play() does nothing too. What am I doing wrong?
EDIT: I've also confirmed that the media.driver
is the media.drivers.directsound
module. I was afraid it was using silent
.