// Name: sndoss.cpp
// Purpose:
// Date: 08/11/1999
-// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
+// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999, 2000
// CVSID: $Id$
// --------------------------------------------------------------------------
#ifdef __GNUG__
{
wxSoundFormatPcm pcm_default;
- m_fd = open(dev_name.mb_str(), O_RDWR);
+ m_fd = open(dev_name.mb_str(), O_WRONLY);
if (m_fd == -1) {
m_snderror = wxSOUND_INVDEV;
m_snderror = wxSOUND_NOERR;
if (*pcm_format != format) {
- m_snderror = wxSOUND_NOTEXACT;
+ m_snderror = wxSOUND_NOEXACT;
return FALSE;
}
return TRUE;
StopProduction();
old_frmt = m_sndformat->Clone();
+ if (!old_frmt) {
+ m_snderror = wxSOUND_MEMERR;
+ return FALSE;
+ }
if (evt == wxSOUND_OUTPUT)
m_fd = open(m_devname.mb_str(), O_WRONLY);