X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/msw/sound.cpp diff --git a/src/msw/sound.cpp b/src/msw/sound.cpp index 1996676888..feaab0dc9a 100644 --- a/src/msw/sound.cpp +++ b/src/msw/sound.cpp @@ -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 @@ -58,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; } @@ -101,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) { @@ -131,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); @@ -144,11 +144,7 @@ wxSound::~wxSound() void wxSound::Free() { - if ( m_data ) - { - delete m_data; - m_data = NULL; - } + wxDELETE(m_data); } bool wxSound::CheckCreatedOk() @@ -168,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();