XenevaOS
Loading...
Searching...
No Matches
sound.h
Go to the documentation of this file.
1
33#ifndef __AU_SOUND_H__
34#define __AU_SOUND_H__
35
36#include <stdint.h>
37#include <circbuf.h>
38
39#ifdef ARCH_X64
40#include <Hal\x86_64_sched.h>
41#elif ARCH_ARM64
42#include <Hal/AA64/sched.h>
43#endif
44
45#include <aurora.h>
46
47#ifdef ARCH_X64
48#pragma pack(push,1)
49#endif
50typedef struct __au_dsp__ {
54#ifdef ARCH_X64
55 AuThread *SndThread;
56#elif ARCH_ARM64
57 AA64Thread* SndThread;
58#endif
64
65#ifdef ARCH_X64
66#pragma pack(pop)
67#endif
68
69
70typedef struct _SoundDev_ {
71 char name[32];
72 int(*write) (uint8_t* buffer, size_t length);
73 int(*read) (uint8_t* buffer, size_t length);
74 int(*stop_output)();
75 int(*start_output)();
76 int(*set_vol)(uint8_t vol);
77 int(*control)(void* data, int code);
80
81
85extern void AuSoundInitialise();
86
93
99
105
112
113/*
114* AuSoundStart -- Starts the Sound card
115*/
116extern void AuSoundStart();
117
118/*
119* AuSoundStop -- Stop Sound card
120*/
121extern void AuSoundStop();
122#endif
#define AU_EXTERN
Definition aurora.h:50
#define AU_EXPORT
Definition aurora.h:38
int snd
Definition main.cpp:64
short int int16_t
Definition acefiex.h:159
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
AU_EXTERN AU_EXPORT void AuSoundGetBlock(uint64_t *buffer)
AuSoundGetBlock – the main heart of aurora sound system – called by sound card.
Definition sound.cpp:122
void AuSoundInitialise()
AuSoundInitialize – Initialized the Aurora sound system.
Definition sound.cpp:270
void AuSoundStop()
Definition sound.cpp:216
AU_EXTERN AU_EXPORT void AuSoundRemoveDSP(uint16_t id)
AuSoundRemoveDSP – remove the dsp from dsp list.
Definition sound.cpp:304
struct __au_dsp__ AuDSP
AU_EXTERN AU_EXPORT void AuSoundSetCard(AuSound *dev)
AuSoundSetCard – registers a new sound card.
Definition sound.cpp:198
AU_EXTERN AU_EXPORT int AuSoundRegisterCard(AuSound *snd)
AuSoundRegisterCard – register a new sound card to sound layer.
Definition sndcore.c:299
void AuSoundStart()
Definition sound.cpp:207
struct _SoundDev_ AuSound
Definition sound.h:70
int(* read)(uint8_t *buffer, size_t length)
Definition sound.h:73
bool _force_write
Definition sound.h:78
int(* write)(uint8_t *buffer, size_t length)
Definition sound.h:72
int(* control)(void *data, int code)
Definition sound.h:77
int(* set_vol)(uint8_t vol)
Definition sound.h:76
int(* start_output)()
Definition sound.h:75
int(* stop_output)()
Definition sound.h:74
char name[32]
Definition sound.h:71
Definition sound.h:50
struct __au_dsp__ * prev
Definition sound.h:62
uint16_t _dsp_id
Definition sound.h:52
bool available
Definition sound.h:60
struct __au_dsp__ * next
Definition sound.h:61
CircBuffer * buffer
Definition sound.h:51
uint64_t sleep_time
Definition sound.h:59
int16_t _cardID
Definition sound.h:53
Definition x86_64_sched.h:118
Definition circbuf.h:36