X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/926c550dc5347b149be7a5f02dd452865a8a524d..1dc2f8658b885eb1d3514bba87c24830f0e9b034:/utils/wxMMedia/sndwav.cpp?ds=sidebyside diff --git a/utils/wxMMedia/sndwav.cpp b/utils/wxMMedia/sndwav.cpp index 340d8ed2c3..23857f15c1 100644 --- a/utils/wxMMedia/sndwav.cpp +++ b/utils/wxMMedia/sndwav.cpp @@ -106,6 +106,7 @@ wxUint32 wxSndWavCodec::PrepareToPlay() m_sndtime.seconds = sec2 % 60; wxSndFileCodec::m_mmerror = wxMMFILE_NOERROR; + wxSndFileCodec::m_fstate = wxSFILE_PREPARED_TO_PLAY; return riff_codec.GetChunkLength(); } @@ -139,13 +140,12 @@ bool wxSndWavCodec::PrepareToRecord(wxUint32 m_fsize) if (!riff_codec.CreateChunk("fmt ", sizeof(wav_hdr))) return FALSE; - wav_hdr.format = 1; // PCM_WAV_FORMAT + wav_hdr.format = m_sndformat.GetCodecNo(); // PCM_WAV_FORMAT wav_hdr.channels = m_sndformat.GetChannels(); wav_hdr.sample_fq = m_sndformat.GetSampleRate(); wav_hdr.byte_p_spl = (m_sndformat.GetBps() / 8) * wav_hdr.channels; wav_hdr.byte_p_sec = m_sndformat.GetCodec()->GetByteRate(); wav_hdr.bits_p_spl = m_sndformat.GetBps(); - ChangeCodec(WXSOUND_PCM); if (wav_hdr.format == WXSOUND_PCM) { m_sndformat.SetSign(wxSND_SAMPLE_SIGNED);