VoxelEngine/src/audio/NoAudio.cpp
Vyacheslav Ivanov bbf33e8e4d
format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 19:53:48 +03:00

27 lines
602 B
C++

#include "NoAudio.hpp"
using namespace audio;
NoSound::NoSound(const std::shared_ptr<PCM>& pcm, bool keepPCM) {
duration = pcm->getDuration();
if (keepPCM) {
this->pcm = pcm;
}
}
std::unique_ptr<Sound> NoAudio::createSound(
std::shared_ptr<PCM> pcm, bool keepPCM
) {
return std::make_unique<NoSound>(pcm, keepPCM);
}
std::unique_ptr<Stream> NoAudio::openStream(
std::shared_ptr<PCMStream> stream, bool keepSource
) {
return std::make_unique<NoStream>(stream, keepSource);
}
std::unique_ptr<NoAudio> NoAudio::create() {
return std::make_unique<NoAudio>();
}