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:
@@ -32,7 +32,9 @@ class TestPanel(wx.Panel):
|
|||||||
|
|
||||||
def OnButton2(self, evt):
|
def OnButton2(self, evt):
|
||||||
try:
|
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")
|
self.log.write("before Play...\n")
|
||||||
sound.Play(wx.SOUND_ASYNC)
|
sound.Play(wx.SOUND_ASYNC)
|
||||||
wx.YieldIfNeeded()
|
wx.YieldIfNeeded()
|
||||||
|
Reference in New Issue
Block a user