vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::ClipSamples Class Reference

A clip's interleaved PCM, shared with every voice playing it. More...

#include <audio_clip_asset.h>

Public Member Functions

 ClipSamples (std::vector< int16_t > samples)
 Take samples as a clip's buffer, shared from vkm_core.

Detailed Description

A clip's interleaved PCM, shared with every voice playing it.

Refcounted so a voice on the audio thread outlives a scene load freeing the asset (see AudioDevice). The filling constructor lives in vkm_core: the control block carries the code that frees it, and a gameplay module's code may be unmapped by a hot reload before the last reference drops.

Immutable: nothing may edit a clip's samples out from under a voice.

Constructor & Destructor Documentation

◆ ClipSamples()

Vkm::Engine::ClipSamples::ClipSamples ( std::vector< int16_t > samples)
explicit

Take samples as a clip's buffer, shared from vkm_core.

Parameters
samplesInterleaved PCM, moved in.

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