X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/622e48cbd2b024ca6c36fdd90cc075950ccf53af..ac2def68edf450f51483c8d78dbc2890dd6985bc:/utils/wxMMedia2/lib/sndfile.cpp diff --git a/utils/wxMMedia2/lib/sndfile.cpp b/utils/wxMMedia2/lib/sndfile.cpp index 3040943411..6525d2bbc6 100644 --- a/utils/wxMMedia2/lib/sndfile.cpp +++ b/utils/wxMMedia2/lib/sndfile.cpp @@ -5,7 +5,12 @@ // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ // -------------------------------------------------------------------------- +#include + +#ifndef WX_PRECOMP #include +#endif + #include "sndbase.h" #include "sndcodec.h" #include "sndfile.h" @@ -258,8 +263,9 @@ bool wxSoundFileStream::StopProduction() void wxSoundFileStream::OnSoundEvent(int evt) { size_t len = m_sndio->GetBestSize(); - char buffer[m_sndio->GetBestSize()]; + char *buffer; + buffer = new char[m_sndio->GetBestSize()]; wxSoundStream::OnSoundEvent(evt); switch(evt) { @@ -284,6 +290,7 @@ void wxSoundFileStream::OnSoundEvent(int evt) m_codec.Write(buffer, len); break; } + delete[] buffer; } bool wxSoundFileStream::SetSoundFormat(const wxSoundFormatBase& format)