mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
More microphone stuff
This commit is contained in:
parent
d220d188ff
commit
21658c6b32
3 changed files with 53 additions and 6 deletions
|
@ -5,13 +5,19 @@
|
|||
#include "memory.hpp"
|
||||
#include "result/result.hpp"
|
||||
|
||||
// Circular dependencies, yay
|
||||
class Kernel;
|
||||
|
||||
class MICService {
|
||||
Handle handle = KernelHandles::MIC;
|
||||
Memory& mem;
|
||||
Kernel& kernel;
|
||||
MAKE_LOG_FUNCTION(log, micLogger)
|
||||
|
||||
// Service commands
|
||||
void getEventHandle(u32 messagePointer);
|
||||
void getGain(u32 messagePointer);
|
||||
void isSampling(u32 messagePointer);
|
||||
void mapSharedMem(u32 messagePointer);
|
||||
void setClamp(u32 messagePointer);
|
||||
void setGain(u32 messagePointer);
|
||||
|
@ -19,15 +25,18 @@ class MICService {
|
|||
void setPower(u32 messagePointer);
|
||||
void startSampling(u32 messagePointer);
|
||||
void stopSampling(u32 messagePointer);
|
||||
void unmapSharedMem(u32 messagePointer);
|
||||
void theCaptainToadFunction(u32 messagePointer);
|
||||
|
||||
u8 gain = 0; // How loud our microphone input signal is
|
||||
bool micEnabled = false;
|
||||
bool shouldClamp = false;
|
||||
bool isSampling = false;
|
||||
bool currentlySampling = false;
|
||||
|
||||
std::optional<Handle> eventHandle;
|
||||
|
||||
public:
|
||||
MICService(Memory& mem) : mem(mem) {}
|
||||
MICService(Memory& mem, Kernel& kernel) : mem(mem), kernel(kernel) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue