Fixed wxMemoryOutputStream (it wasn't working at all)

Fixed wxStreamBuffer to support features of wxMemoryOutputStream
wxMMedia2 updates (various fixes)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-11-06 17:44:03 +00:00
parent 81915974f6
commit 56dc1ffd50
20 changed files with 257 additions and 87 deletions

View File

@@ -92,6 +92,14 @@ bool wxSoundRouterStream::SetSoundFormat(const wxSoundFormatBase& format)
return TRUE;
}
wxUint32 wxSoundRouterStream::GetBestSize() const
{
if (m_router)
return m_router->GetBestSize();
else
return m_sndio->GetBestSize();
}
bool wxSoundRouterStream::StartProduction(int evt)
{
if (!m_router) {
@@ -268,7 +276,7 @@ bool wxSoundFileStream::StopProduction()
void wxSoundFileStream::OnSoundEvent(int evt)
{
wxUint32 len = m_sndio->GetBestSize();
wxUint32 len = m_codec.GetBestSize();
char *buffer;
buffer = new char[len];
@@ -285,6 +293,7 @@ void wxSoundFileStream::OnSoundEvent(int evt)
m_len -= len;
if (m_len == 0) {
Stop();
delete[] buffer;
return;
}
break;
@@ -292,6 +301,7 @@ void wxSoundFileStream::OnSoundEvent(int evt)
len = GetData(buffer, len);
if (len == 0) {
Stop();
delete[] buffer;
return;
}
m_codec.Write(buffer, len);