]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxMMedia/sndfrmt.cpp
fixed somebody's poorly done StreamSize-->GetSize transition
[wxWidgets.git] / utils / wxMMedia / sndfrmt.cpp
index 2c446375ea81dbb6c07cf016db3e0cdc0a59cfb2..fc9aa77654e3d0ad19c4a08c7476dae40fcea11c 100644 (file)
@@ -106,12 +106,15 @@ void wxSoundDataFormat::CodecChange()
   case WXSOUND_PCM: {
       wxSoundPcmCodec *pcm_codec = (wxSoundPcmCodec *)codec;
 
-      pcm_codec->SetBits(m_bps);
-      pcm_codec->SetByteOrder(m_byteorder);
-      pcm_codec->SetSign(m_sign);
+      pcm_codec->m_orig_format.SetSampleRate(m_srate);
+      pcm_codec->m_orig_format.SetBps(m_bps);
+      pcm_codec->m_orig_format.SetChannels(m_channels);
+      pcm_codec->m_orig_format.SetByteOrder(m_byteorder);
+      pcm_codec->m_orig_format.SetSign(m_sign);
       break;
     }
   default:
+      codec->InitWith(*this);
       break;
   }
 }
@@ -148,19 +151,19 @@ bool wxSoundDataFormat::operator ==(const wxSoundDataFormat& format) const
 // ----------------------------------------------------------------------------
 
 #include "sndpcm.h"
-//#include "sndadpcm.h"
+#include "sndadpcm.h"
 //#include "sndalaw.h"
 #include "sndmulaw.h"
 
 static wxClassInfo *l_sound_formats[] = {
       NULL,
       CLASSINFO(wxSoundPcmCodec),
-      NULL, //  CLASSINFO(wxSoundAdpcmCodec),
+      CLASSINFO(wxSoundAdpcmCodec),
       NULL,
       NULL,
       NULL,
       NULL, // CLASSINFO(wxSoundAlawCodec),
-      NULL  // CLASSINFO(wxSoundMulawCodec)
+      CLASSINFO(wxSoundMulawCodec)
 };
 
 static int l_nb_formats = WXSIZEOF(l_sound_formats);