<s> '''<STR_LIT>''' <EOL> __docformat__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> import ctypes <EOL> import optparse <EOL> import sys <EOL> from pyglet . media . drivers import openal <EOL> from pyglet . media . drivers . openal import lib_openal as al <EOL> from pyglet . media . drivers . openal import lib_alc as alc <EOL> def split_nul_strings ( s ) : <EOL> nul = False <EOL> i = <NUM_LIT:0> <EOL> while True : <EOL> if s [ i ] == '<STR_LIT>' : <EOL> if nul : <EOL> break <EOL> else : <EOL> nul = True <EOL> else : <EOL> nul = False <EOL> i += <NUM_LIT:1> <EOL> s = s [ : i - <NUM_LIT:1> ] <EOL> return s . split ( '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> op = optparse . OptionParser ( ) <EOL> op . add_option ( '<STR_LIT>' , '<STR_LIT>' , dest = '<STR_LIT>' , <EOL> help = '<STR_LIT>' , metavar = '<STR_LIT>' ) <EOL> ( options , args ) = op . parse_args ( sys . argv [ <NUM_LIT:1> : ] ) <EOL> default_device = ctypes . cast ( <EOL> alc . alcGetString ( None , alc . ALC_DEFAULT_DEVICE_SPECIFIER ) , <EOL> ctypes . c_char_p ) . value <EOL> capture_default_device = ctypes . cast ( <EOL> alc . alcGetString ( None , alc . ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER ) , <EOL> ctypes . c_char_p ) . value <EOL> print '<STR_LIT>' % default_device <EOL> print '<STR_LIT>' % capture_default_device <EOL> if alc . alcIsExtensionPresent ( None , '<STR_LIT>' ) : <EOL> devices = split_nul_strings ( <EOL> alc . alcGetString ( None , alc . ALC_DEVICE_SPECIFIER ) ) <EOL> capture_devices = split_nul_strings ( <EOL> alc . alcGetString ( None , alc . ALC_CAPTURE_DEVICE_SPECIFIER ) ) <EOL> print '<STR_LIT>' % '<STR_LIT:U+002CU+0020>' . join ( devices ) <EOL> print '<STR_LIT>' % '<STR_LIT:U+002CU+0020>' . join ( capture_devices ) <EOL> print <EOL> if options . device : <EOL> print '<STR_LIT>' % options . device <EOL> openal . driver_init ( options . device ) <EOL> else : <EOL> print '<STR_LIT>' <EOL> openal . driver_init ( ) <EOL> print '<STR_LIT>' % openal . get_version ( ) <EOL> print '<STR_LIT>' % '<STR_LIT:U+002CU+0020>' . join ( openal . get_extensions ( ) ) </s>
