1 #############################################################################
3 ## Purpose: XS++ for wxSound class
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Sound.xsp 2560 2009-05-17 08:33:45Z mbarbon $
8 ## Copyright: (c) 2006, 2009 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
15 %typemap{wxSound*}{simple};
18 #if WXPERL_W_VERSION_GE( 2, 5, 1 )
23 %name{Wx::Sound} class wxSound
25 %name{newDefault} wxSound();
26 %name{newFile} wxSound( const wxString& fileName );
32 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
36 %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::Sound", THIS, ST(0) );
40 %name{Create} bool Create( const wxString& fileName );
42 bool Play( unsigned flags = wxSOUND_ASYNC );
51 MATCH_VOIDM_REDISP( newDefault )
52 MATCH_ANY_REDISP( newFile )
53 END_OVERLOAD( "Wx::Choicebook::new" )
56 wxSound::newData( data )
60 const wxByte* buffer = (wxByte*) SvPV( data, len );
61 RETVAL = new wxSound( len, buffer );
64 #if !defined(__WXMAC__)
67 wxSound::CreateData( data )
71 const wxByte* buffer = (wxByte*) SvPV( data, len );
72 RETVAL = THIS->Create( len, buffer );
82 #if !defined( __WXMSW__ )
87 RETVAL = wxSound::IsPlaying();