zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
alcConfig.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "alMain.h"

Go to the source code of this file.

Typedefs

typedef struct ConfigBlock ConfigBlock
 
typedef struct ConfigEntry ConfigEntry
 

Functions

int ConfigValueExists (const char *blockName, const char *keyName)
 
int ConfigValueFloat (const char *blockName, const char *keyName, float *ret)
 
int ConfigValueInt (const char *blockName, const char *keyName, int *ret)
 
int ConfigValueStr (const char *blockName, const char *keyName, const char **ret)
 
int ConfigValueUInt (const char *blockName, const char *keyName, unsigned int *ret)
 
void FreeALConfig (void)
 
const char * GetConfigValue (const char *blockName, const char *keyName, const char *def)
 
int GetConfigValueBool (const char *blockName, const char *keyName, int def)
 
static void LoadConfigFromFile (FILE *f)
 
void ReadALConfig (void)
 

Variables

static char buffer [1024]
 
static ConfigBlockcfgBlocks
 
static unsigned int cfgCount
 

Typedef Documentation

typedef struct ConfigBlock ConfigBlock
typedef struct ConfigEntry ConfigEntry

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

Function Documentation

int ConfigValueExists ( const char *  blockName,
const char *  keyName 
)

Definition at line 310 of file alcConfig.c.

References GetConfigValue().

Referenced by alc_wave_probe().

int ConfigValueFloat ( const char *  blockName,
const char *  keyName,
float *  ret 
)

Definition at line 343 of file alcConfig.c.

References GetConfigValue(), and NULL.

Referenced by alc_initconfig().

int ConfigValueInt ( const char *  blockName,
const char *  keyName,
int ret 
)

Definition at line 325 of file alcConfig.c.

References GetConfigValue(), and NULL.

Referenced by alc_initconfig(), alcOpenDevice(), pa_open_capture(), and pa_open_playback().

int ConfigValueStr ( const char *  blockName,
const char *  keyName,
const char **  ret 
)
int ConfigValueUInt ( const char *  blockName,
const char *  keyName,
unsigned int ret 
)

Definition at line 334 of file alcConfig.c.

References GetConfigValue(), and NULL.

Referenced by alcLoopbackOpenDeviceSOFT(), alcOpenDevice(), and UpdateDeviceParams().

void FreeALConfig ( void  )

Definition at line 258 of file alcConfig.c.

References cfgCount, entries, free, i, j, and NULL.

Referenced by alc_deinit_safe().

const char* GetConfigValue ( const char *  blockName,
const char *  keyName,
const char *  def 
)
int GetConfigValueBool ( const char *  blockName,
const char *  keyName,
int  def 
)

Definition at line 356 of file alcConfig.c.

References GetConfigValue().

Referenced by alc_initconfig(), alsa_reset_playback(), and UpdateDeviceParams().

static void LoadConfigFromFile ( FILE *  f)
static

Definition at line 58 of file alcConfig.c.

References cfgBlocks, cfgCount, ERR, free, i, memmove, NULL, realloc, strdup(), TRACE, and WARN.

Referenced by ReadALConfig().

void ReadALConfig ( void  )

Definition at line 208 of file alcConfig.c.

References calloc, cfgCount, FALSE, LoadConfigFromFile(), NULL, str, and strdup().

Referenced by alc_initconfig().

Variable Documentation

char buffer[1024]
static

Definition at line 56 of file alcConfig.c.

ConfigBlock* cfgBlocks
static

Definition at line 53 of file alcConfig.c.

Referenced by LoadConfigFromFile().

unsigned int cfgCount
static

Definition at line 54 of file alcConfig.c.

Referenced by FreeALConfig(), GetConfigValue(), LoadConfigFromFile(), and ReadALConfig().