PortAudio  2.0
Functions

Win32 implementation of platform-specific PaUtil support functions. More...

#include <windows.h>
#include <mmsystem.h>
#include "pa_util.h"

Functions

void * PaUtil_AllocateMemory (long size)
 
void PaUtil_FreeMemory (void *block)
 
int PaUtil_CountCurrentlyAllocatedBlocks (void)
 
void Pa_Sleep (long msec)
 
void PaUtil_InitializeClock (void)
 
double PaUtil_GetTime (void)
 

Detailed Description

Win32 implementation of platform-specific PaUtil support functions.

Function Documentation

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_AllocateMemory ( long  size)
int PaUtil_CountCurrentlyAllocatedBlocks ( void  )

Return the number of currently allocated blocks. This function can be used for detecting memory leaks.

Note
Allocations will only be tracked if PA_TRACK_MEMORY is #defined. If it isn't, this function will always return 0.
void PaUtil_FreeMemory ( void *  block)
double PaUtil_GetTime ( void  )
void PaUtil_InitializeClock ( void  )

Initialize the clock used by PaUtil_GetTime(). Call this before calling PaUtil_GetTime.

See Also
PaUtil_GetTime

Referenced by Pa_Initialize().