+ while (!m_sndio->QueueFilled()) {
+ switch(evt) {
+ case wxSOUND_INPUT:
+ if (len > m_len)
+ len = m_len;
+
+ len = m_codec.Read(buffer, len).GetLastAccess();
+ PutData(buffer, len);
+ m_len -= len;
+ if (m_len == 0) {
+ Stop();
+ return;
+ }
+ break;
+ case wxSOUND_OUTPUT:
+ len = GetData(buffer, len);
+ if (len == 0) {
+ Stop();
+ return;
+ }
+ m_codec.Write(buffer, len);
+ break;