X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/926c550dc5347b149be7a5f02dd452865a8a524d..2356708db31b737c6eae53c2316b642aa5a2e68d:/utils/wxMMedia/sndpcm.cpp diff --git a/utils/wxMMedia/sndpcm.cpp b/utils/wxMMedia/sndpcm.cpp index acf37b661b..f40fcadedc 100644 --- a/utils/wxMMedia/sndpcm.cpp +++ b/utils/wxMMedia/sndpcm.cpp @@ -1,3 +1,12 @@ +//////////////////////////////////////////////////////////////////////////////// +// Name: sndpcm.cpp +// Purpose: wxMMedia +// Author: Guilhem Lavaux +// Created: 1998 +// Updated: 1999 +// Copyright: (C) 1997, 1998, 1999, Guilhem Lavaux +// License: wxWindows license +//////////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ #pragma implementation "sndpcm.h" #endif @@ -38,10 +47,8 @@ wxSoundDataFormat wxSoundPcmCodec::GetPreferredFormat(int codec) const void wxSoundPcmCodec::Decode() { - InitMode(DECODING); if (m_io_format == m_orig_format) { CopyToOutput(); - ExitMode(); return; } @@ -58,7 +65,6 @@ void wxSoundPcmCodec::Decode() default: break; } - ExitMode(); } // --------------------------------------------------------------------------- @@ -109,9 +115,11 @@ void wxSoundPcmCodec::InputSwapAndSign16() } else { while (StreamOk()) { temp = GET(); + temp2 = GET(); PUT(temp ^ signer1); if (!StreamOk()) { m_in_sound->WriteBack(temp); + m_in_sound->WriteBack(temp2); break; } PUT(GET() ^ signer2); @@ -167,6 +175,7 @@ void wxSoundPcmCodec::OutputSwapAndSign16() PUT(temp ^ signer1); if (!StreamOk()) { m_in_sound->WriteBack(temp); + m_in_sound->WriteBack(temp2); break; } PUT(temp2 ^ signer2); @@ -179,10 +188,8 @@ void wxSoundPcmCodec::OutputSwapAndSign16() void wxSoundPcmCodec::Encode() { - InitMode(ENCODING); if (m_io_format == m_orig_format) { CopyToOutput(); - ExitMode(); return; } @@ -199,5 +206,4 @@ void wxSoundPcmCodec::Encode() default: break; } - ExitMode(); }