close(m_fd);
m_oss_stop = TRUE;
+ m_q_filled = TRUE;
}
wxSoundStreamOSS::~wxSoundStreamOSS()
return m_bufsize;
}
-wxSoundStream& wxSoundStreamOSS::Read(void *buffer, size_t len)
+wxSoundStream& wxSoundStreamOSS::Read(void *buffer, wxUint32 len)
{
int ret;
- m_lastcount = (size_t)ret = read(m_fd, buffer, len);
+ m_lastcount = (wxUint32)ret = read(m_fd, buffer, len);
+ m_q_filled = TRUE;
if (ret < 0)
m_snderror = wxSOUND_IOERR;
return *this;
}
-wxSoundStream& wxSoundStreamOSS::Write(const void *buffer, size_t len)
+wxSoundStream& wxSoundStreamOSS::Write(const void *buffer, wxUint32 len)
{
int ret;
- m_lastcount = (size_t)ret = write(m_fd, buffer, len);
+ m_lastcount = (wxUint32)ret = write(m_fd, buffer, len);
+ m_q_filled = TRUE;
if (ret < 0)
m_snderror = wxSOUND_IOERR;
void wxSoundStreamOSS::WakeUpEvt(int evt)
{
+ m_q_filled = FALSE;
OnSoundEvent(evt);
}
ioctl(m_fd, SNDCTL_DSP_SETTRIGGER, &trig);
m_oss_stop = FALSE;
+ m_q_filled = FALSE;
return TRUE;
}
close(m_fd);
m_oss_stop = TRUE;
+ m_q_filled = TRUE;
return TRUE;
}
+bool wxSoundStreamOSS::QueueFilled() const
+{
+ return m_q_filled;
+}
+
//
// Detect the closest format (The best).
//