- def __init__(self, wiimoteSupport=True, fullscreen=False) :
+ def __init__(self, wiimoteSupport=True, fullscreen=False, audioDriver=None) :
envLogger.info('winwii log format version : %s', LOG_FORMAT_VERSION)
self.wiimoteSupport = wiimoteSupport
self.fullscreen = fullscreen
envLogger.info('winwii log format version : %s', LOG_FORMAT_VERSION)
self.wiimoteSupport = wiimoteSupport
self.fullscreen = fullscreen
themedir = os.path.sep.join(themedir)
theme = Theme(themedir)
self.app = Desktop(theme=theme)
themedir = os.path.sep.join(themedir)
theme = Theme(themedir)
self.app = Desktop(theme=theme)
+ self.synth = Synth(driver=audioDriver)
self.screenResolution = SCREEN_RESOLUTION
envLogger.info('résolution écran : %s', self.screenResolution)
self.nwiimotes = 0
self.screenResolution = SCREEN_RESOLUTION
envLogger.info('résolution écran : %s', self.screenResolution)
self.nwiimotes = 0
import pygame
from app import MinWii
import pygame
from app import MinWii
-def main(wiimoteSupport, fullscreen) :
+def main(wiimoteSupport, fullscreen, audioDriver) :
- minwii = MinWii(wiimoteSupport=wiimoteSupport, fullscreen=fullscreen)
+ audioDriver = None if not audioDriver else audioDriver # cast de '' en None. fluidsynth le teste spécifiquement…
+ minwii = MinWii(wiimoteSupport=wiimoteSupport, fullscreen=fullscreen, audioDriver=audioDriver)
minwii.run()
pygame.quit()
minwii.run()
pygame.quit()
, default=False
, help = u"activation du mode plein écran"
u" [%default]")
, default=False
, help = u"activation du mode plein écran"
u" [%default]")
+ op.add_option("--audio-driver", dest="audio_driver"
+ , action="store"
+ , default="coreaudio"
+ , help=u"driver audio pour le synthétiseur (fluidsynth) [%default]"
+ )
options, args = op.parse_args()
options, args = op.parse_args()
- main(options.wiimoteSupport, options.fullscreen)
+ main(options.wiimoteSupport, options.fullscreen, options.audio_driver)