Audio: Add dummy device (in case OpenAL fails to load) and unifiate unit tests
This commit is contained in:
26
include/Nazara/Audio/DummyAudioSource.inl
Normal file
26
include/Nazara/Audio/DummyAudioSource.inl
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - Audio module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Audio/DummyAudioSource.hpp>
|
||||
#include <Nazara/Audio/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline DummyAudioSource::DummyAudioSource(std::shared_ptr<AudioDevice> device) :
|
||||
AudioSource(std::move(device)),
|
||||
m_playClock(0, true),
|
||||
m_status(SoundStatus::Stopped),
|
||||
m_position(Vector3f::Zero()),
|
||||
m_velocity(Vector3f::Zero()),
|
||||
m_isLooping(false),
|
||||
m_isSpatialized(true),
|
||||
m_attenuation(1.f),
|
||||
m_minDistance(1.f),
|
||||
m_pitch(1.f),
|
||||
m_volume(1.f)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Audio/DebugOff.hpp>
|
||||
Reference in New Issue
Block a user