zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mixer.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 "alSource.h"
#include "alBuffer.h"
#include "alListener.h"
#include "alAuxEffectSlot.h"
#include "alu.h"
#include "bs2b.h"

Go to the source code of this file.

Macros

#define DECL_TEMPLATE(T)
 

Functions

static void Filter2P (FILTER *filter, ALuint chan, ALfloat *RESTRICT dst, const ALfloat *RESTRICT src, ALuint numsamples)
 
static void LoadData (ALfloat *dst, const ALvoid *src, ALuint srcstep, enum FmtType srctype, ALuint samples)
 
ALvoid MixSource (ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
 
static __inline ALfloat Sample_ALbyte (ALbyte val)
 
static __inline ALfloat Sample_ALfloat (ALfloat val)
 
static __inline ALfloat Sample_ALshort (ALshort val)
 
static void SilenceData (ALfloat *dst, ALuint samples)
 

Macro Definition Documentation

#define DECL_TEMPLATE (   T)
Value:
static void Load_##T(ALfloat *dst, const T *src, ALuint srcstep, ALuint samples)\
{ \
for(i = 0;i < samples;i++) \
dst[i] = Sample_##T(src[i*srcstep]); \
}
float ALfloat
Definition: al.h:68
GLenum GLenum dst
Definition: glew.h:2396
for(;;)
GLsizei samples
Definition: gl2ext.h:970
unsigned int ALuint
Definition: al.h:59
GLenum src
Definition: glew.h:2396
int i
Definition: pngrutil.c:1377

Definition at line 49 of file mixer.c.

Function Documentation

static void Filter2P ( FILTER filter,
ALuint  chan,
ALfloat *RESTRICT  dst,
const ALfloat *RESTRICT  src,
ALuint  numsamples 
)
static

Definition at line 87 of file mixer.c.

References i, lpFilter2P(), and lpFilter2PC().

Referenced by MixSource().

static void LoadData ( ALfloat dst,
const ALvoid src,
ALuint  srcstep,
enum FmtType  srctype,
ALuint  samples 
)
static

Definition at line 63 of file mixer.c.

References FmtByte, FmtFloat, and FmtShort.

Referenced by MixSource().

static __inline ALfloat Sample_ALbyte ( ALbyte  val)
static

OpenAL cross platform audio library Copyright (C) 1999-2007 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 40 of file mixer.c.

static __inline ALfloat Sample_ALfloat ( ALfloat  val)
static

Definition at line 46 of file mixer.c.

static __inline ALfloat Sample_ALshort ( ALshort  val)
static

Definition at line 43 of file mixer.c.

static void SilenceData ( ALfloat dst,
ALuint  samples 
)
static

Definition at line 79 of file mixer.c.

References i.

Referenced by MixSource().