// Date: 08/11/1999
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999, 2000
// CVSID: $Id$
+// wxWindows licence
// --------------------------------------------------------------------------
-#ifdef __GNUG__
-#pragma implementation "sndcpcm.cpp"
-#endif
#include "wx/wxprec.h"
if (m_sndio->SetSoundFormat(format)) {
m_function_out = NULL;
m_function_in = NULL;
- return TRUE;
+ return true;
}
if (format.GetType() != wxSOUND_PCM) {
m_snderror = wxSOUND_INVFRMT;
- return FALSE;
+ return false;
}
if (m_sndformat)
delete m_sndformat;
src_rate = pcm_format->GetSampleRate();
dst_rate = pcm_format2->GetSampleRate();
- m_needResampling = TRUE;
+ m_needResampling = true;
if (src_rate < dst_rate)
- m_expandSamples = TRUE;
+ m_expandSamples = true;
else
- m_expandSamples = FALSE;
+ m_expandSamples = false;
m_pitch = (src_rate << FLOATBITS) / dst_rate;
}
#endif
break;
default:
// TODO: Add something here: error, log, ...
- return FALSE;
+ return false;
}
switch (pcm_format2->GetBPS()) {
case 8:
break;
default:
// TODO: Add something here: error, log, ...
- return FALSE;
+ return false;
}
if (pcm_format2->Signed() != pcm_format->Signed())
if (m_prebuffer)
delete[] m_prebuffer;
- // We try to minimize the need of dynamic memory allocation by preallocating a buffer. But
+ // We try to minimize the need for dynamic memory allocation by preallocating a buffer. But
// to be sure it will be efficient we minimize the best size.
if (m_multiplier_in < m_multiplier_out) {
m_prebuffer_size = (wxUint32)(m_sndio->GetBestSize() *
wxUnusedVar( SetSoundFormatReturn );
m_sndformat = new_format;
- return TRUE;
+ return true;
}
wxUint32 wxSoundStreamPcm::GetWriteSize(wxUint32 len) const