]> git.saurik.com Git - wxWidgets.git/commitdiff
Only MSW supports loading sounds from data.
authorKevin Ollivier <kevino@theolliviers.com>
Fri, 13 Mar 2009 21:02:13 +0000 (21:02 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Fri, 13 Mar 2009 21:02:13 +0000 (21:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/sound/sound.cpp

index 4c4c869c8368bf26f32ed8a56f4f9269eb00b9d3..5b92e205eb6ef43268b1565f087d7526f2bebdef 100644 (file)
@@ -194,8 +194,9 @@ MyFrame::MyFrame(const wxString& title)
     menuFile->Append(Sound_SelectFile, _T("Select WAV &file...\tCtrl-O"), _T("Select a new wav file to play"));
 #ifdef __WXMSW__
     menuFile->Append(Sound_SelectResource, _T("Select WAV &resource...\tCtrl-R"), _T("Select a new resource to play"));
-#endif // __WXMSW__
     menuFile->Append(Sound_SelectMemory, _T("Select WAV &data\tCtrl-M"), _T("Choose to play from memory buffer"));
+#endif // __WXMSW__
+
     menuFile->Append(Sound_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
 
     wxMenu *playMenu = new wxMenu;
@@ -227,6 +228,7 @@ MyFrame::MyFrame(const wxString& title)
 
 bool MyFrame::CreateSound(wxSound& snd) const
 {
+#ifdef __WXMSW__
     if ( m_useMemory )
     {
         // this is the dump of cuckoo.wav
@@ -960,7 +962,6 @@ bool MyFrame::CreateSound(wxSound& snd) const
         return snd.Create(sizeof(data), data);
     }
 
-#ifdef __WXMSW__
     if ( !m_soundRes.empty() )
     {
         return snd.Create(m_soundRes, true);