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

Go to the source code of this file.

Functions

void alc_wave_deinit (void)
 
ALCboolean alc_wave_init (BackendFuncs *func_list)
 
void alc_wave_probe (enum DevProbe type)
 
static void fwrite16le (ALushort val, FILE *f)
 
static void fwrite32le (ALuint val, FILE *f)
 
static void wave_close_playback (ALCdevice *device)
 
static ALCenum wave_open_playback (ALCdevice *device, const ALCchar *deviceName)
 
static ALCboolean wave_reset_playback (ALCdevice *device)
 
static ALCboolean wave_start_playback (ALCdevice *device)
 
static void wave_stop_playback (ALCdevice *device)
 
static ALuint WaveProc (ALvoid *ptr)
 

Variables

static const ALuint channel_masks []
 
static const ALubyte SUBTYPE_FLOAT []
 
static const ALubyte SUBTYPE_PCM []
 
static const BackendFuncs wave_funcs
 
static const ALCchar waveDevice [] = "Wave File Writer"
 

Function Documentation

void alc_wave_deinit ( void  )

Definition at line 353 of file wave.c.

ALCboolean alc_wave_init ( BackendFuncs func_list)

Definition at line 347 of file wave.c.

References ALC_TRUE, and wave_funcs.

void alc_wave_probe ( enum DevProbe  type)
static void fwrite16le ( ALushort  val,
FILE *  f 
)
static

Definition at line 70 of file wave.c.

Referenced by wave_reset_playback().

static void fwrite32le ( ALuint  val,
FILE *  f 
)
static

Definition at line 76 of file wave.c.

Referenced by wave_reset_playback(), and wave_stop_playback().

static void wave_close_playback ( ALCdevice device)
static

Definition at line 194 of file wave.c.

References ALCdevice_struct::ExtraData, free, and NULL.

static ALCenum wave_open_playback ( ALCdevice device,
const ALCchar deviceName 
)
static
static void wave_stop_playback ( ALCdevice device)
static

Definition at line 300 of file wave.c.

References ALCdevice_struct::ExtraData, free, fwrite32le(), NULL, SEEK_SET, and StopThread().

Variable Documentation

const ALuint channel_masks[]
static
Initial value:
= {
0,
0x4,
0x1 | 0x2,
0,
0x1 | 0x2 | 0x10 | 0x20,
0,
0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20,
0x1 | 0x2 | 0x4 | 0x8 | 0x100 | 0x200 | 0x400,
0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20 | 0x200 | 0x400,
}

Definition at line 57 of file wave.c.

Referenced by wave_reset_playback().

const ALubyte SUBTYPE_FLOAT[]
static
Initial value:
= {
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa,
0x00, 0x38, 0x9b, 0x71
}

Definition at line 52 of file wave.c.

Referenced by wave_reset_playback().

const ALubyte SUBTYPE_PCM[]
static
Initial value:
= {
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa,
0x00, 0x38, 0x9b, 0x71
}

Definition at line 48 of file wave.c.

Referenced by wave_reset_playback().

const BackendFuncs wave_funcs
static
Initial value:
= {
}
#define NULL
Definition: ftobjs.h:61
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
static void wave_close_playback(ALCdevice *device)
Definition: wave.c:194
static void wave_stop_playback(ALCdevice *device)
Definition: wave.c:300
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
static ALCboolean wave_reset_playback(ALCdevice *device)
Definition: wave.c:203
static ALCenum wave_open_playback(ALCdevice *device, const ALCchar *deviceName)
Definition: wave.c:165
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281
static ALCboolean wave_start_playback(ALCdevice *device)
Definition: wave.c:277

Definition at line 330 of file wave.c.

Referenced by alc_wave_init().

const ALCchar waveDevice[] = "Wave File Writer"
static

Definition at line 46 of file wave.c.

Referenced by alc_wave_probe(), and wave_open_playback().