1 #ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
2 #define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
4 #include "./raylib.hpp"
5 #include "./raylib-cpp-utils.hpp"
20 AudioStream(
unsigned int SampleRate,
unsigned int SampleSize,
unsigned int Channels = 2) {
21 set(LoadAudioStream(SampleRate, SampleSize, Channels));
29 other.buffer =
nullptr;
39 GETTERSETTER(rAudioBuffer *, Buffer, buffer)
40 GETTERSETTER(
unsigned int, SampleRate, sampleRate)
41 GETTERSETTER(
unsigned int, SampleSize, sampleSize)
42 GETTERSETTER(
unsigned int, Channels, channels)
59 other.buffer =
nullptr;
71 ::UpdateAudioStream(*
this, data, samplesCount);
79 ::UnloadAudioStream(*
this);
86 return ::IsAudioStreamProcessed(*
this);
93 ::PlayAudioStream(*
this);
101 ::PauseAudioStream(*
this);
109 ::ResumeAudioStream(*
this);
117 return ::IsAudioStreamPlaying(*
this);
124 ::StopAudioStream(*
this);
132 ::SetAudioStreamVolume(*
this, volume);
140 ::SetAudioStreamPitch(*
this, pitch);
148 ::SetAudioStreamBufferSizeDefault(size);
152 inline void set(const ::AudioStream& stream) {
153 buffer = stream.buffer;
154 sampleRate = stream.sampleRate;
155 sampleSize = stream.sampleSize;
156 channels = stream.channels;
161 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_