RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sounds::SlicedSoundBuffer Class Reference

A view into a subsection of an existing SoundBuffer. More...

#include <SlicedSoundBuffer.h>

Inheritance diagram for sounds::SlicedSoundBuffer:
Inheritance graph
[legend]
Collaboration diagram for sounds::SlicedSoundBuffer:
Collaboration graph
[legend]

Public Member Functions

 SlicedSoundBuffer (std::shared_ptr< const SoundBuffer > parent, ma_uint64 startFrame, ma_uint64 frameCount)
 Creates a slice of an existing buffer.
 
auto getFrames () const -> ma_uint64 override
 
auto getSamples () const -> std::span< const float > override
 
- Public Member Functions inherited from sounds::SoundBuffer
virtual ~SoundBuffer ()=default
 

Detailed Description

A view into a subsection of an existing SoundBuffer.

Used for bmson slicing. The parent buffer must outlive the slice. Frame indices are in stereo frames (2 floats each).

Constructor & Destructor Documentation

◆ SlicedSoundBuffer()

sounds::SlicedSoundBuffer::SlicedSoundBuffer ( std::shared_ptr< const SoundBuffer >  parent,
ma_uint64  startFrame,
ma_uint64  frameCount 
)

Creates a slice of an existing buffer.

Parameters
parentThe original buffer to slice from.
startFrameThe first frame (inclusive) of the slice.
frameCountThe number of frames in the slice.

Member Function Documentation

◆ getFrames()

auto sounds::SlicedSoundBuffer::getFrames ( ) const -> ma_uint64
overridevirtual

Implements sounds::SoundBuffer.

◆ getSamples()

auto sounds::SlicedSoundBuffer::getSamples ( ) const -> std::span<const float>
overridevirtual

Implements sounds::SoundBuffer.


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