Added PCM stream to write data. Still plays with same ma_sound_start. Added some QoL for myself

This commit is contained in:
2025-09-27 07:09:34 +03:00
parent 5291b08330
commit d996910515
3 changed files with 38 additions and 3 deletions

View File

@@ -42,6 +42,9 @@ public:
void SetVolume(float value);
const float GetVolume();
// For StreamedRawPCM
void WriteToRingBuffer(uint8_t *data, uint32_t length);
private:
Sound(class Engine *engine, std::function<void(Sound *)> setupFunction,
SoundType type, std::string additionalErrorMessage = "");
@@ -110,6 +113,8 @@ private:
ma_result maResponse;
ma_decoder maStero;
ma_uint64 listenerCounter = 0;
ma_format PCMFormat = ma_format_f32;
ma_uint8 frameSize;
friend class Listener;
friend class Sound;
};