Don't fail to okay all mono WAVs in OSS wxSound backend

Ever since the changes of 544c4a3bde
(almost 14 years ago), playing mono WAVs with wxSound completely failed
if setting the sound device to mono using SNDCTL_DSP_STEREO ioctl
failed. This doesn't look like a wise thing to do, so don't consider
this as a fatal failure, but just play mono as stereo (and even possibly
stereo as mono) instead.

This fixes the sound sample being broken out of the box on many (all?)
Linux systems.
This commit is contained in:
Vadim Zeitlin
2017-11-19 22:44:57 +01:00
parent d788588cfc
commit 2558c91ae8

View File

@@ -224,7 +224,6 @@ bool wxSoundBackendOSS::InitDSP(int dev, const wxSoundData *data)
if (tmp != stereo)
{
wxLogTrace(wxT("sound"), wxT("Unable to set DSP to %s."), stereo? wxT("stereo"):wxT("mono"));
m_needConversion = true;
}
tmp = data->m_samplingRate;