X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..dca2fe5daecf9c74f227062d8a9a259b4e5ef1fc:/src/unix/sound.cpp?ds=inline diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 500e861718..c6ff1bd420 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -4,7 +4,6 @@ // Author: Marcel Rasche, Vaclav Slavik // Modified by: // Created: 25/10/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart, Open Source Applications Foundation // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -435,7 +434,7 @@ wxSound::wxSound(const wxString& sFileName, bool isResource) : m_data(NULL) Create(sFileName, isResource); } -wxSound::wxSound(int size, const wxByte* data) : m_data(NULL) +wxSound::wxSound(size_t size, const void* data) : m_data(NULL) { Create(size, data); } @@ -483,7 +482,7 @@ bool wxSound::Create(const wxString& fileName, return true; } -bool wxSound::Create(int size, const wxByte* data) +bool wxSound::Create(size_t size, const void* data) { wxASSERT( data != NULL ); @@ -623,7 +622,7 @@ typedef struct #define WAVE_INDEX 8 #define FMT_INDEX 12 -bool wxSound::LoadWAV(const wxUint8 *data, size_t length, bool copyData) +bool wxSound::LoadWAV(const void* data_, size_t length, bool copyData) { // the simplest wave file header consists of 44 bytes: // @@ -648,6 +647,8 @@ bool wxSound::LoadWAV(const wxUint8 *data, size_t length, bool copyData) if ( length < 44 ) return false; + const wxUint8* data = static_cast(data_); + WAVEFORMAT waveformat; memcpy(&waveformat, &data[FMT_INDEX + 4], sizeof(WAVEFORMAT)); waveformat.uiSize = wxUINT32_SWAP_ON_BE(waveformat.uiSize);