+wxSoundFormatBase *wxSoundWave::HandleInputPCM(wxDataOutputStream& data)
+{
+ wxUint16 format, channels, byte_p_spl, bits_p_spl;
+ wxUint32 sample_fq, byte_p_sec;
+ wxSoundFormatPcm *pcm;
+
+ pcm = (wxSoundFormatPcm *)(m_sndformat->Clone());
+
+ // Write block length
+ data.Write32(16);
+
+ sample_fq = pcm->GetSampleRate();
+ bits_p_spl = pcm->GetBPS();
+ channels = pcm->GetChannels();
+ byte_p_spl = pcm->GetBPS() / 8;
+ byte_p_sec = pcm->GetBytesFromTime(1);
+ format = 0x01;
+
+ pcm->Signed(TRUE);
+ pcm->SetOrder(wxLITTLE_ENDIAN);
+
+ data << format << channels << sample_fq
+ << byte_p_sec << byte_p_spl << bits_p_spl;
+
+ return pcm;
+}
+
+wxSoundFormatBase *wxSoundWave::HandleInputG72X(wxDataOutputStream& data)
+{
+ wxUint16 format, channels, byte_p_spl, bits_p_spl;
+ wxUint32 sample_fq, byte_p_sec;
+ wxSoundFormatG72X *g72x;
+
+ // Write block length
+ data.Write32(16);
+
+ g72x = (wxSoundFormatG72X *)(m_sndformat->Clone());
+ if (g72x->GetG72XType() != wxSOUND_G721) {
+ delete g72x;
+ return NULL;
+ }
+
+ sample_fq = g72x->GetSampleRate();
+ bits_p_spl = 4;
+ channels = 1;
+ byte_p_spl = 0;
+ byte_p_sec = g72x->GetBytesFromTime(1);
+ format = 0x40;
+ data << format << channels << sample_fq
+ << byte_p_sec << byte_p_spl << bits_p_spl;
+
+ return g72x;
+}
+