All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
panning.c File Reference
#include "config.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "alMain.h"
#include "AL/al.h"
#include "AL/alc.h"
#include "alu.h"

Go to the source code of this file.


ALvoid aluInitPanning (ALCdevice *Device)
ALvoid ComputeAngleGains (const ALCdevice *device, ALfloat angle, ALfloat hwidth, ALfloat ingain, ALfloat *gains)
static void SetSpeakerArrangement (const char *name, ALfloat SpeakerAngle[MaxChannels], enum Channel Speaker2Chan[MaxChannels], ALint chans)

Function Documentation

ALvoid ComputeAngleGains ( const ALCdevice device,
ALfloat  angle,
ALfloat  hwidth,
ALfloat  ingain,
ALfloat gains 


Sets channel gains based on a given source's angle and its half-width. The angle and hwidth parameters are in radians.

Definition at line 149 of file panning.c.

References F_PI, i, lerp(), MaxChannels, ALCdevice_struct::NumChan, ALCdevice_struct::Speaker2Chan, and ALCdevice_struct::SpeakerAngle.

Referenced by CalcNonAttnSourceParams(), CalcSourceParams(), DedicatedUpdate(), EchoUpdate(), and Update3DPanning().

static void SetSpeakerArrangement ( const char *  name,
ALfloat  SpeakerAngle[MaxChannels],
enum Channel  Speaker2Chan[MaxChannels],
ALint  chans 

OpenAL cross platform audio library Copyright (C) 1999-2010 by authors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or go to http://www.gnu.org/copyleft/lgpl.html

Definition at line 34 of file panning.c.

References BackCenter, BackLeft, BackRight, ConfigValueStr(), ERR, F_PI, free, FrontCenter, FrontLeft, FrontRight, i, i2, min, NULL, SideLeft, SideRight, str, and strdup().

Referenced by aluInitPanning().