Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from time import sleep
- import winsound
- import pyglet
- from pyglet.gl import *
- wav = "a.wav"
- mp3 = "a.mp3"
- #PLAY WAV FILES
- def play_wav(s):
- winsound.PlaySound('%s' % s, winsound.SND_FILENAME)
- #PLAY MP3
- pyglet.options['audio'] = ('openal', 'directsound', 'silent')
- def play_mp3(s):
- music = pyglet.resource.media(s)
- music.play()
- pyglet.app.run()
- play_wav(wav)
- sleep(1)
- play_mp3(mp3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement