]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/mmedia/sndmsad.cpp
added more HP-UX charset names
[wxWidgets.git] / contrib / src / mmedia / sndmsad.cpp
index 81068016fcb006fd3228308b15ebfe5b79b86906..3078d98d26d6c5c997a2525e74c00b6bd5133613 100644 (file)
@@ -4,12 +4,10 @@
 // Date: 08/11/1999
 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
 // CVSID: $Id$
+// wxWindows licence
 // --------------------------------------------------------------------------
-#ifdef __GNUG__
-#pragma implementation "sndmsad.cpp"
-#endif
 
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
   #include "wx/defs.h"
@@ -66,7 +64,7 @@ wxUint16 wxSoundFormatMSAdpcm::GetChannels() const
     return m_nchannels; 
 }
 
-void wxSoundFormatMSAdpcm::SetCoefs(wxInt16 **coefs, wxUint16 ncoefs,
+void wxSoundFormatMSAdpcm::SetCoefs(wxInt16 **WXUNUSED(coefs), wxUint16 ncoefs,
                                     wxUint16 coefs_len)
 {
     wxUint16 i;
@@ -77,7 +75,7 @@ void wxSoundFormatMSAdpcm::SetCoefs(wxInt16 **coefs, wxUint16 ncoefs,
         delete[] m_coefs;
     }
     // TODO: Add some memory checking here
-    m_coefs = new (wxInt16 *)[ncoefs];
+    m_coefs = new wxInt16 *[ncoefs];
 
     for (i=0;i<ncoefs;i++)
        m_coefs[i] = new wxInt16[coefs_len];
@@ -130,7 +128,7 @@ bool wxSoundFormatMSAdpcm::operator !=(const wxSoundFormatBase& frmt2) const
     const wxSoundFormatMSAdpcm *adpcm = (const wxSoundFormatMSAdpcm *)&frmt2;
     
     if (frmt2.GetType() != wxSOUND_MSADPCM)
-        return TRUE;
+        return true;
     
     return (adpcm->m_srate != m_srate) && (adpcm->m_nchannels != m_nchannels);
 }
@@ -143,8 +141,8 @@ wxSoundStreamMSAdpcm::wxSoundStreamMSAdpcm(wxSoundStream& sndio)
 {
     // PCM converter
     m_router     = new wxSoundRouterStream(sndio);
-    m_got_header = FALSE;
-    m_stereo = FALSE;
+    m_got_header = false;
+    m_stereo = false;
 }
 
 wxSoundStreamMSAdpcm::~wxSoundStreamMSAdpcm()
@@ -152,7 +150,7 @@ wxSoundStreamMSAdpcm::~wxSoundStreamMSAdpcm()
     delete m_router;
 }
 
-wxSoundStream& wxSoundStreamMSAdpcm::Read(void *buffer, wxUint32 len)
+wxSoundStream& wxSoundStreamMSAdpcm::Read(void *WXUNUSED(buffer), wxUint32 WXUNUSED(len))
 {
     m_snderror = wxSOUND_NOCODEC;
     m_lastcount = 0;
@@ -354,7 +352,7 @@ bool wxSoundStreamMSAdpcm::SetSoundFormat(const wxSoundFormatBase& format)
 {
     if (format.GetType() != wxSOUND_MSADPCM) {
         m_snderror = wxSOUND_INVFRMT;
-        return FALSE;
+        return false;
     }
     
     wxSoundFormatPcm pcm;
@@ -368,15 +366,14 @@ bool wxSoundStreamMSAdpcm::SetSoundFormat(const wxSoundFormatBase& format)
     adpcm->GetCoefs(m_coefs, ncoefs, coefs_len);
 
     if (!ncoefs) {
-        wxLogError(__FILE__ ":%d: Number of ADPCM coefficients"
-                   " must be non null", __LINE__);
-        return FALSE;
+        wxLogError(wxT("Number of ADPCM coefficients must be non null"));
+        return false;
     }
     
     pcm.SetSampleRate(adpcm->GetSampleRate());
     pcm.SetBPS(16);
     pcm.SetChannels(adpcm->GetChannels());
-    pcm.Signed(TRUE);
+    pcm.Signed(true);
     pcm.SetOrder(wxBYTE_ORDER);
 
     m_stereo = (adpcm->GetChannels() == 2);
@@ -385,6 +382,6 @@ bool wxSoundStreamMSAdpcm::SetSoundFormat(const wxSoundFormatBase& format)
     
     m_router->SetSoundFormat(pcm);
     
-    return TRUE;
+    return true;
 }