PortAudio
2.0
|
Win32 implementation of platform-specific PaUtil support functions. More...
Functions | |
void * | PaUtil_AllocateZeroInitializedMemory (long size) |
void | PaUtil_FreeMemory (void *block) |
int | PaUtil_CountCurrentlyAllocatedBlocks (void) |
void | Pa_Sleep (long msec) |
void | PaUtil_InitializeClock (void) |
double | PaUtil_GetTime (void) |
void | PaWinUtil_SetLastSystemErrorInfo (PaHostApiTypeId hostApiType, long winError) |
Win32 implementation of platform-specific PaUtil support functions.
void Pa_Sleep | ( | long | msec | ) |
Put the caller to sleep for at least 'msec' milliseconds. This function is provided only as a convenience for authors of portable code (such as the tests and examples in the PortAudio distribution.)
The function may sleep longer than requested so don't rely on this for accurate musical timing.
Referenced by AudioDeviceSetPropertyNowAndWaitForChange(), main(), PaQa_RunLoopbackFullDuplex(), PaQa_WaitForStream(), paqaCheckLatency(), PlaySine(), ReadStream(), TestOnce(), TestStopMode(), waitUntilBlioWriteBufferIsEmpty(), and WriteStream().
void* PaUtil_AllocateZeroInitializedMemory | ( | long | size | ) |
Allocate size bytes of zero-initialized memory.
Guaranteed to be aligned to a FIXME byte boundary.
Referenced by InitializeWave(), OpenStream(), PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaPulseAudio_New(), PaPulseAudio_RenameSink(), PaPulseAudio_RenameSource(), PaSkeleton_Initialize(), PaSndio_Initialize(), PaUtil_CreateAllocationGroup(), PaUtil_GroupAllocateZeroInitializedMemory(), PaUtil_InitializeBufferProcessor(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), PaWinWdm_Initialize(), and ProcessingThread().
int PaUtil_CountCurrentlyAllocatedBlocks | ( | void | ) |
Return the number of currently allocated blocks. This function can be used for detecting memory leaks.
void PaUtil_FreeMemory | ( | void * | block | ) |
Release block allocated by PaUtil_AllocateZeroInitializedMemory()
if block is non-NULL. block may be NULL
Referenced by OpenStream(), PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaPulseAudio_CloseStreamCb(), PaPulseAudio_Free(), PaPulseAudio_RenameSink(), PaPulseAudio_RenameSource(), PaSkeleton_Initialize(), PaUtil_CreateAllocationGroup(), PaUtil_DestroyAllocationGroup(), PaUtil_FreeAllAllocations(), PaUtil_GroupFreeMemory(), PaUtil_InitializeBufferProcessor(), PaUtil_TerminateBufferProcessor(), PaWin_WDMKS_QueryFilterMaximumChannelCount(), PaWinMme_Initialize(), and ProcessingThread().
double PaUtil_GetTime | ( | void | ) |
Return the system time in seconds. Used to implement CPU load functions
Referenced by PaUnixThread_New(), PaUtil_BeginCpuLoadMeasurement(), PaUtil_EndCpuLoadMeasurement(), PaWinWdm_Initialize(), ProcessingThreadProc(), and waitUntilBlioWriteBufferIsEmpty().
void PaUtil_InitializeClock | ( | void | ) |
Initialize the clock used by PaUtil_GetTime(). Call this before calling PaUtil_GetTime.
Referenced by Pa_Initialize().
void PaWinUtil_SetLastSystemErrorInfo | ( | PaHostApiTypeId | hostApiType, |
long | winError | ||
) |
Convert a Windows error code into a PaError. Sets the host-api specific error information if needed.
hostApiType | The calling host api type. Used when reporting paUnanticipatedHostError |
winError | A Windows error code. |
References PaUtil_SetLastHostErrorInfo().
Referenced by PaWinUtil_CoInitialize().