1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 13:47:04 +00:00

OpenAL: untested support for 8-channel audio.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29542 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-08-19 16:03:05 +00:00
parent 0d0c303ebe
commit 54af60865f

View File

@ -52,7 +52,7 @@ static const ao_info_t info =
LIBAO_EXTERN(openal) LIBAO_EXTERN(openal)
#define MAX_CHANS 6 #define MAX_CHANS 8
#define NUM_BUF 128 #define NUM_BUF 128
#define CHUNK_SIZE 512 #define CHUNK_SIZE 512
static ALuint buffers[MAX_CHANS][NUM_BUF]; static ALuint buffers[MAX_CHANS][NUM_BUF];
@ -95,10 +95,11 @@ static void print_help(void) {
static int init(int rate, int channels, int format, int flags) { static int init(int rate, int channels, int format, int flags) {
float position[3] = {0, 0, 0}; float position[3] = {0, 0, 0};
float direction[6] = {0, 0, 1, 0, -1, 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, 0.5}, {1, 0, 0.5},
{-1, 0, -1}, {1, 0, -1}, {-1, 0, -1}, {1, 0, -1},
{0, 0, 1}, {0, 0, 0.1}, {0, 0, 1}, {0, 0, 0.1},
{-1, 0, 0}, {1, 0, 0},
}; };
ALCdevice *dev = NULL; ALCdevice *dev = NULL;
ALCcontext *ctx = NULL; ALCcontext *ctx = NULL;