X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..d485bda109d5ef0fef36a3f737549e9b9f54baab:/src/unix/sound.cpp diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 500e861718..8543c66443 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -435,7 +435,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 +483,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 +623,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 +648,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);