PortAudio 2.0
pa_unix_oss.c File Reference
#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)
 

Macro Definition Documentation

◆ AFMT_S16_NE

#define AFMT_S16_NE   Get_AFMT_S16_NE()

◆ ENSURE_

#define ENSURE_ ( expr,
code )
Value:
do { \
if( UNLIKELY( (sysErr_ = (expr)) < 0 ) ) \
{ \
/* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
if( (code) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \
{ \
PaUtil_SetLastHostErrorInfo( paOSS, sysErr_, strerror( errno ) ); \
} \
\
PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " PA_STRINGIZE( __LINE__ ) "\n" )); \
result = (code); \
goto error; \
} \
} while( 0 );
#define UNLIKELY(expr)
Definition pa_unix_util.h:66
#define PA_STRINGIZE(x)
Definition pa_util.h:58
@ paUnanticipatedHostError
Definition portaudio.h:128
@ paOSS
Definition portaudio.h:285

Typedef Documentation

◆ PaOssStream

typedef struct PaOssStream PaOssStream

Implementation specific representation of a PaStream.

Enumeration Type Documentation

◆ StreamMode

enum StreamMode
Enumerator
StreamMode_In 
StreamMode_Out 

Function Documentation

◆ PaOSS_Initialize()

◆ PaUtil_InitializeDeviceInfo()

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 )