fetch up pyglet

This commit is contained in:
shenjack 2023-03-25 20:16:08 +08:00
parent f95d7f96ec
commit 5a123389ae

View File

@ -1,13 +1,21 @@
"""Drivers for playing back media."""
import sys
import atexit
import pyglet
_debug = pyglet.options['debug_media']
_is_pyglet_doc_run = hasattr(sys, "is_pyglet_doc_run") and sys.is_pyglet_doc_run
for driver_name in pyglet.options['audio']:
if _is_pyglet_doc_run:
from . import silent
_audio_driver = silent.create_audio_driver()
else:
for driver_name in pyglet.options['audio']:
try:
if driver_name == 'pulse':
from . import pulse
@ -45,9 +53,9 @@ for driver_name in pyglet.options['audio']:
import traceback
traceback.print_exc()
else:
from . import silent
else:
from . import silent
_audio_driver = silent.create_audio_driver()