XT-Audio
XtDevice.h
Go to the documentation of this file.
1 #ifndef XT_API_DEVICE_H
2 #define XT_API_DEVICE_H
3 
5 #include <xt/api/Shared.h>
6 #include <xt/api/Structs.h>
7 #include <stdint.h>
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 XT_API void XT_CALL
16 XT_API void* XT_CALL
17 XtDeviceGetHandle(XtDevice const* d);
18 XT_API XtError XT_CALL
20 XT_API XtError XT_CALL
21 XtDeviceGetMix(XtDevice const* d, XtBool* valid, XtMix* mix);
22 XT_API XtError XT_CALL
23 XtDeviceGetChannelCount(XtDevice const* d, XtBool output, int32_t* count);
24 XT_API XtError XT_CALL
25 XtDeviceSupportsAccess(XtDevice const* d, XtBool interleaved, XtBool* supports);
26 XT_API XtError XT_CALL
27 XtDeviceSupportsFormat(XtDevice const* d, const XtFormat* format, XtBool* supports);
28 XT_API XtError XT_CALL
29 XtDeviceGetBufferSize(XtDevice const* d, const XtFormat* format, XtBufferSize* size);
30 XT_API XtError XT_CALL
31 XtDeviceOpenStream(XtDevice* d, XtDeviceStreamParams const* params, void* user, XtStream** stream);
32 XT_API XtError XT_CALL
33 XtDeviceGetChannelName(XtDevice const* d, XtBool output, int32_t index, char* buffer, int32_t* size);
34 
35 #ifdef __cplusplus
36 }
37 #endif // __cplusplus
38 #endif // XT_API_DEVICE_H
XtError XtDeviceGetChannelCount(XtDevice const *d, XtBool output, int32_t *count)
Gets the maximum number of channels supported by the device.
Device buffer size limits.
Definition: Structs.h:84
XtError XtDeviceGetBufferSize(XtDevice const *d, const XtFormat *format, XtBufferSize *size)
Gets the buffer size limits supported by the device.
Audio stream format.
Definition: Structs.h:65
uint64_t XtError
Error type.
Definition: Shared.h:26
Audio mix format.
Definition: Structs.h:29
XtError XtDeviceGetMix(XtDevice const *d, XtBool *valid, XtMix *mix)
Gets the device's current mix format.
XtError XtDeviceSupportsAccess(XtDevice const *d, XtBool interleaved, XtBool *supports)
Indicates whether the device supports the specified access mode.
XtError XtDeviceSupportsFormat(XtDevice const *d, const XtFormat *format, XtBool *supports)
Indicates whether an audio format is supported by the device.
XtError XtDeviceOpenStream(XtDevice *d, XtDeviceStreamParams const *params, void *user, XtStream **stream)
Opens an audio stream on the given device.
Data structure types.
#define XT_CALL
Calling convention.
struct XtStream XtStream
opaque audio stream handle
Definition: Shared.h:31
int32_t XtBool
Boolean type.
Definition: Shared.h:25
void * XtDeviceGetHandle(XtDevice const *d)
Implementation-defined handle to the backend device.
struct XtDevice XtDevice
opaque audio device handle
Definition: Shared.h:30
Calling conventions and common data types.
void XtDeviceDestroy(XtDevice *d)
Destroys an audio device.
XtError XtDeviceShowControlPanel(XtDevice *d)
Show the device specific control panel.
XtError XtDeviceGetChannelName(XtDevice const *d, XtBool output, int32_t index, char *buffer, int32_t *size)
Gets the name of a specific input/output channel.
Stream parameters specific to regular (non-aggregated) audio streams.
Definition: Structs.h:107