libnx v4.9.0
Loading...
Searching...
No Matches
audrec.h
Go to the documentation of this file.
1/**
2 * @file audrec.h
3 * @brief Audio Recorder IPC wrapper.
4 * @author plutoo
5 * @copyright libnx Authors
6 */
7#pragma once
8
9#include "../types.h"
10#include "../audio/audio.h"
11#include "../sf/service.h"
12#include "../kernel/event.h"
13
14typedef struct {
15 u64 released_ns;
16 u64 next_buffer_ptr;
17 u64 sample_buffer_ptr;
18 u64 sample_buffer_capacity;
19 u64 data_size;
20 u64 data_offset;
22
23typedef struct {
24 u32 sample_rate;
25 u32 channel_count;
27
28typedef struct {
29 u32 sample_rate;
30 u32 channel_count;
31 u32 sample_format;
32 u32 state;
34
35typedef struct {
36 Service s;
38
39Result audrecInitialize(void);
40void audrecExit(void);
41Service* audrecGetServiceSession(void);
42
43Result audrecOpenFinalOutputRecorder(AudrecRecorder* recorder_out, FinalOutputRecorderParameter* param_in, u64 aruid, FinalOutputRecorderParameterInternal* param_out);
44
45Result audrecRecorderStart(AudrecRecorder* recorder);
46Result audrecRecorderStop(AudrecRecorder* recorder);
47Result audrecRecorderRegisterBufferEvent(AudrecRecorder* recorder, Event* out_event);
48Result audrecRecorderAppendFinalOutputRecorderBuffer(AudrecRecorder* recorder, u64 buffer_client_ptr, FinalOutputRecorderBuffer* param);
49Result audrecRecorderGetReleasedFinalOutputRecorderBuffers(AudrecRecorder* recorder, u64* out_buffers, u64* inout_count, u64* out_released);
50void audrecRecorderClose(AudrecRecorder* recorder);
Definition audrec.h:35
Kernel-mode event structure.
Definition event.h:13
Definition audrec.h:14
Definition audrec.h:23
Service object structure.
Definition service.h:14
uint64_t u64
64-bit unsigned integer.
Definition types.h:22
u32 Result
Function error code result type.
Definition types.h:44
uint32_t u32
32-bit unsigned integer.
Definition types.h:21