From 181196fc0c3a637a3910c85dbeee2033430f12d9 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Thu, 15 Jan 2015 10:54:27 +0100 Subject: [PATCH] Add support for 5.1 and 7.1 audio loading, still seems a bit dodgy (issue #970) --- src/modules/audio/openal/Source.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/audio/openal/Source.cpp b/src/modules/audio/openal/Source.cpp index 4be115da5..c692ec1c0 100644 --- a/src/modules/audio/openal/Source.cpp +++ b/src/modules/audio/openal/Source.cpp @@ -651,6 +651,14 @@ ALenum Source::getFormat(int channels, int bitDepth) const return AL_FORMAT_STEREO8; else if (channels == 2 && bitDepth == 16) return AL_FORMAT_STEREO16; + else if (channels == 6 && bitDepth == 8) + return AL_FORMAT_51CHN8; + else if (channels == 6 && bitDepth == 16) + return AL_FORMAT_51CHN16; + else if (channels == 8 && bitDepth == 8) + return AL_FORMAT_71CHN8; + else if (channels == 8 && bitDepth == 16) + return AL_FORMAT_71CHN16; else return 0; }