Gateware Libraries  R6.5A
Beta Build
GMusic.h
1 #pragma once
2 #ifndef GMUSIC_H
3 #define GMUSIC_H
4 
16 #include "../G_Core/GDefines.h"
17 #include "../G_Core/GMultiThreaded.h"
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 GMusicUUIID =
35  {
36 
37  0x86c6e985, 0xbff0, 0x499f,{ 0x80, 0xe9, 0xf0, 0xee, 0x22, 0x71, 0x81, 0x3a }
38 
39  };
41  {
42 
43  public:
44  // Not yet Implemented
45  //virtual GReturn SetPCMShader(const char* _data) = 0;//function ptr
46 
48 
72  virtual GReturn SetChannelVolumes(float * _values, int _numChannels) = 0;
73 
75 
85  virtual GReturn SetVolume(float _newVolume) = 0;
86 
88 
99  virtual GReturn StreamStart(bool _loop = false) = 0;
100 
102 
114  virtual GReturn PauseStream() = 0;
115 
116 
118 
127  virtual GReturn ResumeStream() = 0;
128 
130 
140  virtual GReturn StopStream() = 0;
141 
143 
152  virtual GReturn GetStreamSourceChannels(unsigned int & returnedChannelNum) = 0;
153 
154 
156 
166  virtual GReturn GetStreamOutputChannels(unsigned int & returnedChannelNum) = 0;
167 
169 
177  virtual GReturn isStreamPlaying(bool & _returnedBool) = 0;
178 
180 
186  virtual GReturn GetCount(unsigned int& _outCount) = 0;
187 
189 
195  virtual GReturn IncrementCount() = 0;
196 
198 
204  virtual GReturn DecrementCount() = 0;
205 
207 
217  virtual GReturn RequestInterface(const GUUIID& _interfaceID, void** _outputInterface) = 0;
218  virtual ~GMusic() = 0;
219  }; // end GMusic class
220 
221 
222  } // end SYSTEM namespace
223 } // end GW namespace
224 #endif
virtual GReturn DecrementCount()=0
Decrease the total number of active references to this object.
virtual GReturn GetCount(unsigned int &_outCount)=0
Return the total number of active references to this object.
virtual GReturn GetStreamOutputChannels(unsigned int &returnedChannelNum)=0
Stores the number of specified outputs into the passed in unsigned int.
virtual GReturn isStreamPlaying(bool &_returnedBool)=0
Fills out the passed in bool with information as to if the music stream is playing or not.
virtual GReturn RequestInterface(const GUUIID &_interfaceID, void **_outputInterface)=0
Requests an interface that may or may not be supported by this object.
virtual GReturn ResumeStream()=0
Attempts to resume a currently paused music stream.
virtual GReturn StopStream()=0
Attempts to stop playback of a music stream and reset it to begining for future use.
This interface is only used to label and query interfaces which promise to 100% internally support th...
Definition: GMultiThreaded.h:31
virtual GReturn GetStreamSourceChannels(unsigned int &returnedChannelNum)=0
Stores the .wav files internal amount of channels the sound was recorded with into the passed in unsi...
Definition: GMusic.h:40
Gateware Universally Unique Interface IDentifier.
Definition: GDefines.h:25
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 PauseStream()=0
Attempts to pause a currently playing music stream.
virtual GReturn StreamStart(bool _loop=false)=0
Attempts to start a music stream.
virtual GReturn SetVolume(float _newVolume)=0
Attempts to change the overall volume.
The core namespace to which all Gateware interfaces/structures/defines must belong.
Definition: GAudio.h:20
virtual GReturn IncrementCount()=0
Increase the total number of active references to this object.
GReturn
Listing of common error codes returned by Gateware functions.
Definition: GDefines.h:53