+void wxSoundFileStream::FinishPreparation(wxUint32 len)
+{
+ m_bytes_left = m_length = len;
+ m_prepared = TRUE;
+}
+
+wxString wxSoundFileStream::GetCodecName() const
+{
+ return wxString(wxT("wxSoundFileStream base codec"));
+}
+
+wxUint32 wxSoundFileStream::GetLength()
+{
+ if (m_input && !m_prepared && GetError() == wxSOUND_NOERR)
+ return (PrepareToPlay()) ? m_length : 0;
+
+ return m_length;
+}
+
+wxUint32 wxSoundFileStream::GetPosition()
+{
+ if (!m_prepared && m_input != NULL && GetError() == wxSOUND_NOERR)
+ PrepareToPlay();
+
+ return m_length-m_bytes_left;
+}
+
+wxUint32 wxSoundFileStream::SetPosition(wxUint32 new_position)
+{
+ if (!m_prepared && m_input != NULL && GetError() == wxSOUND_NOERR)
+ PrepareToPlay();
+
+ if (!m_prepared)
+ return 0;
+
+ if (!RepositionStream(new_position))
+ return m_length-m_bytes_left;
+
+ if (new_position >= m_length) {
+ m_bytes_left = 0;
+ return m_length;
+ }
+
+ m_bytes_left = m_length-new_position;
+ return new_position;
+}
+