Nebula
Loading...
Searching...
No Matches
audioserver.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
12//------------------------------------------------------------------------------
13#include "core/refcounted.h"
14#include "core/singleton.h"
15
16namespace Audio
17{
18
19class AudioDevice;
20
22{
25public:
28
30 bool Open();
32 bool Close();
34 bool IsOpen() const;
36 void OnFrame();
37
38private:
39 bool isOpen;
41};
42
43//------------------------------------------------------------------------------
46inline bool
48{
49 return this->isOpen;
50}
51
52
53} // namespace Audio
Front-end of the Audio subsystem.
Definition audioserver.h:22
~AudioServer()
Definition audioserver.cc:27
Ptr< AudioDevice > device
Definition audioserver.h:40
bool Open()
Initialize the audio subsystem.
Definition audioserver.cc:36
void OnFrame()
called per-frame
Definition audioserver.cc:62
bool IsOpen() const
return true if the audio subsystem is open
Definition audioserver.h:47
bool Close()
Shutdown the audio subsystem.
Definition audioserver.cc:49
bool isOpen
Definition audioserver.h:39
__DeclareSingleton(AudioServer)
__DeclareClass(AudioServer)
The common base class of Nebula.
Definition refcounted.h:38
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition audioclip.h:15