git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-05-07 22:18:37 +00:00
parent 68cc401372
commit 9318d9b32d

View File

@@ -32,9 +32,13 @@ class TestPanel(wx.Panel):
def OnButton2(self, evt):
try:
#sound = wx.Sound(opj('data/plan.wav'))
if True:
sound = wx.Sound(opj('data/plan.wav'))
else:
# sounds can also be loaded from a buffer object
data = open(opj('data/plan.wav'), 'rb').read()
sound = wx.SoundFromData(data)
self.log.write("before Play...\n")
sound.Play(wx.SOUND_ASYNC)
wx.YieldIfNeeded()