]> git.mxchange.org Git - simgear.git/commitdiff
Warn for stereo files.
authorErik Hofman <erik@ehofman.com>
Mon, 3 Oct 2011 06:34:20 +0000 (08:34 +0200)
committerErik Hofman <erik@ehofman.com>
Mon, 3 Oct 2011 06:34:20 +0000 (08:34 +0200)
simgear/sound/soundmgr_openal.cxx

index 3a0b2979c3a4d841caf11cdddd67518fcd44e8e1..9aa4e3e9631f5d18b1cfdf21ac51d5bde1569b83 100644 (file)
@@ -613,6 +613,10 @@ bool SGSoundMgr::load(string &samplepath, void **dbuf, int *fmt,
     }
 #endif
 
+    if (format == AL_FORMAT_STEREO8 || format == AL_FORMAT_STEREO16) {
+        throw sg_io_exception("Warning: STEREO files are not supported for 3D audio effects: " + samplepath);
+    }
+
     *dbuf = (void *)data;
     *fmt = (int)format;
     *sz = (size_t)size;