RhythmGame 1.4.3
Loading...
Searching...
No Matches
SlicedSoundBuffer.h
Go to the documentation of this file.
1//
2// Created by copilot on 24.02.26.
3//
4
5#ifndef RHYTHMGAME_SLICEDSOUNDBUFFER_H
6#define RHYTHMGAME_SLICEDSOUNDBUFFER_H
7
8#include "SoundBuffer.h"
9#include <memory>
10
11namespace sounds {
12
19{
20 std::shared_ptr<const SoundBuffer> parent;
21 ma_uint64 startFrame;
22 ma_uint64 frameCount;
23
24 public:
31 SlicedSoundBuffer(std::shared_ptr<const SoundBuffer> parent,
32 ma_uint64 startFrame,
33 ma_uint64 frameCount);
34
35 auto getFrames() const -> ma_uint64 override;
36 auto getSamples() const -> std::span<const float> override;
37};
38
39} // namespace sounds
40
41#endif // RHYTHMGAME_SLICEDSOUNDBUFFER_H
A view into a subsection of an existing SoundBuffer.
Definition SlicedSoundBuffer.h:19
auto getSamples() const -> std::span< const float > override
Definition SlicedSoundBuffer.cpp:27
auto getFrames() const -> ma_uint64 override
Definition SlicedSoundBuffer.cpp:21
A buffer that can be used to create sounds. Wraps an buffer.
Definition SoundBuffer.h:23
The namespace for all sound related classes.
Definition HitRules.h:16