]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxMMedia/sndfrmt.cpp
1. wxLoad/SaveFileSelector return "wxString" instead of "char *"
[wxWidgets.git] / utils / wxMMedia / sndfrmt.cpp
index 750f17c83b34effe4bee52b089c4a07d070184e2..dc6d653ad9a6836ab2b67c1507452a6c515f2ac3 100644 (file)
@@ -1,3 +1,12 @@
+////////////////////////////////////////////////////////////////////////////////
+// Name:       sndfrmt.cpp
+// Purpose:    wxMMedia
+// Author:     Guilhem Lavaux
+// Created:    1998
+// Updated:    December 1998
+// Copyright:  (C) 1997, 1998, Guilhem Lavaux
+// License:    wxWindows license
+////////////////////////////////////////////////////////////////////////////////
 #ifdef __GNUG__
 #pragma implementation "sndfrmt.h"
 #endif
@@ -81,6 +90,7 @@ wxSoundCodec *wxSoundDataFormat::GetCodec()
 
   m_codchange = FALSE;
   m_codec = wxSoundCodec::Get(m_codno);
+  CodecChange();
 
   return m_codec;
 }
@@ -96,9 +106,11 @@ 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: