Operating system: Win7
wxPython version & source: wxPython 4.0.4a1.dev4042+af7f52b6 msw (phoenix) wxWidgets 3.0.5
Python version & source: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] on win32
Description of the problem:
Working on getting some more of the demos in https://github.com/Metallicow/wxPython-Sample-Apps-and-Demos updated and whatnot to xwx phoenix 4.0.x. Came across wx.Sound and found loop option and need to clean cruft out.
@RobinD42 Is this bug still in phoenix? What bug? Is there a reference to this anywhere in history?! Otherwise remove line...
Also... I think the 'except NotImplementedError as exc:' stuff can be removed. Maybe my memory is foggy... but what was NotImplemented?
def OnButton2(self, event):
try:
if True:
sound = wx.adv.Sound(gDataDir + os.sep + 'plan.wav')
else:
# Sounds can also be loaded from a buffer object.
data = open(gDataDir + os.sep + 'plan.wav', 'rb').read()
sound = wx.SoundFromData(data)
self.log.WriteText("before Play...\n")
sound.Play(wx.adv.SOUND_ASYNC)
self.sound = sound # save a reference (This shoudln't be needed, but there seems to be a bug...)
## wx.YieldIfNeeded()
self.log.WriteText("...after Play\n")
except NotImplementedError as exc:
wx.MessageBox(str(exc), "Exception Message")
def OnButton3(self, event):
try:
sound = wx.adv.Sound(gDataDir + os.sep + 'plan.wav')
self.log.WriteText("before Play...\n")
# Loop must be played asynchronously.
sound.Play(wx.adv.SOUND_ASYNC | wx.adv.SOUND_LOOP)
self.log.WriteText("...after Play\n")
except NotImplementedError as exc:
wx.MessageBox(str(exc), "Exception Message")
Operating system: Win7 wxPython version & source: wxPython 4.0.4a1.dev4042+af7f52b6 msw (phoenix) wxWidgets 3.0.5 Python version & source: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] on win32
Description of the problem: Working on getting some more of the demos in https://github.com/Metallicow/wxPython-Sample-Apps-and-Demos updated and whatnot to xwx phoenix 4.0.x. Came across wx.Sound and found loop option and need to clean cruft out.
@RobinD42 Is this bug still in phoenix? What bug? Is there a reference to this anywhere in history?! Otherwise remove line... Also... I think the 'except NotImplementedError as exc:' stuff can be removed. Maybe my memory is foggy... but what was NotImplemented?