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) {
21 set(InitAudioStream(SampleRate, SampleSize, Channels));
28 GETTERSETTER(rAudioBuffer *, Buffer, buffer)
29 GETTERSETTER(
unsigned int, SampleRate, sampleRate)
30 GETTERSETTER(
unsigned int, SampleSize, sampleSize)
31 GETTERSETTER(
unsigned int, Channels, channels)
42 ::UpdateAudioStream(*
this, data, samplesCount);
50 ::CloseAudioStream(*
this);
57 return ::IsAudioStreamProcessed(*
this);
64 ::PlayAudioStream(*
this);
72 ::PauseAudioStream(*
this);
80 ::ResumeAudioStream(*
this);
88 return ::IsAudioStreamPlaying(*
this);
95 ::StopAudioStream(*
this);
103 ::SetAudioStreamVolume(*
this, volume);
111 ::SetAudioStreamPitch(*
this, pitch);
119 ::SetAudioStreamBufferSizeDefault(size);
123 inline void set(const ::AudioStream& stream) {
124 buffer = stream.buffer;
125 sampleRate = stream.sampleRate;
126 sampleSize = stream.sampleSize;
127 channels = stream.channels;
132 #endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_