Gateware Libraries  6.3.A
Beta Build
GAudio.h
1 #ifndef GAUDIO_H
2 #define GAUDIO_H
3 
15 #include "GSound.h"
16 #include "GMusic.h"
17 
18 
20 namespace GW
21 {
23  namespace AUDIO
24  {
25 
27 #pragma pack(push, 1)
28 
29 #pragma pack(pop)
30 
31 
32 
34  static const GUUIID GAudioUUIID =
35  {
36 
37  0x82de61c1, 0xc47a, 0x41e5,{ 0x90, 0xbe, 0xc3, 0x16, 0x4, 0xdf, 0x11, 0x40 }
38 
39  };
40 
42  {
43  private:
44  // virtual GReturn Destroy() = 0;
45  public:
47 
63  virtual GReturn Init(int _numOfOutputs = 2) = 0;
64 
66 
79  virtual GReturn CreateSound(const char* _path, GSound** _outSound) = 0;
80 
82 
95  virtual GReturn CreateMusicStream(const char* _path, GMusic** _outMusic) = 0;
96 
98 
105  virtual GReturn SetMasterVolume(float _value) = 0;
106 
108 
128  virtual GReturn SetMasterChannelVolumes(const float * _values, int _numChannels) = 0;
129 
131 
136  virtual GReturn PauseAll() = 0;
137 
139 
144  virtual GReturn ResumeAll() = 0;
145 
147 
152  virtual GReturn StopAll() = 0;
153 
154 
156 
162  virtual GReturn GetCount(unsigned int& _outCount) = 0;
163 
165 
171  virtual GReturn IncrementCount() = 0;
172 
174 
180  virtual GReturn DecrementCount() = 0;
181 
183 
193  virtual GReturn RequestInterface(const GUUIID& _interfaceID, void** _outputInterface) = 0;
194 
195  virtual ~GAudio() = 0;
196 
197  }; // end GAudio class
198  GATEWARE_EXPORT_IMPLICIT GReturn CreateGAudio(GAudio** _outAudio);
199 
200 
201 
202  } // end SYSTEM namespace
203 } // end GW namespace
204 #endif
This interface is only used to label and query interfaces which promise to 100% internally support th...
Definition: GMultiThreaded.h:31
virtual GReturn DecrementCount()=0
Decrease the total number of active references to this object.
Definition: GAudio.h:41
virtual GReturn CreateMusicStream(const char *_path, GMusic **_outMusic)=0
Fills out a GMusic with data from provided .wav file.
Gateware Universally Unique Interface IDentifier.
Definition: GDefines.h:25
virtual GReturn PauseAll()=0
Sets Pauses all sounds and music.
virtual GReturn IncrementCount()=0
Increase the total number of active references to this object.
virtual GReturn RequestInterface(const GUUIID &_interfaceID, void **_outputInterface)=0
Requests an interface that may or may not be supported by this object.
GReturn
Listing of common error codes returned by Gateware functions.
Definition: GDefines.h:53
virtual GReturn Init(int _numOfOutputs=2)=0
Initializes all neccassary data for GAudio based on platform.
virtual GReturn CreateSound(const char *_path, GSound **_outSound)=0
Fills out a GSound with data from provided .wav file.
Definition: GMusic.h:40
virtual GReturn StopAll()=0
Stops all paused/playing sounds and music.
The core namespace to which all Gateware interfaces/structures/defines must belong.
Definition: GAudio.h:20
virtual GReturn SetMasterChannelVolumes(const float *_values, int _numChannels)=0
Sets Master Volume for all sounds and music for specifc speakers.
virtual GReturn ResumeAll()=0
Resumes all paused/stoped sounds and music.
virtual GReturn SetMasterVolume(float _value)=0
Sets Master Volume for all sounds and music.
Definition: GSound.h:41
virtual GReturn GetCount(unsigned int &_outCount)=0
Return the total number of active references to this object.