From 9a5dd1c33c8291e07e1f819f4b32aef521b5ed1f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 7 May 2004 21:43:35 +0000 Subject: [PATCH] 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 --- wxPython/demo/Sound.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()