2021-04-16 23:21:06 +08:00
|
|
|
from .adaptation import OpenALDriver
|
|
|
|
|
|
|
|
import pyglet
|
2021-09-23 06:34:23 +08:00
|
|
|
|
2021-04-16 23:21:06 +08:00
|
|
|
_debug = pyglet.options['debug_media']
|
|
|
|
_debug_buffers = pyglet.options.get('debug_media_buffers', False)
|
|
|
|
|
|
|
|
|
|
|
|
def create_audio_driver(device_name=None):
|
|
|
|
_driver = OpenALDriver(device_name)
|
|
|
|
if _debug:
|
|
|
|
print('OpenAL', _driver.get_version())
|
|
|
|
return _driver
|