wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
mic.h
Go to the documentation of this file.
1#pragma once
2#include "wut.h"
3
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef int MICHandle;
15
17typedef struct MICStatus MICStatus;
18
28
34
36{
39
42};
43WUT_CHECK_OFFSET(MICWorkMemory, 0x00, sampleMaxCount);
44WUT_CHECK_OFFSET(MICWorkMemory, 0x04, sampleBuffer);
45WUT_CHECK_SIZE(MICWorkMemory, 0x08);
46
48{
49 int state; // 1 << 1 = Open
52};
53WUT_CHECK_OFFSET(MICStatus, 0x00, state);
54WUT_CHECK_OFFSET(MICStatus, 0x04, availableData);
55WUT_CHECK_OFFSET(MICStatus, 0x08, bufferPos);
56WUT_CHECK_SIZE(MICStatus, 0x0C);
57
62MICInit(MICInstance instance, int unused, MICWorkMemory *workMemory,
63 MICError *outError);
64
67
69MICGetState(MICHandle handle, int state, uint32_t *outStateVal);
70
72MICSetState(MICHandle handle, int state, uint32_t stateVal);
73
75MICGetStatus(MICHandle handle, MICStatus *outStatus);
76
78MICSetDataConsumed(MICHandle handle, int dataAmountConsumed);
79
82
85
86#ifdef __cplusplus
87}
88#endif
89
size_t sampleMaxCount
Maximum amount of samples at a time must be at least 0x2800.
Definition mic.h:38
int availableData
Definition mic.h:50
int state
Definition mic.h:49
void * sampleBuffer
A 0x40 aligned buffer of size sampleMaxCount * 2.
Definition mic.h:41
int bufferPos
Definition mic.h:51
MICError MICClose(MICHandle handle)
int MICHandle
Definition mic.h:14
MICError MICSetState(MICHandle handle, int state, uint32_t stateVal)
MICError
Definition mic.h:20
MICInstance
Definition mic.h:30
MICError MICOpen(MICHandle handle)
MICHandle MICInit(MICInstance instance, int unused, MICWorkMemory *workMemory, MICError *outError)
The second parameter to MICInit is unused, any value is valid.
MICError MICSetDataConsumed(MICHandle handle, int dataAmountConsumed)
MICError MICUninit(MICHandle handle)
MICError MICGetState(MICHandle handle, int state, uint32_t *outStateVal)
MICError MICGetStatus(MICHandle handle, MICStatus *outStatus)
@ MIC_ERROR_ALREADY_CLOSED
Definition mic.h:25
@ MIC_ERROR_NOT_OPENED
Definition mic.h:22
@ MIC_ERROR_INVALID_INSTANCE
Definition mic.h:26
@ MIC_ERROR_OK
Definition mic.h:21
@ MIC_ERROR_INVALID_HANDLE
Definition mic.h:23
@ MIC_ERROR_INIT
Definition mic.h:24
@ MIC_INSTANCE_1
Definition mic.h:32
@ MIC_INSTANCE_0
Definition mic.h:31