mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
audio system basic interface
This commit is contained in:
parent
7cde1e8ac9
commit
97539aa9f4
12 changed files with 528 additions and 320 deletions
18
src/audio/NoAudio.cpp
Normal file
18
src/audio/NoAudio.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include "NoAudio.h"
|
||||
|
||||
using namespace audio;
|
||||
|
||||
NoSound::NoSound(std::shared_ptr<PCM> pcm, bool keepPCM) {
|
||||
duration = pcm->getDuration();
|
||||
if (keepPCM) {
|
||||
this->pcm = pcm;
|
||||
}
|
||||
}
|
||||
|
||||
Sound* NoAudio::createSound(std::shared_ptr<PCM> pcm, bool keepPCM) {
|
||||
return new NoSound(pcm, keepPCM);
|
||||
}
|
||||
|
||||
NoAudio* NoAudio::create() {
|
||||
return new NoAudio();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue