]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxMMedia2/lib/sndulaw.cpp
Major changes in wxVidXANIM (support for output filtering)
[wxWidgets.git] / utils / wxMMedia2 / lib / sndulaw.cpp
index bba1cd7eea959ba2a22a7e51e4d386eea1ec700a..5fb3153f9cbe1f4d307c3bdf4b71490620eec8d8 100644 (file)
@@ -9,6 +9,7 @@
 #pragma implementation "sndulaw.cpp"
 #endif
 
+#include <wx/wxprec.h>
 #include "sndbase.h"
 #include "sndfile.h"
 #include "sndpcm.h"
@@ -81,17 +82,17 @@ wxSoundStreamUlaw::~wxSoundStreamUlaw()
   delete m_router;
 }
 
-wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, size_t len)
+wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, wxUint32 len)
 {
   return *this;
 }
 
-wxSoundStream& wxSoundStreamUlaw::Write(const void *buffer, size_t len)
+wxSoundStream& wxSoundStreamUlaw::Write(const void *buffer, wxUint32 len)
 {
   wxUint16 *old_linear;
   register wxUint16 *linear_buffer;
   register const wxUint8 *ulaw_buffer;
-  register size_t countdown = len;
+  register wxUint32 countdown = len;
 
   old_linear = linear_buffer = new wxUint16[len*2];
   ulaw_buffer = (const wxUint8 *)buffer;
@@ -108,6 +109,11 @@ wxSoundStream& wxSoundStreamUlaw::Write(const void *buffer, size_t len)
   return *m_router;
 }
 
+wxUint32 wxSoundStreamUlaw::GetBestSize() const
+{
+  return m_sndio->GetBestSize() / 2;
+}
+
 bool wxSoundStreamUlaw::SetSoundFormat(const wxSoundFormatBase& format)
 {
   if (format.GetType() != wxSOUND_ULAW) {