* Fixes and updates on wxMMedia.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-02-18 18:18:06 +00:00
parent b2cce0c457
commit 8a7c9dcc1c
12 changed files with 84 additions and 27 deletions

View File

@@ -60,8 +60,9 @@ void wxSndFileCodec::Play(wxSound& snd)
if (m_fstate != wxSFILE_STOPPED || IsSet(wxSND_BUFLOCKED))
return;
if (!(m_fsize = PrepareToPlay()))
return;
if (m_fstate != wxSFILE_PREPARED_TO_PLAY)
if (!(m_fsize = PrepareToPlay()))
return;
m_fpos = 0;
m_fstate = wxSFILE_PLAYING;
@@ -193,7 +194,7 @@ wxMMtime wxSndFileCodec::GetPosition()
wxMMtime wxSndFileCodec::GetLength()
{
if (m_sndtime.hours == -1 && m_istream)
PrepareToPlay();
m_fsize = PrepareToPlay();
return m_sndtime;
}
@@ -202,7 +203,6 @@ bool wxSndFileCodec::TranslateBuffer(wxSndBuffer& buf)
{
#define TMP_BUFSIZE 10240
wxUint32 buf_size;
wxStreamBuffer *tmp_buf;
wxSoundCodec *codec_in, *codec_out;
wxSoundDataFormat std_format;