Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::audio::SampleMemoryGovernor Class Reference

Shared off-audio-thread admission governor for resident preload heads and stream-cache pages. More...

#include <sample_memory_governor.hpp>

Public Member Functions

 SampleMemoryGovernor ()=default
 SampleMemoryGovernor (const SampleMemoryGovernor &)=delete
SampleMemoryGovernor & operator= (const SampleMemoryGovernor &)=delete
 SampleMemoryGovernor (SampleMemoryGovernor &&) noexcept=default
SampleMemoryGovernor & operator= (SampleMemoryGovernor &&) noexcept=delete
bool prepare (std::uint64_t capacity_bytes)
bool release () noexcept
 Drops the facade only when no outstanding leases remain.
bool prepared () const noexcept
SampleMemoryGovernorHandle handle () const noexcept
SampleMemoryReserveResult reserve (SampleMemoryCategory category, std::uint64_t bytes) noexcept
SampleMemoryGovernorStats stats () const noexcept

Detailed Description

Shared off-audio-thread admission governor for resident preload heads and stream-cache pages.

A reservation succeeds only when the new combined total fits the configured cap; the returned lease owns the accounting lifetime.

Constructor & Destructor Documentation

◆ SampleMemoryGovernor() [1/3]

pulp::audio::SampleMemoryGovernor::SampleMemoryGovernor ( )
default

◆ SampleMemoryGovernor() [2/3]

pulp::audio::SampleMemoryGovernor::SampleMemoryGovernor ( const SampleMemoryGovernor & )
delete

◆ SampleMemoryGovernor() [3/3]

pulp::audio::SampleMemoryGovernor::SampleMemoryGovernor ( SampleMemoryGovernor && )
defaultnoexcept

Member Function Documentation

◆ handle()

SampleMemoryGovernorHandle pulp::audio::SampleMemoryGovernor::handle ( ) const
inlinenoexcept

◆ operator=() [1/2]

SampleMemoryGovernor & pulp::audio::SampleMemoryGovernor::operator= ( const SampleMemoryGovernor & )
delete

◆ operator=() [2/2]

SampleMemoryGovernor & pulp::audio::SampleMemoryGovernor::operator= ( SampleMemoryGovernor && )
deletenoexcept

◆ prepare()

bool pulp::audio::SampleMemoryGovernor::prepare ( std::uint64_t capacity_bytes)
inline

◆ prepared()

bool pulp::audio::SampleMemoryGovernor::prepared ( ) const
inlinenoexcept

◆ release()

bool pulp::audio::SampleMemoryGovernor::release ( )
inlinenoexcept

Drops the facade only when no outstanding leases remain.

◆ reserve()

SampleMemoryReserveResult pulp::audio::SampleMemoryGovernor::reserve ( SampleMemoryCategory category,
std::uint64_t bytes )
inlinenoexcept

◆ stats()

SampleMemoryGovernorStats pulp::audio::SampleMemoryGovernor::stats ( ) const
inlinenoexcept

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