Audio system using FMOD with all declarations needed for basic audio playback.
More...
#include <AudioObject.h>
Audio system using FMOD with all declarations needed for basic audio playback.
◆ AudioObject() [1/4]
| AudioObject::AudioObject |
( |
| ) |
|
default constructor to make a sound object
◆ AudioObject() [2/4]
| AudioObject::AudioObject |
( |
const char * | name, |
|
|
bool | loopable, |
|
|
AudioType | _channelType ) |
constructor to make a sound object with a path to the sound file
- Parameters
-
| path | = path to the sound file |
| loopable | = if the sound should loop or not (rough method for now) |
| channelType | = what channel group the sound should play on, if none it will play on the master channel group and log a warning |
◆ AudioObject() [3/4]
◆ AudioObject() [4/4]
- Todo
- implement move constructor properly
◆ ~AudioObject()
| AudioObject::~AudioObject |
( |
| ) |
|
destructor to clean up the sound object
◆ getAudioHandler()
Returns the audio handler
- Returns
- AudioObject* = pointer to the audio handler
◆ getIsPaused()
| auto AudioObject::getIsPaused |
( |
| ) |
const->bool |
Returns if the sound is paused
- Returns
- bool = true if the sound is paused, false otherwise
◆ getIsPlaying()
| auto AudioObject::getIsPlaying |
( |
| ) |
const->bool |
Returns if the sound is playing
- Returns
- bool = true if the sound is playing, false otherwise
◆ getPitch()
| auto AudioObject::getPitch |
( |
| ) |
const->float |
Returns the pitch of the sound
\ return float = pitch of the sound (0.5f - 2.0f)
◆ getVolume()
| auto AudioObject::getVolume |
( |
| ) |
const->float |
Returns the volume of the sound
- Returns
- float = volume of the sound (0.0f - 1.0f)
◆ load()
| auto AudioObject::load |
( |
Stream & | stream | ) |
->void |
◆ loadFile()
| auto AudioObject::loadFile |
( |
const std::string & | fileName, |
|
|
bool | loopable )->void |
loads file basically a constructor
- Parameters
-
| fileName | its in the constructor |
| loopable | its in the constructor |
◆ name()
| auto AudioObject::name |
( |
| ) |
const->conststd::string & |
Returns the name of the audio
- Returns
- std::string audio
◆ operator=() [1/2]
- Todo
- implement move assignment properly
◆ operator=() [2/2]
◆ pause()
| auto AudioObject::pause |
( |
bool | pause | ) |
->void |
Pauses the sound
- Parameters
-
| pause | = bool to pause or unpause the sound |
◆ play()
| auto AudioObject::play |
( |
| ) |
->void |
◆ save()
| auto AudioObject::save |
( |
Stream & | stream | ) |
const->void |
◆ setPitch()
| auto AudioObject::setPitch |
( |
float | pit | ) |
->void |
Sets the pitch of the sound
- Parameters
-
| pitch | = value to set the pitch to where 0.5 represents half pitch (one octave down), 1.0 represents unmodified pitch and 2.0 represents double pitch (one octave up). |
◆ setVolume()
| auto AudioObject::setVolume |
( |
float | vol | ) |
->void |
Sets the volume of the sound
- Parameters
-
| vol | = value to set the volume to (0.0f - 1.0f) |
◆ stop()
| auto AudioObject::stop |
( |
| ) |
->void |
◆ from_json
◆ to_json
◆ _name
| std::string AudioObject::_name |
|
private |
◆ channel
| FMOD::Channel* AudioObject::channel |
|
private |
◆ channelType
◆ filePath
| std::string AudioObject::filePath |
|
private |
◆ isLoopable
| bool AudioObject::isLoopable |
|
private |
◆ isPaused
| bool AudioObject::isPaused |
|
private |
◆ isPlaying
| bool AudioObject::isPlaying |
|
private |
◆ pitch
◆ sound
| FMOD::Sound* AudioObject::sound |
|
private |
◆ volume
| float AudioObject::volume |
|
private |
The documentation for this class was generated from the following files: