Audio: Rewrite audio module
This commit is contained in:
@@ -31,7 +31,7 @@ SCENARIO("Music", "[AUDIO][MUSIC]")
|
||||
|
||||
THEN("We can play it and get the time offset")
|
||||
{
|
||||
Nz::Audio::Instance()->SetGlobalVolume(0.f);
|
||||
Nz::Audio::Instance()->GetDefaultDevice()->SetGlobalVolume(0.f);
|
||||
|
||||
music.Play();
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
@@ -44,7 +44,7 @@ SCENARIO("Music", "[AUDIO][MUSIC]")
|
||||
music.SetPlayingOffset(3500);
|
||||
REQUIRE(music.GetPlayingOffset() >= 3500);
|
||||
|
||||
Nz::Audio::Instance()->SetGlobalVolume(100.f);
|
||||
Nz::Audio::Instance()->GetDefaultDevice()->SetGlobalVolume(100.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ SCENARIO("SoundEmitter", "[AUDIO][SOUNDEMITTER]")
|
||||
sound.SetPosition(Nz::Vector3f::Zero());
|
||||
sound.SetVelocity(Nz::Vector3f::UnitX());
|
||||
|
||||
REQUIRE(sound.IsSpatialized());
|
||||
REQUIRE(sound.IsSpatializationEnabled());
|
||||
REQUIRE(sound.GetPosition() == Nz::Vector3f::Zero());
|
||||
REQUIRE(sound.GetVelocity() == Nz::Vector3f::UnitX());
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ SCENARIO("Sound", "[AUDIO][SOUND]")
|
||||
|
||||
THEN("We can play it and get the time offset")
|
||||
{
|
||||
Nz::Audio::Instance()->SetGlobalVolume(0.f);
|
||||
Nz::Audio::Instance()->GetDefaultDevice()->SetGlobalVolume(0.f);
|
||||
|
||||
sound.Play();
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
@@ -39,7 +39,7 @@ SCENARIO("Sound", "[AUDIO][SOUND]")
|
||||
sound.SetPlayingOffset(3500);
|
||||
REQUIRE(sound.GetPlayingOffset() >= 3500);
|
||||
|
||||
Nz::Audio::Instance()->SetGlobalVolume(100.f);
|
||||
Nz::Audio::Instance()->GetDefaultDevice()->SetGlobalVolume(100.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user