libnx  v4.2.0
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 
14 typedef 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 
23 typedef struct {
24  u32 sample_rate;
25  u32 channel_count;
27 
28 typedef struct {
29  u32 sample_rate;
30  u32 channel_count;
31  u32 sample_format;
32  u32 state;
34 
35 typedef struct {
36  Service s;
38 
39 Result audrecInitialize(void);
40 void audrecExit(void);
41 Service* audrecGetServiceSession(void);
42 
43 Result audrecOpenFinalOutputRecorder(AudrecRecorder* recorder_out, FinalOutputRecorderParameter* param_in, u64 aruid, FinalOutputRecorderParameterInternal* param_out);
44 
45 Result audrecRecorderStart(AudrecRecorder* recorder);
46 Result audrecRecorderStop(AudrecRecorder* recorder);
47 Result audrecRecorderRegisterBufferEvent(AudrecRecorder* recorder, Event* out_event);
48 Result audrecRecorderAppendFinalOutputRecorderBuffer(AudrecRecorder* recorder, u64 buffer_client_ptr, FinalOutputRecorderBuffer* param);
49 Result audrecRecorderGetReleasedFinalOutputRecorderBuffers(AudrecRecorder* recorder, u64* out_buffers, u64* inout_count, u64* out_released);
50 void audrecRecorderClose(AudrecRecorder* recorder);
Event
Kernel-mode event structure.
Definition: event.h:13
FinalOutputRecorderBuffer
Definition: audrec.h:14
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
Result
u32 Result
Function error code result type.
Definition: types.h:44
AudrecRecorder
Definition: audrec.h:35
FinalOutputRecorderParameterInternal
Definition: audrec.h:28
Service
Service object structure.
Definition: service.h:13
FinalOutputRecorderParameter
Definition: audrec.h:23