summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/portaudio/src/common/pa_util.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/portaudio/src/common/pa_util.h')
-rw-r--r--3rdparty/portaudio/src/common/pa_util.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/3rdparty/portaudio/src/common/pa_util.h b/3rdparty/portaudio/src/common/pa_util.h
index ad5dac52879..5e3909ab43d 100644
--- a/3rdparty/portaudio/src/common/pa_util.h
+++ b/3rdparty/portaudio/src/common/pa_util.h
@@ -29,13 +29,13 @@
*/
/*
- * The text above constitutes the entire PortAudio license; however,
+ * The text above constitutes the entire PortAudio license; however,
* the PortAudio community also makes the following non-binding requests:
*
* Any person wishing to distribute modifications to the Software is
* requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also
- * requested that these non-binding requests be included along with the
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
* license above.
*/
@@ -51,6 +51,13 @@
#include "portaudio.h"
+/** Preprocessor Utilities
+*/
+
+#define PA_STRINGIZE_HELPER(x) #x
+#define PA_STRINGIZE(x) PA_STRINGIZE_HELPER(x)
+
+
#ifdef __cplusplus
extern "C"
{
@@ -65,7 +72,7 @@ struct PaUtilHostApiRepresentation;
host api specific extension functions which aren't passed a rep pointer
by pa_front.c.
- @param hostApi A pointer to a host API represenation pointer. Apon success
+ @param hostApi A pointer to a host API representation pointer. Upon success
this will receive the requested representation pointer.
@param type A valid host API type identifier.
@@ -79,7 +86,7 @@ PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **ho
/** Convert a PortAudio device index into a host API specific device index.
- @param hostApiDevice Pointer to a device index, on success this will recieve the
+ @param hostApiDevice Pointer to a device index, on success this will receive the
converted device index value.
@param device The PortAudio device index to convert.
@param hostApi The host api which the index should be converted for.
@@ -112,16 +119,19 @@ void PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,
const char *errorText );
-
+
/* the following functions are implemented in a platform platform specific
.c file
*/
-/** Allocate size bytes, guaranteed to be aligned to a FIXME byte boundary */
-void *PaUtil_AllocateMemory( long size );
+/** Allocate size bytes of zero-initialized memory.
+Guaranteed to be aligned to a FIXME byte boundary.
+*/
+void *PaUtil_AllocateZeroInitializedMemory( long size );
-/** Realease block if non-NULL. block may be NULL */
+/** Release block allocated by PaUtil_AllocateZeroInitializedMemory()
+if block is non-NULL. block may be NULL */
void PaUtil_FreeMemory( void *block );
@@ -144,6 +154,12 @@ void PaUtil_InitializeClock( void );
/** Return the system time in seconds. Used to implement CPU load functions
+ @note Do not make assumptions about which underlying clock is used to implement
+ PaUtil_GetTime, or use the current implementation as a guide. Do not use this
+ function when a specific clock is required (e.g. when using platform APIs
+ such as pthreads). If you need to use a specific clock, use a native API that
+ returns that clock.
+
@see PaUtil_InitializeClock
*/
double PaUtil_GetTime( void );