开发者

How to stop audio with pyglet when file is played?

开发者 https://www.devze.com 2022-12-24 01:28 出处:网络
I\'m using this program to play na audio file: music = pyglet.resour开发者_高级运维ce.media(\'file.wav\')

I'm using this program to play na audio file:

music = pyglet.resour开发者_高级运维ce.media('file.wav') music.play()

pyglet.app.run()

I have a problem: I can't do anything after this program. How to stop the audio file when is played? It's look like a loop.


I think you'd have to include add an eventlistener for the on_eos event.

For an example have a look as this thread on the pyglet Google group.

0

精彩评论

暂无评论...
验证码 换一张
取 消