zenilib: zenilib/jni/external/openal-soft/Alc/backends/wave.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
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 | ) |

Definition at line 357 of file wave.c.

References ALL_DEVICE_PROBE, AppendAllDevicesList(), CAPTURE_DEVICE_PROBE, ConfigValueExists(), and waveDevice.

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

Definition at line 165 of file wave.c.

References ALC_INVALID_VALUE, ALC_NO_ERROR, calloc, ALCdevice_struct::DeviceName, ERR, ALCdevice_struct::ExtraData, free, GetConfigValue(), strdup(), and waveDevice.

static ALCboolean wave_reset_playback | ( | ALCdevice * | device | ) |

static

Definition at line 203 of file wave.c.

References ALC_FALSE, ALC_TRUE, BytesFromDevFmt(), channel_masks, ChannelsFromDevFmt(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtShort, DevFmtUByte, DevFmtUInt, DevFmtUShort, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, ALCdevice_struct::Frequency, fwrite16le(), fwrite32le(), SEEK_SET, SetDefaultWFXChannelOrder(), SUBTYPE_FLOAT, and SUBTYPE_PCM.

static ALCboolean wave_start_playback | ( | ALCdevice * | device | ) |

static

Definition at line 277 of file wave.c.

References ALC_FALSE, ALC_TRUE, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), free, malloc, NULL, StartThread(), ALCdevice_struct::UpdateSize, and WaveProc().

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().

static ALuint WaveProc | ( | ALvoid * | ptr | ) |

static

Definition at line 85 of file wave.c.

References ALCdevice_Lock, ALCdevice_Unlock, aluHandleDisconnect(), aluMixData(), BytesFromDevFmt(), ALCdevice_struct::Connected, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), ALCdevice_struct::Frequency, i, IS_LITTLE_ENDIAN, Sleep, timeGetTime(), and ALCdevice_struct::UpdateSize.

Referenced by wave_start_playback().

## 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:
= {
wave_open_playback,
wave_close_playback,
wave_reset_playback,
wave_start_playback,
wave_stop_playback,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
ALCdevice_GetLatencyDefault
}
NULL
#define NULL
Definition: ftobjs.h:61
ALCdevice_GetLatencyDefault
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
wave_close_playback
static void wave_close_playback(ALCdevice *device)
Definition: wave.c:194
wave_stop_playback
static void wave_stop_playback(ALCdevice *device)
Definition: wave.c:300
ALCdevice_LockDefault
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
wave_reset_playback
static ALCboolean wave_reset_playback(ALCdevice *device)
Definition: wave.c:203
wave_open_playback
static ALCenum wave_open_playback(ALCdevice *device, const ALCchar *deviceName)
Definition: wave.c:165
ALCdevice_UnlockDefault
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281
wave_start_playback
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().