Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Rubberduckycooly
GitHub Repository: Rubberduckycooly/RSDKv5-Decompilation
Path: blob/master/RSDKv5/RSDK/Audio/MiniAudio/MiniAudioDevice.hpp
1163 views
1
#define LockAudioDevice()
2
#define UnlockAudioDevice()
3
4
#include <thread>
5
6
namespace RSDK
7
{
8
class AudioDevice : public AudioDeviceBase
9
{
10
public:
11
static ma_device device;
12
13
static bool32 Init();
14
static void Release();
15
16
static void FrameInit() {}
17
18
inline static void HandleStreamLoad(ChannelInfo *channel, bool32 async)
19
{
20
if (async) {
21
std::thread thread(LoadStream, channel);
22
thread.detach();
23
}
24
else
25
LoadStream(channel);
26
}
27
28
private:
29
static uint8 contextInitialized;
30
31
static void InitAudioChannels();
32
33
static void AudioCallback(ma_device* device, void *output, const void *input, ma_uint32 frameCount);
34
};
35
} // namespace RSDK
36