XT-Audio
Functions
XtPlatform.h File Reference

Maps setup and system identifiers to platform specific services. More...

Go to the source code of this file.

Functions

void XtPlatformDestroy (XtPlatform *p)
 Terminates the XT-Audio library. More...
 
XtService const * XtPlatformGetService (XtPlatform const *p, XtSystem system)
 Get audio service corresponding to the given system. More...
 
XtSystem XtPlatformSetupToSystem (XtPlatform const *p, XtSetup setup)
 Translate audio setup to corresponding system on the current platform. More...
 
void XtPlatformGetSystems (XtPlatform const *p, XtSystem *buffer, int32_t *size)
 Get available systems for the current platform. More...
 

Detailed Description

Maps setup and system identifiers to platform specific services.

Contains functions to retrieve available audio setups and systems, and to retrieve the corresponding platform specific audio service.

See also
XtSetup
XtSystem

Function Documentation

void XtPlatformDestroy ( XtPlatform p)

Terminates the XT-Audio library.

Parameters
pthe platform handle returned by XtAudioInit.

It is ok to pass NULL. It is an error to terminate the library when any streams, devices or device lists are still open.

This function may only be called from the main thread.

See also
XtAudioInit
XtService const * XtPlatformGetService ( XtPlatform const *  p,
XtSystem  system 
)

Get audio service corresponding to the given system.

Returns
an audio service, or NULL if XT-Audio was compiled without support for the given system.
Parameters
pthe platform handle returned by XtAudioInit.
systemthe service identifier.

Use XtPlatformGetSystems to check which systems are actually supported (and compiled-in) on the current platform.

This function may only be called from the main thread.

See also
XtAudioInit
XtPlatformGetSystems
XtPlatformSetupToSystem
void XtPlatformGetSystems ( XtPlatform const *  p,
XtSystem buffer,
int32_t *  size 
)

Get available systems for the current platform.

Parameters
pthe platform handle returned by XtAudioInit.
bufferthe buffer to receive the available systems. If NULL, *size receives the required buffer size.
sizethe size of the buffer.

This function retrieves all XtSystems which are compiled into the running XT-Audio binary. Only these systems will return a non-null XtService handle from XtPlatformGetService.

This function may only be called from the main thread.

See also
XtAudioInit
XtPlatformGetSystems
XtPlatformSetupToSystem
XtSystem XtPlatformSetupToSystem ( XtPlatform const *  p,
XtSetup  setup 
)

Translate audio setup to corresponding system on the current platform.

Returns
the system corresponding to the given setup.
Parameters
pthe platform handle returned by XtAudioInit.
setupthe audio setup.

Use XtPlatformGetSystems to check which systems are actually supported (and compiled-in) on the current platform.

This function may only be called from the main thread.

See also
XtAudioInit
XtPlatformGetService
XtPlatformGetSystems