PortAudio
2.0
|
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/poll.h>
#include <limits.h>
#include <semaphore.h>
#include "portaudio.h"
#include "pa_util.h"
#include "pa_allocation.h"
#include "pa_hostapi.h"
#include "pa_stream.h"
#include "pa_cpuload.h"
#include "pa_process.h"
#include "pa_unix_util.h"
#include "pa_debugprint.h"
Data Structures | |
struct | PaOSSHostApiRepresentation |
struct | PaOssStreamComponent |
struct | PaOssStream |
Macros | |
#define | ENSURE_(expr, code) |
#define | AFMT_S16_NE Get_AFMT_S16_NE() |
Typedefs | |
typedef struct PaOssStream | PaOssStream |
Enumerations | |
enum | StreamMode { StreamMode_In, StreamMode_Out } |
Functions | |
PaError | PaOSS_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex) |
PaError | PaUtil_InitializeDeviceInfo (PaDeviceInfo *deviceInfo, const char *name, PaHostApiIndex hostApiIndex, int maxInputChannels, int maxOutputChannels, PaTime defaultLowInputLatency, PaTime defaultLowOutputLatency, PaTime defaultHighInputLatency, PaTime defaultHighOutputLatency, double defaultSampleRate, PaUtilAllocationGroup *allocations) |
#define AFMT_S16_NE Get_AFMT_S16_NE() |
#define ENSURE_ | ( | expr, | |
code | |||
) |
typedef struct PaOssStream PaOssStream |
Implementation specific representation of a PaStream.
enum StreamMode |
PaError PaOSS_Initialize | ( | PaUtilHostApiRepresentation ** | hostApi, |
PaHostApiIndex | hostApiIndex | ||
) |
Initialize the OSS API implementation.
This function will initialize host API datastructures and query host devices for information.
Aspect DeviceCapabilities: Enumeration of host API devices is initiated from here
Aspect FreeResources: If an error is encountered under way we have to free each resource allocated in this function, this happens with the usual "error" label.
References PaOSSHostApiRepresentation::allocations, PaOSSHostApiRepresentation::blockingStreamInterface, PaOSSHostApiRepresentation::callbackStreamInterface, GetStreamReadAvailable(), GetStreamWriteAvailable(), PaOSSHostApiRepresentation::hostApiIndex, PaUtilHostApiRepresentation::info, PaOSSHostApiRepresentation::inheritedHostApiRep, PA_ENSURE, PA_UNLESS, paInsufficientMemory, paNoError, paOSS, PaUtil_AllocateMemory(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_DummyGetCpuLoad(), PaUtil_DummyGetReadAvailable(), PaUtil_DummyGetWriteAvailable(), PaUtil_DummyRead(), PaUtil_DummyWrite(), PaUtil_FreeAllAllocations(), PaUtil_FreeMemory(), PaUtil_InitializeStreamInterface(), ReadStream(), PaHostApiInfo::structVersion, and WriteStream().
PaError PaUtil_InitializeDeviceInfo | ( | PaDeviceInfo * | deviceInfo, |
const char * | name, | ||
PaHostApiIndex | hostApiIndex, | ||
int | maxInputChannels, | ||
int | maxOutputChannels, | ||
PaTime | defaultLowInputLatency, | ||
PaTime | defaultLowOutputLatency, | ||
PaTime | defaultHighInputLatency, | ||
PaTime | defaultHighOutputLatency, | ||
double | defaultSampleRate, | ||
PaUtilAllocationGroup * | allocations | ||
) |
References PaDeviceInfo::defaultHighInputLatency, PaDeviceInfo::defaultHighOutputLatency, PaDeviceInfo::defaultLowInputLatency, PaDeviceInfo::defaultLowOutputLatency, PaDeviceInfo::defaultSampleRate, PaDeviceInfo::hostApi, PaDeviceInfo::maxInputChannels, PaDeviceInfo::maxOutputChannels, PaDeviceInfo::name, PA_UNLESS, paInsufficientMemory, paNoError, PaUtil_GroupAllocateMemory(), and PaDeviceInfo::structVersion.