iaudio 0.1.0
Contrat audio chargeable : IAudioModule
Loading...
Searching...
No Matches
IAudioModule.hpp
Go to the documentation of this file.
1
14#ifndef IAUDIO_MODULE_HPP
15#define IAUDIO_MODULE_HPP
16
17#include "IMusic.hpp"
18#include "ISound.hpp"
19#include "ISoundBuffer.hpp"
20
21#include "IModule.hpp"
22
23
28class IAudioModule : public IModule {
29
30public:
32 static constexpr const char *entry = "getAudioModule";
33
35 static constexpr const char *contract = "audio";
36
38 static constexpr const char *accepts[] = {"audio", nullptr};
39
40 virtual ~IAudioModule() = default;
41
42 // music - streams from disk, no buffer to share
43 virtual audio::IMusic *createMusic(std::string path) = 0;
44 virtual void deleteMusic(audio::IMusic *music) = 0;
45
46 // sound buffer
47 virtual audio::ISoundBuffer *createSoundBuffer(std::string path) = 0;
48 virtual void deleteSoundBuffer(audio::ISoundBuffer *buffer) = 0;
49 // sound
51 virtual void deleteSound(audio::ISound *sound) = 0;
52};
53
56#endif /* !IAUDIO_MODULE_HPP */
A vendor's audio factory : music streamed from disk, sample buffers, and the sounds that reference th...
Definition IAudioModule.hpp:28
virtual void deleteSound(audio::ISound *sound)=0
static constexpr const char * entry
Symbol the loader looks up : present = this vendor does audio.
Definition IAudioModule.hpp:32
virtual audio::IMusic * createMusic(std::string path)=0
static constexpr const char * contract
Ce que type() doit rendre.
Definition IAudioModule.hpp:35
virtual audio::ISound * createSound(audio::ISoundBuffer *buffer)=0
virtual void deleteSoundBuffer(audio::ISoundBuffer *buffer)=0
static constexpr const char * accepts[]
Aucune sous-famille pour l'instant.
Definition IAudioModule.hpp:38
virtual ~IAudioModule()=default
virtual audio::ISoundBuffer * createSoundBuffer(std::string path)=0
virtual void deleteMusic(audio::IMusic *music)=0
Definition IMusic.hpp:19
Loaded audio samples, independent of any ISound that plays them - deleting every ISound built from a ...
Definition ISoundBuffer.hpp:24
Definition ISound.hpp:19