zenilib: zenilib/jni/external/openal-soft/Alc/backends/portaudio.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
portaudio.c File Reference
`#include "config.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "alMain.h"`
`#include "alu.h"`
`#include <portaudio.h>`

Go to the source code of this file.

## Functions

void | alc_pa_deinit (void)
ALCboolean | alc_pa_init (BackendFuncs *func_list)
void | alc_pa_probe (enum DevProbe type)
static ALCuint | pa_available_samples (ALCdevice *device)
static int | pa_callback (const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, const PaStreamCallbackFlags statusFlags, void *userData)
static int | pa_capture_cb (const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, const PaStreamCallbackFlags statusFlags, void *userData)
static ALCenum | pa_capture_samples (ALCdevice *device, ALCvoid *buffer, ALCuint samples)
static void | pa_close_capture (ALCdevice *device)
static void | pa_close_playback (ALCdevice *device)
static ALCboolean | pa_load (void)
static ALCenum | pa_open_capture (ALCdevice *device, const ALCchar *deviceName)
static ALCenum | pa_open_playback (ALCdevice *device, const ALCchar *deviceName)
static ALCboolean | pa_reset_playback (ALCdevice *device)
static void | pa_start_capture (ALCdevice *device)
static ALCboolean | pa_start_playback (ALCdevice *device)
static void | pa_stop_capture (ALCdevice *device)
static void | pa_stop_playback (ALCdevice *device)

## Variables

static const ALCchar | pa_device [] = "PortAudio Default"
static const BackendFuncs | pa_funcs

## Function Documentation

void alc_pa_deinit | ( | void |  | ) |

Definition at line 447 of file portaudio.c.

References NULL.

ALCboolean alc_pa_init | ( | BackendFuncs * | func_list | ) |

Definition at line 439 of file portaudio.c.

References ALC_FALSE, ALC_TRUE, pa_funcs, and pa_load().

void alc_pa_probe | ( | enum DevProbe | type | ) |

Definition at line 461 of file portaudio.c.

References ALL_DEVICE_PROBE, AppendAllDevicesList(), AppendCaptureDeviceList(), CAPTURE_DEVICE_PROBE, and pa_device.

static ALCuint pa_available_samples | ( | ALCdevice * | device | ) |

static

Definition at line 415 of file portaudio.c.

References ALCdevice_struct::ExtraData, and RingBufferSize().

static int pa_callback | ( | const void * | inputBuffer,
|  | void * | outputBuffer,
|  | unsigned long | framesPerBuffer,
|  | const PaStreamCallbackTimeInfo * | timeInfo,
|  | const PaStreamCallbackFlags | statusFlags,
|  | void * | userData
| ) |  |

static

Definition at line 130 of file portaudio.c.

References aluMixData().

Referenced by pa_open_playback().

static int pa_capture_cb | ( | const void * | inputBuffer,
|  | void * | outputBuffer,
|  | unsigned long | framesPerBuffer,
|  | const PaStreamCallbackTimeInfo * | timeInfo,
|  | const PaStreamCallbackFlags | statusFlags,
|  | void * | userData
| ) |  |

static

Definition at line 144 of file portaudio.c.

References ALCdevice_struct::ExtraData, and WriteRingBuffer().

Referenced by pa_open_capture().

static ALCenum pa_capture_samples | ( | ALCdevice * | device,
|  | ALCvoid * | buffer,
|  | ALCuint | samples
| ) |  |

static

Definition at line 408 of file portaudio.c.

References ALC_NO_ERROR, ALCdevice_struct::ExtraData, and ReadRingBuffer().

static void pa_close_capture | ( | ALCdevice * | device | ) |

static

Definition at line 375 of file portaudio.c.

References ERR, ALCdevice_struct::ExtraData, free, and NULL.

static void pa_close_playback | ( | ALCdevice * | device | ) |

static

Definition at line 227 of file portaudio.c.

References ERR, ALCdevice_struct::ExtraData, free, and NULL.

static ALCboolean pa_load | ( | void |  | ) |

static

Definition at line 61 of file portaudio.c.

References ALC_FALSE, ALC_TRUE, ERR, LOAD_FUNC, and NULL.

Referenced by alc_pa_init().

static ALCenum pa_open_capture | ( | ALCdevice * | device,
|  | const ALCchar * | deviceName
| ) |  |

static

Definition at line 305 of file portaudio.c.

References ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, calloc, ChannelsFromDevFmt(), ConfigValueInt(), CreateRingBuffer(), DestroyRingBuffer(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtShort, DevFmtTypeString(), DevFmtUByte, DevFmtUInt, DevFmtUShort, ALCdevice_struct::DeviceName, ERR, error, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), free, ALCdevice_struct::Frequency, NULL, ALCdevice_struct::NumUpdates, pa_capture_cb(), pa_device, strdup(), and ALCdevice_struct::UpdateSize.

static ALCenum pa_open_playback | ( | ALCdevice * | device,
|  | const ALCchar * | deviceName
| ) |  |

static

Definition at line 160 of file portaudio.c.

References ALC_INVALID_VALUE, ALC_NO_ERROR, calloc, ConfigValueInt(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtShort, DevFmtUByte, DevFmtUInt, DevFmtUShort, ALCdevice_struct::DeviceName, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, free, ALCdevice_struct::Frequency, NULL, ALCdevice_struct::NumUpdates, pa_callback(), pa_device, strdup(), and ALCdevice_struct::UpdateSize.

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

static

Definition at line 240 of file portaudio.c.

References ALC_FALSE, ALC_TRUE, DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtShort, DevFmtStereo, DevFmtUByte, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, ALCdevice_struct::Frequency, SetDefaultChannelOrder(), and ALCdevice_struct::UpdateSize.

static void pa_start_capture | ( | ALCdevice * | device | ) |

static

Definition at line 388 of file portaudio.c.

References ERR, and ALCdevice_struct::ExtraData.

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

static

Definition at line 279 of file portaudio.c.

References ALC_FALSE, ALC_TRUE, ERR, and ALCdevice_struct::ExtraData.

static void pa_stop_capture | ( | ALCdevice * | device | ) |

static

Definition at line 398 of file portaudio.c.

References ERR, and ALCdevice_struct::ExtraData.

static void pa_stop_playback | ( | ALCdevice * | device | ) |

static

Definition at line 294 of file portaudio.c.

References ERR, and ALCdevice_struct::ExtraData.

## Variable Documentation

const ALCchar pa_device[] = "PortAudio Default"

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 33 of file portaudio.c.

Referenced by alc_pa_probe(), pa_open_capture(), and pa_open_playback().

const BackendFuncs pa_funcs

static

Initial value:
= {
pa_open_playback,
pa_close_playback,
pa_reset_playback,
pa_start_playback,
pa_stop_playback,
pa_open_capture,
pa_close_capture,
pa_start_capture,
pa_stop_capture,
pa_capture_samples,
pa_available_samples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
ALCdevice_GetLatencyDefault
}
pa_start_capture
static void pa_start_capture(ALCdevice *device)
Definition: portaudio.c:388
pa_stop_capture
static void pa_stop_capture(ALCdevice *device)
Definition: portaudio.c:398
ALCdevice_GetLatencyDefault
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
pa_close_capture
static void pa_close_capture(ALCdevice *device)
Definition: portaudio.c:375
pa_open_playback
static ALCenum pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
Definition: portaudio.c:160
pa_stop_playback
static void pa_stop_playback(ALCdevice *device)
Definition: portaudio.c:294
pa_capture_samples
static ALCenum pa_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint samples)
Definition: portaudio.c:408
pa_reset_playback
static ALCboolean pa_reset_playback(ALCdevice *device)
Definition: portaudio.c:240
pa_available_samples
static ALCuint pa_available_samples(ALCdevice *device)
Definition: portaudio.c:415
pa_close_playback
static void pa_close_playback(ALCdevice *device)
Definition: portaudio.c:227
ALCdevice_LockDefault
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
pa_start_playback
static ALCboolean pa_start_playback(ALCdevice *device)
Definition: portaudio.c:279
pa_open_capture
static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
Definition: portaudio.c:305
ALCdevice_UnlockDefault
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281

Definition at line 422 of file portaudio.c.

Referenced by alc_pa_init().