| Welcome to Epee Engine. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Sound; Documentation on the Sound class | |
|---|---|
| Topic Started: Mar 8 2007, 11:37 AM (290 Views) | |
| Alan | Mar 8 2007, 11:37 AM Post #1 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
Sound: Is a object that can be passed to PlaySoundNow to play a sound or music file. The Epee Engine supports all file formats supported by the SDL_Mixer library. Inherits from: nothing Function List: see below and replies public: Sound(std::string _Name ,std::string _FileName,int _Channel=0,int _NumberOfTimesToLoop=0, int _Volume=MIX_MAX_VOLUME); ~Sound(); int GetVolume(); bool SetVolume(int _Volume); bool LoadSound(); bool SetChannel(int _ChannelToSetTo); int GetChannel(); bool SetNumberOfTimesToLoop(int _NumberOfTimesToLoop); int GetNumberOfTimesToLoop(); std::string GetName(); |
![]() |
|
| Alan | Mar 21 2007, 08:50 AM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
Sound(std::string _Name , std::string _FileName, int _Channel, int _NumberOfTimesToLoop, int _Volume) Public function of the Sound Class Description: Constructor of the sound class Notes: Call create sound instead of creating a new instance. Create sound will do this for you and insert the sound in to the sound list Arguments: Required: std::string _Name name of the sound used for the find sound funtion std::string _FileName file name of the audio file to load Optional: int _Channel the channel to play the sound on defaults to 0 int _NumberOfTimesToLoop number of times to play the sound defaults to 0 (loops for ever) int _Volume sets the volume of the channel defaults to MIX_MAX_VOLUME Return Value: none |
![]() |
|
| Alan | Mar 21 2007, 08:57 AM Post #3 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
int GetVolume() Public function of the Sound Class Description: gets the current volume that the sound will play at Arguments: None Return Value: returns the current volume of the sound |
![]() |
|
| Alan | Mar 21 2007, 08:59 AM Post #4 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
bool SetVolume(int _Volume) Public function of the Sound Class Description: sets the volume that the sound will play at Arguments: Required: int _Volume volume to play at Return Value: returns true on success, false otherwise |
![]() |
|
| Alan | Mar 21 2007, 09:10 AM Post #5 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
bool LoadSound() Public function of the Sound Class this function will become protected at some point Description: loads the audio file (_FileName) into memory Notes: DO NOT call this function create sound will do it for you Arguments: None Return Value: returns true on success, false otherwise |
![]() |
|
| Alan | Mar 21 2007, 09:11 AM Post #6 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
bool SetChannel(int _ChannelToSetTo) Public function of the Sound Class Description: sets the channel that the sound will play on Arguments: Required: int _ChannelToSetTo channel to play on. must be greater that zero Return Value: returns true on success, false otherwise |
![]() |
|
| Alan | Mar 21 2007, 09:13 AM Post #7 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
int GetChannel(); Public function of the Sound Class Description: gets the current channel that the sound will on Arguments: None Return Value: returns the channel that the sound will play on |
![]() |
|
| Alan | Mar 21 2007, 09:16 AM Post #8 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
bool SetNumberOfTimesToLoop(int _NumberOfTimesToLoop) Public function of the Sound Class Description: sets the number of times to loop the sound Arguments: Required: int _NumberOfTimesToLoop number of times to loop the sound passing in zero cause the sound to loop forever must be greater than zero Return Value: returns true on success, false otherwise |
![]() |
|
| Alan | Mar 21 2007, 09:19 AM Post #9 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
int GetNumberOfTimesToLoop(); Public function of the Sound Class Description: gets the number of times the sound will loop Arguments: None Return Value: returns the number of times the sound will loop |
![]() |
|
| Alan | Mar 21 2007, 09:23 AM Post #10 |
|
Administrator
![]() ![]() ![]() ![]() ![]()
|
std::string GetName() Public function of the Sound Class Description: Gets the name of the sound object Arguments: None Return Value: returns the name of the sound object |
![]() |
|
| « Previous Topic · Documentation · Next Topic » |





![]](http://209.85.48.16/static/1/pip_r.png)


