changeset 29500:60819382adfe

OpenAL: untested support for 8-channel audio.
author reimar
date Wed, 19 Aug 2009 16:03:05 +0000
parents e8072b90858e
children a0ba51e33912
files libao2/ao_openal.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_openal.c	Wed Aug 19 13:29:07 2009 +0000
+++ b/libao2/ao_openal.c	Wed Aug 19 16:03:05 2009 +0000
@@ -52,7 +52,7 @@
 
 LIBAO_EXTERN(openal)
 
-#define MAX_CHANS 6
+#define MAX_CHANS 8
 #define NUM_BUF 128
 #define CHUNK_SIZE 512
 static ALuint buffers[MAX_CHANS][NUM_BUF];
@@ -95,10 +95,11 @@
 static int init(int rate, int channels, int format, int flags) {
   float position[3] = {0, 0, 0};
   float direction[6] = {0, 0, 1, 0, -1, 0};
-  float sppos[6][3] = {
+  float sppos[MAX_CHANS][3] = {
     {-1, 0, 0.5}, {1, 0, 0.5},
     {-1, 0,  -1}, {1, 0,  -1},
     {0,  0,   1}, {0, 0, 0.1},
+    {-1, 0,   0}, {1, 0,   0},
   };
   ALCdevice *dev = NULL;
   ALCcontext *ctx = NULL;