PortAudio  2.0
Functions

Stream interfaces, representation structures and helper functions used to interface between pa_front.c host API implementations. More...

#include "pa_stream.h"

Functions

void PaUtil_InitializeStreamInterface (PaUtilStreamInterface *streamInterface, PaError(*Close)(PaStream *), PaError(*Start)(PaStream *), PaError(*Stop)(PaStream *), PaError(*Abort)(PaStream *), PaError(*IsStopped)(PaStream *), PaError(*IsActive)(PaStream *), PaTime(*GetTime)(PaStream *), double(*GetCpuLoad)(PaStream *), PaError(*Read)(PaStream *, void *, unsigned long), PaError(*Write)(PaStream *, const void *, unsigned long), signed long(*GetReadAvailable)(PaStream *), signed long(*GetWriteAvailable)(PaStream *))
 
void PaUtil_InitializeStreamRepresentation (PaUtilStreamRepresentation *streamRepresentation, PaUtilStreamInterface *streamInterface, PaStreamCallback *streamCallback, void *userData)
 
void PaUtil_TerminateStreamRepresentation (PaUtilStreamRepresentation *streamRepresentation)
 
PaError PaUtil_DummyRead (PaStream *stream, void *buffer, unsigned long frames)
 
PaError PaUtil_DummyWrite (PaStream *stream, const void *buffer, unsigned long frames)
 
signed long PaUtil_DummyGetReadAvailable (PaStream *stream)
 
signed long PaUtil_DummyGetWriteAvailable (PaStream *stream)
 
double PaUtil_DummyGetCpuLoad (PaStream *stream)
 

Detailed Description

Stream interfaces, representation structures and helper functions used to interface between pa_front.c host API implementations.

Function Documentation

double PaUtil_DummyGetCpuLoad ( PaStream stream)

Dummy GetCpuLoad function for use in an interface to a read/write stream. Pass to the GetCpuLoad parameter of PaUtil_InitializeStreamInterface.

Returns
Returns 0.

Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().

signed long PaUtil_DummyGetReadAvailable ( PaStream stream)

Dummy GetReadAvailable function for use in interfaces to callback based streams. Pass to the GetReadAvailable parameter of PaUtil_InitializeStreamInterface.

Returns
An error code indicating that the function has no effect because the stream is a callback stream.

References paCanNotReadFromACallbackStream.

Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().

signed long PaUtil_DummyGetWriteAvailable ( PaStream stream)

Dummy GetWriteAvailable function for use in interfaces to callback based streams. Pass to the GetWriteAvailable parameter of PaUtil_InitializeStreamInterface.

Returns
An error code indicating that the function has no effect because the stream is a callback stream.

References paCanNotWriteToACallbackStream.

Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().

PaError PaUtil_DummyRead ( PaStream stream,
void *  buffer,
unsigned long  frames 
)

Dummy Read function for use in interfaces to a callback based streams. Pass to the Read parameter of PaUtil_InitializeStreamInterface.

Returns
An error code indicating that the function has no effect because the stream is a callback stream.

References paCanNotReadFromACallbackStream.

Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().

PaError PaUtil_DummyWrite ( PaStream stream,
const void *  buffer,
unsigned long  frames 
)

Dummy Write function for use in an interfaces to callback based streams. Pass to the Write parameter of PaUtil_InitializeStreamInterface.

Returns
An error code indicating that the function has no effect because the stream is a callback stream.

References paCanNotWriteToACallbackStream.

Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().

void PaUtil_InitializeStreamInterface ( PaUtilStreamInterface streamInterface,
PaError(*)(PaStream *)  Close,
PaError(*)(PaStream *)  Start,
PaError(*)(PaStream *)  Stop,
PaError(*)(PaStream *)  Abort,
PaError(*)(PaStream *)  IsStopped,
PaError(*)(PaStream *)  IsActive,
PaTime(*)(PaStream *)  GetTime,
double(*)(PaStream *)  GetCpuLoad,
PaError(*)(PaStream *, void *, unsigned long)  Read,
PaError(*)(PaStream *, const void *, unsigned long)  Write,
signed long(*)(PaStream *)  GetReadAvailable,
signed long(*)(PaStream *)  GetWriteAvailable 
)
void PaUtil_InitializeStreamRepresentation ( PaUtilStreamRepresentation streamRepresentation,
PaUtilStreamInterface streamInterface,
PaStreamCallback streamCallback,
void *  userData 
)
void PaUtil_TerminateStreamRepresentation ( PaUtilStreamRepresentation streamRepresentation)

Clean up a PaUtilStreamRepresentation structure previously initialized by a call to PaUtil_InitializeStreamRepresentation.

See Also
PaUtil_InitializeStreamRepresentation

References PaUtilStreamRepresentation::magic.