mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
memory-related refactor
This commit is contained in:
parent
f47c7d00a2
commit
c5f663b7cb
16 changed files with 205 additions and 209 deletions
|
|
@ -389,7 +389,7 @@ std::unique_ptr<Stream> ALAudio::openStream(std::shared_ptr<PCMStream> stream, b
|
|||
return std::make_unique<ALStream>(this, stream, keepSource);
|
||||
}
|
||||
|
||||
ALAudio* ALAudio::create() {
|
||||
std::unique_ptr<ALAudio> ALAudio::create() {
|
||||
ALCdevice* device = alcOpenDevice(nullptr);
|
||||
if (device == nullptr)
|
||||
return nullptr;
|
||||
|
|
@ -400,7 +400,7 @@ ALAudio* ALAudio::create() {
|
|||
}
|
||||
AL_CHECK();
|
||||
logger.info() << "initialized";
|
||||
return new ALAudio(device, context);
|
||||
return std::make_unique<ALAudio>(device, context);
|
||||
}
|
||||
|
||||
uint ALAudio::getFreeSource(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue