]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/sound.cpp
Added ability to switch off more components of the size page UI
[wxWidgets.git] / src / msw / sound.cpp
index 2cf3619b602ed42d3a167e1f3d7a4a59045aeb39..feaab0dc9a0296f863e9dc499f643abfdee3f8d8 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        sound.cpp
+// Name:        src/msw/sound.cpp
 // Purpose:     wxSound
 // Author:      Julian Smart
 // Modified by: 2005-07-29: Vadim Zeitlin: redesign
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "sound.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -62,7 +58,7 @@ class wxSoundDataMemory : public wxSoundData
 {
 public:
     // we copy the data
-    wxSoundDataMemory(int size, const wxByte *buf);
+    wxSoundDataMemory(size_t size, const void* buf);
 
     void *GetPtr() const { return m_waveDataPtr; }
 
@@ -74,7 +70,7 @@ private:
     GlobalPtr m_waveData;
     GlobalPtrLock m_waveDataPtr;
 
-    DECLARE_NO_COPY_CLASS(wxSoundDataMemory)
+    wxDECLARE_NO_COPY_CLASS(wxSoundDataMemory);
 };
 
 // class for sound files and resources
@@ -94,7 +90,7 @@ private:
     const wxString m_name;
     const bool m_isResource;
 
-    DECLARE_NO_COPY_CLASS(wxSoundDataFile)
+    wxDECLARE_NO_COPY_CLASS(wxSoundDataFile);
 };
 
 // ============================================================================
@@ -105,7 +101,7 @@ private:
 // wxSoundData-derived classes
 // ----------------------------------------------------------------------------
 
-wxSoundDataMemory::wxSoundDataMemory(int size, const wxByte *buf)
+wxSoundDataMemory::wxSoundDataMemory(size_t size, const void* buf)
                  : m_waveData(size),
                    m_waveDataPtr(m_waveData)
 {
@@ -135,7 +131,7 @@ wxSound::wxSound(const wxString& filename, bool isResource)
     Create(filename, isResource);
 }
 
-wxSound::wxSound(int size, const wxByte *data)
+wxSound::wxSound(size_t size, const void* data)
 {
     Init();
     Create(size, data);
@@ -148,11 +144,7 @@ wxSound::~wxSound()
 
 void wxSound::Free()
 {
-    if ( m_data )
-    {
-        delete m_data;
-        m_data = NULL;
-    }
+    wxDELETE(m_data);
 }
 
 bool wxSound::CheckCreatedOk()
@@ -172,7 +164,7 @@ bool wxSound::Create(const wxString& filename, bool isResource)
     return CheckCreatedOk();
 }
 
-bool wxSound::Create(int size, const wxByte* data)
+bool wxSound::Create(size_t size, const void* data)
 {
     Free();