Added WarnIfTrue also warns for using some functions with StreamedRawPCM

This commit is contained in:
2025-10-05 15:14:15 +03:00
parent 69fd698da1
commit 020f9c5eef
3 changed files with 48 additions and 8 deletions

View File

@@ -33,6 +33,7 @@ public:
const SoundState GetState();
const SoundType GetSoundType();
const uint64_t GetPlayedSampleCount();
const float GetPlaybackTime();
bool SetPlaybackTime(float time);
@@ -119,8 +120,13 @@ private:
friend class Sound;
};
// For MA
void ThrowOnRuntimeError(std::string message,
ma_result errorType = ma_result::MA_ERROR);
// Generalised
void ThrowOnRuntimeError(std::string message, bool comparison);
void WarnIfTrue(std::string message, bool comparison = true);
} // namespace ChargeAudio
#endif