* Fixes (AIF works on Linux)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1998-12-26 15:36:45 +00:00
parent d05237ea7b
commit 2a040d3f07
8 changed files with 47 additions and 12 deletions

View File

@@ -106,8 +106,6 @@ bool wxUssSound::DoInput(wxSndBuffer *buf)
wxSoundCodec *codec = buf->GetCurrentCodec();
m_sndbuf->ResetBuffer();
codec->SetInStream(m_sndbuf);
codec->InitIO(m_ussformat);
bufsize = codec->Available();
if (bufsize > m_max_bufsize)
@@ -152,11 +150,18 @@ bool wxUssSound::InitBuffer(wxSndBuffer *buf)
}
codec = buf->GetCurrentCodec();
codec->SetOutStream(m_sndbuf);
codec->InitIO(m_ussformat);
// TODO: We need more tests here.
codec->InitMode((m_mode == wxSND_OUTPUT) ? wxSoundCodec::DECODING : wxSoundCodec::ENCODING);
switch (m_mode) {
case wxSND_INPUT:
codec->SetInStream(m_sndbuf);
codec->InitIO(m_ussformat);
codec->InitMode(wxSoundCodec::ENCODING);
break;
case wxSND_OUTPUT:
codec->SetOutStream(m_sndbuf);
codec->InitIO(m_ussformat);
codec->InitMode(wxSoundCodec::DECODING);
break;
}
return TRUE;
}