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) {
void wxSoundFileStream::OnSoundEvent(int evt)
{
- wxUint32 len = m_sndio->GetBestSize();
+ wxUint32 len = m_codec.GetBestSize();
char *buffer;
buffer = new char[len];
m_len -= len;
if (m_len == 0) {
Stop();
+ delete[] buffer;
return;
}
break;
len = GetData(buffer, len);
if (len == 0) {
Stop();
+ delete[] buffer;
return;
}
m_codec.Write(buffer, len);