Gateware Libraries  R6.5A
Beta Build
GSound.h
1 #pragma once
2 #ifndef GSound_H
3 #define GSound_H
4 
16 #include "../G_Core/GDefines.h"
17 #include "../G_Core/GMultiThreaded.h"
18 
19 
21 namespace GW
22 {
24  namespace AUDIO
25  {
26 
28 #pragma pack(push, 1)
29 
30 #pragma pack(pop)
31 
32 
33 
35  static const GUUIID GSoundUUIID =
36  {
37 
38  0x4a714, 0x6e71, 0x4a9d,{ 0xb1, 0xf9, 0x23, 0xe2, 0x46, 0x8d, 0x28, 0x17 }
39 
40  };
42  {
43 
44  public:
45 
46  //SetPCMShader is not yet implemented
47  // virtual GReturn SetPCMShader(const char* _data) = 0;
48 
50 
74  virtual GReturn SetChannelVolumes(float *_values, int _numChannels) = 0;
75 
77 
88  virtual GReturn SetVolume(float _newVolume) = 0;
89 
91 
102  virtual GReturn Play() = 0;
103 
105 
116  virtual GReturn Pause() = 0;
117 
119 
130  virtual GReturn Resume() = 0;
131 
133 
144  virtual GReturn StopSound() = 0;
145 
147 
156  virtual GReturn GetSoundSourceChannels(unsigned int & returnedChannelNum) = 0;
157 
159 
169  virtual GReturn GetSoundOutputChannels(unsigned int & returnedChannelNum) = 0;
170 
172 
181  virtual GReturn isSoundPlaying(bool & _returnedBool) = 0;
182 
184 
189  virtual GReturn GetCount(unsigned int& _outCount) = 0;
190 
192 
198  virtual GReturn IncrementCount() = 0;
199 
201 
207  virtual GReturn DecrementCount() = 0;
208 
210 
220  virtual GReturn RequestInterface(const GUUIID& _interfaceID, void** _outputInterface) = 0;
221 
222  virtual ~GSound() = 0;
223  }; // end GSound class
224 
225  } // end SYSTEM namespace
226 } // end GW namespace
227 #endif
virtual GReturn GetSoundOutputChannels(unsigned int &returnedChannelNum)=0
Stores the number of specified outputs into the passed in unsigned int.
virtual GReturn Resume()=0
Attempts to resume a currently paused sound effect.
Definition: GSound.h:41
virtual GReturn DecrementCount()=0
Decrease the total number of active references to this object.
virtual GReturn SetChannelVolumes(float *_values, int _numChannels)=0
Attempts to set the output volume for the specified number of outputs to the passed in values.
virtual GReturn IncrementCount()=0
Increase the total number of active references to this object.
virtual GReturn StopSound()=0
Attempts to stop playback of sound effect and reset it to begining for future use.
virtual GReturn Pause()=0
Attempts to pause a currently playing sound effect.
This interface is only used to label and query interfaces which promise to 100% internally support th...
Definition: GMultiThreaded.h:31
virtual GReturn SetVolume(float _newVolume)=0
Attempts to change the overall volume.
virtual GReturn GetSoundSourceChannels(unsigned int &returnedChannelNum)=0
Stores the .wav files internal amount of channels the sound was recorded with into the passed in unsi...
Gateware Universally Unique Interface IDentifier.
Definition: GDefines.h:25
virtual GReturn Play()=0
Attempts to playback a sound effect.
virtual GReturn GetCount(unsigned int &_outCount)=0
Return the total number of active references to this object.
virtual GReturn isSoundPlaying(bool &_returnedBool)=0
Fills out the passed in bool with information as to if the sound thinks it is playing or not.
The core namespace to which all Gateware interfaces/structures/defines must belong.
Definition: GAudio.h:20
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