libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
audio.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include<libtransistor/types.h>
13 #include<libtransistor/ipc.h>
14 
19 typedef enum {
20  PCM_INT16 = 2,
22 
27 typedef enum {
28  PLAYING = 0,
29  STOPPED = 1,
31 
36 typedef struct {
37  ipc_object_t object;
38  uint32_t num_channels;
39  uint32_t sample_rate;
40  sample_format_t sample_format;
42 
47 typedef struct {
48  void *ptr;
49  void *sample_data;
50  uint64_t buffer_size;
51  uint64_t data_size;
52  uint64_t unknown;
54 
55 #ifdef __cplusplus
56 }
57 #endif
This struct is sent over IPC and must look exactly like this.
Definition: audio.h:47
Various system types.
Audio output.
Definition: audio.h:36
Represents either an object within an IPC domain or a standalone object.
Definition: ipc.h:32
sample_format_t
Audio sample format used for output.
Definition: audio.h:19
Interprocess Communication data structures and functions.
audio_output_state_t
Audio output state.
Definition: audio.h:27