Some test code for loading sound from data

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-05-07 21:43:35 +00:00
parent e0f0eaba3d
commit 9a5dd1c33c

View File

@ -32,7 +32,9 @@ class TestPanel(wx.Panel):
def OnButton2(self, evt):
try:
sound = wx.Sound(opj('data/plan.wav'))
#sound = wx.Sound(opj('data/plan.wav'))
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()