13#ifndef RAYAUDIO_MODULE_HPP
14#define RAYAUDIO_MODULE_HPP
16#include "IAudioModule.hpp"
46 const char *
type()
const override {
return IAudioModule::contract; }
47 const char *
name()
const override {
return "raylib"; }
56 void deleteMusic(audio::IMusic *music)
override { drop(music); }
68 audio::ISound *
createSound(audio::ISoundBuffer *buffer)
override {
69 if (!buffer || !start())
74 void deleteSound(audio::ISound *sound)
override { drop(sound); }
81 raylib::InitAudioDevice();
85 if (!raylib::IsAudioDeviceReady())
94 raylib::CloseAudioDevice();
100 void drop(T *
object) {
110 unsigned _opened = 0;
111 bool _started =
false;
L'ouverture du peripherique audio de raylib, comptee par reference.
Definition RayAudioModule.hpp:40
void deleteMusic(audio::IMusic *music) override
Definition RayAudioModule.hpp:56
audio::ISound * createSound(audio::ISoundBuffer *buffer) override
Definition RayAudioModule.hpp:68
~RayAudioModule()
Definition RayAudioModule.hpp:44
audio::IMusic * createMusic(std::string path) override
Definition RayAudioModule.hpp:50
const char * name() const override
Definition RayAudioModule.hpp:47
const char * type() const override
Definition RayAudioModule.hpp:46
void deleteSound(audio::ISound *sound) override
Definition RayAudioModule.hpp:74
void deleteSoundBuffer(audio::ISoundBuffer *buffer) override
Definition RayAudioModule.hpp:65
audio::ISoundBuffer * createSoundBuffer(std::string path) override
Definition RayAudioModule.hpp:59
raylib music stream.
Definition RayMusic.hpp:28
Raylib SoundBuffer class - owns the loaded samples (raylib's own LoadSound() result)....
Definition RaySoundBuffer.hpp:25
Raylib Sound class - a LoadSoundAlias() of a RaySoundBuffer, does not own the buffer....
Definition RaySound.hpp:31