From: Robin Dunn Date: Fri, 7 May 2004 21:43:35 +0000 (+0000) Subject: Some test code for loading sound from data X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9a5dd1c33c8291e07e1f819f4b32aef521b5ed1f 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 --- diff --git a/wxPython/demo/Sound.py b/wxPython/demo/Sound.py index 456733b5bf..c6d7028edb 100644 --- a/wxPython/demo/Sound.py +++ b/wxPython/demo/Sound.py @@ -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()