// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
// CVSID: $Id$
// --------------------------------------------------------------------------
+#include <wx/wxprec.h>
+
+#ifndef WX_PRECOMP
#include <wx/stream.h>
+#endif
+
#include "sndbase.h"
#include "sndcodec.h"
#include "sndfile.h"
if (!PrepareToRecord(time))
return FALSE;
- m_len = m_sndformat->GetByteFromTime(time);
+ m_len = m_sndformat->GetBytesFromTime(time);
if (!StartProduction(wxSOUND_INPUT))
return FALSE;
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) {
m_codec.Write(buffer, len);
break;
}
+ delete[] buffer;
}
bool wxSoundFileStream::SetSoundFormat(const wxSoundFormatBase& format)