;ò íy‚Ac@sŸdkZdklZdeifd„ƒYZd„ZdZedjoPdkZdk Z dk Z e i de i i eidƒgeid ƒndS( N(sopjs TestPanelcBs,tZd„Zd„Zd„Zd„ZRS(NcCsÈtii||dƒ||_ti|ddddfƒ}|iti |i |ƒti|ddddfƒ}|iti |i |ƒti|ddddfƒ}|iti |i |ƒdS(NiÿÿÿÿsPlay Sound 1 (sync)isPlay Sound 2 (async)iAsSelect .WAV fileii( swxsPanels__init__sselfsparentslogsButtonsbsBinds EVT_BUTTONs OnButton1s OnButton2s OnSelectSound(sselfsparentslogsb((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys__init__ s cCs{yItitdƒƒ}|iidƒ|itiƒ|iidƒWn+t j o}ti t |ƒdƒnXdS(Nsdata/anykey.wavsbefore Play... s...after Play sException Message( swxsSoundsopjssoundsselfslogswritesPlays SOUND_SYNCsNotImplementedErrorsvs MessageBoxsstr(sselfsevtssoundsv((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys OnButton1scCsÃy‘totitdƒƒ}n+ttdƒdƒiƒ}ti|ƒ}|i i dƒ|i ti ƒ||_tiƒ|i i dƒWn+tj o}tit|ƒdƒnXdS(Ns data/plan.wavsrbsbefore Play... s...after Play sException Message(sTrueswxsSoundsopjssoundsopensreadsdatas SoundFromDatasselfslogswritesPlays SOUND_ASYNCs YieldIfNeededsNotImplementedErrorsvs MessageBoxsstr(sselfsevtssoundsdatasv((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys OnButton2!s  cCs titi|ƒddddtiƒ}|iƒtijoRy tii |i ƒti ƒWq’t j o}tit|ƒdƒq’Xn|iƒdS(NsChoose a sound fileswildcardsWAV files (*.wav)|*.wavsstylesException Message(swxs FileDialogsGetTopLevelParentsselfsOPENsdlgs ShowModalsID_OKsSounds PlaySoundsGetPaths SOUND_SYNCsNotImplementedErrorsvs MessageBoxsstrsDestroy(sselfsevtsdlgsv((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys OnSelectSound3s (s__name__s __module__s__init__s OnButton1s OnButton2s OnSelectSound(((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys TestPanels  cCst||ƒ}|SdS(N(s TestPanelsnbslogswin(sframesnbslogswin((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pysrunTestGssj

Sound

This class represents a short wave file, in Windows WAV format, that can be stored in memory and played. Currently this class is implemented on Windows and GTK (Linux) only.

This demo offers two examples, both driven by buttons, but obviously the event that drives the playing of the sound can come from anywhere. s__main__sii(swxsMainsopjsPanels TestPanelsrunTestsoverviews__name__ssyssossrunsmainspathsbasenamesargv(ssyssrunsoverviewsrunTestswxsossopjs TestPanel((se/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Sound.pys?s  ?