Describes an audio source: its file path, name and volume.
More...
#include <sound.hpp>
|
| | Sound (std::string path, std::string name) |
| | Constructs a sound with an explicit path and name.
|
| |
| | Sound (std::string path) |
| | Constructs a sound from a path, deriving the name from it.
|
| |
|
| std::string | name |
| | Identifier used to reference the sound.
|
| |
| std::string | path |
| | Path to the audio file.
|
| |
| float | volume = 1.0f |
| | Playback volume (0.0 = silent, 1.0 = full).
|
| |
Describes an audio source: its file path, name and volume.
Used by AudioManager to load and reference playable sounds.
◆ Sound() [1/2]
| cangine::Sound::Sound |
( |
std::string |
path, |
|
|
std::string |
name |
|
) |
| |
|
inline |
Constructs a sound with an explicit path and name.
- Parameters
-
| path | Path to the audio file. |
| name | Identifier for the sound. |
◆ Sound() [2/2]
| cangine::Sound::Sound |
( |
std::string |
path | ) |
|
Constructs a sound from a path, deriving the name from it.
- Parameters
-
| path | Path to the audio file. |
◆ name
| std::string cangine::Sound::name |
Identifier used to reference the sound.
◆ path
| std::string cangine::Sound::path |
◆ volume
| float cangine::Sound::volume = 1.0f |
Playback volume (0.0 = silent, 1.0 = full).
The documentation for this struct was generated from the following files: