+ return TRUE;
+}
+
+bool wxUssSound::InitBuffer(wxSndBuffer *buf)
+{
+ wxSoundCodec *codec;
+
+ if (!OnSetupDriver(*buf, buf->GetMode())) {
+ if (buf->IsNotSet(wxSND_BUFREADY))
+ return FALSE;
+ }
+
+ codec = buf->GetCurrentCodec();
+ switch (m_mode) {
+ case wxSND_INPUT:
+ codec->SetInStream(m_sndbuf);
+ codec->InitIO(m_ussformat);
+ codec->InitMode(wxSoundCodec::ENCODING);
+ break;
+ case wxSND_OUTPUT:
+ codec->SetOutStream(m_sndbuf);
+ codec->InitIO(m_ussformat);
+ codec->InitMode(wxSoundCodec::DECODING);
+ break;
+ case wxSND_DUPLEX:
+ case wxSND_OTHER_IO:
+ break;
+ }
+ return TRUE;