]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/sound.cpp
GTK2: gtk_widget_draw -> gtk_widget_queue_draw + gdk_window_process_updates. Do we...
[wxWidgets.git] / src / unix / sound.cpp
index 3871409e7ee0c944e9b269d19d5aa38c8879fdad..6afa44f146d97c5336f01c5b38dbc04c130659fa 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        sound.cpp
+// Name:        src/unix/sound.cpp
 // Purpose:     wxSound
 // Author:      Marcel Rasche, Vaclav Slavik
 // Modified by:
@@ -9,16 +9,9 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "sound.h"
-#pragma implementation "soundbase.h"
-#endif
-
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/setup.h"
-
 #if defined(__BORLANDC__)
 #pragma hdrstop
 #endif
@@ -452,7 +445,8 @@ wxSound::~wxSound()
     Free();
 }
 
-bool wxSound::Create(const wxString& fileName, bool isResource)
+bool wxSound::Create(const wxString& fileName,
+                     bool WXUNUSED_UNLESS_DEBUG(isResource))
 {
     wxASSERT_MSG( !isResource,
              _T("Loading sound from resources is only supported on Windows") );
@@ -471,7 +465,7 @@ bool wxSound::Create(const wxString& fileName, bool isResource)
 
     size_t len = wx_truncate_cast(size_t, lenOrig);
     wxUint8 *data = new wxUint8[len];
-    if (fileWave.Read(data, len) != len)
+    if ( fileWave.Read(data, len) != lenOrig )
     {
         wxLogError(_("Couldn't load sound data from '%s'."), fileName.c_str());
         return false;