cangine
Loading...
Searching...
No Matches
sound.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5namespace cangine {
11 struct Sound {
12 std::string name;
13 std::string path;
14 float volume = 1.0f;
15
21 Sound(std::string path, std::string name) : path(path), name(name) {}
26 Sound(std::string path);
27 };
28}
Definition audiomanager.cpp:4
Describes an audio source: its file path, name and volume.
Definition sound.hpp:11
std::string path
Path to the audio file.
Definition sound.hpp:13
std::string name
Identifier used to reference the sound.
Definition sound.hpp:12
float volume
Playback volume (0.0 = silent, 1.0 = full).
Definition sound.hpp:14
Sound(std::string path, std::string name)
Constructs a sound with an explicit path and name.
Definition sound.hpp:21