zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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)
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 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:
= {
}
static void pa_start_capture(ALCdevice *device)
Definition: portaudio.c:388
static void pa_stop_capture(ALCdevice *device)
Definition: portaudio.c:398
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
static void pa_close_capture(ALCdevice *device)
Definition: portaudio.c:375
static ALCenum pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
Definition: portaudio.c:160
static void pa_stop_playback(ALCdevice *device)
Definition: portaudio.c:294
static ALCenum pa_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint samples)
Definition: portaudio.c:408
static ALCboolean pa_reset_playback(ALCdevice *device)
Definition: portaudio.c:240
static ALCuint pa_available_samples(ALCdevice *device)
Definition: portaudio.c:415
static void pa_close_playback(ALCdevice *device)
Definition: portaudio.c:227
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
static ALCboolean pa_start_playback(ALCdevice *device)
Definition: portaudio.c:279
static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
Definition: portaudio.c:305
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281

Definition at line 422 of file portaudio.c.

Referenced by alc_pa_init().