Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::SoundManager Class Reference
Inheritance diagram for brenta::SoundManager:
brenta::Subsystem

Data Structures

class  Builder
 
class  Driver
 

Public Member Functions

std::string name () override
 
bool is_initialized () override
 
std::expected< void, Subsystem::Error > initialize () override
 
std::expected< void, Subsystem::Error > terminate () override
 

Static Public Member Functions

static SoundManagerinstance ()
 
static std::optional< SoundAssetload (const std::filesystem::path &path)
 
static void unload (const SoundAsset &sound)
 
static std::optional< Stream > request_stream (const SoundAsset &id)
 
static void release_stream (Stream stream)
 
static void play (const Sound &sound)
 
static void stop (const Sound &sound)
 
static void set_volume (const Sound &sound, float volume)
 

Static Public Attributes

static const std::string subsystem_name = "SoundManager"
 

Additional Inherited Members

- Public Types inherited from brenta::Subsystem
using Error = std::string
 

Detailed Description

Definition at line 130 of file sound.hpp.

Member Function Documentation

◆ initialize()

std::expected< void, Subsystem::Error > SoundManager::initialize ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 84 of file sound.cpp.

◆ instance()

SoundManager & SoundManager::instance ( )
static

Definition at line 129 of file sound.cpp.

◆ is_initialized()

bool SoundManager::is_initialized ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 122 of file sound.cpp.

◆ load()

std::optional< SoundAsset > SoundManager::load ( const std::filesystem::path &  path)
static

Definition at line 151 of file sound.cpp.

◆ name()

std::string SoundManager::name ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 117 of file sound.cpp.

◆ play()

void SoundManager::play ( const Sound sound)
static

Definition at line 167 of file sound.cpp.

◆ release_stream()

void SoundManager::release_stream ( Stream  stream)
static

Definition at line 142 of file sound.cpp.

◆ request_stream()

std::optional< Stream > SoundManager::request_stream ( const SoundAsset id)
static

Definition at line 135 of file sound.cpp.

◆ set_volume()

void SoundManager::set_volume ( const Sound sound,
float  volume 
)
static

Definition at line 183 of file sound.cpp.

◆ stop()

void SoundManager::stop ( const Sound sound)
static

Definition at line 175 of file sound.cpp.

◆ terminate()

std::expected< void, Subsystem::Error > SoundManager::terminate ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 101 of file sound.cpp.

◆ unload()

void SoundManager::unload ( const SoundAsset sound)
static

Definition at line 158 of file sound.cpp.

Field Documentation

◆ subsystem_name

const std::string SoundManager::subsystem_name = "SoundManager"
static

Definition at line 141 of file sound.hpp.


The documentation for this class was generated from the following files: