]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxMMedia2/lib/sndulaw.cpp
Ok. Vidwin works again on Windows.
[wxWidgets.git] / utils / wxMMedia2 / lib / sndulaw.cpp
index d858bfacc4b68010cdb72002e9264c4c8a9261de..371f68b64667e4616c3a348b7bbbf859f7aaefef 100644 (file)
@@ -9,6 +9,11 @@
 #pragma implementation "sndulaw.cpp"
 #endif
 
 #pragma implementation "sndulaw.cpp"
 #endif
 
+#include <wx/wxprec.h>
+
+#ifndef WX_PRECOMP
+#endif
+
 #include "sndbase.h"
 #include "sndfile.h"
 #include "sndpcm.h"
 #include "sndbase.h"
 #include "sndfile.h"
 #include "sndpcm.h"
@@ -46,12 +51,12 @@ wxSoundFormatBase *wxSoundFormatUlaw::Clone() const
   return ulaw;
 }
 
   return ulaw;
 }
 
-wxUint32 wxSoundFormatUlaw::GetTimeFromByte(wxUint32 bytes) const
+wxUint32 wxSoundFormatUlaw::GetTimeFromBytes(wxUint32 bytes) const
 {
   return (bytes / m_srate);
 }
 
 {
   return (bytes / m_srate);
 }
 
-wxUint32 wxSoundFormatUlaw::GetByteFromTime(wxUint32 time) const
+wxUint32 wxSoundFormatUlaw::GetBytesFromTime(wxUint32 time) const
 {
   return time * m_srate;
 }
 {
   return time * m_srate;
 }
@@ -81,17 +86,18 @@ wxSoundStreamUlaw::~wxSoundStreamUlaw()
   delete m_router;
 }
 
   delete m_router;
 }
 
-wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, size_t len)
+wxSoundStream& wxSoundStreamUlaw::Read(void *buffer, wxUint32 len)
 {
 {
-  return *this;
+    // TODO
+    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;
 {
   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;
 
   old_linear = linear_buffer = new wxUint16[len*2];
   ulaw_buffer = (const wxUint8 *)buffer;
@@ -108,6 +114,11 @@ wxSoundStream& wxSoundStreamUlaw::Write(const void *buffer, size_t len)
   return *m_router;
 }
 
   return *m_router;
 }
 
+wxUint32 wxSoundStreamUlaw::GetBestSize() const
+{
+  return m_sndio->GetBestSize() / 2;
+}
+
 bool wxSoundStreamUlaw::SetSoundFormat(const wxSoundFormatBase& format)
 {
   if (format.GetType() != wxSOUND_ULAW) {
 bool wxSoundStreamUlaw::SetSoundFormat(const wxSoundFormatBase& format)
 {
   if (format.GetType() != wxSOUND_ULAW) {