RhythmGame 1.4.3
Loading...
Searching...
No Matches
NormalSoundBuffer.h
Go to the documentation of this file.
1//
2// Created by PC on 24/02/2026.
3//
4
5#ifndef RHYTHMGAME_NORMALSOUNDBUFFER_H
6#define RHYTHMGAME_NORMALSOUNDBUFFER_H
7
8#include "SoundBuffer.h"
9#include <QByteArrayView>
10
11#include <filesystem>
12#include <span>
13#include <vector>
14
15namespace sounds {
16class AudioEngine;
25{
26 std::vector<float> samples;
27
28 public:
33 explicit NormalSoundBuffer(AudioEngine* engine,
34 const std::filesystem::path& filename);
35
40 explicit NormalSoundBuffer(AudioEngine* engine, QByteArrayView encoded);
41
42 auto getFrames() const -> ma_uint64 override;
43
44 auto getSamples() const -> std::span<const float> override;
45};
46
47} // sounds
48
49#endif // RHYTHMGAME_NORMALSOUNDBUFFER_H
Definition AudioEngine.h:16
A buffer that can be used to create sounds. Wraps an buffer.
Definition NormalSoundBuffer.h:25
auto getSamples() const -> std::span< const float > override
Definition NormalSoundBuffer.cpp:220
auto getFrames() const -> ma_uint64 override
Definition NormalSoundBuffer.cpp:215
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