1 #ifndef RAYLIB_CPP_WAVE_HPP_
2 #define RAYLIB_CPP_WAVE_HPP_
12 #include "./raylib-cpp-utils.hpp"
21 Wave(
unsigned int SampleCount = 0,
unsigned int SampleRate = 0,
unsigned int SampleSize = 0,
unsigned int Channels = 0) {
22 sampleCount = SampleCount;
23 sampleRate = SampleRate;
24 sampleSize = SampleSize;
28 Wave(
const std::string& fileName) {
29 set(LoadWave(fileName.c_str()));
37 sampleCount = wave.sampleCount;
38 sampleRate = wave.sampleRate;
39 sampleSize = wave.sampleSize;
40 channels = wave.channels;
44 GETTERSETTER(
unsigned int,X,sampleCount)
45 GETTERSETTER(
unsigned int,Y,sampleRate)
46 GETTERSETTER(
unsigned int,Z,sampleSize)
47 GETTERSETTER(
unsigned int,W,channels)
48 GETTERSETTER(
void*,Data,data)
60 inline Wave&
Format(
int SampleRate = 0,
int SampleSize = 0,
int Channels = 2) {
61 ::WaveFormat(
this, SampleRate, SampleSize, Channels);
66 return ::WaveCopy(*
this);
69 inline Wave&
Crop(
int initSample,
int finalSample) {
70 ::WaveCrop(
this, initSample, finalSample);
75 ::ExportWave(*
this, fileName.c_str());
79 ::ExportWaveAsCode(*
this, fileName.c_str());
91 return ::LoadSoundFromWave(*
this);
95 return ::GetWaveData(*
this);