]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/mmedia/sndulaw.cpp
fix evaluation order bug (patch 1158099)
[wxWidgets.git] / contrib / src / mmedia / sndulaw.cpp
index 3ad9e5174a022b1ff3871fbca6a6c668b6b60440..0c7550cc4cc046ef93978d4b84b0184686939b5d 100644 (file)
@@ -4,6 +4,7 @@
 // Date: 08/11/1999
 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
 // CVSID: $Id$
 // Date: 08/11/1999
 // Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
 // CVSID: $Id$
+// wxWindows licence
 // --------------------------------------------------------------------------
 #ifdef __GNUG__
 #pragma implementation "sndulaw.cpp"
 // --------------------------------------------------------------------------
 #ifdef __GNUG__
 #pragma implementation "sndulaw.cpp"
@@ -82,7 +83,7 @@ bool wxSoundFormatUlaw::operator !=(const wxSoundFormatBase& frmt2) const
     wxSoundFormatUlaw *ulaw = (wxSoundFormatUlaw *)&frmt2;
     
     if (frmt2.GetType() != wxSOUND_ULAW)
     wxSoundFormatUlaw *ulaw = (wxSoundFormatUlaw *)&frmt2;
     
     if (frmt2.GetType() != wxSOUND_ULAW)
-        return TRUE;
+        return true;
     
     return (ulaw->m_srate != m_srate);
 }
     
     return (ulaw->m_srate != m_srate);
 }
@@ -160,11 +161,12 @@ bool wxSoundStreamUlaw::SetSoundFormat(const wxSoundFormatBase& format)
 {
     if (format.GetType() != wxSOUND_ULAW) {
         m_snderror = wxSOUND_INVFRMT;
 {
     if (format.GetType() != wxSOUND_ULAW) {
         m_snderror = wxSOUND_INVFRMT;
-        return FALSE;
+        return false;
     }
     
     }
     
-    // As the codec only support 16 bits, Mono we must use a wxSoundRouter to filter the data and
-    // to translate them to a format supported by the sound card.
+    // As the codec only support 16 bits, Mono we must use a wxSoundRouter
+    // to filter the data and to translate them to a format supported
+    // by the sound card.
     
     wxSoundFormatPcm pcm;
     wxSoundFormatUlaw *ulaw;
     
     wxSoundFormatPcm pcm;
     wxSoundFormatUlaw *ulaw;
@@ -176,10 +178,10 @@ bool wxSoundStreamUlaw::SetSoundFormat(const wxSoundFormatBase& format)
     pcm.SetSampleRate(ulaw->GetSampleRate());
     pcm.SetBPS(16);
     pcm.SetChannels(ulaw->GetChannels());
     pcm.SetSampleRate(ulaw->GetSampleRate());
     pcm.SetBPS(16);
     pcm.SetChannels(ulaw->GetChannels());
-    pcm.Signed(TRUE);
+    pcm.Signed(true);
     pcm.SetOrder(wxBYTE_ORDER);
     
     m_router->SetSoundFormat(pcm);
     
     pcm.SetOrder(wxBYTE_ORDER);
     
     m_router->SetSoundFormat(pcm);
     
-    return TRUE;
+    return true;
 }
 }