Sound asset to be played on a Track.
More...
#include <Sound.hpp>
|
| static std::shared_ptr< Sound > | Create (const std::string &name, const std::filesystem::path &path, const bool preDecode=true) |
| | Creates a Sound object.
|
Sound asset to be played on a Track.
Definition at line 12 of file Sound.hpp.
◆ ~Sound()
| Cori::Audio::Sound::~Sound |
( |
| ) |
|
◆ Create()
| std::shared_ptr< Sound > Cori::Audio::Sound::Create |
( |
const std::string & | name, |
|
|
const std::filesystem::path & | path, |
|
|
const bool | preDecode = true ) |
|
staticnodiscard |
Creates a Sound object.
- Parameters
-
| name | Name to be assigned to the Sound. |
| path | Path to the audio asset. |
| preDecode | Whether to precede the audio or no. Generally you want to leave it at default. |
- Returns
- Shared pointer to the loaded Sound asset.
Definition at line 25 of file Sound.cpp.
◆ GetID()
| SoundID Cori::Audio::Sound::GetID |
( |
| ) |
const |
|
nodiscard |
◆ IsPlaceholder()
| bool Cori::Audio::Sound::IsPlaceholder |
( |
| ) |
const |
|
nodiscard |
Checks if the sound was created with a placeholder.
- Returns
- Placeholder state.
Definition at line 17 of file Sound.cpp.
◆ IsValid()
| bool Cori::Audio::Sound::IsValid |
( |
| ) |
const |
|
nodiscard |
Check if the Sound is valid.
- Returns
- Validity state.
- Note
- Generally there is no need to explicitly check for sound validity, because Track already does so.
Definition at line 13 of file Sound.cpp.
◆ m_Name
| const std::string Cori::Audio::Sound::m_Name |
The documentation for this class was generated from the following files: