Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::audio::Runtime Class Referencefinal

#include <AudioRuntime.hpp>

Classes

struct  Voice
 

Public Member Functions

 Runtime (std::shared_ptr< const data::ResourceSnapshot > resources)
 
 ~Runtime ()
 
 Runtime (const Runtime &)=delete
 
Runtime & operator= (const Runtime &)=delete
 
std::expected< void, std::string > ensureReady ()
 
std::expected< void, std::string > play (PlaybackKey key, data::DataId waveDataId, float gain=1.0F, bool loop=false, std::uint32_t pitchHertz=0U, std::int32_t panPercentage=0)
 
std::expected< void, std::string > playFile (PlaybackKey key, std::string_view relativePath, float gain=1.0F, bool loop=false, std::uint32_t pitchHertz=0U, std::int32_t panPercentage=0)
 
void stop (PlaybackKey key) noexcept
 
void stopAll () noexcept
 
void setGain (PlaybackKey key, float gain) noexcept
 
void setPitch (PlaybackKey key, std::uint32_t hertz) noexcept
 
void setPanning (PlaybackKey key, std::int32_t percentage) noexcept
 
void setLooping (PlaybackKey key, bool loop) noexcept
 
std::optional< std::int32_t > positionTicks (PlaybackKey key) const noexcept
 
std::expected< void, std::string > synchronizeSequence (PlaybackKey key, std::int32_t position, bool paused, std::uint64_t seekGeneration)
 
void update () noexcept
 
bool active (PlaybackKey key) const noexcept
 
data::BoardEdition boardEdition () const noexcept
 
data::LanguageId language () const noexcept
 

Detailed Description

Definition at line 113 of file AudioRuntime.hpp.

Constructor & Destructor Documentation

◆ Runtime() [1/2]

monopoly::audio::Runtime::Runtime ( std::shared_ptr< const data::ResourceSnapshot >  resources)
explicit

Definition at line 110 of file AudioRuntime.cpp.

◆ ~Runtime()

monopoly::audio::Runtime::~Runtime ( )

Definition at line 116 of file AudioRuntime.cpp.

◆ Runtime() [2/2]

monopoly::audio::Runtime::Runtime ( const Runtime &  )
delete

Member Function Documentation

◆ active()

bool monopoly::audio::Runtime::active ( PlaybackKey  key) const
noexcept

Definition at line 524 of file AudioRuntime.cpp.

◆ boardEdition()

data::BoardEdition monopoly::audio::Runtime::boardEdition ( ) const
inlinenoexcept

Definition at line 151 of file AudioRuntime.hpp.

◆ ensureReady()

std::expected< void, std::string > monopoly::audio::Runtime::ensureReady ( )

Definition at line 123 of file AudioRuntime.cpp.

◆ language()

data::LanguageId monopoly::audio::Runtime::language ( ) const
inlinenoexcept

Definition at line 155 of file AudioRuntime.hpp.

◆ operator=()

Runtime & monopoly::audio::Runtime::operator= ( const Runtime &  )
delete

◆ play()

std::expected< void, std::string > monopoly::audio::Runtime::play ( PlaybackKey  key,
data::DataId  waveDataId,
float  gain = 1.0F,
bool  loop = false,
std::uint32_t  pitchHertz = 0U,
std::int32_t  panPercentage = 0 
)

Definition at line 160 of file AudioRuntime.cpp.

◆ playFile()

std::expected< void, std::string > monopoly::audio::Runtime::playFile ( PlaybackKey  key,
std::string_view  relativePath,
float  gain = 1.0F,
bool  loop = false,
std::uint32_t  pitchHertz = 0U,
std::int32_t  panPercentage = 0 
)

Definition at line 247 of file AudioRuntime.cpp.

◆ positionTicks()

std::optional< std::int32_t > monopoly::audio::Runtime::positionTicks ( PlaybackKey  key) const
noexcept

Definition at line 414 of file AudioRuntime.cpp.

◆ setGain()

void monopoly::audio::Runtime::setGain ( PlaybackKey  key,
float  gain 
)
noexcept

Definition at line 370 of file AudioRuntime.cpp.

◆ setLooping()

void monopoly::audio::Runtime::setLooping ( PlaybackKey  key,
bool  loop 
)
noexcept

Definition at line 396 of file AudioRuntime.cpp.

◆ setPanning()

void monopoly::audio::Runtime::setPanning ( PlaybackKey  key,
std::int32_t  percentage 
)
noexcept

Definition at line 389 of file AudioRuntime.cpp.

◆ setPitch()

void monopoly::audio::Runtime::setPitch ( PlaybackKey  key,
std::uint32_t  hertz 
)
noexcept

Definition at line 379 of file AudioRuntime.cpp.

◆ stop()

void monopoly::audio::Runtime::stop ( PlaybackKey  key)
noexcept

Definition at line 356 of file AudioRuntime.cpp.

◆ stopAll()

void monopoly::audio::Runtime::stopAll ( )
noexcept

Definition at line 365 of file AudioRuntime.cpp.

◆ synchronizeSequence()

std::expected< void, std::string > monopoly::audio::Runtime::synchronizeSequence ( PlaybackKey  key,
std::int32_t  position,
bool  paused,
std::uint64_t  seekGeneration 
)

Definition at line 469 of file AudioRuntime.cpp.

◆ update()

void monopoly::audio::Runtime::update ( )
noexcept

Definition at line 498 of file AudioRuntime.cpp.


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